**** BEGIN LOGGING AT Wed Nov 27 03:00:00 2013 Nov 27 03:00:11 alex_PP: how do I get the default whistle notification sound? Nov 27 03:01:06 no idea Nov 27 03:01:10 mediascanner? Nov 27 03:01:58 I know how to get the notification sound the user set, but not specifically the whistle sound Nov 27 03:03:31 <|0xD34D|> What whistle sound? Nov 27 03:05:17 the notification whistle Nov 27 03:05:27 <|0xD34D|> my device does not have a whistle sound Nov 27 03:07:22 oh Nov 27 03:07:41 I have a Galexy S3 Nov 27 03:19:59 Hi, can anyone explain to me what the "Master password" is for when signing on Android Studio? Nov 27 03:20:06 Do I have to set one up? or can i skip it? Nov 27 03:20:16 basically Nov 27 03:20:20 1 password for all ur shit Nov 27 03:20:30 gihtub,svn,bitbucket, etc. Nov 27 03:20:32 haha.. can i skip it? Nov 27 03:20:54 uhh Nov 27 03:20:57 its nice to set it up Nov 27 03:21:45 umm.. ok.. Nov 27 03:22:19 well what else do you want from me :P Nov 27 03:27:18 how can i migrate an intellij maven android project to a gradle android studio project? Nov 27 03:31:52 neer: cant you just import it? Nov 27 03:32:43 desmin88: do you mean just run it in android studio with maven? Nov 27 03:33:01 no i think as will import it Nov 27 03:33:03 to gradle Nov 27 03:40:42 Anybody feeling generous enough to help me with master/detail with 1 activity/2 fragments? Nov 27 03:48:35 okat :( Nov 27 03:48:43 fck, okay* Nov 27 03:50:39 how do I get the URI of an embedded file Nov 27 03:54:36 desmin88: i've never done it, but what's the question Nov 27 03:55:06 How can it be done with only 1 activity Nov 27 03:55:07 and 2 fragmetns Nov 27 03:55:17 fuck it Nov 27 03:55:21 im just going to use 2 activites Nov 27 03:55:23 and 2 fragments Nov 27 03:56:16 activity initializes the fragments then passes the detail fragment to the master fragment Nov 27 03:56:16 that just seems so damn verbose Nov 27 03:56:28 so the master fragment can tell the detail fragment to load something Nov 27 03:56:53 that would be my assumption anyhow Nov 27 04:02:14 how do I get the URI of an embedded file Nov 27 04:03:00 MDTech-us_MAN: thats easily google-able Nov 27 04:04:20 nothing here: https://www.google.com/search?q=get+the+URI+of+an+embedded+file+android Nov 27 04:04:58 desmin88: a link maybe!? Nov 27 04:05:15 "embedded file" Nov 27 04:05:16 ? Nov 27 04:06:52 as I was calling brunch to my device, I get the following error: make: *** No rule to make target `/home/anonynimity/Phablet/out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp', needed by `/home/anonynimity/Phablet/out/target/common/obj/APPS/GalaxyS3Settings_intermediates/src/R.stamp'. Stop. Nov 27 04:07:02 does anyone know what I can do to fix this? Nov 27 04:07:32 sounds like an #android or #android-root question Nov 27 04:07:48 Crimson_Rogue: predominately app-dev here Nov 27 04:08:36 I've been working on this for 3 days, with a friend helping me... I just want this to work... Nov 27 04:09:32 I added a file to my assets folder Nov 27 04:09:35 Crimson_Rogue: unfortunately I don't know that anyone here does rom building, since it's predominately an app-dev channel Nov 27 04:09:53 I've done rom building, but never encountered said error. Nov 27 04:10:58 MDTech-us_MAN: Google "android asset file uri" Nov 27 04:15:22 Crimson_Rogue: sorry, but I haven't encountered it, I don't know. You'll probably have better luck in a channel dedicated to either rom building or ubuntu touch; messaging me won't do you any good since I simply have no experience with it. Nov 27 04:19:43 fck man master detail gets complicated. Nov 27 04:26:56 dragorn: yes but how would I tell if i can have both fragments shown Nov 27 04:32:23 desmin88: as opposed to? Nov 27 04:32:30 1 fragment shown Nov 27 04:32:39 then show the second Nov 27 04:33:09 you mean when you're not on a tablet? Nov 27 04:33:10 show master/detail fragment together, as opposed to master then detail fragment Nov 27 04:33:25 presumably you'd have a different layout for different screen sizes Nov 27 04:33:42 uhh Nov 27 04:34:15 so your activity can determine if both are present or not and inform the fragments Nov 27 04:37:05 is there ever a requirement for a LocationListener to go in its own thread? why shouldn't I just always run it on the UI thread? Nov 27 04:38:02 canurabus: often you want locationlistener in a service, but if you only care about it being active while your activity is active it's probably fine Nov 27 04:39:33 hmm okay. its also weird how you can request location updates and specify a looper, but you can't do the same with gps status updates... (ie, LocationManager.requestLocationUpdates vs. LocationManager.addGpsStatusUpdates) Nov 27 04:40:11 There's lots of quirks in the API Nov 27 04:40:23 I don't know if there's a logical reason for that one, or if it's just a quirk. Nov 27 04:45:09 Is the main/ui thread of an activity suspended (blocked) when Activity.onPause() is called? If I start a LocationListener on the Activity's main thread and I want to log GPS position for example... if the user switches to another app (but doesn't exit my app) will it still keep logging? Nov 27 04:47:01 canurabus: no, it won't keep logging Nov 27 04:47:16 canurabus: hence, "usually you'd want it in a service, but if you only care about it working when your app is active..>" Nov 27 04:47:55 dragorn: I'm just having 1 layout for an activity, that activity determines if we can show both fragment at same time. If not, show 1 then the other. Nov 27 04:50:02 I desperately need a polite way to tell my boss that he's a retired accountant and really shouldn't be writing FAQs and other copy for our site... when he uses "notional", "initial", "thereafter" and "maximise" in a single sentence... argh Nov 27 04:53:50 ha Nov 27 04:54:00 sounds like how all our copy gets written Nov 27 04:54:10 but with worse spelling Nov 27 04:54:30 *better spelling Nov 27 05:17:09 Is this correct to build an int color? (red & 255) | ((green & 255) << 8) | ((blue & 255) << 16) | ((alpha & 255) << 24); Nov 27 05:19:59 or just 0xAARRGGBB? Nov 27 05:25:57 an int color? Nov 27 05:26:01 why would you need that? Nov 27 05:27:49 i use int colors for paints. i'm sure there are other methods for the (255,255,255) conversion, but simply put for int colors i use the 0xAARRGGBB format Nov 27 05:30:46 i have 4 floats Nov 27 05:31:08 i have do (int)(255 * Math.max(0, Math.min(1, red)) for R, G, B, and A Nov 27 05:31:19 then bitwiseOR them together Nov 27 05:31:23 to make an int :| Nov 27 05:31:31 to use for paints :I Nov 27 05:32:26 oh crap, this is the android channel Nov 27 05:32:32 either way... Nov 27 05:33:23 explodes: it should work to pack them as ARGB, yes Nov 27 05:34:11 explodes: quick google search http://stackoverflow.com/questions/18022364/how-to-convert-rgb-color-to-int-in-java maybe check that out Nov 27 05:34:40 explodes: but I think it's a << 24 r << 16 g << 8 b Nov 27 05:34:51 doh you're right Nov 27 05:35:02 other than that, should be fine Nov 27 05:35:18 coo Nov 27 05:35:19 thanks Nov 27 05:52:00 alex_PP: he's also written *55* FAQs for a site which hasn't launched yet!!! Nov 27 05:54:57 Hey guys quick question. I have java server on my pc and I am having my android devices connect to it. On the java server side would it be recommend for me to use JPanel to list my devices that are connected? Nov 27 05:58:35 Hello Nov 27 05:58:54 Has anyone tried googles new IDE based on IntelliJ yet? Nov 27 05:59:06 lots of people have Nov 27 05:59:12 Is is far enough along to start using VS Something like eclipse? Nov 27 05:59:35 yes Nov 27 05:59:46 Okay then, cause I love IntelliJ Nov 27 05:59:52 use IJ then Nov 27 06:00:05 Havent the slightest what Gadle is though Nov 27 06:00:10 It is IJ Nov 27 06:00:26 Just optimized for Android Nov 27 06:00:41 With things like Grandle Nov 27 06:00:46 I think. Nov 27 06:00:48 you can still use IJ though, AS is just an extension (but strangely enough with a lot of other stuff removed ) Nov 27 06:01:03 Yeah like the ADT Nov 27 06:01:11 was for Eclipse Nov 27 06:01:29 Was Eclipse, made for Android stripped of a lot of other stuff. Nov 27 06:01:41 But I hear Brandle is a good thing Nov 27 06:04:22 I am just a giuy who likes Python, knows very little java, hates XML.. that desperately wants to tap into the Android Market haha Nov 27 06:04:35 So anything that makes it any easier for me personally. Nov 27 06:10:19 What will be the first Kit Kat phone? Nov 27 06:10:32 n5 was Nov 27 06:12:40 lol. Nov 27 06:17:21 Hmm has no fancy GUI like eclipse to add buttons and such, guess its more XML based Nov 27 06:18:27 yes it does Nov 27 06:18:36 Click design Nov 27 06:18:40 instead of text Nov 27 06:18:42 Thanks Nov 27 06:18:43 in the xml editor Nov 27 06:18:45 yw Nov 27 06:18:56 I should find a tutorial haha Nov 27 06:19:06 although Nov 27 06:19:10 doing it by hand xml is prob bette Nov 27 06:19:49 Yeah I usually just use it for lie templates, then edit in XML Nov 27 06:19:59 But I am sure it is better to do it all in XML Nov 27 06:20:13 I don't edit the properties in the Design view at least Nov 27 06:20:13 i get a really rough outline with the design Nov 27 06:20:15 then tweak it Nov 27 06:20:27 I just hate ML's Nov 27 06:20:36 They make me sick Nov 27 06:21:00 ml's Nov 27 06:21:06 ? Nov 27 06:23:10 Markup Languages Nov 27 06:23:12 Sorry Nov 27 06:31:46 hi Nov 27 06:32:19 Why my generated apk by android studio does not pagckage the library to the classse.dex? http://imgbin.org/images/15819.png Nov 27 06:39:06 http://pastey.org/view/61c47bff Nov 27 06:39:43 Okay for some reason in the AS Design view when I use @string/beans it displays the String "Cheese" ? Nov 27 06:39:51 But there is my Strings.xml Nov 27 06:39:59 Is this bug or me? Nov 27 06:40:21 what? Nov 27 06:40:35 thats a feature, so you know what the @string/beans is Nov 27 06:41:08 Huh? Nov 27 06:41:39 I mean I am using @string/beans in the text property of a radio button Nov 27 06:41:59 but it displays the string "Cheese" instead of the string "Beans" Nov 27 06:44:00 desmin88: ? Nov 27 06:44:07 OH Nov 27 06:44:10 oh* Nov 27 06:44:10 no idea Nov 27 06:44:56 http://pastey.org/view/a6d29695 Nov 27 06:45:16 There is the Fragment Main xml Nov 27 06:48:45 Must be a bug, I dont get it Nov 27 06:50:11 check your strings Nov 27 06:50:13 clean rebuild Nov 27 06:50:15 u know the deal Nov 27 06:51:33 I did check my string Nov 27 06:51:36 I pasted them Nov 27 06:52:03 No matter what I put in the file for @beans I get Cheese in the emulator and in the preview and designer Nov 27 06:52:11 what on earth is happeneing Nov 27 06:55:54 does anyone have any clue whats going wrong using httpurlconnection http://stackoverflow.com/questions/20216091/httpurlconnection-and-multipartentity-without-apache-client? Nov 27 06:57:17 I think As is just way broken still Nov 27 06:58:55 it works fine for many people Nov 27 06:59:02 its probably a user error issue Nov 27 07:00:26 misterli: I think you are mistaken about how to represent the multipart http post Nov 27 07:00:54 yes? Nov 27 07:01:00 mmm .. is there a quick way to suggest fixs for developer.a.c doc pages? ... can't see anything obvious Nov 27 07:01:39 misterli: you are probably missing some equivalent of: Content-type: multipart/form-data, boundary=AaB03x Nov 27 07:02:10 misterli: note that the boundary must match with what is actually being used as the boundary in the mime Nov 27 07:02:20 array(1) { ["--jO0fHcdcvXC8ksLsK-_jWK4DdnO93EContent-Disposition:_form-data;_name"]=> ... Nov 27 07:02:54 I don't care what the request was parsed to, what you are sending is probably not coming with the right mime type & boundary definition Nov 27 07:03:12 I'd recommend sending it to netcat so you can see exactly what was submitted by the client Nov 27 07:03:23 good idea Nov 27 07:03:25 And correct request looks like this: http://chxo.com/be2/20050724_93bf.html Nov 27 07:05:46 hello, who know apn information for Morocco? Nov 27 07:10:39 wh-hw, this channel is for android app developers Nov 27 07:10:48 try google or xda Nov 27 07:17:50 canadiancow, ok, i know , but #android channel , no people answer me , so i try this channel Nov 27 07:17:53 No matter how many times I start the project over it keeps getting the wrong String literals from my Strings.XML when I do like @string/foo in a radio button? Nov 27 07:18:10 does anybody know that ? Nov 27 07:18:41 wh-hw, that is not an appropriate topic for this channel, please try somewhere else Nov 27 07:18:54 canadiancow, ok Nov 27 07:21:36 This is very frustrating :( Nov 27 07:21:47 It is working for every radio button but one every time Nov 27 07:21:51 wh-hw: have you tried googling it? Nov 27 07:22:05 Gentoon: what are you trying to do GEntoon? Nov 27 07:22:10 impedancee, yes, i tried Nov 27 07:23:05 impedancee: Just messing about with AS, making a simple lil app that builds a taco with some radio buttons. Nov 27 07:23:25 And every radio button is working except the first one Nov 27 07:23:42 like if I do MEAT Nov 27 07:23:48 in strings.xml Nov 27 07:24:26 and put @string/meat for the text property for a radio button it will be some other string like "Lettuce" Nov 27 07:24:41 does AS have a channel? Nov 27 07:24:48 Maybe it is some bug Nov 27 07:25:50 Gentoon, try cleaning and rebuilding Nov 27 07:25:53 keeps saying Olives! Nov 27 07:26:03 I did 3 times and started from scratch Nov 27 07:26:12 what do you mean cleaning? Nov 27 07:26:35 Build -> Rebuild Project Nov 27 07:27:12 haven't even built it yet Nov 27 07:27:22 OH so it's just showing wrong in AS? Nov 27 07:27:23 Just talking about what shows up in the design view Nov 27 07:27:33 try building it :P Nov 27 07:28:07 Has anyone used google play services on Genymotion? Nov 27 07:28:08 if I make a new string called meats and give it the value "Meat" and then reference @string/meats, it works Nov 27 07:28:22 But why is the designer doing that? Nov 27 07:29:48 because it's buggy? i don't know Nov 27 07:29:54 file a bug :) Nov 27 07:40:44 Has anyone compared ORMs libraries? Nov 27 07:42:50 swiggity swooty Nov 27 07:42:53 im comin for that booty Nov 27 07:42:57 oh uh. wrong channel Nov 27 07:46:28 So in Android.. Just to make a button do something like make a list and display it... I have to create a method for a on click listener, and create an intent? Nov 27 07:47:29 then I just run that method at the beginning of my main activity? Nov 27 07:49:29 sure Nov 27 07:56:13 This is so confusing haha Nov 27 07:57:23 Why does As create my MainActivity starting with Nov 27 07:57:27 public class MainActivity extends ActionBarActivity Nov 27 07:57:38 Why ActionBarActivity? Nov 27 07:58:00 alankila, here is the dump i can not figure out why its not processed correctly http://pastebin.com/gEHW0uye Nov 27 07:58:20 This template has me so lost I have no clue where to put the method for a OnClickListener for a stupid butoon Nov 27 07:58:24 Ugh, I fail Nov 27 07:59:49 why do you use as at all? use compatibility package and use the androids ActionBar Nov 27 08:02:11 misterli: What do you mean? Nov 27 08:02:28 I was testing it cause I have used IntelliJ before.. and liked it.. but hate Eclipse Nov 27 08:02:52 but I dont understand hald of the code it creates by default Nov 27 08:02:55 half Nov 27 08:04:58 4.4 documents URIs are invalid Nov 27 08:06:38 what Intent code would I use to display a list? Nov 27 08:07:30 i really hate the android api sometimes, so much code for simple things Nov 27 08:08:23 finally got master detail working, sort of Nov 27 08:08:32 http://pastey.org/view/5cb59d1a Nov 27 08:08:53 youd have to build an activity Nov 27 08:08:56 with a list in it Nov 27 08:09:20 I have that, but have no idea how to use Intent to do something like show a list.. Nov 27 08:09:27 Okay Nov 27 08:09:29 make an intent to start your activity Nov 27 08:09:55 Thanks I will try that Nov 27 08:24:23 so usually to create a new activity do you just make a new class file? Nov 27 08:25:34 is there a library which generate easy report and capture printstacktrace and upload it? and collect crashes and such (out of playstore) Nov 27 08:27:08 Gentoon: yes. Nov 27 08:28:18 I don't think learning Android on As is a good way to start Nov 27 08:28:26 the Templates it creates are way to confusing Nov 27 08:29:08 maybe you should check the android your first app tutorial Nov 27 08:29:31 haha I have done lots of those Nov 27 08:29:48 then you havent really learned yet Nov 27 08:29:50 go back Nov 27 08:29:50 none of them introduce me to any of this crap that is generated in a new project in AS Nov 27 08:30:08 No I have learned everything from those tutorials, the basic ones.. Nov 27 08:30:15 what is generated? Nov 27 08:30:22 that is confusing Nov 27 08:30:22 But all this Fragments and crap wtf Nov 27 08:30:47 OnOptionsItemsSelected method Nov 27 08:31:04 OnCreateOptionsMenu method Nov 27 08:31:15 thats not confusing Nov 27 08:31:22 and definitely was in the android dev tutorials Nov 27 08:31:33 and why does it start with public class MainActivity extends ActionBarActivity ? Nov 27 08:31:41 ... Nov 27 08:31:52 http://developer.android.com/training/basics/firstapp/index.html Nov 27 08:32:22 Why not just simpleOmg I have done many apps without any of this crap Nov 27 08:32:32 You do not need all of these methods Nov 27 08:32:40 Why are they generated? Nov 27 08:32:51 does anyone know a good place to start for creating an app which basicly shows the content of webarticles from a html webpage? Nov 27 08:32:58 Even ADT didnt generate all this crap for a new project Nov 27 08:33:07 Gentoon: lol. Nov 27 08:33:14 Sirolf: So you want to make a webapp? Nov 27 08:33:17 I am serious. Nov 27 08:33:41 I start a new project and get 70 lines of code.. Nov 27 08:33:43 desmin88: yes I guess so Nov 27 08:33:46 Gentoon: You have some learning to do. Nov 27 08:34:02 Sirolf: My opinion is, don't make a webapp, they suck. But if you must, look into phonegap/cordova Nov 27 08:34:34 desmin88: I have created many android apps Nov 27 08:34:41 Never needed any of this Nov 27 08:34:41 Sure Nov 27 08:34:44 I have Nov 27 08:34:46 I can show you Nov 27 08:34:50 ok Nov 27 08:35:05 I don't know if webapp is the right term ... I just want the written articles to be displayed in a cleaner way a mobile website can Nov 27 08:35:07 They are simple, but they still work.. and I did not need all this crap that is included Nov 27 08:35:09 webapps sux big time Sirolf Nov 27 08:35:20 Gentoon: ok Nov 27 08:35:29 Sirolf: Sounds like you need a nice HTML Parser library Nov 27 08:35:32 Java has lots Nov 27 08:35:44 hmm Nov 27 08:35:46 okay Nov 27 08:35:59 but why would a webapp suck that hard then? Nov 27 08:36:00 ;-) Nov 27 08:36:18 It wouldn't, they are trolls. Nov 27 08:36:19 native > webapp Nov 27 08:37:02 hmm I don't think I understand what you guys mean by "webapp" then I guess ;-) Nov 27 08:37:04 Just get a library like Twisted for parsing HTML intro readable Strings, or Arrays, or however you wanna format your data structure Nov 27 08:37:24 They think you want to make a native java web app Nov 27 08:37:25 hi! i have a little problem with keeping track with in what state a phonecall is. there is idle, offhook and ringing. but how can i find out if the phone is ringing while the user is already talking (offhook+ringing)? Nov 27 08:38:03 When you just want to make an android app tat parses some website for readable text and then returns it in some usable data structure for your app to neatly display Nov 27 08:38:17 I want to make a native android app ... just for the content I want to use the same text as is used in articles that are online on our website ... and then add some more sharing functionality Nov 27 08:38:28 Yeah kinda like I just said :) Nov 27 08:38:40 ;-) Nov 27 08:38:58 Easiest way is with an external lib Nov 27 08:39:05 I love some of thoses apps some news sites have Nov 27 08:39:15 I know many Python ones that would work, but I am new to java Nov 27 08:39:19 sure they have some as well Nov 27 08:39:27 thanks ... I'll look into it Nov 27 08:39:30 Ok Nov 27 08:39:43 I think our website uses joomla ... so maybe that will help as well Nov 27 08:40:04 Yes Joomla has n easy to use API Nov 27 08:40:26 joomla api for android? Nov 27 09:05:49 Whatsup fellow latenight devs? Nov 27 09:13:58 Brian|CS, nothing, just eating memory. Nov 27 09:14:32 Sounds delicious Nov 27 09:15:02 i'm lazy, so instead of going downstairs to get my usual laptop, I'm installing my toolkit on this laptop I left in my room Nov 27 09:15:04 lol Nov 27 09:15:31 did you just "lol" at your own statement? Nov 27 09:16:14 Did you just judge me over the internets? Nov 27 09:16:37 yes Nov 27 09:17:11 Well then Nov 27 09:22:21 what event is returned when a touch listener is calling back ACTION_MOVE and the activity hosting the listener 's onPause is called? Nov 27 09:39:53 testing is hard. Nov 27 09:40:38 community testers fte Nov 27 09:40:40 ftw* Nov 27 09:41:42 it is Nov 27 09:41:58 how can i set custom multi element gradient of a GradientDrawable Nov 27 09:42:01 is it possibel ? Nov 27 09:42:03 possible Nov 27 09:42:22 I'm trying to rewrite this application so that it's more modular and easy to write tests for but this paradigm is very new and strange to me. Nov 27 09:42:42 especially since i'm using Volley so a lot of it is async Nov 27 09:43:08 http://stackoverflow.com/questions/4381033/multi-gradient-shapes/4381192#4381192 <— seems to be the only option, but i dont think its sane Nov 27 09:53:33 ah well. Nov 27 09:57:05 guess I have some abstraction to do. Nov 27 09:59:11 hi, i'm new in android, i'm googled a lot to solve this problem: i need to use usb devices in my app (usb-serial) and i want just grant permissions to my app one time and don't show permission popup dialog. When i click on "use as default app" my app starts when usb devices is connected, but it is not proper behavior, how to disable autostart my app? (i have USB_DEVICE_ATTACHED and device_filter in manifest) Nov 27 10:48:36 Is there a standard way of getting a string from returned javascript function in a webview? Nov 27 10:49:01 i've seen some strange hacks on stack overflow, but it would be nice to have something normal Nov 27 10:49:13 *synchronously Nov 27 10:57:05 i'm misunderstanding the documention. Nov 27 10:57:23 why does the documentation ( http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape ) example return a gradientdrawable, not a shapedrawable Nov 27 10:58:51 wmealing_: it could be a bug in the docs - it's happened before Nov 27 10:59:45 could be. Nov 27 11:10:32 If your primary testing device ran out of juice, is that a good reason to start slacking? :D Nov 27 11:13:01 ugh, the javascript interface for webviews is great in that you can go js->native Nov 27 11:13:06 but cant go native->js Nov 27 11:13:08 wtffff Nov 27 11:56:53 i wanna implement ActionBar in my app so i can have it on android 2 and 4; so is it a good practice to use Support Library v7? (i know about ActionBarSherlock but i prefer to use the Android API library) Nov 27 12:03:00 Yes Nov 27 12:03:12 god i hate java sometimes Nov 27 12:03:34 switch to ios and you can love obj-c at max Nov 27 12:04:33 even worse :< Nov 27 12:04:49 then you just better learn to program Nov 27 12:04:51 at least something. Nov 27 12:05:08 would rather just use a different language Nov 27 12:05:23 omid8bimo: New App? Nov 27 12:05:40 Then minSdk=15 and just use the native ActionBar. Nov 27 12:05:45 storkme: pick one of the other mobile ecosystems Nov 27 12:06:00 go to windows phone Nov 27 12:06:11 kakazza: yeah for a new app but i need it to support android 2.3 as well Nov 27 12:06:17 no java or obj-c worries there Nov 27 12:06:33 like android, don't especially like java Nov 27 12:07:14 omid8bimo: fair enough to use Support Library v7 Nov 27 12:07:31 * YuviPanda too would like to live in a magical world where 2.3 support doesn't matter Nov 27 12:08:36 YuviPanda: so great. i can use support lib v7 without any trouble to have actionbar in android 2 Nov 27 12:08:46 2.3 yeah Nov 27 12:08:57 is it true that it's faster than using ActionBarSherlock? Nov 27 12:09:03 Define faster Nov 27 12:09:19 over 9000? Nov 27 12:09:23 works flawless Nov 27 12:09:40 or better to use ? Nov 27 12:10:01 Also, if your app ends up not using some of the more useful APIs from 14+ because of it, it's not worth it. You'll basically have an app where 70% of the users potentially miss out on great things. Nov 27 12:10:04 im kinda leveling what's the use of ActionBarSherlock when you can use support lib v7 to have actionbar in older androids Nov 27 12:10:46 ABS has been around for months (even years) longer than AppCompat. I used it since version 4.1.0 and never had problems. Nov 27 12:10:48 because ABS was pre AB compat Nov 27 12:10:58 ABS is deprecated and has been for a while Nov 27 12:10:59 Nowadays, I go for minSdk 15 Nov 27 12:11:08 i would like to have put more information as drawables in xml, but it seems the system is just not quite powerful enough out of the box. Nov 27 12:11:18 unless i'm missing a bunch Nov 27 12:11:53 ABS is "deprecated" in the sense that Jake doesn't want you to use it anymore and go for minSdk=14 Nov 27 12:11:56 AFIAK Nov 27 12:11:58 AFAIK* Nov 27 12:15:27 hi, all! I need to create idc file for the 3M touchscreen... what should be the name of file if the system names this touchscreen as '3M 3M USB Touchscreen - EX II'? Nov 27 12:18:55 i gotta write my own.. i would expect this to be .. already done.. guess not Nov 27 12:19:27 all right. so i guess using support lib v7 is ok for just having the actionbar show up in android 2.3 Nov 27 12:19:52 Yeah Nov 27 12:19:53 you would need to use it Nov 27 12:20:19 kakazza: one question though, what do you by not using more useful APIs from 14+ because of it (it meaning support lib v7)? Nov 27 12:20:45 you do a check for the version before doing it, or you see if there's a support class for that operation Nov 27 12:21:11 such as MenuItem, there's a support class in v7 that back ports to pre HC Nov 27 12:21:21 But sometimes, there isn't. And by dropping support for 2.x, you just don't have to care. Nov 27 12:21:29 for everything else do a check on the devices version using Build.OS.Version.SDK_INT Nov 27 12:21:44 or you just not support that specific feature on pre api 14 Nov 27 12:22:22 Meaning, if it takes you more time than your own userbase on 2.3, you're actually wasting time. Nov 27 12:22:50 If you see that 5% of your users are on 2.3 and you have to invest 20% of your dev time to support it... Nov 27 12:37:45 please, advice me. Nov 27 12:38:45 don't eat yellow snow Nov 27 12:39:16 ok Nov 27 12:39:24 y u troll CallumTaylor :-P Nov 27 12:39:34 i not troll Nov 27 12:39:40 i give advice Nov 27 12:39:44 fair call imho Nov 27 12:40:14 hehe, in a parallel universel; trolls admit trolling Nov 27 12:40:41 so, what reason is there for not having a paint objects and similar basic drawing primatives not in xml ? Nov 27 12:40:45 am i missing something Nov 27 12:41:27 ie, so you can initiate from an xml setting Nov 27 12:49:53 CallumTaylor: about touchscreen' name, please. Nov 27 12:52:39 hi guys! i have implemented a UtteranceProgressListener() for TextToSpeechEngine and i would like to let the speech engine continue with some more text, after it is done with speaking. is it good style to call tts from inside the OnUtteranceProgressListener? Nov 27 12:54:04 specifically UtteranceProgressListener.onDone() Nov 27 13:08:08 OMG, i've just found delphi for mobile Nov 27 13:08:41 does it come in mens Nov 27 13:16:06 hi all, I've been thrue a lot with that problem. anyone pleasr help me. So i need to send bitmap via sms, and via email. It works fine with email for now, but there's no way I can't handle it for sms, anything you find out wrong with my code http://pastebin.com/69xTLpFB? Nov 27 13:20:34 im reading a float value from a json using a json mapper Gson. The problem is that values get rounded by default, is there some way to just receive the original value? Nov 27 13:55:45 Has anyone compared the different ORMs libraries? Nov 27 13:59:18 when i try to use Bitmaps functions on my phone (decodeFile, createBitmap) i am always out of memory Nov 27 13:59:33 any way to go over this ? Nov 27 13:59:44 making me mad Nov 27 14:01:14 macTAR: what are you trying to do? Nov 27 14:01:29 Bitmap operations are generally quite expensive in terms of memory usage, hence your out of memories. Nov 27 14:01:52 hi to all, i need help to create a fragmentdialog with viewpager Nov 27 14:02:00 anyone can help me? Nov 27 14:02:47 Miklas: I am trying to rotate a jpg picture Nov 27 14:03:00 only way to do this is with matrix and bitmap Nov 27 14:03:13 There is always another way. Nov 27 14:03:35 For instance, generating an openGL texture from it, and use the GPU to rotate -- for example. Nov 27 14:03:48 Or using some image processing library Nov 27 14:03:57 Or writing your own implementation of bitmap/rotation. Nov 27 14:04:24 How large is the picture we are talking about? Nov 27 14:04:32 (in pixels) Nov 27 14:06:03 Miklas: 1232x2048 Nov 27 14:06:08 or bigger Nov 27 14:06:35 Still strange that you run out of memory for that. Nov 27 14:06:55 there is no problem with Galaxy s4 Nov 27 14:07:02 but gs2 crash Nov 27 14:07:04 always Nov 27 14:07:18 http://pastebin.com/L4Pf0u9c Nov 27 14:07:21 macTAR: how are you rotating? Nov 27 14:07:38 actually i do this and receive java.lang.IllegalStateException: Fragment does not have a view Nov 27 14:07:55 funkbox: with matrix Nov 27 14:08:04 like that bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); Nov 27 14:08:36 there exists a jpeg rotation that occurs directly on the data stream without fully decoding and recompressing it into memory Nov 27 14:08:45 might be worth looking into that option Nov 27 14:13:14 Hey all X) Nov 27 14:13:56 macTAR: that keeps two copies of it in memory Nov 27 14:14:29 macTAR: where is the original bitmap loaded? Nov 27 14:14:50 do you need it full size? Nov 27 14:14:53 original is the first argument "bitmap" Nov 27 14:15:29 no, where does the original come from Nov 27 14:15:39 its from a jpeg picture Nov 27 14:15:46 Anyone know how I can increast the OMX video encoders buffer size? Keep getting errors such as: [OMX.google.mpeg4.encoder] Codec's input buffers are too small to accomodate buffer read from source (info->mSize = 115200, srcLength = 460800) Nov 27 14:15:51 i decode it to bitmap Nov 27 14:16:06 and then i rotate Nov 27 14:16:15 when you decode, rotate it Nov 27 14:16:56 how many bits per pixel is that bitmap? Nov 27 14:17:10 ?? Nov 27 14:17:19 macTAR: or you could just use picasso and let it do everything for you Nov 27 14:17:50 1232*2048*32 = 80megs Nov 27 14:18:43 funkbox: i can rotate while decoding ? Nov 27 14:18:53 and picasso is a free library ? Nov 27 14:19:57 pduin: mega_bit_ Nov 27 14:20:06 Divide by 8. Nov 27 14:20:18 omg, noob mistake, sorry Nov 27 14:22:03 Hey all, I have a FragmentStatePagerAdapter: http://pastebin.com/Rzjpqt6G Nov 27 14:22:49 When I rotate the device it gives me the error "Fragment is not currently in the FragmentManager Nov 27 14:23:18 this error message comes from: t android.support.v4.app.FragmentManagerImpl.saveFragmentInstanceState(FragmentManager.java:589) Nov 27 14:27:09 anyone here got exp of creating a custom camcorder..? Nov 27 14:27:56 /quit Nov 27 14:28:02 * omid8bimo oops! Nov 27 14:36:22 ah yes, Ankhwatcher that is a known bug in the support libs implementation of the state pager adapter Nov 27 14:36:32 * Kegsay digs up relevant info on this Nov 27 14:37:37 hmm may have been http://code.google.com/p/android/issues/detail?id=37990 Nov 27 14:39:27 Has anyone here realized a proper working mqtt client? Nov 27 14:39:44 alankila: u got more information about that jpeg rotation ? i searching since many days and never found something else than bitmaps ! Nov 27 14:42:43 Can anyone recommend a method for persistant notifications? For instance, I send a push notification to the device, I want to do something every 30 seconds until it is noticed. Nov 27 14:43:12 http://pastebin.com/L4Pf0u9c "java.lang.IllegalStateException: Fragment does not have a view" Nov 27 14:43:17 need help Nov 27 14:44:47 plz Nov 27 14:44:48 does your Fragment have a view? Nov 27 14:47:02 yes Nov 27 14:47:06 i post the code Nov 27 14:47:24 http://pastebin.com/rEhqNZ2c Nov 27 14:47:49 what's imageview ? Nov 27 14:48:34 http://pastebin.com/ktwW6Xge Nov 27 14:49:25 ? Nov 27 14:51:54 so? Nov 27 14:54:30 xan_IT: what's the class hosting it? Nov 27 14:54:38 are you using support or the other fragments Nov 27 14:54:48 show us your whole code, including activity Nov 27 14:55:19 ok Nov 27 14:55:44 activity is a fragmentactivity Nov 27 14:58:00 http://pastebin.com/EXefaPLD Nov 27 14:58:13 this is all the code funkbox Nov 27 15:00:55 ? Nov 27 15:07:17 ? Nov 27 15:10:31 anyone can help me? Nov 27 15:16:00 What do you guys like better, Android Studio or Eclipse? Nov 27 15:17:30 AS Nov 27 15:21:07 so, this shouldnt worry me too much? Caution: Android Studio is currently available as an early access preview. Several features are either incomplete or not yet implemented and you may encounter bugs. Nov 27 15:21:19 I haven't found any issues with it Nov 27 15:21:23 and I work on production apps Nov 27 15:23:33 BankZ, to answer your first question, IDEA Nov 27 15:23:38 +1 to IDEA Nov 27 15:23:46 AS crashed on me a fair bit Nov 27 15:24:31 How much does IDEA cost? Nov 27 15:24:55 it's free Nov 27 15:25:05 http://www.jetbrains.com/idea/ Nov 27 15:25:21 just use the community edition Nov 27 15:25:35 hey guys Nov 27 15:25:51 would anyone know about ways to get sparse file support on the sdcard ? Nov 27 15:26:02 If it's not free Nov 27 15:26:07 you have to pay for it Nov 27 15:27:20 how's that relevant when it *is* free? -.- Nov 27 15:28:10 I thought AS was based on IDEA? Nov 27 15:30:21 it is Nov 27 15:30:29 but it's crapped by google, like everything else ;) Nov 27 15:31:51 I was checking out pre-order of Moto G Nov 27 15:32:07 I think that Moto X is better option when compared to Moto G Nov 27 15:32:47 more channel bands, customisation felxibility Nov 27 15:35:57 Looney: and, er - more than twice the price, and only available in one country? Nov 27 15:36:25 hmm, that bummer Nov 27 15:36:36 just noticed this on checkout Nov 27 15:36:45 I have to be married to an operator Nov 27 15:38:19 so, moto G it is then ? / Nov 27 15:38:31 I mean, its a cheap phone for testing and development Nov 27 15:51:38 mh, it's got a too large screen and no hw kb :p Nov 27 15:51:53 no external storage... Nov 27 15:52:21 otherwise it looks ok Nov 27 15:58:07 anyone know how I can run a Runnable() on the ui thread but then wait in the calling thread until that runnable completes? Nov 27 16:00:22 you don't want to do any waiting on the UI thread Nov 27 16:01:16 I'm using Activity.runOnUiThread() so if the calling thread is the UI thread it wouldn't 'wait' regardless Nov 27 16:01:32 that's not what you asked Nov 27 16:01:41 I want to run a task on the ui thread but have it be synchronous with the calling thread Nov 27 16:02:00 the calling thread may or may not be the Ui thread Nov 27 16:02:13 hello everyone! Nov 27 16:02:48 I updated my Nexus7 to KitKat today and from this update, I noticed that the custom font I am using in my app is not displayed anymore Nov 27 16:03:02 does anyone experienced the same ? Nov 27 16:26:22 hello Nov 27 16:34:20 is it possible to change actionbar's navigationbar on a viewpager dynamically? Nov 27 16:36:02 how do you mean[2~ Nov 27 16:36:51 sorry i mean navigationMode and not navigationbar Nov 27 16:37:03 Actionbar.setNavigationMode(); Nov 27 16:37:17 did you try setNavigationMode ? Nov 27 16:37:24 this is a method from the Activity Nov 27 16:37:53 yes, and i'm trying to change it from fragments in a viewpager Nov 27 16:38:17 i'm just asking if this a problem in doing it in a viewpager Nov 27 16:39:49 because my items are chaging as i move in the viewpager but the navigationmode is not changing Nov 27 16:41:45 paulovap, if it works from the activity, either use getActivity().set... or tell the activity to change it? Nov 27 16:43:26 i do that from my fragment and it works: getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); Nov 27 16:43:35 ( i use actionbarsherlock ) Nov 27 16:43:58 but i don't use a viewpager Nov 27 16:50:13 hello for a new application what android version should i choose ? (tablet only) Nov 27 16:51:15 Baluse, latest Nov 27 16:51:18 Hey I am just starting out with android dev and was wondering if anyone had any other resources for building a UI, I get how to place objects such as text and inputs into an activity however i am not sure how to kind of make them prettier :D eg like some of the http://android.inspired-ui.com/ Nov 27 16:51:19 latest API level Nov 27 16:52:29 autrilla i mean the minimum supported version Nov 27 16:53:39 Baluse, that is really your call. I'd go with Froyo Nov 27 16:53:53 oh i see Nov 27 16:54:02 i am thinking for 4.2 Nov 27 16:54:32 http://developer.android.com/about/dashboards/index.html Nov 27 16:54:39 this isnt for tablets Nov 27 16:54:58 aabsolute minimum api level for new apps: 15 Nov 27 16:55:06 imo Nov 27 16:55:15 still 26% at gingerbread Nov 27 16:55:18 Zharf: i'm doing exactly what you are telling, but it's not changing Nov 27 16:55:47 paulovap, what are you using as trigger for it Nov 27 16:56:04 shibakaneki: but you change navigationMode between fragments? Nov 27 16:56:29 yes Nov 27 16:56:58 paulovap, if you want to change it when user switches to another page, use the viewpager pagechangelistener or whatever Nov 27 16:57:12 I have one Activity and I display one Fragment at a time, every fragment provides its own actionbar elements and navigation Nov 27 16:57:33 Zharf: https://gist.github.com/paulovap/7679164 Nov 27 16:58:05 what method is that in -.- Nov 27 16:58:11 i'll go with 16 i guess Nov 27 16:58:14 onResume of fragment Nov 27 16:58:47 but fragments in viewpager don't get onresume like normal activities Nov 27 16:59:12 Hey Nov 27 16:59:12 hum..thats it Nov 27 16:59:34 must be it. Thanx Zharf Nov 27 16:59:42 paulovap, use the page chane listener thing Nov 27 17:00:26 question regarding IPC via services. A service runs in the UI thread. Now let's say I want to create a service offering a synchronous API that needs CPU intensive work to be done on the service side. How would one do it while still preserving a synchronous API? Nov 27 17:01:11 The service would have to delegate the work to a separate thread, but opon returning the API call would return without the actual result being available. Nov 27 17:01:16 Hey guys how are you doing this day. Nov 27 17:01:32 pleed, use asynch stuff instead :) Nov 27 17:01:47 pleed, futures, callbacks, etc are your friends Nov 27 17:01:53 Zharf: that's not an answer for "offering a synchronous api ;) Nov 27 17:02:24 wondering if this is possible at all Nov 27 17:02:32 If you want a synchronous api then you need to block until work is completed Nov 27 17:03:05 you can't really do it without disturbing things if it's bound to ui thread Nov 27 17:03:49 And there is no way in binder to delegate the "return sth. from bound service call to a worker thread?" Nov 27 17:04:46 Such that the caller will stay blocked until the worker thread decides to "return the API call" Nov 27 17:05:57 sure you can do that, but the caller shouldn't be in ui thread Nov 27 17:07:12 Zharf: yes of course. The caller would be allowed to be blocked. Do you have any hints where to look on how to implement it? Nov 27 17:07:13 Wouldn't the methods be called on whatever thread the other end decides to call it on? Nov 27 17:07:57 As in, you don't have to care.. just do your stuff Nov 27 17:09:01 SimonVT: The problem is on the service side: I can't abstract cpu intensive stuff behind a synchronous bounded service api call unless I know how to delegate the API return to a worker thread. Nov 27 17:09:52 Which is the whole point of my question: Is it possible to return from a bounded service api call in another thread than the ui thread. Nov 27 17:10:02 anyway, I made this weird way of syncing an async call: http://eclipser.xmms2.org/git/java-xmmsclient.git/tree/src/main/java/org/xmms2/eclipser/client/Client.java#n55 not sure if viable for you Nov 27 17:10:23 Zharf: that's on the caller's side, right? Nov 27 17:11:21 "Calls from a remote process are dispatched from a thread pool the platform maintains inside of your own process" Nov 27 17:11:49 So your api isn't called on the ui thread Nov 27 17:12:02 no it's the function implementation that someone can call and be blocked until it returns Nov 27 17:12:04 SimonVT: Android doc says, every services "lives" in the ui thread Nov 27 17:12:20 Yes, lifecycle methods are executed on the main thred Nov 27 17:12:59 SimonVT: that holds for an IPC call offered by a bounded service. So the IPC call is called on the ui thread Nov 27 17:13:11 But read the docs on aidl. If the call is from the same process, it happens on whatever thread made the call. If the call is from another process, it happens on a thread in a thread pool maintained by android Nov 27 17:14:37 So only if you call a method on your services from the main thread of the process the service is running in will it happens on the main thread Nov 27 17:14:42 SimonVT: It's inter-process ipc. But interesting. That leads to the question if it's possible to do an inter-process call using aidl without a service implementing the interface Nov 27 17:15:21 SimonVT: but yes, if it was only app internal, that would not be a problem. Nov 27 17:16:24 How is it a problem when it's another process? Nov 27 17:17:48 SimonVT: here is my perception of the problem: I'd like to offer an IPC interface to an arbitrary app. Currently I only figured out to do this with a service using aidl. If I do it with a service, the API is called on the ui thread which causes my synchronous-while-cpu-intensive problems. Nov 27 17:18:24 Maybe I should figure out a way to do IPC using aidl WITHOUT a service, such that the API is being called on another thread. Nov 27 17:18:31 But according to the documentation it doesn't happen on the ui thread Nov 27 17:19:01 SimonVT: it does according to http://developer.android.com/guide/components/services.html Nov 27 17:19:29 Yes, lifecycle methods happen on the ui thread Nov 27 17:19:36 http://developer.android.com/guide/components/aidl.html Nov 27 17:19:50 "Calls from a remote process are dispatched from a thread pool the platform maintains inside of your own process. You must be prepared for incoming calls from unknown threads, with multiple calls happening at the same time. In other words, an implementation of an AIDL interface must be completely thread-safe." Nov 27 17:19:53 SimonVT: so can I implement an aidl interface without using a service? Nov 27 17:20:05 that seems what the limitation is arising from Nov 27 17:20:05 != "Calls from remote process happen on the main thread" Nov 27 17:21:08 Expose the interface to clients Nov 27 17:21:08 Implement a Service and override onBind() to return your implementation of the Stub class. Nov 27 17:21:13 there we go Nov 27 17:21:53 which attribute do i use to specify a custom selector for the overflow menu list of the actionbar? Nov 27 17:21:57 but you could be right in saying that the implementation isn't called necessarily in the ui thread Nov 27 17:22:25 I'll check on that Nov 27 17:29:27 Hey guys, I've been told to use Maven to create a free version of my paid app but it seems complicated, is there a simpler way? Nov 27 17:36:12 CocoStorm: dunno if best soluton Nov 27 17:36:22 but what I did was make main project library Nov 27 17:36:30 should I Service or IntentService if I have to run a bluethooth always on server. It should be able to run tasks in parallel (just if bluethoot can trasfer data with two or more device in parallel. it is possibile? does it depends on bt version?) Nov 27 17:36:48 *I use Nov 27 17:36:51 and made 2 projects, free and paid, then added just files that was changed for free and paid Nov 27 17:37:03 probably overly complicated Nov 27 17:37:52 SimonVT: You're right. The service's lifecycle calls are on the ui thread. The actual IPC calls offered by the aidl interface implementation are NOT called in the ui thread. So my question was based on a wrong assumption. Thanks for clarification. Nov 27 17:38:08 XXCoder, probably the safest solution if you don't wanna screw things up though right? Nov 27 17:38:24 I guess so yeah Nov 27 17:46:26 Hey guys I am using gridlayout and was wondering how can I put the dividers of the gridlayout to invisible? Nov 27 18:05:32 how do i keep service alive when activity changes? Nov 27 18:06:21 service.staywithmebro() Nov 27 18:07:25 jaja would be nice Nov 27 18:07:40 I updated my Nexus7 to KitKat today and from this update, I noticed that the custom font I am using in my app is not displayed anymore Nov 27 18:09:01 Hi, I have a simpleAdapter which I'm putting some items in for display in a ListView. I've got a custom layout that I'm feeding into the simpleadapter constructor, but I'd like to alter text color in the custom layout depending on one of the items textView components . Is there a way to do this Nov 27 18:10:38 Acidic have you tryed the "if" statements Nov 27 18:10:52 MrMeTooo: what would i operate on within each condition Nov 27 18:11:05 the layout reference is just an id when I feed it into the simpleadapter Nov 27 18:11:47 post your code at http://pastebin.com/ then the link after Nov 27 18:11:58 I am in the process of making gists Nov 27 18:12:04 here is the layout Nov 27 18:12:05 https://gist.github.com/Lugghawk/f0049d4b2086445a45a5 Nov 27 18:12:50 yhats the xml post the java code Nov 27 18:12:59 yes im in the process of making it Nov 27 18:14:15 post after you make it Nov 27 18:14:19 burmat Nov 27 18:14:28 https://gist.github.com/Lugghawk/3431ab291989f7009169 Nov 27 18:14:32 got a updated question Nov 27 18:15:32 it's very barebones right now, but if the value I put into "item_time" ends up being less than 0, I want to change the color of that textview to red Nov 27 18:15:59 but since the layout R.layout.job_item is fed directly into the SimpleAdapter, I'm not sure how to change it Nov 27 18:25:31 Hi :) I have got a simple question about sending data throught a network. What do you think I should use ? IntentService asks to make a connection, perform the action then close the connection. Is there a way to keep it alive ? Nov 27 18:26:28 I thought about keeping the connection on a Service and using IntentService for downloading/uploading data. Nov 27 18:40:51 MrMeTooo: go ahead Nov 27 18:42:40 MrMeTooo: Sorry, disconnected by accident. go ahea Nov 27 18:44:03 I have got a general question if somebody knows: which thread do the operation, the one who creates the object or the one where the method is called ? Nov 27 18:45:14 burmat so i decided to ditch the passing information between activities due to the frustration and just add everything in one activity. But this time I'm using checkboxes when i add a new item to the listview check a box then add another it resets all check boxes to blank i want to keep what i checked Nov 27 18:47:49 So, I'm intending on publishing a basic little game on the app store, but would like to offer some free comic with it. Is there a way to 'gift' a person the comic (which could be separately published through the Play Store, perhaps), when they buy the game? Or is there some straightforward way (on a programming level), on presenting the comic from the game (in the form of a PDF)? Nov 27 18:48:12 MrMeTooo: I don't think I understand what you mean when you say "i'm using checkboxes when i add a new item to the listview". You are adding an entry to the listview and all of the entries have checkboxes? If you add a listentry, all of the checkboxes are reset? Is that your problem? Nov 27 18:48:38 Burmat Yes Nov 27 18:51:12 otherwise is there a more appropriate channel or place to the question? Nov 27 18:51:35 MrMeTooo: so when you add an entry to the list, you have to call notifyDataSetChanged to update the listview and this is reseting the checkboxes. What you have to do is save the current state of the checkboxes and then re-apply the states after you update with notifyDataSetChanged Nov 27 18:51:58 i had an Q/A I posted on SO on this type of behavioud when using a textwatcher, let me see if I can find it Nov 27 18:52:30 burmat make sense Nov 27 18:57:59 MrMeTooo: looks like I used SparseBooleanArray to get the positions of what items were checked and then put a value into a list. Then, when everything was updated, I would iterate through the listview and check all of the items in the list that were checked before. This was a hacked attempt because I couldn't figure out how to do it gracefully Nov 27 18:59:18 burmat gotcha... Nov 27 19:00:14 MrMeTooo: the solution is used can be found here: http://stackoverflow.com/a/12398006/586859 If you look at this code, you can see in beforeTextChanged() that I am getting all of the positions, pulling a String from the listentry, an storing it into an list. Then in afterTextChanged(), I am iterating through, checking to see if the item was stored into the list, and checking the checkbox if it was. Nov 27 19:00:44 this solution sends shivers down my spine though when it comes to bugs and performance, but you may have to resort to something like that. Nov 27 19:01:27 burmat ok i'll take a look Nov 27 19:02:13 every activity should have its own ServiceConnection ? or I can use a generic one? Nov 27 19:13:21 MrMeTooo: Also, check out this SO answer.. it may be easier to understand/implement and is surely faster: http://stackoverflow.com/a/19069888/586859 Nov 27 19:14:01 ok thanks Nov 27 19:21:35 hi Nov 27 19:21:51 I am currently developing an app which needs to count the amount of notifications that are currently in the drawer / have been received since a certain point in time. A nice extra would be the ability to distinguish between notifications from different apps. Nov 27 19:22:22 Anyone any ideas? I have no idea where to start as the NotificationManager class does not provide any helpful methods or attributes Nov 27 19:22:51 man, EditText.selectAll() sure does not like to work Nov 27 19:23:08 afaik, an application has no access to other application's notifications. even the ability to see them or know of their existance Nov 27 19:23:24 Well that's just a load of crap then. Nov 27 19:23:29 :/ Nov 27 19:25:00 Anyone ever have an issue trying to upload a new draft to Google play, and it says "Saved" but it doesn't actually overwrite your old draft? Nov 27 19:25:17 Isn't there any event that gets triggered / broadcasted when a notification is pushed? Nov 27 19:27:41 http://developer.android.com/reference/android/service/notification/NotificationListenerService.html there's this, but it's only in api 18+ Nov 27 19:28:06 thanks, I'll check it out Nov 27 19:29:29 Adults only API. Nov 27 19:29:42 That looks like the perfect solution Nov 27 19:29:48 But API 18... god dammit. Nov 27 19:30:12 That's about 1% of all devices lol Nov 27 19:30:23 or something along those lines Nov 27 19:32:13 2.3%, 130% more of what you thought! Nov 27 19:32:53 oddsenses_: so your app is going to be way ahead of the game Nov 27 19:33:02 2.3% of a heck of a lot of devices is still a heck of a lot of devices :) Nov 27 19:33:48 oddsenses_: imagine when android 1.0 was released, it was on very few devices. but people still developed for it Nov 27 19:34:10 yeah... Nov 27 19:34:22 oddsenses_: I think you may be out of luck buddy :/ NotificationManager is a system service, so you have very limited access to it Nov 27 19:36:43 I have got a general question if somebody knows: which thread do the operation, the one who creates the object or the one where the method is called ? Nov 27 19:37:37 if I call an operation on the onCreate in a IntentService, will the operation be on the intentservice thread ? Nov 27 19:37:46 oddsenses_: you can use Accessibility to get notifications on a notification Nov 27 19:37:47 oddsenses_: http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html Nov 27 19:38:17 <|0xD34D|> oddsenses_: you could do what apps did prior to API 18, use the accessibility api and listen for events of TYPE_NOTIFICATION_STATE_CHANGED http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#TYPE_NOTIFICATION_STATE_CHANGED Nov 27 19:38:20 oddsenses_: see http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html#TYPE_NOTIFICATION_STATE_CHANGED Nov 27 19:38:22 yeah Nov 27 19:38:30 Arkky: a normal java method call will *always* run on the same thread as it's being called on. Nov 27 19:39:07 but that method may then send a message of some sort to another thread, and some operation happens on that thread. Nov 27 19:40:04 <_genuser_> interesting problem: on emulator my widget with listview shows entries. On the phone, it just says "Loading..." for each item. Nov 27 19:40:09 Anybody having trouble with Instrumentation Tests in Android Studio 0.3.6? Nov 27 19:40:11 <_genuser_> has anyone seen this before? Nov 27 19:40:36 Thanks guys! I will look into it Nov 27 19:40:44 Oddly, they're not working from command line anymore either, so probably not related. Nov 27 19:41:07 But even checking out old code, I'm getting errors when trying to run them. Nov 27 19:42:58 "Unable to find instrumentation info for: ComponentInfo{com.socialradar.android/android.test.InstrumentationTestRunner}" is the command line error Nov 27 19:44:39 I get "Failure [INSTALL_FAILED_VERSION_DOWNGRADE]" when running from Android Studio, even if I uninstall the app beforehand Nov 27 19:55:50 <_genuser_> anybody work with listview on widgets? Nov 27 19:56:10 <_genuser_> mine load fine on emulator but on the actual phone, the listview items just say "Loading..." Nov 27 19:56:38 oddsenses_: you can't use accessibilityservice because it doesn't provide info about dismissing notifications Nov 27 19:56:54 hmm Nov 27 19:57:39 that makes sense I guess, I'm just thinking about if that would affect our use cases Nov 27 20:10:41 Got a Surface question for you folks. Nov 27 20:12:05 I create a class that extends SurfaceView. I can register the SurfaceHolder.Callback and get the SurfaceHolder on surfaceCreated/Changed, and from that I can get the actual Surface via getSurface(). Nov 27 20:12:40 Can I pass that Surface to a MediaCodec? Nov 27 20:13:09 For example, if I want to decode frames to the Surface. Nov 27 20:14:45 MrMeTooo are you still there? Nov 27 20:15:05 yes Nov 27 20:15:46 your checkboxes are loosing their state because during the scroll of the listview, android recycles the layouts used for each row Nov 27 20:16:10 this is an optimization pattern in android, to reuse the recycled layouts for the next items Nov 27 20:16:30 so you must create objects that store the states of your items and deal with objects instead Nov 27 20:16:34 shibakaneki but i havent begun scolling yet Nov 27 20:16:46 and it looses the state? Nov 27 20:16:59 ( i didn't read all the discussion ) Nov 27 20:17:25 I have an activity with two different views. If you're on a tablet, the view has two fragments, one of them is a list, and the other is a text field. When you click on an item on the list, it shows some text on the text field. If you're on a phone, the activity only contains the list, and starts a new activity with the text field when you select one. Nov 27 20:17:25 I don't know how to do the second one. I've done the update of the other fragment, but I can't see how I can update a new Activity's Fragment's text field. Nov 27 20:17:25 Here's how I've done the first one, it's in the list fragment: Nov 27 20:17:26 http://pastebin.kde.org/pvrp5zgen Nov 27 20:17:28 Any ideas? Nov 27 20:18:12 i did a small demo app that displays a listview with checkboxes and keep the states Nov 27 20:18:19 do you need to have a look at it? Nov 27 20:19:11 Boz0r: you need to pass a Bundle to the new activity Nov 27 20:19:28 and have it read the Bundle in onCreate Nov 27 20:19:40 shibakaneki yes i think that would help me out... basically imagine a notepad app with checkboxes...if i add my first entry of dog via edittext...with the number one checked when i add my second entry of cat all previous checkboxes will go blank Nov 27 20:19:50 Boz0r: don't start a new activity on the phone, just use the FragmentManager to put the text fragment onto the screen Nov 27 20:19:59 Hey anyone know how I can resolve this? : [OMX.google.mpeg4.encoder] Codec's input buffers are too small to accomodate buffer read from source (info->mSize = 115200, srcLength = 460800) Nov 27 20:20:14 (using setArguments and getArguments) Nov 27 20:20:35 But yea, I agree with TRomeo Nov 27 20:21:19 jaybobzin, there isnt a way to setMSize().. Nov 27 20:21:22 Use ft = getFragmentManager().beginTransaction(); ft.replace(…); ft.addToBackstack(null); ft.commit(); Nov 27 20:21:30 MrMeTooo: my app just displays a list with check boxes. When you check an item, its background color changes. This app also implements selectors so the 'pressed' color will change on both cases. There is also a small edit/normal mode on the actionbar that makes all row flip like cards. Nov 27 20:21:45 most of these features are not needed for you, but you can have a look at it Nov 27 20:21:56 here is the app on my github: https://github.com/shibakaneki/ListItemState Nov 27 20:22:08 lacx: was still speaking to Boz0r Nov 27 20:22:12 everyone can have a look at it if it helps ;) Nov 27 20:22:22 lol soz jaybobzin X) Nov 27 20:22:42 shibakaneki the color thing was a feature i planned to implement in the future Nov 27 20:22:53 so you will be happy with this code Nov 27 20:23:01 lacx: don't know about video codecs, but if I was having that trouble with images I would look to downsample the image Nov 27 20:23:06 maybe there's something similar Nov 27 20:23:28 lacx: You using MediaCodec? Nov 27 20:23:47 the card flip animation is a bit special so you can remove this part, just replace the ViewFlipper element in the layout of the listitem by your own layout Nov 27 20:23:48 yea I *could* use a tiny res jaybobzin just curious as to how to change it! Nov 27 20:23:56 Andrew76, no Nov 27 20:24:07 shibakaneki what file am i looking for? Nov 27 20:24:54 you should get all the project for a full understanding. I think it would be good Nov 27 20:25:07 but all the items important stuff is done in the Adapter: https://github.com/shibakaneki/ListItemState/blob/master/ListItemState/src/main/java/ch/shibastudio/listitemstate/StatedListAdapter.java Nov 27 20:25:08 TRomeo: Shouldn't I start a new activity if I want the Phone to show a new page with the text? Nov 27 20:25:10 whats MediaCodec Andrew76 ? Nov 27 20:25:42 lacx: http://developer.android.com/reference/android/media/MediaCodec.html Nov 27 20:26:07 shibakaneki ok thanks! Nov 27 20:26:13 Boz0r: not necessarily Nov 27 20:26:16 hello Nov 27 20:26:33 Boz0r: read this guide on fragments http://developer.android.com/guide/components/fragments.html it should give you some guidance Nov 27 20:26:44 has anybody in this channel ever worked in a radio or music app for android? Nov 27 20:26:51 A list-detail view is the first example they give Nov 27 20:26:55 you will see that every item in the list is described by an object that stores the states, like 'checked'. In the getView method, I check the state of the object related to the current position and check/uncheck the checkbox regarding the object's check state Nov 27 20:27:02 oooh nice didnt know about that Andrew76! im just using whatever is defined as QUALITY_HIGH Nov 27 20:27:04 I'm having trouble to stop de audio when receiving a call Nov 27 20:27:17 but will probably need to look at that in the future.. Nov 27 20:27:58 shibakaneki mine is similar http://pastebin.com/JS5nP8mj Nov 27 20:28:44 Gholias: you have to use the AudioManager system service to manage that sort of thing Nov 27 20:28:47 there is a guide here: http://developer.android.com/training/managing-audio/audio-focus.html Nov 27 20:29:10 thanks TRomeo, I will take a look Nov 27 20:32:20 TRomeo: spot on, very good, implementing right now Nov 27 20:32:44 :D no problem Gholias Nov 27 20:32:57 MrMeTooo: it's almost the same but in my Adapter I have this member: private ArrayList mItems; Nov 27 20:33:27 here is StatedListItem: https://github.com/shibakaneki/ListItemState/blob/master/ListItemState/src/main/java/ch/shibastudio/listitemstate/StatedListItem.java Nov 27 20:33:35 it contains the information "checked" Nov 27 20:34:29 shibakaneki so why does mine reset all checked boxes upon new entries Nov 27 20:35:16 you don't handle the checkbox state in your getView method Nov 27 20:35:46 in my case I do that in getView: holder.cbState.setChecked(mItems.get(position).checked); Nov 27 20:37:18 can you give me an example i get what you mean Nov 27 20:37:56 do you mean just and something simple like an if statement? Nov 27 20:38:01 I see many problems in your implementation. First problem is: in your click listener, you set the adapter of the listview: txtlist.setAdapter(add); Nov 27 20:38:32 it is bad for the performances and you will loose your other datas by doing that Nov 27 20:39:22 so, Your Activity contains a ListView and you must set only one Adapter for it. Then, you modify the content of this adapter Nov 27 20:39:54 you should add methods to add/remove/clear items in your adapter Nov 27 20:40:14 1 ListView -> 1 Adapter. And you deal only with the adapter Nov 27 20:40:43 so, create a class that describes what is an item in your list ( maybe, it's a text and a check state ). Nov 27 20:41:00 thought i was dealing with only one adapter Nov 27 20:41:04 then, when you add items, you add one object of this item descriptor in the Adapter Nov 27 20:41:33 you have only one adapter at a time but you set the adapter in the click listener. That means that you override the current adapter Nov 27 20:41:47 MrMeTooo: you should pause all thoughts, and just read&understand shibakaneki's statements :) Nov 27 20:41:56 I really recommend you to have a deep look at my project Nov 27 20:42:15 hehe thx canvs2321 Nov 27 20:43:17 i too as a beginner started down a path of when i change my data i re-set my listview's adapter to update with new data. but that was wrong. create one listview create one adapter, set them then just change data for adapter then notifyDataSetChanged Nov 27 20:43:20 when I started programming on android, I came on this IRC with the same questions :) it took me a lot of time to understand what's happening Nov 27 20:43:31 yup Nov 27 20:44:18 ok I'm taking note Nov 27 20:45:14 good luck;) Nov 27 20:45:29 &don't change an adapters data on a seperate thread, it not like :) but you are in total control, update your data, then notify the adapter of a change Nov 27 20:46:31 is it possible to extract multipart fields from an http-multipart upload BEFORE streaming it to something like busboy? Nov 27 20:46:40 i have a chicken and egg problem Nov 27 20:46:53 sorry, wrong channel! Nov 27 20:47:18 the android side of this actually works! :) Nov 27 20:47:25 what you should keep in mind is: getView, of the Adapter, only load a layout in a View and display it. You must see it like: "it will load a layout and he must put the correct content in this layout's elements" Nov 27 20:47:35 <_genuser_> is there any place in eclipse where we can check if it's seeing a phone over USB? Nov 27 20:49:05 getView is a skeleton loader for your ..._list_item.xml fill the fields from your adapter data for said adapter Nov 27 21:01:31 why does master detail have to be so complicated. Nov 27 21:03:00 being a master is? Nov 27 21:03:44 ok well its complicated, just dumb Nov 27 21:03:44 desmin88: it's not Nov 27 21:03:50 see above :P Nov 27 21:04:41 Every master/detail requires 4 classes, 4 xml files Nov 27 21:04:45 its getting crazy with all the shit i have Nov 27 21:04:58 thats bare minimum Nov 27 21:06:00 I found a nice library Nov 27 21:06:04 so thats gonna help Nov 27 21:07:56 <_genuser_> hmm, in textboxes, first letter isn't auto capitalized. I have to click on "shift". Is there an option to set it to automatically capitalize the first letter? Nov 27 21:09:16 _genuser_: ndroid:inputType="textCapSentences" Nov 27 21:11:03 <_genuser_> burmat: thanks. I was just about to start googling "capitalize first letter android textview". :) Nov 27 21:15:13 Can I launch a activity (or preferably a service) when inserting a USB device at the lock screen? Right now I am able to act, but only if the service was started before. Nov 27 21:17:18 how are you able to act? if you have a receiver in the service, why not put it in manifest? Nov 27 21:18:29 hmm, that might be the reason Nov 27 21:18:54 I insert an intentfilter in my service's onCreate, but have no in my manifest Nov 27 21:19:52 it looks like: ... Nov 27 21:21:01 then add it to somewhere you can act to launch your activity, or your prefered service :) Nov 27 21:21:02 does it make sense to move the intent-filter outside the service into a ? Nov 27 21:21:27 If you're listening for broadcasts it makes sense to use a BroadcastReceiver Nov 27 21:29:07 Q: Should loaders subscribe to content events themselves, or should the fragment initiating them subscribe to the events, and call forceLoad() on the loader? Nov 27 21:29:53 SimonVT, canvs2321: thanks, I will try to use use a BroadcastService child to start the service. Nov 27 21:29:57 Lekensteyn: in particular, you can't receive broadcast intents directly by your service. the service's intent filter only matches startService or bindService intents. Nov 27 21:30:39 the intent filter for a broadcast receiver only receives broadcast intents, and that for an activity, only startActivity intents. Nov 27 21:32:16 JesusFreke: well it appears that once a service is started, I can receive broadcast events I registered through registerReceiver (the manifest also has an additional inside ) Nov 27 21:32:45 Lekensteyn: right. your dynamically registered broadcast receiver is receiving them in that case, not your service. Nov 27 21:33:18 the dynamically registered broadcast receiver has nothing to do with any intent filter you declare in your manifest Nov 27 21:33:45 unless you're somehow inflating that into an IntentFilter and passing that to registerReceiver Nov 27 21:34:08 JesusFreke: oh, so having an in a is useless...? Nov 27 21:34:23 Lekensteyn: it's used for startService or bindService intents Nov 27 21:34:32 okay, that's clear then Nov 27 21:35:17 what process space does the broadcastreceiver run in? Can I make the service class implement the BroadcastReceiver and then immediately access the service's members? Or is that a bad idea? Nov 27 21:35:52 Typically, services are started using an explicit intent (one that has an explicit component name) though. So it's fairly rare that you actually need to declare an intent filter for a service Nov 27 21:36:14 Lekensteyn: all your components run in the same process, unless you take explicit steps to make that not so. Nov 27 21:37:13 java doesn't have multiple inheritance, so you can't have a single class that extends both Service and BroadcastReceiver Nov 27 21:43:45 I'm using DownloadManager to download some mp3-files in a application. Everything works fine, but i'm not able to remove the "Download complete notifcation" from the notification bar. I tried using downloadManager.remove(id) but this also removes the file completely.. (and gave me a 2 hour heacache). Are there any other ways to do this? Nov 27 21:48:33 I recommend ibuprofen Nov 27 21:50:44 Do you know if I can give a custome object to an IntentService class ? Nov 27 21:51:30 If I need to render a programmatically defined view on top of existing layout (without restructuring layout), what are my options? So far I only found a transparent activity... Any other options? Use case: a library that can be embedded into any app that renders a UI on top of app's layout. Nov 27 21:55:32 Arkky: what do you mean? Whether you can make on an Intent data to be any object? Nov 27 21:57:48 I have an object called O and I need to use O.method() in an other thread running in background (Intentservice is the best from what I've read). I need to create C class extends IntentService and use A.method() when the intentservice is ran Nov 27 21:58:00 I am not sure about the way to do it Nov 27 21:59:48 <_genuser_> pretty cool. installed google usb driver. forced updated SDK. forced updated ADT. Now thing works!!! Nov 27 21:59:51 <_genuser_> YAY!! Nov 27 21:59:56 <_genuser_> *nothing Nov 27 22:00:26 o_O hmm... Do you expect results of the O.method() to be visible in the original thread? Nov 27 22:00:47 yes Nov 27 22:01:17 Also, when you say "another thread" ... do you mean outside of your application runtime (background service)? Mind you, my experience with Android is pretty limited... Nov 27 22:01:33 Here is the problem: i'm doing a back up app and I need to keep connexion ON somewhere. I need to apply download/upload method in different thread not to freeze the UI Nov 27 22:01:55 yes background service Nov 27 22:03:09 hold, I think you might be confusing terminology. (think being operative word, as I said, pretty hazy with Android nouns here) Nov 27 22:03:39 Thread different from UI thread != background service running outside of application lifecycle Nov 27 22:04:08 <_genuser_> reverting to old build tools can be done by selecting older SDK Tools from the SDK Manger window, correct? Nov 27 22:04:11 If you want a thread - just spawn a thread and do whatever you need there. Nov 27 22:04:55 yes but the thread has to be in background Nov 27 22:05:01 not to freeze the UI Nov 27 22:05:07 no, don't just spawn a thread... use the android classes Nov 27 22:05:08 If i'm right (new to android app) Nov 27 22:05:17 AsyncTask or IntentService Nov 27 22:05:44 seand: Yes I want to use IntentService but I would like to give a custom object to IntentService Nov 27 22:05:51 and I am not sure how to do it Nov 27 22:06:05 can't you have the object implement Parcelable? Nov 27 22:06:09 Hmmm Nov 27 22:06:54 seand: he wants calls to be reflected in the original thread. Basically, he wants the same instance of an object visible from both threads (at least from what I understood so far). Nov 27 22:07:20 I don't know to be honest, I havn't looks at Parcelable class yet. It is just an object that create a session and a chanel to allow SSH connexion Nov 27 22:07:31 that's it Nov 27 22:07:35 AsyncTask should do fine, it should run in the same memory space and same instance should be visible. Nov 27 22:08:11 but Async leaks a lot and I will need to download very big files Nov 27 22:08:31 "leaks a lot"? how do you mean? Nov 27 22:08:53 memory leaks and if it last too long the UI freeze Nov 27 22:08:57 (don't mind me if you know what to do... I'm just curious at thsi point) Nov 27 22:09:50 I'm new to android app too, I wanted to keep a connexion open somewhere and during this time i'm doing operations on the distant server Nov 27 22:10:02 I don't want to disconnect and reconnect for every command Nov 27 22:10:09 Arkky: async does do those things/? Nov 27 22:10:15 Arkky: the UI is freezing on you because AsyncTask isn't executed on another thread by default Nov 27 22:10:26 Arkky: o_O a) I am not sure you are right about asynctask Nov 27 22:10:58 Arkky: b) ... isn't there an async download facility in Android that you don't have to manage from a separate thread? Nov 27 22:11:06 How do you draw a Picture with transparency? I have tried to wrap my Picture with a picture drawable, and its all like not drawing anything and stuff Nov 27 22:11:15 desmin88: seand: from what I've read, async is for very small operation that doesn't long more than 1 or 2 seconds. Here i'm considering keeping the connexion open for a few minutes at least Nov 27 22:11:31 Arkky: you want a service for that Nov 27 22:12:11 i do long operations with a Service+AsyncTask combo, you just want to be sure you call executeOnExecutor instead of execute Nov 27 22:12:15 Hey guys I just got a nexus 5 I was wondering where I can find the developer options on this thing? Nov 27 22:12:19 seand: Yes okay but for downloading/uploading/whatever commands I will run, I will need an IntentService. And I will need to give the connexion (object I guess) to the intentservice Nov 27 22:12:38 Can I turn it on from the ADB? Nov 27 22:13:04 andreyonadam: go to settings, about phone, and click on the last item 7 times Nov 27 22:13:07 (yes, really) Nov 27 22:13:21 i heard they removed developer options in nexus 5 Nov 27 22:13:39 seand: just the usual dance to get them Nov 27 22:13:48 JesusFreke: Thank's. Got it. Nov 27 22:14:12 that was done in.. 4.2? 4.3? can't recall Nov 27 22:14:21 just kiddin Nov 27 22:16:38 JesusFreke: Yeah I forgot. Thanks! Nov 27 22:16:54 seand: Maybe I can simply run a service in background on a other thread and giving it custom objects ? Nov 27 22:17:44 Arkky: I'm still not quite sure I'm reading the docs correctly, but... It looks like background service is similar to services in linux or windows - separate processes that run outside of any application it their own memory space. You can only talk to them exchanging data. If that's correct, you can't pass a connection to a service. Nov 27 22:17:55 Hello. I have a gridview with a base adapter holding a list of catagories in a list view. The grid view is a menu for changing the display order of the catagories. Everything is working except that 4 types are actually represented as one in the gridview, and which i enable by overriding getCount (to count for those of the same type, and returning only one for all of them). Nov 27 22:18:28 However, when I call notifyDataSetChanged, each of the 4 is now being displayed in the gridview, as if getCount is not getting called properly Nov 27 22:18:43 Arkky: you can pass URIs, service would open its own connection and you can control what service is doing. And you can quit your app and then restrat-reconnect to the service and it'll still be there. Nov 27 22:18:46 Arkky: yeah, you should be able to pass objects into the service via the Intent Nov 27 22:18:48 gverig: Okay thank you ! So the best option would be do connect and disconnect for any command I run on the distant server ? Nov 27 22:19:11 Arkky: but no, I don't think you will be able to pass around connections since they aren't just data, they have system resources allocated to them Nov 27 22:19:56 AsyncTasks sound better (or spawning your own thread if you feel adventurous) if your connection is managed in your application and has meaning only while app is running Nov 27 22:21:24 Arkky: no, if you have an service you should be able to establish and control a session e.g. via some kind of a Map where you would keep connections, state, last commands, etc. Nov 27 22:21:36 okay so, I run the connection in background in my activity and I use AsyncTack for upload/download commands ? Nov 27 22:22:57 Arkky: mmm... really depends on what you are doing, Nov 27 22:23:07 i am trying to get an app to work in the google chrome browser on android Nov 27 22:23:09 download and upload using SFTP protocol Nov 27 22:23:10 Arkky: IF you are just downloadign stuff, you could maybe look into DownloadManager Nov 27 22:23:16 My mind is burning ^^ Nov 27 22:23:18 is there some way to make it so css/js is redownloaded everytime Nov 27 22:23:27 I want to recode mine Nov 27 22:24:09 Arkky: aight. Do you want your downloads/uploads to contunue when you leave application? Nov 27 22:24:32 Would be really awesomm but maybe I'll try this later Nov 27 22:24:37 it's driving me farking insane Nov 27 22:24:47 gverig: at least while the app is running would be great Nov 27 22:25:58 whats a good windows application for making modifications to apps not created by myself? Nov 27 22:26:09 Holy FUCK I hate this project Nov 27 22:26:14 Arkky: aight. In application - either start your own thread or use a bunch of async tasks. Don't do *anything* with networking in the UI task (even DNS lookup is undeterministic and can lag). Use some sort of command queue to pass tasks between threads - don't spawn hundreds of parallel async tasks Nov 27 22:26:24 junkheadINC: eclipse Nov 27 22:26:33 link? Nov 27 22:26:43 junkheadINC: google android sdk Nov 27 22:27:00 i have Ideal ,Android Studio, apkedit Nov 27 22:27:02 junkheadINC: Your question became an oxymoron around "good windows application" :p (just being an arse) Nov 27 22:27:08 gverig: yeah I know that's what I need to run the connection in an other thread somehow and doing command in an other other thread Nov 27 22:27:49 gverig: but I don't understand the way to do this properly... Nov 27 22:28:44 Arkky: Sorry, "properly" depends on what specifically you are doing and what kind of granularity you need. Nov 27 22:28:50 i have eclipse...just havent set it up Nov 27 22:29:28 Arkky: I would I would probably spawn my own thread, use ConcurrentLinkedQueue for tasks and manage tasks that way Nov 27 22:29:51 gverig: okay and I open the connection there ? Nov 27 22:30:16 Arkky: depending on level of interaction you need (do you need to support multiple parallel downloads/uploads, to be able to cancel, to monitor progress,e tc.) specific model would be different. Nov 27 22:30:45 gverig: oh okay, I guess the simpliest to begin Nov 27 22:30:53 gverig: one at a time, no cancelling... Nov 27 22:31:08 gdoteof: how are you downloading css/js? Nov 27 22:31:23 seand: sorry it is not an 'app' Nov 27 22:31:25 it is a webapp Nov 27 22:31:27 Arkky: k. Then your commands are "download this URI to there" or "upload this file to this URI" (plus secutiry, etc.) Nov 27 22:31:39 i am just trying to make the google chrome browser not use cache Nov 27 22:31:41 ~pastebin Nov 27 22:31:45 oh Nov 27 22:31:51 and anyway i can do better to iterate Nov 27 22:31:53 gverig: yes exactly Nov 27 22:31:57 Arkky: one sec. Nov 27 22:31:59 everytime i want to clear it it is like 10 clicks Nov 27 22:32:02 er.. taps Nov 27 22:32:11 what i'd really like is some way to get a JS console Nov 27 22:32:12 or something Nov 27 22:32:17 this is outrageously annoying Nov 27 22:32:44 gdoteof: incognito tab shouldn't cache anything Nov 27 22:34:17 * gdoteof facepalms Nov 27 22:34:19 well Nov 27 22:34:21 thats a good idea Nov 27 22:34:40 gverig: If I do the very very easiest thing that is : connect, download, disconnect, the best way would be to simply implements runnable and do the stuff in an other thread, in background, right ? Nov 27 22:35:16 gverig: I think I will just put the "connection-only thread" aside for the moment and get back too it when my version 1 will be released Nov 27 22:35:23 how sensitive is an android device's GPS? Nov 27 22:35:32 Arkky: why would you use thread or runnable? you have the Android-specific classes Nov 27 22:35:50 Arkky: http://pastebin.com/niCKh6u6 Nov 27 22:35:52 could you accurately track the speed of your car? Nov 27 22:36:29 RustyShackleford: GPS varies widely among android devices Nov 27 22:36:32 Arkky: this is ugly as sin and won't scale. But the point is, your app passes commands via queue so actual procedural execution happens on the thread Nov 27 22:36:48 the error is absolute, not relative, so the faster you go the more accurate the speed is Nov 27 22:37:29 gverig: ooh awesome thanks a lot ! Yeah I wanted to do something really too much complicated with keeping the connection open somewhere Nov 27 22:38:23 Arkky: And you can. It's just more involved. Nov 27 22:38:34 does anybody know of an open source app using a master/detail pattern? Nov 27 22:39:45 gverig: okay if I'm more curious, how would you to that ? other simple thread ? Nov 27 22:41:13 Arkky: one sec. Nov 27 22:44:39 anybody? Nov 27 22:45:07 Arkky: something like this: http://pastebin.com/MFUuHZN4 Nov 27 22:45:58 Arkky: Again, this is *verry* rough. But it will support additional calls to get progress, cancel or tweak; it can support per-task callbacks and it will support multiple parallel tasks Nov 27 22:46:22 Arkky: e.g. if it's an interactive client and you are going through multiple sessions and want to maintain connections. Nov 27 22:46:42 g00s: the master/detail complexity is real. Nov 27 22:46:48 even with that librarry Nov 27 22:47:00 desmin88: whatchu tryin to do Nov 27 22:47:21 a simple master detail, one list, one view showing a selected item Nov 27 22:48:35 gverig: but on your last past you still connect and disconnect at any command Nov 27 22:48:36 Arkky: word of caution - there is a reason why seand told you not to use Thread directly, they can be notoriously tricky to get right just because you have to always remember what calls happen on what threads and it's easy to get wires crossed. Said that, good luck! Nov 27 22:49:11 and AsyncTask already makes this stuff easy for you Nov 27 22:49:16 like updating progress, etc Nov 27 22:49:24 Arkky: oh, sorry, I did not edit that part. You would probably have to end up with nonblocking queue and manage progress for all tasks Nov 27 22:49:58 seand: AsyncTask has one major flaw. And it's BAD. Nov 27 22:50:05 gverig: what is it Nov 27 22:50:12 seand: I've never used it :p Nov 27 22:50:12 okay thanks a lot both of you seand and gverig, I will print everything and read it again Nov 27 22:50:47 I will go with Threads Nov 27 22:51:00 seand: so while I can propose a design I know will work with Threads, I'd have to spend time figuring out which thread pools AsyncTask uses and it's life cycle. And I really have to get back to ... err... work :p Nov 27 22:51:25 gverig: good luck on your work and thanks again for everything :) ! Nov 27 22:51:28 you can specify executing them serially or on a thread pool Nov 27 22:51:49 seand: I just think 5 xml files, 4 classes (2activities, 2 fragments) and shit ton of intercommunication code is a little bit dumb Nov 27 22:51:56 Arkky: np Nov 27 22:52:42 I've tried 1 activity, 2 fragments, 3 xml files but havent had tons of success Nov 27 22:52:47 desmin88: couldn't you use 1 activity and 1 fragment for master, 1 detail Nov 27 22:52:53 that way it scales to tablets nicely Nov 27 22:53:14 ? Nov 27 22:53:32 you mean 1 activity, 2 fragments for a master/detail Nov 27 22:53:33 ? Nov 27 22:53:44 yeah, 1 fragment for master, 1 for detail Nov 27 22:53:55 im working on it Nov 27 22:54:09 i don't know how to do it though, i've just read about it Nov 27 22:54:34 exactly Nov 27 22:54:46 seand: I'm sure they are awesome since the book in front of me tells me to use it. I'll definitely need to read up on it. At this point though I wouldn't be able to tell him how to use it properly. I did tell to listen to you though. Nov 27 22:54:59 desmin88: i'm sure there's an example somewhere in commonsware's github Nov 27 22:55:23 gverig: we did warn him :) Nov 27 22:55:49 seand: Maybe you can help me out... If I need to render a programmatically defined view on top of existing layout (without restructuring layout), what are my options? So far I only found a transparent activity... Any other options? Use case: a library that can be embedded into any app that renders a UI on top of app's layout. Nov 27 22:56:14 all other options I found would require a cooperation with the app layout. Nov 27 22:58:23 Is there a way to have a base adapter only display a subset of the original list backing it? Nov 27 22:59:58 gverig: hmm, interesting... i'm not sure. maybe you can use the same method used by some apps that create a global floating shape? Nov 27 23:00:10 not sure what it's called, maybe this will help: http://stackoverflow.com/questions/18124153/how-to-add-a-floating-view-to-android-window-manager-and-listen-to-system-hardwa Nov 27 23:00:21 seand: thanks! Nov 27 23:03:51 desmin88: maybe something like this? it uses SherlockFragmentActivity... https://github.com/commonsguy/cw-omnibus/tree/master/LargeScreen/EU4You Nov 27 23:06:46 gverig: just going back to you for something fast: I don't see where to start the connection. In the run() ? Nov 27 23:08:56 yes, you definitely want all network operations to be contained on that separate thread (which is 'run') Nov 27 23:12:37 gverig: okay sure but if I understood well, the run() function is ran again and again, every time there is something new in queue it get poped Nov 27 23:12:59 so the connection function will be used again and again for every operation Nov 27 23:13:13 it's ok i'll use a boolean Nov 27 23:13:44 ahh... no. You would need while(true) int the run(). Or whie(isNotCancelled) { Nov 27 23:14:03 AAAAaaah Nov 27 23:14:40 But do read up on Runnable, Thread and AsyncTask before you dig much deeper. Nov 27 23:15:40 yes yes Nov 27 23:15:42 just perfect Nov 27 23:15:44 all is clear Nov 27 23:15:52 I will read the documentation and that conversation again Nov 27 23:20:03 seand: maybe maybe, but im using ABC Nov 27 23:20:15 ABC? Nov 27 23:20:28 action bar compat Nov 27 23:23:35 seand: I've messed around with this, but its total shit. http://pastebin.com/s53nvPha Nov 27 23:43:41 Hey anyone familiar with java jtables? Nov 27 23:44:44 maybe ask in #java Nov 27 23:47:02 I have a Picture Nov 27 23:47:21 How do I draw it with alpha transparency? Even if I have to rasterize the bitch, I gotta get some transparency Nov 27 23:48:01 Is rasterizing it the only way? Nov 27 23:48:46 Hi! I have a Action, with a two-pane layout, and a few buttons in the actionbar. When the user presses button1, it should load fragment1 in the 'sidebar' pane, and when the user presses button2, then fragment2 should be loaded in the sidebar. (in both cases leaving the main fragment visible in the left pane at all times). But what actually happens is that somehow fragment1 and fragment2 are swapped. When I use Log right before the FragmentTransaction, Nov 27 23:49:22 Here's the relevant code from the Activity: http://paste2.org/6dpChEtm Nov 27 23:50:19 fragment_view is not null when the tablet layout is being used (everything I just wrote applies to the tablet layout. No issues on phones) Nov 28 00:01:04 Is it wrong to mix fragments and supportfragments this way? because *not* mixing would mean that I'd have to implement my list-stuff twice (once as a fragment, and once as either a activity or a supportfragment) Nov 28 00:01:34 and please don't tell me to drop gingerbread support, just don't try that on me Nov 28 00:02:44 you shouldn't be mixing them no ... Nov 28 00:03:18 i can't really see what's going wrong here, run in debug and set some breakpoints Nov 28 00:03:52 Yeah, but that doesn't point to anything really wrong Nov 28 00:04:25 and I know I shouldn't, and it felt wrong to even try it, but this is definately not whet I expected Nov 28 00:04:41 I expected all sorts of exceptions being thrown, but not this Nov 28 00:05:18 this even looks like I can fix it by swapping a few lines of code around (but then that code would really be in the wrong place) Nov 28 00:05:23 this is so weird... Nov 28 00:05:53 but I'm going to move code to the wrong place, and add huge TODO and FIXME comments beside it Nov 28 00:06:13 and I'm going to buy cake at the moment I can drop GB support (which is not now) Nov 28 00:09:17 Does anybody have experience with videoplayers (mediaplayer)? I found docs saying stuff like "Android supports a limited number of simultaneous MediaPlayer objects" or "[multiple players] may cause subsequent instances of MediaPlayer objects to fallback to software implementations or fail altogether". Is there any statistics I can find about what to expect (e.g. 95% hardware will only allow one video player at at time)? Nov 28 00:12:04 gverig: I don't know of *any* piece of consumer hardware that can playback more than one video using hardware acceleration Nov 28 00:12:43 and you don't want to play video in software on a mobile device. it get's warm very quicly, adn then turns off even before you can even look at the battery usage :p Nov 28 00:13:10 aight... argh... you just answered my next question. Nov 28 00:13:40 I worked (as an intern) for a company that developed video monitoring systems Nov 28 00:13:41 Do you have any references (best practices, etc.) on that? Nov 28 00:13:54 or is this personal experience? Nov 28 00:14:21 and they used very low framerates on very big computers (7fps on a dual Xeon machine, because they recorded maybe 20 cameras) Nov 28 00:15:01 and the second thing is a bit exaggerated,, but some existing video players can do software rendering. you could try those on your device Nov 28 00:15:15 (it works quite well as long as you are plugged in to something) Nov 28 00:15:44 aight, thank you :( Nov 28 00:15:52 Will have to keep looking. Nov 28 00:16:04 wait a minute Nov 28 00:16:22 I'm going to do cpu usage benchmarks while playing video in hardware and then in software right now Nov 28 00:16:29 you'll want to know the results :) Nov 28 00:16:37 ahh, neat. thanks! Nov 28 00:17:17 Peetz0r: how do you control whether hardware acceleration is enabled for your player? Nov 28 00:18:09 MX Player has a button for it Nov 28 00:18:22 and it's a nice video player in general :) Nov 28 00:19:46 Hi I tried to build a dialog like this http://imgbin.org/images/15825.png And this is my code( http://dpaste.dzfl.pl/6095d12e ), but I always get the NPE, what's the problem? Anyone can check it is possible? Nov 28 00:20:00 JesusFreke: thank you for your tips, it is working as it should Nov 28 00:20:08 Lekensteyn: great :) Nov 28 00:21:10 how can I make wrap_content not wrap around text on a line not shown because of maxlines Nov 28 00:23:59 I am trying to save a file from a camera capture to the cache directory, and I'm not able to click on the OK button in the camera capture view. From research, this seems to mean that the path isn't valid. Nov 28 00:24:12 But the path is definitely valid as I have tried it in the debugger. Nov 28 00:24:22 One sec. Will pastebin code. Nov 28 00:25:00 http://pastebin.com/BvJe3qSV Nov 28 00:25:10 Okay, my phone is a JiaYu G3, with a MediaTek MT6577 SoC, 1ghz dualcore, 1GB ram. Results: http://paste2.org/G85NWX3y Nov 28 00:25:16 gverig: ^^ Nov 28 00:25:52 I was surprised by the 40% cpu usage even in hardware mode Nov 28 00:26:20 See http://stackoverflow.com/questions/7277287/default-camera-activity-not-finishing-upon-ok-button-press for an example of a similar issue. Nov 28 00:29:02 There's also an option sodecode audio in software, but that doesn't really change CPU usage but it does add visible lag Nov 28 00:29:14 decode* Nov 28 00:29:57 the results on paste2.org were all made using audio decoding in hardware, and the video looked smooth in both software and hardware :) Nov 28 00:30:06 http://stackoverflow.com/questions/1910608/android-action-image-capture-intent Oh boy... looks like it's a bug in Android. :P Nov 28 00:32:55 Oh, and the video I used is a 720p h264 video ripped from youtube (http://www.youtube.com/watch?v=JYtYCNkR1Yo; use a youtube-download-addon for your browser) Nov 28 00:38:21 Nevermind... Figured it out. Nov 28 00:38:39 Camera activity doesn't have access to my app folder. Nov 28 00:40:44 Someone should make that throw an exception or something... Nov 28 00:45:01 hey, stopService() won't kill off a service's process if another service lives in that same process, right? Nov 28 00:45:28 Peetz0r: Thanks, looking Nov 28 00:45:36 Peetz0r: (sorry, stepped away from the desk) Nov 28 00:45:53 (trying to figure out the best way for Notification actions to notify a service to do something without stepping through an Activity, so, it seems that Start Command arguments in a service PendingIntent are the best route to get a message to the process and my long-lived service) Nov 28 00:51:35 Peetz0r: Hmm... interesting. It actually does not look as scary as I expected and the phone spects don't seem to be super-hardcore (~ Galaxy Nexus level?) Nov 28 00:52:07 Then again, I don't know the phone hardware distribution. Nov 28 00:59:04 gverig: the phone was intoduced fall 2012, and I paid €160 or $200 for it february this year Nov 28 00:59:19 (but don't let those prices fool you, it's a chinese brand :p) Nov 28 01:00:22 my moms phone, with comparable specs (but a smaller screen, and crappy vendor-themed android 2.3 build) would've cost €320 at the same time Nov 28 01:00:38 Peetz0r: yeah, you mentioned it. Aight, so it seems that a) it does seem to work (at least in this test) b) I would much rather not do it. Argh... k, I'll keep looking. Thx! Nov 28 01:00:57 playing one video in software works Nov 28 01:01:04 more will not work Nov 28 01:01:40 also funny, I was just trying to run two Genymotion (android-in-virtualbox) devices Nov 28 01:01:40 and it worked Nov 28 01:01:45 it was painfulle slow, but okay Nov 28 01:01:50 Peetz0r: Well, the expectation is that only one video will play at a time but I might not be able to have MediaPlayer context released from the other player Nov 28 01:01:59 then i started my app (which uses Google Maps API v2) on them Nov 28 01:02:18 and it failed on the 2nd device, because opengl couldn't properly initialised Nov 28 01:02:26 it worked as soon as I killed the first device Nov 28 01:03:08 I don't have experience with video playback in my own apps, but if ther video's never playback at the same time it could work Nov 28 01:03:42 Peetz0r: Thank you, you've helped a lot! Nov 28 01:03:55 you're welcome Nov 28 01:04:24 I've bee thinking about testing this earlier, but I wasn't sitting behind my computer at that time Nov 28 01:04:37 so actually you've helped my finding a excuse to do it right now :p Nov 28 01:05:35 I have a connection dialog, where user can fill in some stuff, and I have a "more" button, where if they click that, they get 3 more editboxes to fill in Nov 28 01:05:48 do I really need to make an expandable listview for this or this there another way here? Nov 28 01:06:17 s/or this/or is Nov 28 01:17:55 So, I'm trying to get some data from JS out of a webview; and I want to keep the JS the same across iOS/Android as much as I can Nov 28 01:18:31 I have a JSInterface set to the webview, which is OK, but I can't reproduce everything, because it stores callback functions Nov 28 01:19:52 When my JSInterface gets called with, lets day, doTheStuff(String thingName, String jsonParams); and I want to get some more information that was not passed to me... Nov 28 01:20:50 Still having trouble with above camera issue, if anyone's interested. Nov 28 01:20:53 i'm thinking about just doing webView.loadUrl("javascript:MyJSInterface.continueDoingTheStuff( xx the info i need);"); and then continue doing the stuff in the 'continueDoingTheStuff' function Nov 28 01:21:01 Turns out the fix I found doesn't work. Nov 28 01:21:12 i'm pretty sure this is a feasible way of doing it, but is there any other way? Nov 28 01:21:20 any _better_ way? Nov 28 01:33:01 I have a listview and I've set fastScrollEnabled to true, but it won't work when I scroll (the scrollbar for it won't show). It does work correctly, though, when I have fastScrollAlwaysVisible to true Nov 28 01:34:34 how many items Nov 28 01:36:02 ~30 Nov 28 01:37:35 It looks like it needs a min number of items to kick in Nov 28 01:37:36 ? Nov 28 01:38:14 yes Nov 28 01:40:32 ok thanks Nov 28 01:41:03 is there a way to customize that number? Nov 28 02:24:58 will i be able to determine the speed at which someone is driving from GPS info? Nov 28 02:25:32 also, rougly how accurately does it determine your current location? Nov 28 02:26:39 RustyShackleford: Sha -ShAAH Nov 28 02:27:26 desmin88: haha this is the best username I ever registered Nov 28 02:27:28 https://www.youtube.com/watch?v=PTAXUYLbFYk Nov 28 02:27:30 under perfect conditions, accuracy could be around 1-2m Nov 28 02:28:04 and how often can you refresh location data? Nov 28 02:29:39 my idea is to monitor your location data while driving, and alert you if you are coming up on a speed camera Nov 28 02:30:13 and if possible, I'd like to alert the user and inform them that they are going faster than the speed limit Nov 28 02:30:39 I think you can do that, but it's battery-heavy Nov 28 02:30:53 eh, it's an experiment Nov 28 02:30:53 in fact, I'm pretty sure there are apps that do that - like waze, for example Nov 28 02:31:19 my S4 has amazing battery life actually Nov 28 02:34:00 would the the accelorometer be of any use? Nov 28 02:35:23 probably not Nov 28 02:41:36 hey how do you open the color swatch files from http://developer.android.com/design/style/color.html ? Nov 28 02:42:27 wait scratch that, i'm dumb Nov 28 02:42:33 i can just use the image on the page Nov 28 02:46:48 okay wtf... why is this blue action bar color appearing with a green tint? Nov 28 02:55:21 have a service that bind/unbinds in onStart/onStop during orientation changes, but onUnbind seems to takes too long to be called, even after onStart had been called **** ENDING LOGGING AT Thu Nov 28 02:59:58 2013