**** BEGIN LOGGING AT Wed Aug 13 02:59:58 2014 Aug 13 02:59:59 ic ic :) Aug 13 03:03:27 g00s: thank you phandroid is a nice site to surf Aug 13 03:05:50 hey is there any way to clear the current task for an app if it's launched with NEW_TASK ? Aug 13 03:06:55 if i open A -> B and then open A with flag NEW_TASK, if i press back it will go from A -> B -> A then home screen. that doesn't seem correct Aug 13 03:07:37 kamol also androidpolice.com Aug 13 03:15:24 g00s: thank you :) Aug 13 03:20:45 i like androidpolice because they call BS once in a while Aug 13 03:21:13 its kinda like the waitor you trust more: the one who recommends avoiding these dishes and getting those Aug 13 03:22:25 hm, so this little nokia handset is selling for $25 usd (for emerging markets) - the intreresting part is that it ties into the MS ecosystem Aug 13 03:25:24 jabza, Yeah. Aug 13 03:25:52 I just remade it, testing it now Aug 13 03:26:02 Oh, it looks like it might be a missing Theme.xml or something Aug 13 03:26:13 because of an error in the unpacking or so,mething Aug 13 03:26:31 But it works now that I just randomly remade it Aug 13 03:26:37 Maybe it was an error in how I had it installed originally. Aug 13 03:27:01 It does work, now. Aug 13 03:32:17 I have a native library in my apk (lib/armeabi/hello.so), but it doesn't get put in /data/app-lib/.../hello.so or anywhere else on the system. Am I doing something wrong? Aug 13 03:52:14 how do i change the language level in android studio? Aug 13 03:52:56 ctrl alt shift s -- it's under project Aug 13 03:53:28 bankai_au, that shortcut doesn't do anything for me Aug 13 03:53:34 what's another way to do it? Aug 13 03:54:12 it's 'project structure' Aug 13 04:02:13 hello, how to run JavaME application on Android? thanks. Aug 13 04:03:04 is anybody here knowledgeable on how to use MediaExtractor? Aug 13 04:05:17 I'm trying to extract the audio from a video into a WAV file. Need some clarification on some parts of the code. Aug 13 04:07:35 balr0g i'm gonna sound like one of those always-uses-proper-capitalization-and-punctuation pedants here, but: is that "hello, how to ?" construct an intentional grammar mis-usage, or is it the result of something else, possibly english not as a primary language? it's quite common and i'm genuinely wondering. Aug 13 04:11:39 sarbs: oh, you mind some spelling nazi or taliban? its ok... indeed english not my first language, but the result of that kind of writing is to see the real native english people to write and talk like with shortcuts and "incomplete", if you know/understand what i mean Aug 13 04:12:04 sarbs: can you help on how to run some JavaME application on an Android device, please? Aug 13 04:12:48 ok, so.. i'm still curious, is it a mistake? or intentional? Aug 13 04:13:17 i don't know anything about JavaME but i'll look into it briefly cuz i do know a lot about android, and seeing as how you're answering my q's i may as well try to help you too Aug 13 04:13:42 (if it's a mistake i'm genuinely not berating you for it, i'm srsly just curious) Aug 13 04:15:01 ah, JavaME is another embedded java platform. looks like there are porting tools (https://stackoverflow.com/questions/13321703/can-we-run-j2me-apps-on-android-phones) but that's what it'll be: porting an app from one platform to another Aug 13 04:16:19 the plain-old-java parts of an android app will compile just fine, but since J2ME lacks the Android framework classes, you'll run into a lot of trouble. i imagine it'd be very similar to trying to get a C application written for DOS to compile in Linux. Aug 13 04:18:19 sarbs: do you mean that the correct way would be something like: hello, how can i ? because I'm not sure what do you think could be the correct... so... and intentional wrong behaviour constantly repeated to forget was intentaional becomes a mistake? Aug 13 04:21:19 yes, that'd be the typically correct english grammar. your question wasn't at all unclear, i just see that particular "incorrect" usage very often and i'm a linguist geek, so i wondered if it was the result of a non-primary-language mistake, or if it was an intentional usage of an alternate grammar Aug 13 04:21:31 balr0g: you dont Aug 13 04:22:27 desmin88: what? about the porting application or about the spelling mistakes? Aug 13 04:22:45 running javame on android Aug 13 04:23:40 Anbody know about "exec format error " while loading modules Aug 13 04:24:12 desmin88: sorry, it's not my fault, it doesn't depend on me... i just need to get that JavME application running on Android Aug 13 04:24:22 which javame application Aug 13 04:24:42 desmin88: a customized developed one Aug 13 04:25:04 you can't run javame on android Aug 13 04:25:33 ^ Aug 13 04:25:37 desmin88: its for a friend.. some years ago i developed that JavaME application, now he needs it running on Android... its important to him, he will pay me, its important Aug 13 04:25:55 yes but how important is it Aug 13 04:26:00 pfn: maybe can i emulate JavaME on Android? Aug 13 04:26:11 desmin88: very important Aug 13 04:26:50 you most likely wont get it to work Aug 13 04:28:04 desmin88: i already recap and have the application running on JME SDK platform, i solved some environment bugs, and now is running... but he needs that on Android Aug 13 04:28:44 not gonna happen really Aug 13 04:28:46 i think this sarbs|away found could be helpful: https://stackoverflow.com/questions/13321703/can-we-run-j2me-apps-on-android-phones Aug 13 04:28:56 balr0g, no, you cannot Aug 13 04:29:09 honestly just rewrite the app for android Aug 13 04:29:16 android is not a jvm Aug 13 04:30:37 pfn: but can be emulated Aug 13 04:30:50 no Aug 13 04:31:40 desmin88: no man, i told him, he needs to do something with the JavaME code, and see that running on Android, just for this application Aug 13 04:32:13 just because he wants it bad doesnt mean you can magically make it work Aug 13 04:32:47 balr0g, no, it cannot be emulated Aug 13 04:32:55 i really want 2 girls at one time but Aug 13 04:33:12 sure you can, $$$ Aug 13 04:33:14 lol Aug 13 04:35:04 lol Aug 13 04:35:18 same solution for j2me/android, really Aug 13 04:35:19 $$$$$ Aug 13 04:35:23 but i think it can be emulated, basic stuff, not specialized libraries Aug 13 04:35:31 if you know so much about it Aug 13 04:35:34 sarbs: why? Aug 13 04:35:35 why did you come here Aug 13 04:35:46 balr0g $$$$$ to develop a J2ME platform that runs on Android Aug 13 04:36:04 in the same way that WINE runs Windows apps natively in Linux Aug 13 04:36:04 sarbs: oh, i see Aug 13 04:36:19 i need something already developed Aug 13 04:36:29 there isn't anything, sorry Aug 13 04:36:44 those tools i pointed out looked like they'd try to convert android/j2me calls Aug 13 04:36:57 i really want the game server to a 2004 closed beta client for my favorite game ever Aug 13 04:36:58 but what you're asking is basically akin to wanting to run ios apps on android Aug 13 04:37:15 but there isnt anything developed for it Aug 13 04:37:17 j2me and android may both use java, but they are completely different platforms Aug 13 04:37:39 * desmin88 has reverse engineered enough to have basic login though Aug 13 04:39:37 hello everyone Aug 13 04:40:49 in fact Steve Wozniak isnt working the idea to run Android on iPhone? one reason is to cover more market Aug 13 04:42:07 >.> Aug 13 04:43:19 Does anyone know how android message scheduling works? Aug 13 04:43:23 I am trying to do something similar. Aug 13 04:44:11 detachYo what do you mean by android message scheduling ? Aug 13 04:44:19 bloody hell im having this same damn issue where my phone gets stuck in roaming but its not actually roaming Aug 13 04:45:53 pls help Aug 13 04:46:41 g00s: the new s5 has a feature where you can schedule an sms message to be sent later. Aug 13 04:47:03 thats probably samsung touchwiz baked Aug 13 04:48:22 which means I can do the same thing on android device :) Aug 13 04:48:32 not if its baked with touchwiz Aug 13 04:50:30 What do you mean, no? Aug 13 04:51:15 only default sms application can send sms Aug 13 04:51:39 I think I can, with some alarms and broadcast receivers. Aug 13 04:51:45 THat is not right desmin88 Aug 13 04:52:13 blegh Aug 13 04:53:19 Hi all Aug 13 04:54:54 yesterday after lot of reading and googling I found that jsonobject is not for ordered data. And to get a ordered data I have to use LinkedHashMap Aug 13 04:56:05 niru: what are you trying to do? Aug 13 04:56:31 detachYo: you got me Aug 13 04:56:38 i was confusing with writing/reading from the smsprovider Aug 13 04:56:39 So I was able to display the data in the UI in this format:{1001=Form1,1002=Form2,1003=Form3} Aug 13 04:57:25 desmin88: :) Aug 13 04:57:31 niru: that would be a HashMap. Aug 13 04:57:39 Go on... Aug 13 04:58:04 detachYo is it not as simple as writing a service to queue the message and send it at a specified time? Aug 13 04:58:50 detachYo: Now please let me know if I can display {1001=Form1,1002=Form2,1003=Form3} in the UI in the this form Form1 Form2 Form3 is only the value part Aug 13 04:59:34 I want to see them in a listview Aug 13 04:59:46 sure why couldnt you Aug 13 05:00:05 niru http://docs.oracle.com/javase/tutorial/collections/ Aug 13 05:00:30 HashMaps (and Maps in general) don't store data in an ordered format, like lists do Aug 13 05:00:49 when you iterate over a map you can (in theory) get a different ordering every time you iterate through Aug 13 05:01:02 niru: there are bunch of tutorial on that online Aug 13 05:01:09 a LinkedHashMap is both a List and a Map, that's why you can get a specific ordering Aug 13 05:01:21 but yes, listen to sarbs, he knows this stuff :) Aug 13 05:02:08 sarbs: yes now I want to get only the value part getting displayed in a listview Aug 13 05:02:17 sarbs, I've never dealt with that side of android, I guess I just need to understand how the services and pending intents work. :) Aug 13 05:02:22 sarbs: ie Form1 Form2 etc Aug 13 05:03:16 niru: keySet() Aug 13 05:03:55 as in allTheKeys = inThisMap.keySet(); Aug 13 05:04:59 niru you can order a jsonobject by putting jsonobjects in a jsonarray and making sure each jsonobject has a key -> id that auto-increments when set Aug 13 05:06:35 lasserix_: Now my data is ordered by using LiknedHashMap by converting the jsonobject to jsonarray Aug 13 05:07:01 lasserix_: But the next part is how to display only the value part in a listview Aug 13 05:07:17 as the display is like this at present {1001=Form1,1002=Form2,1003=Form3} Aug 13 05:09:13 split on equal Aug 13 05:09:15 lol Aug 13 05:09:28 will it always start at 1001? Aug 13 05:10:20 also will it always be sequential with no gaps? Aug 13 05:11:33 if so seems a hashmap should just be a list Aug 13 05:12:01 niru i think what you want is .values() Aug 13 05:12:08 1001 is the key, Form1 is the value Aug 13 05:12:18 depends on what you are working with, hashmap has .keys which you can use to iterate for (KeyObject k : hashmap.keys) { hashmap.get(k). } Aug 13 05:12:42 if you are working iwth jsonarray you can iterate over it by doing what sarbs mentioned Aug 13 05:12:58 depends on what you are using to store the list of forms now? linkedhashmap? jsonarray? jsonobject? Aug 13 05:13:25 detachYo i'm actually not very familiar with that particular usage of a service either, tbh. the timer part is basically an alarm, which i know there are tons of examples of Aug 13 05:13:42 the sending-an-sms part, if it's possible from a user app, i also imagine would be pretty straightforward Aug 13 05:13:57 lasserix_: sarbs desmin88 http://pastebin.com/hz9aVE9t Aug 13 05:14:08 yeah, I got that part down. I just wanted to understand how BroadcastReceivers Alarms, PendingIntent's work. Aug 13 05:14:46 omit that for loop. I added it just now. Dont consider that part Aug 13 05:15:18 http://pastebin.com/NMPhRHJE Aug 13 05:15:36 niru can you explain what you are trying to do? Aug 13 05:15:48 like this seems waaaay overly complicated Aug 13 05:15:57 from input to output, what are you trying to do here? Aug 13 05:16:45 are you getting data from aserver or an sqlite table? Aug 13 05:16:55 and this data you are getting, what exactly are you trying to do with it? Aug 13 05:17:25 lasserix_: Ouch may I copied only the backend code so you are confused Aug 13 05:17:36 wait a sec I will copy the other part too Aug 13 05:18:53 lasserix_: check now http://pastebin.com/M4c9sn9x Aug 13 05:19:12 detachYo oh gotcha, that part's easy. minus the alarms bit, no experience there. but BCR's are just a pub-sub mechanism, register a receiver for an intent and it gets fired as a callback when a matching intent gets broadcast Aug 13 05:19:30 does that make any sense now....? Aug 13 05:19:52 sarbs: makes sense, I am going to go and do my reading :) Aug 13 05:19:55 pending intents are a way to tell the system about an intent it should fire later... i know i'm super general in those explanations, not sure what you've got q's about Aug 13 05:19:56 thanks! Aug 13 05:20:04 no Aug 13 05:20:16 cool gl man hit me up if there's something unclear, i think you'll pick it right up tho Aug 13 05:20:18 why do you JSONArray converted_array=object.put(forms); in the Ui code? Aug 13 05:20:22 you already have the list Aug 13 05:20:27 why convert it? Aug 13 05:21:27 just iterate over LinkedHashMap forms=SyncService.getForms(); to get the form values... Aug 13 05:21:39 i dont think he knows lasserix_ Aug 13 05:21:53 if you have to send it to a server, you can convert it to JSON then Aug 13 05:22:27 pending intents have nothing to do with UI, correct? Aug 13 05:22:48 detachYo: no intent does Aug 13 05:22:59 as in a direct relationship Aug 13 05:24:50 intent is like the drunk guy at the bar, trying to get the number of the woman in the short red dress. pending intent is like the pick up artist in the same bar, lurking and waiting for the women in the short red dress Aug 13 05:25:18 nice :) Aug 13 05:25:37 analogy works right? ;p Aug 13 05:25:46 hmm Aug 13 05:25:49 I don't get why intent is added to pending intent, can't pending intent act as an intent? Aug 13 05:25:54 or is it like a queue for intent. Aug 13 05:25:55 erm, maybe a post-it note example :) Aug 13 05:26:05 lasserix_: ah I used it unnecessarily Aug 13 05:26:22 I could loop it with this either DataEntry.add(object.put(forms).getString(i)); Aug 13 05:26:24 detachYo: pending intent wraps the normal intent? Aug 13 05:26:44 no niru Aug 13 05:26:46 no object Aug 13 05:26:53 there is no reason to use the JSONObject here Aug 13 05:26:56 it is totally useless Aug 13 05:28:33 what is the row of the listview supposed to show? the value 'FormX' ? Aug 13 05:28:56 detachYo by "added to the pending intent" you mean PendingIntent.getActivity()/getService()/getBroadcast() etc? Aug 13 05:29:07 yes Aug 13 05:29:20 those are really just factory methods for PendingIntents Aug 13 05:30:03 what it does is it copies out all of the information in the Intent that you give it, into a PendingIntent that *also* records "this should fire up an activity" Aug 13 05:30:41 then later you can say pendingIntent.send() and it will start the activity, without you having to know that it was originally for an activity Aug 13 05:31:30 lasserix_: sarbs yes you both are correct. I got it he he he...:) Aug 13 05:31:33 see here Aug 13 05:31:54 * lasserix_ observes the majesty Aug 13 05:31:59 sarbs: makes sense (kinda) Aug 13 05:32:01 http://pastebin.com/EVJmn3Vp Aug 13 05:32:06 the difference between using a PendingIntent, and simply a container class that has an Intent saved and says "public void startSavedActivity() { mContext.startActivity(mIntent); }", is that a PendingIntent can be sent across process boundaries, but will still be able to refer to things that may be private Aug 13 05:32:24 lasserix_: now no objects there only form.keySet() it all Aug 13 05:32:35 if your app sent me an intent that was targeted at an activity you didn't expose publicly, and i tried to startActivity() on it, i'd fail Aug 13 05:33:09 but you can send me a PendingIntent for that activity, I (90% of the time, the system) can call .send() on it, and everything's hunky dory Aug 13 05:33:20 And now my output is like this 1001 1002 1003 1004 in a listview format Aug 13 05:33:26 niru can't you just use forms.keySet() instead of DataEntry? Aug 13 05:33:32 err Aug 13 05:33:33 valueSet Aug 13 05:33:47 yeah because you are grabbing the keys, not the values Aug 13 05:33:53 lasserix_: yes I can but the list comes under the DataEntry tag Aug 13 05:34:08 sorry i dont know what you mean Aug 13 05:34:13 niru are you iterating directly over the Map? Aug 13 05:34:17 sarbs: makes more sense Aug 13 05:34:20 lasserix_: No I want values only not the keys. I want form1 form2 form3 etc Aug 13 05:34:27 yeah Aug 13 05:34:28 so Aug 13 05:34:33 can you do valueSet() ? Aug 13 05:34:42 let me try lasserix_ Aug 13 05:34:50 an iterator over a Map will return DataEntry objects, but they're not generally meant for consumption Aug 13 05:35:03 err values() Aug 13 05:35:06 you probably want to iterate over keySet or values() like lasserix_ is saying Aug 13 05:35:14 sarbs: No there DataEntry is one of my tags that I use Aug 13 05:35:21 sarbs: yes Aug 13 05:35:23 oh ok Aug 13 05:35:23 you can directly pass values into the array adapter constructor Aug 13 05:35:42 well maybe it's not DataEntry then lol, but whatever a Map's iterator returns you is almost never what you actually want to use Aug 13 05:35:44 the only problem is you are going to have to somehow identify the row that was clicked by this value Aug 13 05:36:20 lasserix_: that is my next task though :( Aug 13 05:36:35 yeah you should use a custom array adapter (ie extend it) Aug 13 05:36:38 I have to identify which form number is clicked and open the respective form dynamically Aug 13 05:36:44 or a base adapter-- i posted the code for you the other week Aug 13 05:36:57 lasserix_: yes Aug 13 05:37:18 well you could do it in a hacky way but just getting the value of the text and then seeing which value in the map equals the value of the text Aug 13 05:37:27 lasserix_: sarbs yes with .values() it worked Aug 13 05:37:57 but in reality you want the type of the arrayadapter to be a data structure that has both the key and the value Aug 13 05:42:14 anyone know if there is an alarm manager constant that doesn't wake up the screen? I mean I don't want to notify the user that the message has been sent, unless its a notification, but it would be useful because there is no where to point with that notification. Aug 13 05:44:01 lasserix_: sorry I missed somewhere. I am not getting you.Can you take some pain to explain me what exactly you meant Aug 13 05:46:22 niru: have you gone though tutorials on things like listViews and Adapters ? Aug 13 05:46:39 if you look at the code i posted from the other week you'll see what i mean Aug 13 05:46:51 but you should take StingRay's advice and understand how adapters work Aug 13 05:47:26 niru: it will be very hard for you to explain what you want if you dont understand enough to know what it is you need/want Aug 13 05:47:38 the array adapter is of type string (you can tell because new ArrayAdapter ) however it can be anything you want, except you have to change the way the array adapter gets the view each row Aug 13 05:47:40 and even harder for others to help/aid Aug 13 05:47:57 *gets the view for each row Aug 13 05:48:32 right now since it's simply of type string it knows it can just grab the value of the string and use it to set the text view in the view that is the row each time it needs to make a row Aug 13 05:49:55 but if you changed it to say like ArrayAdapter where KeyValuePair looks like class FormKeyValuePair { int id; String formName; ... } then you have to override the arrayadapter getView method so that it sets the textview of the row with the value of formname Aug 13 05:50:07 i showed you how to do this in that code from last week if you still have the URL Aug 13 05:50:17 but you should read up on some tutorials about how adapter works Aug 13 05:51:27 lasserix_: I got it. Yes I have the code saved in my system. Thanks lasserix_ and StingRay_ I will do a study I come back Aug 13 05:51:38 thanks again Aug 13 05:54:10 np good luck Aug 13 05:54:42 when i first came across arrayadapters and stuff my mind was literally ... what the fuck! Aug 13 05:56:03 why da hell is setExact on alarm api 19 and above... Aug 13 05:56:10 lasserix_: same here :( Aug 13 05:57:28 detachYo: cause of battery optimizations I think Aug 13 05:57:38 previous it was always exact Aug 13 05:57:52 not inexact saved battery if time is not 100% an issue Aug 13 05:57:57 now* Aug 13 06:00:26 TIL: If you are nesting fragments and those nested fragments contribute to the action bar, you have to call setHasOptionsMenu() in the parent fragments (from reddit) ... orly Aug 13 06:00:56 goof old api design philosophy: principle of most surprise ! Aug 13 06:00:57 g00s: ummm, WAT Aug 13 06:03:06 but that reminds me ... i tried using getView().setKeepScreenOn() from a fragment ... didn't work either (of course, docs didn't say anything) Aug 13 06:05:14 what are receiver's intent filters used for? Aug 13 06:05:57 detachYo determining which intents they'll fire their onReceive method for Aug 13 06:06:16 g00s yeah that actionbar thing was something that bit me a while ago Aug 13 06:06:21 hmmm Aug 13 06:06:28 this is so freaking complicated :/ Aug 13 06:06:51 detachYo: just like the to:addresss on postal services ? Aug 13 06:06:53 :) Aug 13 06:06:54 detachYo it all just boils down to a few thousand string constants Aug 13 06:08:19 g00s: :( don't do that Aug 13 06:08:35 is anybody here knowledgeable on how to use MediaExtractor? Aug 13 06:11:03 ughhhhh Unable to start receiver Aug 13 06:11:07 damn it! Aug 13 06:11:18 valder: the absence of an answer is sometimes and answer in itself Aug 13 06:23:35 i am confused... Aug 13 06:23:51 broadcast receiver got the phone number of the recipient, as soon as it was scheduled... Aug 13 06:23:57 how do I actually send it at that given time? Aug 13 06:27:42 detachYo: alarm manager ? Aug 13 06:30:13 i did that Aug 13 06:30:15 ... Aug 13 06:30:20 testing, 1 sec Aug 13 06:31:06 I noticed that the pending intent can getService and getBroadcast Aug 13 06:32:14 ugh, i'm rusty but i think you shouldn't use getService Aug 13 06:32:40 ugh, I don't want repeating ones.. they keep repeating.. and setExact is 19+ Aug 13 06:32:53 g00s: yea, broadcast is doing fine actually Aug 13 06:32:59 whats the thing called when you click a contact image and a little popup with the info appears ? Aug 13 06:33:10 that dialog, what is it ? Aug 13 06:33:17 quickcontactbadge Aug 13 06:33:34 huh, thats a crappy name Aug 13 06:33:51 it's an info plane/dialog, not really a badge Aug 13 06:34:12 yeah, but the quickcontactbadge opens that dialog lol Aug 13 06:34:22 oh then I dont want that Aug 13 06:34:30 i want the open action Aug 13 06:34:33 not the badge Aug 13 06:35:21 <_u2pop_> hey guys i want to ask a little confuse i have if can work it.. Aug 13 06:36:15 you worked that confuse well Aug 13 06:36:36 <_u2pop_> can use i with any phone/android with the camera scan a Domino Games like you know each one have a difrent a points on each piece and plus it to all together and give how many points there got? Aug 13 06:37:39 <_u2pop_> i dont know if can be possible that Aug 13 06:37:40 <_u2pop_> :P Aug 13 06:38:20 why does this channel attract mostly people with broken english Aug 13 06:38:37 _u2pop_: I think given how you asked the question and the context, the answer currently is NO, but with time and learning, yes Aug 13 06:39:07 <_u2pop_> desmin88 sorry i try to learn english :P Aug 13 06:39:20 <_u2pop_> StingRay_ look this picture http://www.stampcamp.com/Gifs/Images/S233.gif Aug 13 06:39:38 <_u2pop_> i cant use the camera and scan it and tell how many points have there ? Aug 13 06:39:59 I know you cant, well I assume you can't Aug 13 06:40:04 but with learning and time yes you could Aug 13 06:40:11 so, YES it is possible Aug 13 06:40:21 <_u2pop_> ah ok Aug 13 06:40:23 and NO you probably need to learn lots! Aug 13 06:40:26 <_u2pop_> just want to know if can be possible Aug 13 06:40:27 <_u2pop_> hehe Aug 13 06:40:31 <_u2pop_> i know Aug 13 06:40:31 then yes Aug 13 06:40:31 <_u2pop_> hehehe Aug 13 06:40:57 <_u2pop_> one of my friend make one app call Kapicu Aug 13 06:41:29 <_u2pop_> is very good for domino points.. but i want more modern for use the cam and done Aug 13 06:41:31 <_u2pop_> :P Aug 13 06:41:51 <_u2pop_> can/ scan* Aug 13 06:42:17 good morning :) when I write something like "import java.io.File;" - where is File.java is located? is it coming from the regular java sdk, or is it an android java class (dalvik) Aug 13 06:43:31 why do you want to know Aug 13 06:43:42 <_u2pop_> heyyyy Aug 13 06:43:47 <_u2pop_> i found one on google Aug 13 06:43:48 <_u2pop_> great Aug 13 06:43:55 <_u2pop_> domino dot counter Aug 13 06:43:58 <_u2pop_> hmmm let me see that! Aug 13 06:45:41 first of all - knowledge equals power Aug 13 06:46:04 secondly - "import javax.imageio.ImageIO;" failed on NoClassDefFoundError Aug 13 06:46:13 and I'm trying to understand why Aug 13 06:47:06 I see that File.java exists on "libcore/luni/src/main/java/java/io/File.java" Aug 13 06:47:22 but I can't find ImageIO.java file under AOSP Aug 13 06:48:05 use bitmapfactory Aug 13 06:48:28 you cant find it under aosp because its not there Aug 13 06:49:36 so back to my original question - it's not using the regular jdk Aug 13 06:49:39 right? Aug 13 06:50:01 Anything not on d.android.com is not available in the android runtime Aug 13 06:50:23 great, thanks! Aug 13 06:58:17 Has anyone worked with SmsManager here before? Aug 13 06:59:07 detachYo: what is the question? Aug 13 06:59:29 I was wondering what format of phone number it expects. Aug 13 06:59:52 Because you can get PHONE_NUMBER and NORMALIZED_PHONE_NUMBER from ContactsContract. Aug 13 07:01:11 detachYo: if you use uri/parse whatever it shouldnt matter i believe Aug 13 07:01:15 it'll auto figure it out Aug 13 07:01:26 lasserix_: i'll use normalized just to be safe. Aug 13 07:01:45 detachYo: not guaranteed to be there thought right ? Aug 13 07:01:55 well, if phone number is there normalized should also. Aug 13 07:02:08 provider specific though ? Aug 13 07:02:11 iirc Aug 13 07:02:13 And the query that selects has a where clause stating that we want all contacts with phone numbers. Aug 13 07:03:29 g00s did you see this? https://www.youtube.com/watch?v=EwYOi9tDOIY Aug 13 07:03:39 but in my sms app I always format so it can send intl. if needed Aug 13 07:03:47 maybe try something like this: "String formattedNumber = PhoneNumberUtils.formatNumber(unformattedNumber);" Aug 13 07:03:53 http://stackoverflow.com/questions/6106859/how-to-format-a-phone-number-using-phonenumberutils Aug 13 07:05:03 lasserix_ no Aug 13 07:05:15 cant figure out if it is actually useful Aug 13 07:07:26 thanks meital Aug 13 07:07:37 and StingRay_ for format suggestion Aug 13 07:08:04 Does anyone know if lyft / uber drivers can actually make a living doing that? Aug 13 07:08:48 lasserix_: i know people working for uber Aug 13 07:08:54 they make anywhere from 100-250 a day Aug 13 07:08:57 that is dollars. Aug 13 07:09:11 In order to make $75,000 a year driving for uberX in San Francisco, you'd have to work 3,000 hours per year, which is effectively a 58-hour work week, financial journalist Felix Salmon concluded. Aug 13 07:09:11 Read more: http://www.businessinsider.com/how-much-you-earn-as-an-uber-driver-2014-6#ixzz3AFmk9Cal Aug 13 07:09:25 ahh fuck what am i doing with my life ;p Aug 13 07:11:03 detachYo, I believe PHONE_NUMBER is whatever the user entered while NORMALIZED_PHONE_NUMBER is probably in the int'l form, ie. +1-993-1234-567 Aug 13 07:11:31 but this is just an educated guess Aug 13 07:11:45 I'm sure it's documented on d.android Aug 13 07:12:49 ravilov: sounds right Aug 13 07:13:17 so PhoneNumberUtils.formatNumber() should be able to turn int'l form into a sendable form, I would guess. Aug 13 07:13:33 no Aug 13 07:13:35 lol Aug 13 07:13:41 or from what I remember no Aug 13 07:13:48 yes all of that assumed is correct Aug 13 07:13:50 How can I compare 2 images in android? I couldn't find a way to do it with BitmapFactory Aug 13 07:13:58 and in ideal worlds yes yes and yes Aug 13 07:14:31 detachYo: but I would not have a 3rd party lib in my app adding almost a second to format time if that were true Aug 13 07:14:50 unless I was drunk that day, though I dont drink so that would be odd Aug 13 07:15:17 meital: compare for what purpose? can check the checksum of the files for likeness, or check pixels for differences etc Aug 13 07:15:48 (I want to know what is the diff percentages) Aug 13 07:15:59 percentages of what ? Aug 13 07:16:00 lol Aug 13 07:16:09 of the difference Aug 13 07:16:11 If I have a preference that has a dependency on a CheckBoxPreference, would the dependent preference keep its stored value when it's disabled by the CheckBoxPreference? Aug 13 07:16:23 like 90% of the pixels are equal for example Aug 13 07:16:26 meital: I think you need to look into this more Aug 13 07:16:40 you can do simple btye[] comparison Aug 13 07:16:48 but that wont give you the % diff of an image Aug 13 07:16:51 are you streaming&wanting to know if difference, if so, then you'll have to go over the pixels&decide a valid hitbox of difference Aug 13 07:17:05 yeah, but I thought that there is a better way Aug 13 07:17:08 images are perceptual Aug 13 07:17:34 ok, thanks! Aug 13 07:17:37 can use ButterKnife in PagerAdapter? Aug 13 07:17:41 yes Aug 13 07:18:06 meital: just look for motion detection algorithms and such Aug 13 07:19:09 JakeWharton: thank you Aug 13 07:24:00 hi. if I am using Timer and TimerTask and defined their variables, and then later at sometime in the code I used timer.purge(), do I have to re-define the TimerTask object? Aug 13 07:24:31 I mean just to restart the timer because of onRestart() for example. Aug 13 07:27:32 Why ImageView is null in my PagerAdapter with ButterKnife http://pastie.org/9469057 ? Aug 13 07:27:51 because you never call ButterKnife Aug 13 07:31:18 lol Aug 13 07:32:48 JakeWharton: it was in your doc (BaseAdapter) :) Missed ButterKnife.inject(this, view); :P Aug 13 07:32:57 desmin88: ! Aug 13 07:33:04 JakeWharton: thank you man! Aug 13 07:33:22 desmin88: http://stackoverflow.com/a/25152972/132047 Aug 13 07:33:42 less than one week after adding that exception Aug 13 07:33:47 that was you, right? Aug 13 07:33:55 the person with the same problem, that is Aug 13 07:34:48 superlinux-hp: doesn't purge destroy it? I think yes, you'll have to re-define. Aug 13 07:35:04 there should be cancel/stop method, that, I will again assume, won't require you to redefine. Aug 13 07:35:35 JakeWharton: Yeah I had that same problem but that wasnt me Aug 13 07:35:43 detachYo, I ask because I defined TimerTask object as a global variable Aug 13 07:35:51 yeah i knew it wasn't you on SO Aug 13 07:35:59 just interesting to see that others were probably having this problem Aug 13 07:36:24 why would you do that Aug 13 07:36:31 yeah Aug 13 07:36:39 because you can? :) Aug 13 07:36:59 shame android itself doesn't stop you from it Aug 13 07:37:28 haha Aug 13 07:37:29 i didn't even know my package name got messed up Aug 13 07:37:35 failed refactor in AS Aug 13 07:38:12 and this is why "nice and quick and automated" can sometimes be not so nice Aug 13 07:41:40 detachYo, ..also the common logic can say that you are killing the timer (the clock that's) and not the task itself. ok? Aug 13 07:42:47 superlinux-hp: i understand Aug 13 07:42:58 but unfortunately don't have enough knowledge to further help Aug 13 07:44:11 nevermind.. i'll let the reports of my app fans tell me Aug 13 07:44:35 if I get any crash reports , it will tell me more clearly. Aug 13 07:47:37 no testing like user testing, eh? Aug 13 07:48:55 ravilov, yes! correct. Aug 13 07:53:42 Is there some sort of code standard or software design pattern that you should follow if you are building a bigger android project? Aug 13 07:54:56 https://developer.android.com/design/patterns/index.html Aug 13 07:55:10 Certainly with regard to look and feel and component choice. Aug 13 07:55:49 ravilov: DO IT LIVE! Aug 13 07:56:17 rgr: Software design not UI Aug 13 07:57:27 it includes that if you read. See App Design. Aug 13 07:58:15 well, to a degree :) There obviously patterns already in the way you integrate with the activity lifecycle. Aug 13 07:59:01 rgr: Where is "App Design"? Aug 13 08:04:34 Mrdarknezz: one of the best principles ive found is composition Aug 13 08:04:57 a big android project often leads to more big android projects, and more your classes are compositable the easier your life will be Aug 13 08:05:13 i guess a lot of people end up doing some kind of MVVC pattern too Aug 13 08:05:27 some people in this room are big fan of using jxreaxion too Aug 13 08:06:22 you can ask yourself: if had to plug in this subset of my architecutre into another activity/service how easy would it be to do so? and architect along those lines Aug 13 08:07:35 Mrdarknezz: here's one of the best primers ive found on the internet so far: http://www.therealjoshua.com/2011/11/android-architecture-part-1-intro/ Aug 13 08:11:47 lasserix_: Thanks! Aug 13 08:16:21 lasserix_: How do you handle APIs and data handling? Aug 13 08:16:38 lasserix_: Patternwise Aug 13 08:16:59 hi, i tried implementing the android annotations framework through gradle yesterday. i also tried a variety of guides like http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/ , but it doesnt seem to build the annotation classes like "MainAcitivity_" ...though, the generated path seems to be correct (build/generated/sources/apt) Aug 13 08:24:24 Mrdarknezz: can you be more specific? "data handling / apis"? what do you mean, like as in writing an api? Aug 13 08:25:57 lasserix_: Sorry, I mean as in if you access an api with about 20 methods which you will need to send and recieve data from. I'm thinking about seperating it into and API <-> DataHandler <-> ObjectModel pattern Aug 13 08:27:13 If you read through that link (or look at his network architecture series) he creates an Action-Command design pattern Aug 13 08:27:16 for doing stuff like that Aug 13 08:27:30 ohh Aug 13 08:27:51 that seems like it'd be on the right track: again, if you just keep it in terms of composition then it makes abstract and encapsulation easier to comport Aug 13 08:29:14 you might also look at an event bus system like otto or eventbus (i think its called?) might make your life at lot easier when designign the architecture since it gives you many more degrees of freedom in interaccessability of your android classes Aug 13 08:29:52 please, is there noone that can help me with these warnings? i used this guide to get android annotations work with android studio, but it doesnt. Warning:The following options were not recognized by any processor: '[androidManifestFile, resourcePackageName]' Aug 13 08:29:52 Warning:Unclosed files for the types '[dummy1407918201414]'; these types will not undergo annotation processing Aug 13 08:30:04 lasserix_: Thanks for all the help :) Aug 13 08:30:11 lasserix_: Exactly what I was looking for Aug 13 08:30:46 defuex: seppuku may be your only option! Aug 13 08:31:19 defuex: though sounds like maybe you forgot to set your compiler version level? Aug 13 08:31:30 anyways time for bed outta here ! Aug 13 08:36:40 defuex: have you checked stackoverflow? Aug 13 08:44:23 how to get the key for a selected value in jsonobject? Aug 13 08:49:08 Hi all, could someone confirm for me that when you open an android app from a link in the browser there isn't a way to make the app launch standalone, but only via VIEW, which leaves the browser's icon in the app switcher? Aug 13 08:51:00 I don't understand what you mean, daentech Aug 13 08:51:44 I launch my app that has a link, I tap on the link and it gets open in the browser, however there is no browser in the app history and my app is still the first one Aug 13 08:52:03 How do you trigger the app from the browser? Aug 13 08:52:21 huh? it seems the names have swapped. Aug 13 08:52:43 daentech, I...don't? Aug 13 08:52:59 Say I have an intent filter looking for a given scheme Aug 13 08:52:59 I open the browser by clicking the link in the app Aug 13 08:53:11 Sorry, I mean launching the app from a link within the browser Aug 13 08:53:32 oh Aug 13 08:53:39 never tried that as far as I remember Aug 13 08:54:03 daentech: I don't think there is, no Aug 13 08:54:07 though there will be in L Aug 13 08:54:14 but judging by my experience just now, yeah whatever you launch as a secondary intent will probably not show in the app history Aug 13 08:54:39 I thought as much. Estel, I thought L was trying to make it such that you couldn't tell if it was app or browser Aug 13 08:55:07 Kind of, but I think it does that through adding some APIs to allow you to directly manipulate the app history Aug 13 08:55:24 Does anyone know a good way of explaining to a client that what they want can't be done? I told them yesterday, but they've come back and decided that they don't like Android default behaviour Aug 13 08:55:56 Hello.. how do i make a horizontal line slide move on the touch event Aug 13 08:56:38 daentech, you could try starting a *third* intent from the one launched by the browser, depending on the flags you set that one *might* show up in app history Aug 13 08:56:52 i want to place a horizontal line on a image view, which will be used to mark the center of the image.. So i need to make the user able to slide that line up and down Aug 13 08:57:07 * ravilov has started activities from broadcast listeners before that somehow showed up in app history Aug 13 08:57:58 libin: you'll have to create a GestureListener and respond in the on move/drag events Aug 13 08:58:01 libin, relativelayout, image + linearlayout (which is the line), then listen for touches and adjust accordingly Aug 13 08:58:36 Hmm, so launch the VIEW intent, and trigger another, probably main. I'll give that a try, thanks Aug 13 08:58:43 ok Aug 13 08:58:46 thanks guys Aug 13 08:59:37 I have an activity (MainActivity), and a test that extents "ActivityInstrumentationTestCase2" (calls BaseTest) - now I want to write a test that extends "BaseTest". Is it possible? If so - why doesn't it find MainActivity inside of the new class? Did I forget something in the manifest? Aug 13 08:59:40 daentech, yeah never thought of that before but it's entirely possible only .MAIN intents can end up in history Aug 13 08:59:57 not only possible but makes perfect sense Aug 13 09:01:13 where can I find an example how to do it? because I'm obviously missing something... Aug 13 09:02:08 btw, they are in different test projects - maybe this is the problem? Aug 13 09:02:10 * ravilov doesn't do automated testing :p Aug 13 09:02:25 lol Aug 13 09:04:05 What's basetest when it's at home? Aug 13 09:04:13 meital: do you have a reference for using junit etc with android and UI components? Aug 13 09:04:39 rgr: nope Aug 13 09:04:53 Estel: I didn't understand the question Aug 13 09:21:46 Thanks, ravilov Estel, looks like triggering another intent works :) Aug 13 09:22:36 yay! Aug 13 09:27:09 I have a jsonobject {key1:value1,key2:value2} Aug 13 09:27:21 How to get the key corresponding to value2 Aug 13 09:27:44 when i click on value2 I should know that key2 is its key Aug 13 09:28:24 How should I set identifier of view elements when they are created dynamically? Aug 13 09:29:02 .setId(1) works just fine, but it says supplying the wrong type of resource identifier. Aug 13 09:31:10 platzhirsch: You'll need an IDs file, or something similar Aug 13 09:31:13 https://developer.android.com/samples/ActionBarCompat-Basic/res/values/ids.html Aug 13 09:31:19 niru: what do you mean "click on"? Aug 13 09:31:43 daentech: nice, thanks! Aug 13 09:32:21 obviously if you create a UI element with a table its easy and nothing to do with json since youve already decoded it. You cant map back in the json object pure and simple because its not a one to one. the key is unique the value isnt. Aug 13 09:32:26 rgr: when I click on value2 it actually opens up a new activity. So onClickListener(value2){ getId} Aug 13 09:33:14 you could query the content of the previous element or you can store the key value pair in your own little class encapsulator. There are millions of ways. Aug 13 09:33:36 but value2 "as a value" could map to one of many keys. Aug 13 09:34:04 and is nothing to do with json. Aug 13 09:34:37 json is merely the encoding of your data before you built your ui. you could also store a collection mapping *unique* values to keys when you do that. Aug 13 09:35:03 rgr: so its better I use a switch case switch(value){value1:do something value2:do something break;} Aug 13 09:35:14 rgr: isnt it? Aug 13 09:35:17 no. that would be the absolute most stupid way to do it. Aug 13 09:35:25 because you would be hardcoding the, Aug 13 09:35:27 them Aug 13 09:35:55 Im assuming since you mention json the data pairs you use will vary. so you use a map to map from key to value and vice versa. Aug 13 09:37:01 but your last comment with the switch is totally at odds with what you said before : which is getting a key from a value and nothing to do with activities. Unless the key is an activity name or something? Aug 13 09:39:23 rgr: I have a jsonobject as {key1:value1,key2:value2}.Assume value1 and value2 are two textmessages. When I click on each textmessage it should display a message.So to make things dynamic and instead of using the index root(ie switch) I can query for the key (key associated with the value1 and 2) Aug 13 09:40:13 depending on the key value pair I will display the text.Hope now its understandable Aug 13 09:40:56 niru: How are you generating these clickable views in the first place? Aug 13 09:41:13 daentech: they are in listview Aug 13 09:42:38 a simple way could be just to add the key as a tag on the view? Aug 13 09:47:06 so forget the json. Thats just how you get the data to build the view. You simply need to keep a mapping frok value to key. But since each list element is a pair then you just store the key as part of your list element somehow in that row view. Aug 13 09:48:20 so when you click you get a reference to your key value pair however you decide to store that per row. you can not or should not query the json since value is not unique. the key is unique. Aug 13 09:49:06 so your row that displays the "value" actually uses the key as its seed for further activity. Aug 13 09:49:52 hello, I have a question about resValue in gradle: it should overwrite string in my resources? Aug 13 09:49:56 resValue "string", "num", "100" Aug 13 09:50:22 Is there a reason why the CancelableCallback of Retrofit is not in master? Aug 13 09:55:53 it doesnt overwrite. it overrides. Aug 13 09:56:06 a new xml resource file is generated afaik. Aug 13 09:56:48 yes. And a good example is in the answer here : http://stackoverflow.com/questions/21600160/resvalue-gradle-error-unsupported-type-string-in-generated-xml Aug 13 10:09:13 A nice idea I just noticed: displaying an interstitial Admob Ad while telling the user in a Toast message "your file is auto saved to this path". and I repeat it every 5 minutes. I don't think it's bad. Aug 13 10:09:56 As long as 'annoying the user like ****' is 'not bad', I guess you're right. Aug 13 10:21:32 superlinux-hp: I couldnt think of a quicker to get me to uninstall your app. Aug 13 10:23:09 LOL Aug 13 10:24:28 use ads sparingly and somewhere near where the user clicks ;) Aug 13 10:24:54 superlinux-hp: how about you create an ad browser app with ads Aug 13 10:25:57 shmoooz, I did not get what you mean. Aug 13 10:26:11 nothing but ads Aug 13 10:26:16 I did not understand. what do you mean by an ad browser? Aug 13 10:26:39 ok so its a bunch of ads that they can click on to browse to Aug 13 10:26:47 ah ok! well.. It has been an Idea I wanted to do once Aug 13 10:26:49 wow. An even worse idea. Aug 13 10:27:21 it will be like a magazine. Aug 13 10:27:37 like those free magazines Aug 13 10:27:59 yeah but commercials that get you a cut Aug 13 10:28:26 you mean like all the "best apps" apps and playstore etc? You really need to get into touch with what pisses users off the most. Seriously awful idea. Aug 13 10:28:54 not if you call it what it is Aug 13 10:29:09 ad browser Aug 13 10:29:17 rgr, it could be not. because you are already telling the user in the description that its an ads browser. Aug 13 10:29:32 I'd like to browse japanese ads Aug 13 10:29:58 shmoooz, because the japanese people like everything colorful Aug 13 10:30:14 an ads browser? Jesus... seriously... Aug 13 10:30:21 so you'ld find it attractive. Aug 13 10:30:52 rgr, do you know that the silliest ideas are the most working and paying? Aug 13 10:31:56 long time ago I've heard of a (shareware!) win32 app that does nothing but sit in the tray and occasionally pop up message balloons with messages that insulted the user. people were actually buying that app. people are stupid and every app has its audience. Aug 13 10:32:17 sure. Unfortunately I have ethics. And bombarding people with ads is not one. But if it works for you then fine :) Seriously : best of luck. Aug 13 10:32:30 what is the relation between the camera preview size and the camera picture size? What happens when their aspect ratio differ? I want the preview and the captured picture to show the same. Aug 13 10:32:32 (of course ads have their place to finance legitimate work and apps) Aug 13 10:34:24 maybe add a feature like comparing multiple online store prices for the same product Aug 13 10:36:54 sounds like you guys are desperately trying to come up with the next "killer app" Aug 13 10:37:02 quite the wrong way to do things Aug 13 10:37:17 hey it's better than a 'jump to conclusions' mat! Aug 13 10:37:34 dunno, that thing seems funny at least Aug 13 10:37:41 "so bad it's funny" Aug 13 10:40:46 and a feature like filtering by categories of ads Aug 13 10:41:32 yes, and please make the categories be: "annoying", "mind-melting", "beg-for-mercy dumb", "mind-scarring", etc Aug 13 10:42:42 ifuwannabemylover Aug 13 10:47:36 gahh how do i keep my music player alive when its swiped away from recents ;_; Aug 13 10:48:25 iffa: did you develop it yourself ? Aug 13 10:48:36 develop it myself how? the app? yeah Aug 13 10:49:45 use a service Aug 13 10:50:26 i am Aug 13 10:51:33 hi guys, i played myself with gradle now for a while trying to get android annotations working while trying also different compileSdkVersions and target SDKs like 19, 20 and "android-L".....but i always get the same warnings, can anyone help me solving this problem? https://dpaste.de/0BXK -> warning messages -> Warning:The following options were not recognized by any processor: '[androidManifestFile, resourcePackageName]' Aug 13 10:51:33 Warning:Unclosed files for the types '[dummy1407923716019]'; these types will not undergo annotation processing Aug 13 10:51:39 iffa: Apollo doesn't either... -.- Aug 13 10:52:26 iffa: shouldn't the normal behaviour that the music goes off when they remove it from recent tasks ? Aug 13 10:52:57 shmoooz: samsung's music app doesnt die when that happens, neither does play music Aug 13 10:53:01 or anything realy Aug 13 10:53:15 shmoooz: I (userside) would like it to continue playing... ^^ Aug 13 10:54:16 i had a friend complain to me about my app closing when that happens Aug 13 10:54:17 well I have to goto setting>apps>all and find the app and force stop it in a lot of cases to get it to shut up Aug 13 10:54:42 I'd rather swipe right on recents to shut it up Aug 13 10:55:48 shmoooz: many people have the habit of swiping those all the time Aug 13 10:55:48 shmoooz: Apollo also has a notification with a little x in the top-right corner which will stop it. I prefer that way. :) Aug 13 10:56:39 iffa, are you sure you're using the service properly? Aug 13 10:56:45 how should i be using it? Aug 13 10:57:15 do you return START_STICKY from onStartCommand()? Aug 13 10:57:35 yes Aug 13 10:58:12 im wanting to preload as many webviews as i can before my user clicks on any of the buttons in the main activity to load them (new activity. can I pass the webview as an intent? Aug 13 10:58:32 as a part of the bundle* Aug 13 10:59:05 defuex: a quick google came up with this : its AA and versioning. FWIW I played with AA for while and then stopped. It hid too much. https://github.com/excilys/androidannotations/issues/690 Aug 13 11:00:35 Jesperhead: that would be very bad IMO. YOu could load in a bg thread and show the user its still loading and only enable them as and when each one is loaded. But preloading whether the user wants them or not is also bad karma IMO : mobile data usage being one issue. Aug 13 11:01:00 iffa, how are you playing music? if you're connecting to/with another app/service, maybe your service doesn't die but the other one does? Aug 13 11:01:11 also you can maybe try playing with oom settings? just an idea Aug 13 11:01:30 iffa: maybe you have to handle onTaskRemoved from your service Aug 13 11:03:48 rgr, Yeah I currently have it to stay hidden until loaded, but load doesnt occur until the button is pressed. this is an issue because the server is less than reliable. Aug 13 11:03:59 ive had a conversation about the negatives of using a webview for a UI Aug 13 11:04:08 so maybe this will also give us some more push Aug 13 11:04:39 rgr seems to be offline Aug 13 11:04:45 oh dear Aug 13 11:04:55 hardly knew ye Aug 13 11:05:07 :) Aug 13 11:06:10 webview as UI? *shudder* Aug 13 11:06:15 just,,.,, Aug 13 11:06:17 i know. Aug 13 11:06:38 "Oh but now we can update whenever we want without pushing a new version!" Aug 13 11:06:44 NYOOOOOO Aug 13 11:07:06 right Aug 13 11:07:23 why bother making an app at all? just link users to the web page Aug 13 11:08:53 someone should really start writing a manual - "how to get your users to hate you in just a few easy steps" Aug 13 11:09:07 hahahaha Aug 13 11:20:47 i hope its okay if i post my problem again.... i played myself with gradle now for a while trying to get android annotations working while trying also different compileSdkVersions and target SDKs like 19, 20 and "android-L".....but i always get the same warnings, can anyone help me solving this problem? https://dpaste.de/0BXK -> warning messages -> Warning:The following options were not recognized by any processor: '[androidManife Aug 13 11:28:58 sorry defuex never used android annotations. might want to see if they have support chat or forums Aug 13 11:34:41 Hi guys, i have a viewstub which ive inflated from my code. The layout ive inflated contains a radiogroup, which i in my code try to add radiobuttons dynamically. However, none of these buttons are added. any ideas? The code im running: https://dpaste.de/q7ES Aug 13 11:41:07 serrghi: hard to tell without the layout file too Aug 13 11:46:54 Followup: it seems that if i have two "dummy" radiobuttons in my radiogroup inside my viewstub. If i remove them after ive inflated, and then dynamically add items, i get as many items as i had dummy items. If i have 2 dummy items, and remove them, add 3 by code, only 2 is shown Aug 13 11:48:20 StingRay_: https://dpaste.de/q84o Aug 13 11:51:41 tried setting every radio button's visibility to VISIBLE? shouldn't be necessary but you never know Aug 13 11:52:57 Hello. Is there any way to get a preview of a dialog? Like with View's I could do view.draw(canvas) and then use the canvas. Aug 13 11:54:18 hi, how to check in eclipse what is the size of output apk? Aug 13 11:54:33 and can an activity end/stop itself? Aug 13 11:54:55 WORKSPACE/your_project/bin/your_project.apk Aug 13 11:55:05 of course it can Aug 13 11:55:26 finish(); Aug 13 11:55:32 developer.android.com will tell you all about it Aug 13 11:56:40 skulltower, your question is as generic as, for example, "can I get a preview of an app/activity?" Aug 13 11:57:09 every dialog uses its own layout, plus you can provide your own elements to override existing ones Aug 13 11:58:11 great, thanks Aug 13 11:58:39 ravilov: tried that Aug 13 11:59:24 also, I have generated different sizes of images for different resolutions. In such situation, do I need to keep the "res/drawable" (no suffix) at all? If yes, then what to store there? A super-big originals, or miniatures or what? Aug 13 11:59:42 because now my apk is 50 mb big, which is absourd, it's a casual board game Aug 13 12:00:02 askalski: xml drawables Aug 13 12:00:48 askalski: Which parts take up how much space? Aug 13 12:01:52 the drawables (where now I store original images, as graphic guy gave me) and drawables-xxxhdpi, both of these are like 14 mbytes big Aug 13 12:02:20 right now I just filled all drawables-* directories with downsized (imagemagick) stuff from original "drawables" Aug 13 12:02:30 there's no need for that Aug 13 12:03:01 if all you do is scale down the original images, then you're doing nothing better than what the system does for you anyway Aug 13 12:03:07 ok, so what should I do? Just keep the highest res and let the device downsize? Aug 13 12:03:21 there's also drawable-nodpi, btw Aug 13 12:03:35 what it does (-nodpi)? Aug 13 12:03:43 just like the name says Aug 13 12:04:18 how long until webview caches expire? is there a default length? Aug 13 12:04:22 drawables that do not depend on the target screen resolution or its dpi Aug 13 12:04:26 id like to capture which methods are called in runtime under a specific package ( where i dont have the source) - is this possible? Aug 13 12:04:49 i set LOAD_CACHE_ELSE_NETWORK on my webview, but the note says that it will ignore when they are expired Aug 13 12:04:59 dont think i want that Aug 13 12:05:06 askalski, the docs on this are pretty good, you should go through them Aug 13 12:05:20 ktwo, I believe your only option is to run it in an emulator with a debugger attached Aug 13 12:05:24 Is it possible to finish an activity but keep it on the stack, so when the activity on-top is finished the previous one is restarted? Aug 13 12:05:41 platzhirsch, startActivityForResult()? Aug 13 12:05:55 you can't finish an activity *and* keep it around Aug 13 12:05:59 ravilov, on a real device attached via usb debugging it isnt possible? Aug 13 12:06:05 yeah.. that's against the concept.. Aug 13 12:06:30 ktwo, oh yeah, you can try that too Aug 13 12:06:43 so long as you have an actual debugger attached Aug 13 12:06:56 like ddms, eclipse, as... Aug 13 12:08:32 ravilov, What I wanted to know is how can I take a layout file and draw it to a canvas. Do I need to inflate it first? Aug 13 12:09:07 you have to inflate it and do a *lot* of other stuff before you can draw it Aug 13 12:09:24 initialize and measure views is but one of them Aug 13 12:10:16 Oh boy :( Aug 13 12:21:38 sorry im a little confused on this webview stuff... if i load content in a webview in activity A, then switch to activity B, which instantiates a new webview (NOT PASSED!) that loads the same url, will it pull from cache? Aug 13 12:22:06 i know its not ideal, im just trying to gather information Aug 13 12:34:31 Hi all ;) I'm looking for a solution where we can bake a (rather large) video into an application but through DRM or similar only unlock the content after we provide the application with the appropriate key. Does anyone know of a good way to accomplish this? Aug 13 12:35:47 remonvv: baking it in defeats the purpose of drm Aug 13 12:35:57 lul Aug 13 12:36:26 remonvv: you would normally encrypt the content to a unique key for the user there by insuring only that user can decrypt it Aug 13 12:36:31 Napalm: Terminology thing then; an encrypted version of the video. Aug 13 12:37:00 Napalm: It's not that critical. We would like to publish a global key just prior to release. Aug 13 12:37:06 Well, the customer does. Aug 13 12:37:32 remonvv: well by the sounds of it, you just need to make a standalone encypter and have the app decrypt it Aug 13 12:37:52 remonvv: the decryption app side can be done with a simple InputStream wrapper Aug 13 12:38:14 remonvv: same goes for standalone app, use a wrapped OutputStream Aug 13 12:38:29 Napalm: That's what we have now but there does not seem an "easy" way to do that in real-time (read: not first completely decrypt and store the video file and then play it) Aug 13 12:38:39 looks like its built in Aug 13 12:38:49 CipherInputStream and CipherOutputStream Aug 13 12:39:26 Is there a media player that takes a non FileInputStream descendent as input? Who knew.. Aug 13 12:39:45 Napalm: Thanks for the pointers, we shall continue the fiddlin' ;) Aug 13 12:40:44 remonvv: simple solution is make a local webserver that only listens on localhost with a specific port, and have it output your decrypted content to the socket for MediaPlayer to read Aug 13 12:41:56 Napalm: Hm, that might work but we have an additional complication. This app will audio synchronize with a TV broadcast and needs to play the video exactly in sync. I think that may introduce buffering issues if we go for a proper streaming solution. Aug 13 12:42:46 remonvv: have you looked at the android drm features? http://developer.android.com/reference/android/drm/package-summary.html Aug 13 12:46:14 remonvv: just looking you might also be able to get away with using a ContentProvider with its openFile api.. it returns a ParcelFileDescriptor which you can create from a local Socket object. so you can simply use an in-memory socket to transfer the data Aug 13 12:46:54 remonvv: that will work from APIv1 according to docs.. Aug 13 12:50:41 Hi, I've a question. I'm developing a Widget, and if I run the app in the Virtual Device, I can see it in the Widget Preview app, but it's not among the other widgets Aug 13 12:50:53 Does anybody knows what I can do Aug 13 12:51:06 Maybe Something is't missing Aug 13 12:51:08 what? Aug 13 12:51:39 Tuly-: you mean how to get your custom Widget to show in the GUI Widget Palette? Aug 13 12:53:34 Napalm : Cheers, will have a look. Thanks for your input! Aug 13 13:02:15 bankai_au: lambda ? when ? on android ? :D Aug 13 13:08:20 if I needed a tempory tag to identify an object being sent over a network, would generating a random number be sufficient? Aug 13 13:23:51 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:51 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:52 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:55 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:55 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:58 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:23:59 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:24:10 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:24:10 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:24:34 hmm Aug 13 13:24:35 hmm Aug 13 13:24:35 hmm Aug 13 13:24:35 hmm Aug 13 13:24:35 hmm Aug 13 13:24:35 hmm Aug 13 13:24:36 hmm Aug 13 13:24:36 hmm Aug 13 13:24:36 hmm Aug 13 13:24:37 hmm Aug 13 13:24:54 hi Aug 13 13:27:24 where's an Op when you need one Aug 13 13:27:25 :( Aug 13 13:27:36 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:27:36 hi.....is it possible when using eclipse to be able to work on your layouts in portrait mode? or will it always be in that vertical style? Aug 13 13:27:38 hmm Aug 13 13:27:39 hmm Aug 13 13:27:39 hmm Aug 13 13:27:39 hmm Aug 13 13:27:39 hmm Aug 13 13:27:43 yes its possible now go away Aug 13 13:27:45 OMG Aug 13 13:28:03 Napalm: there's an error Aug 13 13:28:11 The TAG is trace Aug 13 13:28:37 and it says "error opening trace file : no such file or directory (2)" Aug 13 13:29:03 So I guess something is missing or there's a wrong path, but I dont know where is the problem Aug 13 13:29:17 ignore that Aug 13 13:30:42 Okay, Aug 13 13:31:09 apart from that there are no problem Aug 13 13:31:35 Tuly-: did you flip through all the pages of widgets? Aug 13 13:32:12 Wait Aug 13 13:32:19 Now it's working Aug 13 13:32:22 lol Aug 13 13:32:24 I don't know why Aug 13 13:32:31 user-error Aug 13 13:32:34 good morning Napalm Aug 13 13:32:39 afternoon Aug 13 13:32:44 :) Aug 13 13:32:46 The virtual device has alway been open, and now there'is Aug 13 13:32:53 ops are against channel policy Aug 13 13:32:57 Anyway thankyou very much for Your HELP Aug 13 13:33:38 hmm Aug 13 13:33:43 hmm Aug 13 13:33:47 :) Aug 13 13:36:03 When I use a AsyncTask to do something, a exception has been thrown. I can get the data from the method doInBackground, and then the exception throw. Aug 13 13:39:46 .... Aug 13 13:40:09 sounds good Aug 13 13:40:34 deng_cn: just have your AsyncTask result object, wrap the data and exception Aug 13 13:43:10 in debug mode, i can watch the data, and return the corrent answer Aug 13 13:45:12 after this the method onPostExecute() can not execute. Aug 13 13:45:50 Why is the lastes version in maven central of com.google.android:android 4.1.1.4? Aug 13 13:46:37 cezium: because the Android jars aren't being officially added to maven central Aug 13 13:47:11 They never should have been Aug 13 13:47:26 adding android platform jars to maven is stupid Aug 13 13:47:38 So I should deploy it to my internal repo? Aug 13 13:48:08 https://github.com/mosabua/maven-android-sdk-deployer might help with that Aug 13 13:48:42 cezium, use deployer Estel linked to deploy platform jars to your local maven Aug 13 13:49:12 Mavrik: yes, just wondered if that was the right solution or if there is any better way of doing it. :/ Aug 13 13:49:24 If an obb expansion file contains drawable assets for different pixel densities, do you know if you would have to manually pick the correct drawable? Like, if you're running on an hdpi device, would you have to detect that in order to read the correct file? Aug 13 13:49:31 cezium, we found it to be the most elegant Aug 13 13:49:44 since we use internal maven as proxy/cache anyway, so no fiddling with extra jars Aug 13 13:49:44 For some bizarre reason I can't persude the guy with the keys to Maven here to deploy the android jars >_> Aug 13 13:49:53 highcup, yes. Aug 13 13:50:28 thanks Aug 13 13:51:24 Mavrik, so all assets stored in those expansion files have to be targeted programmatically, right? Like, you can't reference it directly in a layout file? Aug 13 13:53:16 So I need to take a screenshot and use it as a background in another activity. I can't use it as an extra since it could be larger than 1MB, I don't want to store it somewhere on the system because storing and retreiving the data is fairly slow. Aug 13 13:53:31 So I did this: http://pastebin.com/QaC4K4FD are there better solutions? Aug 13 13:53:38 Anyone know if cwac-camera has some cropping functionality I can tweak when saving the picture? Aug 13 13:53:43 highcup, as far as I know, no. Aug 13 13:54:22 Syzygy__, well, except actually using an "Object" as value Aug 13 13:54:30 it's fine-ish Aug 13 13:54:35 Mavrik, thanks Aug 13 13:54:39 just use... proper bitmap datastructures Aug 13 13:54:59 e.g. if you're just caching images use LruCache etc. Aug 13 13:55:05 I left it as general as possible Aug 13 13:55:49 Yeah, that's terrible practice :) Aug 13 13:56:38 At least I got the class name right :> Aug 13 14:08:24 哈哈 Aug 13 14:09:20 any sort of singleton will work for this situation Aug 13 14:09:26 nothing wrong with it Aug 13 14:09:42 the object value is dumb though Aug 13 14:10:33 JakeWharton: I know this is discussed in Retrofit v2.0 specification and there is already an implementation, but is there a sledgehammer method to stop a current request in Retrofit's current version? I read about using a custom executor service and using shutdownNow() on it Aug 13 14:14:40 is anybody here knowledgeable on how to use MediaExtractor? I'm having an issue trying to export the audio into a wave file. I'm using code inspired from this page. http://www.piterwilson.com/blog/2014/03/15/mediacodec-mediaextractor-and-audiotrack-to-the-rescue/ It's failing at the point when I dequeue the output buffer the first time. Aug 13 14:14:55 the value of ret is -3 Aug 13 14:15:14 I mean value of res Aug 13 14:21:55 anyone know if Universal Image Loader can also save/resize images to file? Aug 13 14:26:23 would someone be so kind to tell me what is the best framework or project to use for offline openstreemap on android? Aug 13 14:26:30 i am creating an app, where i needs to move a line up and down , which i have placed on top of an image. I am using drag and drop event for this Aug 13 14:26:48 I am now able to move down, but cannot move up.. any hints? Aug 13 14:27:38 twiceaday: free or commercial? Aug 13 14:28:43 twiceaday: http://www.fasterimaging.com/ <- offline vector maps, uses openstreetmap data (costs money) is good Aug 13 14:29:07 OSM's vector maps are free Aug 13 14:30:10 I have different eclipse library project I would like to depend on in a project in android studio Aug 13 14:30:19 When I import it to create the gradle files, it starts copying code from libraries it depends on. This defeats the purpose of having the library seperately. Aug 13 14:30:40 zinx: sure, they charge for giving you access to their lib and for hosting data for offline and online usage Aug 13 14:30:42 I'm rooted. How can I log all intents? Like not just broadcasts? Is there an app? Aug 13 14:30:47 got a super newbied question...trying to learn how to work with android scripting......when i read "File: src/CustomOnItemSelectedListener.java"...does that mean i need to start a new project under the src folder in eclipse? Aug 13 14:30:57 I know about Intent Intercept, but it can only do broadcasts Aug 13 14:31:33 my Android socket program works well under WLAN. What techologies should I use to make it support internet? Aug 13 14:31:53 drag and drop event works downwards.. but not upwards.. any clue why it does not move up? Aug 13 14:32:57 Seems like there are a lot of alters but few answerers Aug 13 14:33:05 *askers Aug 13 14:33:17 aye.......i need a super newbie channel for my questions Aug 13 14:33:47 ^ Aug 13 14:34:13 i might even be too old to figure this stuff out Aug 13 14:35:15 chadf32: I don Aug 13 14:35:24 I don't understand your question Aug 13 14:35:50 Did it fail reading? Aug 13 14:35:51 im trying to get an overview of how the programming comes together Aug 13 14:36:01 i see File: src/CustomOnItemSelectedListener.java Aug 13 14:36:12 Well, you only need 1 root-level project Aug 13 14:36:17 does that mean that part of the script needs to be set up in that place Aug 13 14:36:26 that's a .java file in a src/ folder Aug 13 14:36:31 ya c03 Aug 13 14:36:32 my Android socket program works well under WLAN. What techologies should I use to make it support internet? Aug 13 14:36:52 thats kind of what i was trying to ask....if i should make a new file in that location Aug 13 14:36:56 pranav: uses-permission internet Aug 13 14:37:07 if i wanted to test out the example script Aug 13 14:37:09 chadf32: yes Aug 13 14:37:22 ahh....now im getting somewhere Aug 13 14:37:22 chadf32: Well I have no idea what you are trying to do =) Aug 13 14:37:26 heh Aug 13 14:37:32 All the source code goes in /src Aug 13 14:37:38 chadf32: Try following the devloper 'getting started' guides Aug 13 14:37:44 resources in /res Aug 13 14:37:49 i did c03....got lost fairly quick Aug 13 14:37:57 Hey guys I'm kind of in a dilemma here. I've an app that displays content as a ListView in popups (alertDialogs) but I want the users to be able to save and switch between the popups (without leaving one). What would be a good way to do that? I've been doing a Navigation Drawer up till now but I'm starting to see where it lacks. Maybe this a bad design in the first place? Aug 13 14:37:58 keviv....thats another huge help! Aug 13 14:38:04 Sure :D Aug 13 14:38:11 Which part throws you off? Did you actually read the text? Aug 13 14:38:25 its like drowning in information c03 Aug 13 14:38:27 When you compile, the apk and other useful stuff gets outputted to /bin Aug 13 14:38:28 The structure of the application should be explained in the tutorials. Aug 13 14:38:37 ^ Aug 13 14:38:39 chadf32: That's why learning takes time ;) Aug 13 14:38:55 ya......what yall just explained will help tons for sure Aug 13 14:39:09 now i can actually get into it a little more.... Aug 13 14:39:17 and try to figure out the spinner set up Aug 13 14:39:22 thanks so much guys Aug 13 14:39:34 you're welcome Aug 13 14:39:55 glad i dont have students this week....might can figure some of this out Aug 13 14:40:34 Is there any way to hook into the system-level intent handler? Aug 13 14:42:52 keviv: uhh, custom ROM? Aug 13 14:43:36 There's no way to do it with just root? Aug 13 14:46:09 I'm a total noob when it comes to root programming on Android, but is there anything in the system that I can override at runtime? Aug 13 14:46:47 ok I have a really odd thing, it's been like 2 weeks now and a IAP item that is "refunded" in google wallet still comes back as purchased when grabbing info from billing service api Aug 13 14:47:01 anyone else had this? Aug 13 14:48:14 whats the best way to do this: i need to download an image from the web and i need to use that as a drawable and make it repeat (its a pattern) Aug 13 14:48:20 StingRay_: the purchaseState is purchased? Aug 13 14:48:28 yes 0 Aug 13 14:48:44 but in wallet on both my out and my g/f's in shows as refunded Aug 13 14:48:49 actually been months Aug 13 14:49:13 but just checking now…I dont have to do anything special when refunding from my wallet account right ? Aug 13 14:50:21 iffa: do exactly what you said Aug 13 14:50:38 download it, use it as a drawable (bitmapDrawable) and repeat it :) Aug 13 14:50:43 hmm Aug 13 14:51:16 StingRay_: thank you for making my brain 200% less retarded Aug 13 14:51:53 why havent i thought of that for real Aug 13 14:51:54 lol Aug 13 14:51:57 :) Aug 13 14:52:06 great now fix my problem :) Aug 13 14:52:10 whats the easiest way to download it then? i have never done downloading :P Aug 13 14:52:11 IAP errors Aug 13 14:52:16 IAP? Aug 13 14:52:18 oh, Aug 13 14:52:21 oh, erm you can fire intent to downloader Aug 13 14:52:33 or use an off UI thread method to http get it Aug 13 14:52:45 I would suggest the latter Aug 13 14:53:03 BitmapFactory Aug 13 14:53:06 maybe as a small intentService Aug 13 14:53:25 In App Purchase btw Aug 13 14:53:27 IAP Aug 13 14:53:40 did you describe the issue above? Aug 13 14:54:15 my wallet shows refunded, user wallet shows refunded, IAP billing request from the app shows as purchased Aug 13 14:54:25 was refunded though my wallet accout Aug 13 14:54:59 this is from 2-4 months ago and the app reqest still shows as purchased, just done a debug release signed and looking at it now :( Aug 13 14:59:58 StingRay_ are you sure that "purchased" means "purchased but never returned"? Aug 13 15:00:14 Maybe what you're really looking for is a different property Aug 13 15:00:17 0 purchased 2 refunded Aug 13 15:00:35 Wait, so what's wrong then? Aug 13 15:00:45 it returns 0 Aug 13 15:00:54 when it has been refunded 4 months ago Aug 13 15:00:56 :) Aug 13 15:01:01 0 refunded? Aug 13 15:01:06 0 = purchased Aug 13 15:01:11 2 = refunded Aug 13 15:01:21 Why should it be anything else? Aug 13 15:01:46 dont follow Aug 13 15:01:51 I get 0, it should be 2 Aug 13 15:02:05 But they aren't purchased. They're refunded Aug 13 15:02:06 if it's been refunded, why would it still be marked as purchased? Aug 13 15:02:15 ^ Aug 13 15:02:21 thats my problem Aug 13 15:02:27 IAP query says purchased Aug 13 15:02:36 i see Aug 13 15:02:37 google wallet on both sides shows refunded 4 months ago Aug 13 15:02:38 :) Aug 13 15:03:00 "0 purchased 2 refunded" is from Wallet? Aug 13 15:03:10 no, from IAP bundle Aug 13 15:03:18 Huh? Aug 13 15:03:24 google wallet shows the words Aug 13 15:03:26 :) Aug 13 15:03:31 ?? Aug 13 15:03:37 You said IAP shows purchased Aug 13 15:03:40 yes Aug 13 15:03:45 wallet shows refunded Aug 13 15:03:50 hence my problem Aug 13 15:04:14 So 0 purchased amd 2 refunded is what Wallet is saying, no? Aug 13 15:05:10 no, 0,1,2 are constants of the purchase state from an IAP bundle challenge from the billing api Aug 13 15:05:12 It is not the amount of purchased and refunded items he is talking about Aug 13 15:05:21 Oh I see Aug 13 15:05:24 words like purchased and refunded are used in google wallet website Aug 13 15:05:25 :) Aug 13 15:06:11 0 = True, 2 = False, 1 = ? Aug 13 15:06:16 Maybe Aug 13 15:06:43 0 purchased 1 cancelled 2 refunded Aug 13 15:06:59 you get no purchase info if there "never was a purchase" Aug 13 15:07:24 Ah, so IAP says 0? Aug 13 15:07:29 Never a purchase? Aug 13 15:07:35 No, I said never a return Aug 13 15:08:07 purchaseState:0 meaning it's purchased Aug 13 15:08:19 but it was refunded 4 months back Aug 13 15:08:26 Right right Aug 13 15:08:39 tis ok, there is a new sample I got to look over Aug 13 15:08:50 they seem to have updated the helper sample too Aug 13 15:08:56 odd Aug 13 15:30:07 hmmm ok very confused now Aug 13 15:31:03 for anyone interested or that knows, wtf is the diff between http://developer.android.com/training/in-app-billing/purchase-iab-products.html (query purchased items) and http://developer.android.com/google/play/billing/billing_integrate.html (Querying for purchased items) Aug 13 15:32:35 oh the 2nd is just a helper method for the 1st Aug 13 15:32:52 well I'm screwed then cause doing everything correct as far as I can see Aug 13 15:43:13 Has anyone here tried using drawable backgrounds in android L yet? Aug 13 15:43:25 Because... well, they don't seem to work for me. Aug 13 15:45:16 Uh, yeah.. Works fine Aug 13 15:47:05 has anyone come across a `cannot locate symbol "atof"` error when using a native library? Aug 13 15:51:44 alexfu: yes, it's converting from ints to floats Aug 13 15:52:01 or from string to float or some such thing Aug 13 15:52:16 http://www.cplusplus.com/reference/cstdlib/atof/ Aug 13 15:52:54 snowpong: how do i resolve the issue? Aug 13 15:53:05 alexfu: link with stdlib Aug 13 15:53:32 alexfu: -lsdtlib or some such thing - is this with the NDK? Aug 13 15:54:07 snowpong: yeah, with NDK. I thought it links with stdlib already Aug 13 15:55:32 Is their an easy way to add a HashSet to a Bundle? Aug 13 15:55:34 alexfu: well, either you're linking with some incomplete / flakey stdlib or not at all - it's a linker error at least Aug 13 15:56:28 syndarion: looks like it's Serializable Aug 13 15:57:38 canvs2321-: how does that work? Aug 13 15:57:59 should be a put* method for it Aug 13 15:58:03 the bundle Aug 13 15:58:12 alexfu i thought p_l mentions the other day that android's linker doesn't grav dependendent libs transitively, so you need to add everything yourself Aug 13 15:58:25 presumably in the right order also ;) Aug 13 15:59:00 canvs2321-: that's great! Looks like I'll be able to use it for all my sets. No need to convert them to ArrayLists appareantly :) Aug 13 16:02:13 Hey-o! Aug 13 16:09:17 how do properly override finish()? First call super.finish(); and do stuff or the other way around? Aug 13 16:12:48 https://www.dropbox.com/s/v9ouopivnfe7wqj/adb.jpg any idea what could cause my debugable devices to show up 3 times each? Aug 13 16:12:56 2 times when I disconnect them Aug 13 16:13:21 and none of those have any debuggable applications even though my rooted S2 should have all of them debuggable Aug 13 16:14:42 What is the most common way to do UI's for Android games/apps? JavaFX? Drag and Drop -style? I don't know nothing about Android dev. Aug 13 16:14:51 hey guys, I'm having problems with filtering my cursor adapter. According to Stackoveflow it seems like a pretty common problem, yet I'm stumped! Aug 13 16:15:42 Skapadapaduu, I'm guessing most people use some sort of engine like unreal 4 or unity to make their games and build their interface Aug 13 16:16:34 how about apps then? Aug 13 16:16:54 You write layouts. Like web pages. Aug 13 16:17:24 most IDEs provide UI builders. don't use them. write the layouts in xml and use the UI builder only as an inaccurate preview. Aug 13 16:17:52 where do i get common.jar and datachart.jar to put in my libs folder? it seems i need to add them manually as dependencies Aug 13 16:17:54 ui preview in idea is pretty good nowadays Aug 13 16:17:54 layouts in XML. woah, never head of them. Aug 13 16:18:14 heard* Aug 13 16:18:24 Zharf, my UI preview in android studio displays mostly white and errors. Aug 13 16:18:30 Skapadapaduu, well, reading up on hello world tutorial would help :) Aug 13 16:18:42 well I don't use android studio ;p Aug 13 16:19:43 I've attached my source here - I've commented out what I've been using to verify that I am indeed returning the correct cursor to my listview: https://gist.github.com/johnhamelink/4c7b825939704bd8ade9 Aug 13 16:19:43 Skapadapaduu, are you looking for ingame UI or just menu UI? Aug 13 16:20:06 Can anyone give me some ideas how I can improve my design? I need to be able to save and access multiple dialogs. Currently using a navigation drawer on top of a dialog, but imo it looks crappy on portrait mode (landscape too a little). Here the screenshots: http://postimg.org/image/eokwin59b/ http://postimg.org/image/fdv145j3p/ Any advice is appreciated. Aug 13 16:20:06 The problem is that if my filter cursor returns n results, I'll get the first n results of the original cursor! Aug 13 16:20:32 for ingame UI you probably want to use your game engine or write it yourself, either in canvas or opengl depending on what you're using. Aug 13 16:21:18 where do i get common.jar and datachart.jar to put in my libs folder? it seems i need to add them manually as dependencies Aug 13 16:21:47 luist, those are pretty generic names, no one knows what exactly you mean. Aug 13 16:22:18 Mavrik, yep :) Most definitely. I was just wondering if learning JavaFX(/Swing) is a waste of time if you do Android dev. Aug 13 16:22:30 it's a total and utter waste of time :) Aug 13 16:22:35 Android has its own UI toolkit :) Aug 13 16:22:37 even for java dev. Aug 13 16:22:46 Syzygy__: im getting this error: VFY: unable to find class referenced in signature (Ljavax/security/sasl/SaslClient;) when trying to connect to a LDAP server. Its said in stackoverflow that i should specify these 2 jars as dependencies Aug 13 16:25:01 you can probably find them on maven central and include them in your build.gradle file, but I can still not tell which libraries those are exactly Aug 13 16:25:59 any idea what this warning means and if i should care? https://dl.dropboxusercontent.com/u/21637985/Random/Shot-140813-192446-r.png Aug 13 16:26:55 Can capturing all of an application screen (don't need the system level menu bar and back/home buttons, etc) be done with opengl or anything without having root? Aug 13 16:29:01 zugzug, I only know of screenshots so far Aug 13 16:31:10 zugzug: you mean to demo your app, or you mean a function of an app ? Aug 13 16:31:11 Syzygy__: yeah ... following most stack overflow things you find online usually does something along the lines of getting a bitmap from a view's root decor view Aug 13 16:31:37 the problem with doing that is you won't get things like toasts, or dialogs .. since they are in their own window Aug 13 16:32:12 zugzug: your not just wanting a video of your app in action right ? Aug 13 16:32:16 cause thats easy Aug 13 16:32:29 adb can capture videos and screenshots Aug 13 16:32:53 I'd like to be able to record the app, esentially Aug 13 16:33:01 but not lose toasts, dialogs, menu overflow, etc Aug 13 16:33:05 kitkat ? Aug 13 16:33:24 i'm working with 4.0+ atm Aug 13 16:33:26 well you have 2 options, kitkat has native record triggered over adb Aug 13 16:33:40 other option is emulator and something like camtasia etc Aug 13 16:34:02 Can it be done without adb? Aug 13 16:34:20 ie an app feature .. not just for debug purposes Aug 13 16:34:21 probably, but I wouldn't know how. Aug 13 16:34:41 no, doubt it Aug 13 16:34:46 that would need root to get access Aug 13 16:34:56 adb has privs to do it I think Aug 13 16:34:58 there are some apps and things that do it Aug 13 16:35:21 why is adb not an option ? Aug 13 16:35:25 Yeah .. you can pretty easily get the bitmap for the view you are running inside Aug 13 16:35:36 chromecast for example, but since that's google they might have capabilitities that we don't have Aug 13 16:36:03 hey guys any idea why my filter is acting that way? One of the most important things of remote working is building trust and a big part of that is creating an environment that is comfortable for your client. Investing in a microphone is a nice touch that contributes significantly to this. I’d strongly recommend to get one, if this kind of communication is a part of your job - if you charge people, let Aug 13 16:36:05 them to hear you. Aug 13 16:36:07 yeah non-third party apps can just have the phones display buffer Aug 13 16:36:07 oops Aug 13 16:36:09 sorry :D Aug 13 16:36:11 i'm not allowed though :P Aug 13 16:37:30 you could capture the root view and dialogs separately and combine them before displaying, but it's not ideal... and no idea about toasts Aug 13 16:37:46 (frame by frame) Aug 13 16:39:34 Yeah, I would have to tell my "capturer" about the dialog though, yes? I don't think there is a way to iterate through all of the frame/windows in an app Aug 13 16:39:49 Hey guys, any idea why my filter is acting that way? https://gist.github.com/johnhamelink/4c7b825939704bd8ade9 (comment explains all!) Aug 13 16:40:09 I would ideally start capturing the screen whenever the activity starts/a button is pressed, and then just search for all dialogs/toasts etc Aug 13 16:42:23 SimonVT, you said earlier that you have got drawables working on android L right? I assume they have the tag? Aug 13 16:42:58 When the camera takes a picture on Android phones - does it grab more around the edges than the preview shows? Aug 13 16:43:56 How to I make array of a Generic Class (Map) without any warning (like the one I get here: https://dpaste.de/LYZQ) Aug 13 16:43:57 I need to be able to change the color of the drawable at runtime, as far as I know this is only possible with a GradientDrawable, but I can't cast it to that if my drawables have the selector tag Aug 13 16:46:10 what sort of drawable ? Aug 13 16:47:06 astroduck, drop the brackets. -> Map map = new HashMap(); Aug 13 16:47:06 a shape Aug 13 16:47:48 astroduck -> http://developer.android.com/reference/java/util/HashMap.html Aug 13 16:47:53 Your question makes no sense, Syzygy__ Aug 13 16:48:07 No, a selector is not a GradientDrawable.. It's a StateListDrawable Aug 13 16:48:22 I have no idea what that has to do with drawables not working on L Aug 13 16:48:49 Apperently drawable (shapes) won't work without the tag on android L Aug 13 16:49:05 also if it's a shape, there is nothing to prevent you changing anything about it Aug 13 16:49:10 even the …shape :) Aug 13 16:50:24 damn it, I have to leave now. Aug 13 16:50:29 Make a sample, file a bug Aug 13 16:50:40 It's still a preview Aug 13 16:50:58 alright Aug 13 16:52:29 hey guys, can someone help explain fragments to me? I read some things on googlebut i'm still rather confused Aug 13 16:53:26 whats confusing ? Aug 13 16:53:27 kmarlow: Doesn't that make an instance ie object? I want to make an array Aug 13 16:53:49 You want an array of hashmaps? Aug 13 16:54:06 yes Aug 13 16:54:24 StingRay_ i just don't know what the point of them is, why should I use one? in what sense would I need one? Aug 13 16:54:36 WebView.addJavascriptInterface throws an NPE for no obvious reason. Are there any gotchas about it? Aug 13 16:55:23 kmarlow: Actually I am passing this to an AsyncTask but it shows warning, something like "Typecasting to object array" So I thought I'll just make an array and pass that to remove the warning Aug 13 16:55:25 Jack3k3: when you want more control/function and adaptability than a simple view ? Aug 13 16:55:41 sometimes use them headless too Aug 13 16:55:53 many reasons, but you should not if just for the sake Aug 13 16:56:28 so, im leaning towards thinking I dont need it, im attempting to create an app that really only has one screen so im not sure a fragment would be helpful here Aug 13 16:56:40 probably not Aug 13 16:57:24 astroduck: is there a reason you are using an array over a list? Aug 13 16:58:01 okay thanks Aug 13 16:58:53 kmarlow: I can do that too, Is making an array of generic type a bad idea? Aug 13 17:00:18 astroduck: Look at this, https://dpaste.de/vPLV and this, http://stackoverflow.com/questions/16415255/creating-an-array-to-store-generic-types-in-java Aug 13 17:00:19 oh this is stupid now, anyone else using iabv3 ? Aug 13 17:03:40 I have tried the 100% code sample and returns incorrect purchase states Aug 13 17:04:06 so anyone who cancells or gets a refund still has the "purchased" status Aug 13 17:04:41 kmarlow: That makes sense now. Thanks :) Aug 13 17:04:54 anyone else familiar with in app v3 ? Aug 13 17:09:14 Hello all Aug 13 17:10:18 Is there any way to dynamically create a bitmap using functionality like drawLine() or drawRect() without drawing that bitmap to the canvas? Aug 13 17:10:47 I'm trying to create a display of an EKG simulator Aug 13 17:11:30 There's a Canvas constructor that takes a Bitmap Aug 13 17:11:39 and would like to have one dynamically generated image of the waveform wipe over the last image in the background Aug 13 17:11:45 Use that, and it'll draw to the Bitmap Aug 13 17:11:59 SimonVT: and it won't draw to the canvas? Aug 13 17:12:32 rufsketch: The canvas would need to be bound to a view to draw Aug 13 17:12:33 It won't draw it to the Canvas passed to your Views onDraw, no Aug 13 17:12:39 Because that's a different Canvas Aug 13 17:13:05 rufsketch1, your question is strange Aug 13 17:13:14 because it's Canvas that draws to either a bitmap or a screen Aug 13 17:13:38 so it's the other way around :) Aug 13 17:13:40 Mavrik: SimonVT ah okay. So I will need two canvas objects then? Aug 13 17:14:10 anyone know of any good computer science video lectures to watch? Aug 13 17:15:12 rufsketch1: you can subclass view, then override onDraw, then canvas passed will be what's displayed. you can create your own canvas object and draw to it, then copy it into the ondraw canvas (to say, double buffer) Aug 13 17:15:27 if you're going to be doing a lot of drawing repeatidly you might use a surfaceview or even opengl Aug 13 17:15:35 If you want to draw to a Bitmap, use the Canvas(Bitmap) constructor.. It's completely separate from whatever else is being drawn on the screen, or elsewhere Aug 13 17:16:41 lasserix: I am using surfaceview Aug 13 17:16:56 then you can get the canvas from the surfaceholder Aug 13 17:16:56 SimonVT: okay excellent, thank you. Aug 13 17:17:12 and copy your bitmap (or canvas from bitmap) into it Aug 13 17:17:22 by doing the sh.lock sh.lockandpost Aug 13 17:17:29 or just draw directly which will probably be faster Aug 13 17:20:06 rufsketch1, think of canvas as a toolbox for a bitmap Aug 13 17:22:00 1) you can't do much dynamic stuff with a bitmap on its own, you need canvas as a "superlayer"; 2) canvas itself has no bitmap attached unless you attach a bitmap to it; 3) you can have as many canvases as you want, all separate from each other (unless you specify otherwise), and the one passed to onDraw is just one of them Aug 13 17:23:53 hi Aug 13 17:26:44 hi, I have vertical orientated Linear Layout and I would like to place left alinged text and right alinged icon. I did something like: http://dpaste.com/2HHKABN but the problem is when text is too long- icon from right is missing. Aug 13 17:26:51 Do you know any solution for that? Aug 13 17:27:28 use relative layout Aug 13 17:27:50 Put weight on the TextView, not some View in the middle Aug 13 17:28:05 And learn how weight works Aug 13 17:30:05 bah Aug 13 17:30:14 ^^ much better solution Aug 13 17:40:45 can anyone confirm to me that IABv3 works fine ? Aug 13 17:41:14 i've done everything I can think of now, no luck at all Aug 13 17:41:29 can someone just explain me a bit i check JakeWharton example project U2020 there is only 1 gradle file which one is this in android studio structure? Aug 13 17:41:54 i don't understand the question Aug 13 17:51:32 JakeWharton hey ye i saw i write it a bit weird... At your example project U2020 there is only 1 build.gradle file, usualy at fresh project we have 2 files one in app and one in root. The one you have in U2020 is root? Aug 13 17:58:56 on this layout: http://dpaste.com/28V7K17 text sometimes overlaps with icon when it's too long. How can I prevent this behaviour? Aug 13 17:59:00 serously anyone used in app purchases or is it just a none starter given the current state? Aug 13 18:00:02 * ravilov never used any kind of in-app billing, from the looks of it neither did anyone else :) Aug 13 18:00:24 HyperX: there's only the app so I didn't need multiple modules Aug 13 18:00:52 JakeWharton: Okay thanks :) Aug 13 18:01:11 yacek19, use linearlayout and weights instead Aug 13 18:01:40 ravilov: 20 minutes ago I was advised to us RelativeLayout Aug 13 18:01:48 *use Aug 13 18:02:03 hm Aug 13 18:02:44 yacek19, yes, that was one of the ideas, but then another (better) idea was proposed Aug 13 18:02:56 don't stop reading as soon as you get the first bit of feedback Aug 13 18:02:58 You got two suggestions, you chose to go with the bad one Aug 13 18:03:12 ravilov: is there any option to use LinearLayout and weights without specifying hardcoded size ratio? Aug 13 18:03:19 yes Aug 13 18:03:35 I think Aug 13 18:04:07 pretty much you should just try and play with it, hard to tell like this Aug 13 18:07:11 yacek19: use toLeftOf on the TextView and remove the toRightOf on the ImageView if you want the TextView to yield for the ImageView Aug 13 18:07:53 or just use a linearLayout cause it's fast and simple :) Aug 13 18:07:57 like everyone has said Aug 13 18:08:18 weight of 1 on the text to take whatever space is left over from the image Aug 13 18:09:56 JakeWharton: Is there a way to interrupt/stop long Retrofit requests? I looked into the 2.0 spec, but is there something for the current version? Aug 13 18:10:02 no Aug 13 18:10:50 android-studio stopped running on ubuntu 14.04, there are no errors :/ Aug 13 18:10:50 any ideas? Aug 13 18:12:14 what do you mean by "no errors"? did you try running it from a terminal or did you simply try to start it by clicking on icons? Aug 13 18:12:28 yup Aug 13 18:12:35 ... Aug 13 18:12:42 i'll just pastebin the output Aug 13 18:15:43 ahhh, my acra report reader is actually useful now when getting a shitton of reports Aug 13 18:17:36 how do I make a listview that has "automatic more loading" Aug 13 18:17:38 you know what i mean Aug 13 18:18:45 JakeWharton just curious you developing on Win, Linux, or OSx? Aug 13 18:18:49 osx Aug 13 18:19:36 ok, so if tried running android studio as another user(root) and it runs, maybe there is something wrong with my user's config Aug 13 18:20:45 maybe it just wanted to bork your system and it couldn't unless you were root :p Aug 13 18:20:51 Anyone have advice for developing high quality android game graphics with linux? Aug 13 18:21:09 I was hoping to just do gimp/wacom gear Aug 13 18:21:29 this is hardly android-specific Aug 13 18:21:42 android just uses PNGs mostly, you make them with whatever you want Aug 13 18:22:23 also, there isn't exactly any "standard" as to what "high quality game graphics" actually means Aug 13 18:23:05 Well, nuff said then :P Aug 13 18:23:14 this is weird, i deleted the .AndroidStudio folder with the config files, still nothing Aug 13 18:23:38 surely it says at least *something* Aug 13 18:24:07 I'm not using the custom camera app to take photos on my app. When I visualize the images in gallery they are all with the right orientation, but when I open the images they are not like in the gallery. The orientation attribute is missing for this images. (exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED);). How can I get the right orientation like gallery does? Aug 13 18:24:24 JakeWharton, seems you have a broken link in README.md at https://github.com/JakeWharton/u2020, "view the slides" says "presentation not found" Aug 13 18:25:34 question I have a 190x1820 pic that Im trying to display in landscape mode and have it be scrollablle, but I want it to fill the width of the screen (or i guess in landscape mode I want it to fit vertically I mean) Aug 13 18:25:50 im having trouble accomplishing this with imageview, do I need to resize the image to be larger ? Aug 13 18:26:01 Birk_: so how DO you take the photo? Aug 13 18:26:38 Jack3k3: 190x1820? is that a type? Aug 13 18:26:42 *typo Aug 13 18:26:45 no Aug 13 18:26:55 its a really long image i want to be able to scroll through Aug 13 18:27:02 guys, any ideas about the intelliJ channel? Aug 13 18:27:10 snowpong: I mean i'm using a custom camera, inside my app I call the camera hardware. I'm not using the camera app that comes with android. Aug 13 18:27:45 sry for that :) Aug 13 18:28:15 Jack3k3: you could try putting the ImageView in a ScrollView... Aug 13 18:28:37 alexfu, im going to but first i want to get it to fit the screen Aug 13 18:28:44 if that makes sense? Aug 13 18:29:08 ravilov: https://speakerdeck.com/jakewharton/android-apps-with-dagger-devoxx-2013 Aug 13 18:29:36 alexfu,imagine the device in landscape mode, i want the 190px dimension to fit the height of the screen, and you scroll left/right to see the longer dimension Aug 13 18:30:00 so im wondering if i need to resize the image larger in order to get it to go full screen cause ive tried all the scaling types in imageview and its not working Aug 13 18:30:01 JakeWharton, lol, I'm actually already going through it, but you still might want to fix that link ;) Aug 13 18:30:12 already did Aug 13 18:30:16 ah cool Aug 13 18:30:20 thanks for pointing it out Aug 13 18:30:33 no prob Aug 13 18:31:06 anyone had troubles getting asset transfers working on Wear? It worked fine yesterday, but today when i open my project again none of the image assets are transfered to the wear device (text etc work just fine though). Aug 13 18:32:40 Birk_: aha, I believe it's different between Android models - sometimes the image is saved with rotation applied and no EXIF tag, and sometimes the image is saved WITH and EXIF rotation but not actually rotated - I think the proper fix is to "clean up" the image and make sure it's rotated according to the orientation the photo was taken in, and strip away EXIF Aug 13 18:33:01 Birk_: cwac-camera does this here https://github.com/commonsguy/cwac-camera/blob/master/camera/src/com/commonsware/cwac/camera/ImageCleanupTask.java#L50 Aug 13 18:33:32 Birk_: I'm writing my own custom camera activity too - I would suggest you maybe try out cwac-camera before you build it all yourself Aug 13 18:34:37 snowpong: actually I'm using it :), the problem is that the clean up proccess take to long to complete Aug 13 18:34:55 snowpong: Ill take a look again :) Aug 13 18:45:24 can anyone help, Im still having trouble with this, I have a long image, 190x1820, I want to display it when the phone is in landscape mode so I can scroll left and right through it Aug 13 18:45:33 but I want the 190 dimension to fill the entire screen Aug 13 18:45:38 im not sure how to force this Aug 13 18:45:45 none of the scale types will do it Aug 13 18:46:11 are the preferences on the wear app same as on the phone? Aug 13 18:46:23 liek if I change a preference on the phone, will it change on the watch? Aug 13 18:46:27 like* Aug 13 18:47:07 Afzal: only if you write code to synchronize that data, to my understanding Aug 13 18:47:31 Is there a neat way to get all strings displayed in Android Studio so I can check if they need extraction into strings.xml? Aug 13 18:48:04 p_l, man I hate how weird this watch syncing thing is >_< they're like two different apps completely just hanging on to each other by this one little Android wear layer Aug 13 18:48:18 because they are two separate apps Aug 13 18:48:24 I don't like that Aug 13 18:48:46 From the users' perspective, it *is* the same app Aug 13 18:48:56 real world sucks, I know Aug 13 18:49:01 But from the developers' perspective, it's not Aug 13 18:49:08 <_< this isn't real world Aug 13 18:49:21 this... is android? Aug 13 18:49:50 Afzal: those are two separate devices, making it a "single" app would have been horrible on performance etc. Aug 13 18:50:11 ... so instead you get the bits to make it work well and implement whatever model that fits you Aug 13 18:52:52 p_l, as I said, it's the same app from the users' perspective. More could be done to sync them both automatically Aug 13 18:53:03 Does android studio use the gradle wrapper if it exists in a project? Aug 13 18:53:19 If you tell it to Aug 13 18:53:32 SimonVT: How do i tell it to? Aug 13 18:53:44 When opening the build.gradle, select gradle wrapper Aug 13 18:54:14 SimonVT: can you explain a bit more? Im a bit of a newb with studio. Aug 13 18:54:23 I just opened a project from github Aug 13 18:55:40 To open a gradle project, you just press open in AS and select the build.gradle Aug 13 18:55:47 Then you select gradle wrapper Aug 13 18:55:51 Can't explain more than that Aug 13 18:56:33 ok ill try that Aug 13 18:57:41 is there anyway to force an image to only be displayed in one orientation? Aug 13 18:57:47 via imageview Aug 13 18:58:00 ive found that on different devices my image gets rotated Aug 13 18:58:02 SimonVT: customizable or standard gradle wrapper? Aug 13 19:01:12 anyone have experience with finger position tracking and velocity measurement? Aug 13 19:05:28 Jack3k3: can't you just put an imageview of wrap_content in both width and height inside a HorizontalScrollView? Aug 13 19:06:54 Jack3k3: or, you wanted it stretched? then match_parent in height and wrap_content in width and scaleType CENTER_INSIDE... Aug 13 19:08:22 well i found one issue, my fill_parent tags werent working cause it wasnt in the right place in the xml, now its full screen like I wanted, however the orientation flipping is still occuring on different screen sizes Aug 13 19:08:55 Jack3k3: do you want the whole app locked to one orientation? Aug 13 19:10:05 Anyone know what the current line selection background color property is called when changing the style of the android studio color scheme? Aug 13 19:12:26 snowpong: yes but I already set the app orientation to landscape, but when i look at the previous for other devices, the image im trying to displayed gets rotated which i want to prevent Aug 13 19:12:35 Does anyone have a nice book to recommend that focuses on developing android stuff while learning java? Aug 13 19:14:59 Jack3k3: "the previous for other devices" ? doesn't make any sense to me - what do you mean? Aug 13 19:15:29 To anyone wondering, general->"caret row" Aug 13 19:15:56 snowpong: sorry typo, the previews, that show what it looks like on various devices, the image gets rotated Aug 13 19:17:18 So imagine my image is like this ----------, its long and i want it displayed like that in landscape, well on some devices even though they are still in landscape mode, it shows like | Aug 13 19:17:21 a vertical line Aug 13 19:20:53 if i wanted to take out the title bar in a new page, would it be season2014.requestWindowFeature(Window.FEATURE_NO_TITLE); Aug 13 19:21:07 season2014 is the name of the page Aug 13 19:22:14 Jack3k3: strange - I know the orientation on some tablets are sometimes rotated 90 - but I didn't think portrait and landscape was mixed up - this is the Android Studio previews yeah? Aug 13 19:22:53 snowpong yeah, but i dont think its the reason youre thinking Aug 13 19:23:08 i think imageview is just scaling it based on what ive told it, something im doing is wrong Aug 13 19:23:49 in fact, i dont even know how you force imageview to display an image in a certain orientation Aug 13 19:24:31 hello, when uploading .aar to a maven repo for other people to download, is there any way to specify in gradle when declaring the dependency to pick the latest snapshot version so i dont have to write documentation using what will be an outdated snapshot verison? Aug 13 19:25:39 test Aug 13 19:25:53 whoa that was weird someone just bombed the sqlite room Aug 13 19:26:32 hey guys.. lets say i’m retrieving some user information from the LDAP server and ill need to use them on my app. whats a good practice to store these information while the app is running, as if the user was logged in? Aug 13 19:27:46 hi Aug 13 19:28:03 luist: I wouldn't talk to ldap, I'd talk to some sort of web app bridge. Storing user credentials is also super super scary. If you have to store them, store them in ram in a service or something, don't write them out to files Aug 13 19:28:31 dragorn: yeah i didnt think of files Aug 13 19:28:40 dragorn: just while my app is running i guess Aug 13 19:28:53 any body related to android app development on eclipse ?? Aug 13 19:29:02 luist: make a service and keep it in ram there, then Aug 13 19:29:13 luist: you also probably need a service anyhow for your async ldap exchanges Aug 13 19:29:21 luist: if you're doing them direct from the app Aug 13 19:29:58 dragorn: okay but in terms of code structure, what should i use? Aug 13 19:30:15 luist: I don't follow. If you're storing the user creds, just... a string? Aug 13 19:30:35 dragorn: the user has like 20+ fields Aug 13 19:30:49 luist: doing direct auth is a treacherous path. What you really should do is something like oath where the user gets a credential token you hold on to indicating they're valid Aug 13 19:30:51 so... 20 strings? Aug 13 19:31:05 hello. Why does Adblock Plus appear to consume so much traffic? To filter ads, all traffic has to pass through Adblock Plus. Android considers this to be the traffic caused by the app, while it is in reality the sum of all traffic. Aug 13 19:31:10 It this sounding logical? Aug 13 19:31:57 dragorn: OAuth you mean? Aug 13 19:32:24 yes, insert a 'u' where necessary Aug 13 19:33:20 luist: tl;dr, I wouldn't talk ldap from an android app, I definitely wouldn't be trying to send or track user creds. I'd probably set up a web service and hold a token and query that for what they need. And for the love of all, use f'ing ssl if you have to do ldap directly ;P Aug 13 19:34:13 Is there any way to get my custom animations on a fragment transaction such that the fragment replacing the existing one is "on top" of the other? zAdjustment doesn't work for fragments. Aug 13 19:34:46 dragorn: if id use oauth i’d have to setup the webservice in the server too right… i can’t do that atm Aug 13 19:42:38 Any camera experts here? When the preview and the captures aspect ratio differs - are there any rules for what dimension is clipped/extended? So if the preview is less wide than the actual captured image, does it clip the height or expand the width? Aug 13 19:49:23 If you sell an app what obligations do that put on you. I guess you make some diaclaimer that you can stop supporting it ar any time? Aug 13 19:49:59 I don't know of any. :/ Aug 13 19:50:24 Obviously, you got to hold what you promise. I don't know if that's enforcable though... Aug 13 19:57:35 flan3002: start here https://developer.apple.com/appstore/resources/approval/guidelines.html and https://play.google.com/about/developer-content-policy.html I guess Aug 13 19:57:56 sorry, that was for andyroid Aug 13 19:59:18 hey guys… i mark a checkbox and when i change screen and go back, its unmarked again.. how can i keep this information? Aug 13 19:59:35 luist: Save it somewhere? Aug 13 19:59:56 Usually, SharedPreferences. Aug 13 20:03:50 dear god Aug 13 20:03:56 this is driving me crazy Aug 13 20:04:06 how the hell can i force imageview to only show an image in a certain orientation Aug 13 20:04:54 seems i got this situation again; i have a pojo with ~20 attributes whos values i'd like to put in a listview, and a string for the title. so lame to do this in an adapter with a huge case statement; wonder if its worth making a micro library that uses reflection and annotations (as the pointer to the title text) ... Aug 13 20:05:03 or if there is some easier way i'm brainfarting on Aug 13 20:05:23 Snowpong: ty Aug 13 20:06:18 flan3002: thanks… that might help Aug 13 20:06:33 g00s: sounds a good idea, cant think of an easier way Aug 13 20:07:09 Napalm you're pretty inventive, so maybe i should try that Aug 13 20:07:27 g00s: perhaps a better way might be to have the pojo implement an interface that returns a PoJoAdapter.Builder Aug 13 20:08:24 g00s: the pojo objects getPojoAdapterBuilder() could simply have a series of .addField("title", abc); Aug 13 20:08:50 g00s: this means no-reflection, static data set for adapter to use and no worries with pro-guard Aug 13 20:09:56 g00s: ? Aug 13 20:10:01 +1 for proguard mindfullness, but this also doesn't alleviate the boiler plate code that g00s is trying to weed out Aug 13 20:10:03 Napalm yeah that sounds better Aug 13 20:10:21 i bored, im going to do a quick gist of that Aug 13 20:10:25 hehe Aug 13 20:14:17 Napalm i suppose another way, is just use xmlpull to parse a little list, which has Aug 13 20:14:45 erm.. i suppose Aug 13 20:14:56 hmm, yeah :( Aug 13 20:14:59 erm Aug 13 20:15:06 * g00s removes that from irc Aug 13 20:15:14 you guys didn't see that ! Aug 13 20:18:36 i guess the xml way would essentially be like preferences Aug 13 20:19:03 I feel a hole in my memory Aug 13 20:19:19 maybe dave knows what happened Aug 13 20:19:42 :) Aug 13 20:34:29 anyone good in data visualization? on the cover of this book, there is a dashboard - what is the name of the rightmost column http://www.amazon.com/Information-Dashboard-Design-At---Glance/dp/1938377001 Aug 13 20:35:13 variance bar ? Aug 13 20:36:41 hm, variance chart Aug 13 20:40:17 w00t works Aug 13 20:41:23 Napalm lets see ! Aug 13 20:41:55 g00s: https://gist.github.com/slightfoot/6267dbf35ba4bdf5c512#file-pojoactivity-java Aug 13 20:42:10 just hacked together a test pojo Aug 13 20:42:13 but the idea is there Aug 13 20:42:26 you simply create a new adapter from the pojo Aug 13 20:42:57 so did we figure out how to store api keys in the app without them being exposed to everyone? Aug 13 20:43:01 did I miss this somewhere? Aug 13 20:43:10 Napalm nice ! Aug 13 20:43:55 brb, going to grab some foodz Aug 13 20:46:00 question: if I have an activity that is normally started by android.intent.action.MAIN (so by a launcher) and I start this activity from another activity and I add extras to my intent, will the .MAIN activity be remembered in the app history along with all the extras? Aug 13 20:48:38 I need a dev that can strongly customize an mtk6589 based tab firmware Aug 13 20:49:20 -> #android-root Aug 13 21:02:54 ravilov: should be Aug 13 21:03:40 unless you add FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET Aug 13 21:05:03 danijoo, I see Aug 13 21:05:04 thanks Aug 13 21:06:19 <_AleX_> hi all ! 'ive a relative layout, with a textview at left and a imageview at right. I want the textview adapt this width to use all the witdh, but when i try "match_parent" on the textview, my imageview at right is not visible (out of screen) ... how i avoid textview use all avaiable without ejecting imageview of the screen ? Aug 13 21:07:42 _AleX_: Shot the xml you have and I show you what to change Aug 13 21:07:44 _AleX_, were you by any chance here earlier with a suspiciously similar question? Aug 13 21:07:46 show* Aug 13 21:08:12 he probably just needs to add weight to imageview Aug 13 21:08:28 <_AleX_> ravilov: i'm search the solution since 1 hour on stack overflow and tutorials ... Aug 13 21:08:29 You fix it by using linearlayout and weight on the textview Aug 13 21:08:32 but there was discussion about a very similar if not exactly the same thing not so long ago Aug 13 21:08:32 weight in a relative layout? Aug 13 21:08:48 <_AleX_> ravilov: it's not a height problem, but a width problem Aug 13 21:09:04 _AleX_: Show the layout if you want help Aug 13 21:09:29 _AleX_, I never said height... Aug 13 21:09:31 <_AleX_> small screen : < textview > on larger screen : < textview > Aug 13 21:09:43 _AleX_: the xml file... Aug 13 21:10:09 <_AleX_> ravilov: sorry i'm tried, ok ! weight and not height ... sorry :) Aug 13 21:10:43 you could set the textview to span from left side to the point where the imageview begins.. Aug 13 21:11:44 imageview=alignParentRight, textview=width(match_parent)/leftOf(imageview) Aug 13 21:13:11 <_AleX_> danijoo: ravilov : i'm not sure weight is the solution of my problem Aug 13 21:13:19 _AleX_: no it isnt Aug 13 21:13:25 <_AleX_> i'm on a relativelayout Aug 13 21:13:59 I told you to show as the layout you already have 3 times.. Aug 13 21:14:19 <_AleX_> danijoo: i'm read and modify xml file many times Aug 13 21:14:29 <_AleX_> without using layout ui Aug 13 21:15:27 hey guys how can I have scrolling on an imageview that includes momentum scrolling Aug 13 21:15:48 <_AleX_> no solution ? Aug 13 21:15:50 the one caveat is that I need boundaries on how far you can scroll Aug 13 21:16:45 _AleX_, did you provide any xml like you've been asked repeatedly? Aug 13 21:16:53 <_AleX_> maybe someone tell me a good relativelayout tutorial with complex examples ? not just the basic like all tutorials ? Aug 13 21:17:09 there's no such thing Aug 13 21:17:18 the documentation is your only "tutorial" Aug 13 21:17:22 seems like you should stick with the basic ones.. Aug 13 21:18:29 btw the answer is android:layout_toLeftOf="imageViewId" Aug 13 21:21:13 <_AleX_> ravilov: http://pastebin.com/0pGNHtYE Aug 13 21:21:46 _AleX_: I posted the asnwer. Aug 13 21:21:57 <_AleX_> imageview out off screen with layout_width="fill_parent" on textview Aug 13 21:22:47 for the textview: android:layout_toLeftOf and for the imageview, replace line 22 with android:alignParentRight=true Aug 13 21:23:17 <_AleX_> danijoo: i'm trying .. thanks Aug 13 21:23:42 or use the xml editor of and just drag the views arround until they are where you want them :) Aug 13 21:24:05 There's no reason to use relativelayout at all.. There are viewgroups which have attributes whose whole purpose is to achieve this Aug 13 21:27:30 <_AleX_> danijoo: works perfectly, many thanks ! Aug 13 21:29:02 <_AleX_> but i don't understand how it's work ... alignParentRight has the priority on fill_parent ... not very clear Aug 13 21:29:29 AlignParentRight makes it stay at the right corner Aug 13 21:29:40 danijoo: At the risk that it corrupts your carefully coded layout. Aug 13 21:29:49 and toLeftOf makes it span to the Left edge of given view Aug 13 21:30:16 flan3002: sure you have to check that it doesnt do that... Aug 13 21:30:34 Yeah. Or just do it all by hand... ^^ Aug 13 21:30:40 During development, I increment a 'build' number & diosplay it as part of the app title: Chivisda 001 b0047 Aug 13 21:30:42 Is there a way of programmatically adding a string to the ActionBar? Aug 13 21:30:46 flan3002: oh you are talking about ide.. Aug 13 21:31:12 but i think its a good way for learning if you watch what it does with your xml if you are new Aug 13 21:31:26 _AleX_: http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html for a description of what does what Aug 13 21:31:30 <_AleX_> danijoo: ok, but in my first code, i've imageview set to toRightOf the textview ... fill_parent dont care thatt ? Aug 13 21:32:00 Maybe. Looking at samples and modifying them by hand to see what's happening, but still understanding what it's doing, might be better though. Aug 13 21:33:22 <_AleX_> danijoo: many thanks for your help, i'll read your link Aug 13 21:34:12 _AleX_, this seems to work for me: http://pastebin.com/4aMFE127 Aug 13 21:34:58 * ravilov hopes we're done with "textview + imageview problem" kind of questions for a while Aug 13 21:36:03 _AleX_, also, imageView1? textView1? really? at least you could've named them something decent, lol Aug 13 21:36:08 <_AleX_> ravilov: it's works with linearlayout like in your code, but replace with a relativelayout Aug 13 21:36:26 why would I want to use relativelayout? Aug 13 21:36:34 you've been told already relativelayout is not the best option Aug 13 21:36:46 <_AleX_> ravilov: just testing some piece of code, naming is not important at this stage Aug 13 21:36:59 <_AleX_> ravilov: the view will be more complex Aug 13 21:37:15 mmm Aug 13 21:37:29 sorry, can't right now Aug 13 21:37:30 <_AleX_> ravilov: the documentation say that relativelayout is a very good layout Aug 13 21:37:35 time for you to do some footwork now, lol Aug 13 21:37:47 _AleX_, I never said it's not a good layout... Aug 13 21:38:04 <_AleX_> yes ;) go sleeping, it's 23:27 here (france / toulouse) Aug 13 21:38:27 looks like a good way to get across the bay quickly :D http://www.cnet.com/uk/news/salmon-cannon-fires-40-fish-a-minute-up-to-22mph/ Aug 13 21:39:09 <_AleX_> thanks danijoo & ravilov for your help ! good night Aug 13 21:39:36 no time toulouse? :p Aug 13 21:40:28 :)| Aug 13 21:40:49 not Nice? Aug 13 21:40:59 :-) Aug 13 21:41:22 Has anyone else noticed that with the developer.android.com website that clicking anchor links doesn't jump down enough because of the bar at the top of the page? Aug 13 21:41:41 ( relevant: https://www.youtube.com/watch?v=Es0t50H44IE#t=118 ) Aug 13 21:42:14 yiati, for me it jumps down too much Aug 13 21:42:23 always has Aug 13 21:42:24 will calling getView.invalidate in a fragment cause it to redraw? Aug 13 21:42:37 it should I guess Aug 13 21:42:49 ravilov: ooh I found a ticket for it, https://code.google.com/p/android/issues/detail?id=74292& Aug 13 21:43:05 If that annoys anyone else, go to that link and star it to get attention Aug 13 21:44:09 hm, how does me starring it create attention? I thought that's like just my personal bookmark Aug 13 21:45:10 "Vote for this issue and get email change notifications" Aug 13 21:45:18 if you hover over the star Aug 13 21:45:26 Hi I am trying out this http://www.herongyang.com/Android/shell-dalvikvm-Command-to-Run-Java-Application.html but when I reach the last step: dalvikvm -cp Hello.dex Hello I get a bunch of errors such as: java.lang.NoClassDefFoundError: Hello at dalvik.system.NativeStart.main(Native Method) ...? what can be the issue? I am running Linux localhost 2.6.35.7 #1 PREEMPT Tue Sep 27 15:10:11 KST 2011 armv6l GNU/Linux (emulator on android Aug 13 21:45:27 samsung) Aug 13 21:45:49 hm ok Aug 13 21:45:52 ravilov: you can change the email notifications though in the settings Aug 13 21:45:57 and keep it starred Aug 13 21:45:58 whats a good paste bin Aug 13 21:45:59 ok Aug 13 21:46:07 Jack3k3, any is good Aug 13 21:46:10 Jack3k3: pastie.org Aug 13 21:46:36 ravilov: I wouldn't like ix.io for huge amounts of Java code... ^^ Aug 13 21:47:03 ok fine Aug 13 21:47:07 any that I've seen so far Aug 13 21:47:11 which might not be that many Aug 13 21:47:14 (never heard of ix.io) Aug 13 21:47:17 i need some help, http://pastie.org/9471525 ive trying to get fling to work on an imageview, and it compiles fine, but on my device the image isnt moving Aug 13 21:47:18 http://pastie.org/9471525 Aug 13 21:47:56 whoops didnt mean to hit that twice, anyway, i debugged it and i think the if statements for checking the fling do get activated, so im not really sure whats wrong Aug 13 21:48:42 ravilov: ix.io is quite handy to pipe logs into. Anything that doesn't need fancy syntax coloring. Also, it's only the data, nothing around, which I highly appreciate. Aug 13 21:49:13 yeah I just checked it out, interesting Aug 13 21:49:28 ravilov: There's an ArchLinux community package that provides a CLI client... Aug 13 21:49:39 cool Aug 13 21:49:49 Jack3k3, gdt.onTouchEvent(event); Aug 13 21:49:52 return true; Aug 13 21:49:56 should probably be replaced with Aug 13 21:50:04 return gdt.onTouchEvent(event); Aug 13 21:50:25 Do you use AL? Aug 13 21:51:42 me? Aug 13 21:51:49 Yup. Aug 13 21:52:06 what's AL? Aug 13 21:52:34 Jack3k3, if that doesn't help, try reducing SWIPE_THRESHOLD_VELOCITY and/or SWIPE_MIN_DISTANCE, see what happens Aug 13 21:52:54 ravilov: I was talking about ArchLinux. What might AL be? :P Aug 13 21:53:10 ohhh sorry Aug 13 21:53:15 I'm looking at this code here Aug 13 21:53:18 no I don't use arch Aug 13 21:55:46 tbh I've never really tried it Aug 13 21:55:56 might just try it in a VM to start with Aug 13 21:56:48 wow, this is weird Aug 13 21:57:03 the mirror that's closest to me also seems to be the slowest Aug 13 21:57:11 you could try not hitting enter so frequently too, that'd be great Aug 13 21:57:18 ravilov, hmm weird i tried all your suggestions and no luck, im wondering if its something to do with my imageview Aug 13 21:58:21 the image is a big long image,displayed in landscape, the idea is to scroll left/right to see all of it, i have it set to wrapcontent & centercrop in the imageview so its about fullscreen and it just shows a portion of the entire horizontal span Aug 13 21:59:10 hi Aug 13 21:59:13 I would like to have a service that starts each time a change is made in a database or periodically. What type of service should I use? Aug 13 22:01:37 Jack3k3, try logging velocityX and velocityY so you can see what values you're getting (if you're getting anything) Aug 13 22:02:23 yacek19: http://developer.android.com/reference/android/database/ContentObserver.html for your db question Aug 13 22:03:15 Jack3k3, also I'm not sure gesturedetector is the best choice for what you need Aug 13 22:03:34 but I guess it might be Aug 13 22:04:00 bankai_au, were you talking to me about hitting enter? Aug 13 22:04:14 yes Aug 13 22:04:21 hi there Aug 13 22:04:32 I'm hitting enter too frequently??? Aug 13 22:04:33 wow Aug 13 22:04:37 no I don't Aug 13 22:04:51 is there a way to prevent a poping message from blocking input on android? Aug 13 22:05:16 blocking input? Aug 13 22:05:36 I have « unfortunately, launcher has stopped » blocking me from using my 4.2 phone Aug 13 22:05:44 it pops every second Aug 13 22:05:46 i must be blind Aug 13 22:05:51 br4ndon: no Aug 13 22:05:52 where is the watches window in android studio Aug 13 22:05:52 bankai_au: thanks, and what about type of service? Aug 13 22:06:06 this is insane Aug 13 22:06:14 i have told it to start debugging and it does but i dont see a watches window or debugger window actualy Aug 13 22:06:23 br4ndon, that's a FC, that's a critical system message and as such cannot be blocked or hidden Aug 13 22:06:32 what you should do is fix whatever is crashing Aug 13 22:06:38 ah nvm got it Aug 13 22:06:39 not try to hide or ignore the error Aug 13 22:07:40 also that's hardly a dev question Aug 13 22:09:47 ravilov: but how could I fix it if ALL INPUT IS BLOCKED? Aug 13 22:10:34 by fixing whatever it is that's crashing... Aug 13 22:10:49 all the info you need is in logcat Aug 13 22:11:23 if it's not your own app that's crashing... well like I said, that's hardly a dev question then Aug 13 22:11:47 throw it in the bin and get an iphone Aug 13 22:12:10 you must be the local troll, bankai_au Aug 13 22:12:16 no i am Aug 13 22:12:20 lol Aug 13 22:12:24 can there only be one? Aug 13 22:13:09 i don't troll this channel too much, actually Aug 13 22:13:25 i just write off statistically outlying responses as a bad day Aug 13 22:13:35 ravilov, hmm interesting, it seems i never get inside the if statements that return false, Aug 13 22:13:36 bankai_au everything is awesome ! Aug 13 22:13:46 ravilov: that is where I thought this channel could help: how do one deal with android's system storage from a linux workstation? Aug 13 22:13:52 that lego movie was great Aug 13 22:14:04 lol cute Aug 13 22:15:12 ravilov, i found something interesting, in the set of if statements taht check if the swipe conformed to the min distance/velocity, i set a breakpoint at the very beginning and do a left to right swipe, I see that the values on e1.getX(), e2.getX(), velocityX, velocityY, I get show all indicate that the 2nd if statement should execute (the one commented //left to right Aug 13 22:15:14 but it does not Aug 13 22:15:28 in fact none of the if statements are evaluated as true Aug 13 22:15:52 man damn. why won't the view pager let you setOffscreenPageLimit to zero. having to try and figure out a hack because I don't want a map fragment to be loaded in everytime, only when clicked. setUserVisibleHint won't work, I don't think, because I need to inject the SupportMapFragment in onCreateView Aug 13 22:17:22 Im using this (http://stackoverflow.com/questions/7044868/how-to-tell-if-user-is-on-lock-screen-from-service) in my livewallpaper so that it looks different on the lockscreen, however theres a delay with the changes after I unlock the device Aug 13 22:17:26 Does anyone know why? Aug 13 22:17:44 I have an app which is like a directions guide. It has a main activity, which should display a mapview and the next street in the directions, and a detail activity, showing all the streets in the activity. Right now I'm fetching the location and loading the street in the main activity. But I have to redo this everytime the user goes to the detail activity. Would a service be appropriate here? Aug 13 22:21:00 syndarion: rxjava behavioursubject Aug 13 22:21:36 Jack3k3, well there you go, that's something to work on then Aug 13 22:21:42 bankai_au: euhm, what? :p Aug 13 22:22:12 g00s: i should get a commission for this ;) Aug 13 22:23:51 Solved my problem: Aug 13 22:23:52 String title = (String) getTitle(); Aug 13 22:23:54 String buildId = BUILD_DATE_FORMAT.format(START_MILLI); Aug 13 22:23:55 CharSequence titleNew = title + " build:" + buildId; Aug 13 22:23:57 setTitle(titleNew); Aug 13 22:27:37 bankai_au onNext(commission) ;) Aug 13 22:28:22 haha i really did just 'lol' Aug 13 22:30:19 ravilov, any idea why this (velocityX > SWIPE_THRESHOLD_VELOCITY) is evaluating to false if velocityX = 2754.2341 and SWIPE_THRESHOLD_VELOCITY is 200 ? Aug 13 22:32:15 Jack3k3, not sure, but it might be a good idea to declare SWIPE_THRESHOLD_VELOCITY as a float Aug 13 22:32:30 private static final float SWIPE_THRESHOLD_VELOCITY = 200f; Aug 13 22:33:10 Jack3k3, I guess you'll just have to play around with it Aug 13 22:33:59 Why are there not macros in Java? Aug 13 22:34:12 like c macros O.o Aug 13 22:34:18 or lisp macros :D Aug 13 22:34:19 yes Aug 13 22:34:29 because c macros suck ass Aug 13 22:34:37 because java is not c or lisp Aug 13 22:35:23 java has a completely different philosophy and macros really just don't fit into that Aug 13 22:37:18 the java philosophy is to repeat yourself as much as possible Aug 13 22:38:39 repeat yourself and do it as verbosely as possible Aug 13 22:40:07 bankai_au i think we're ravilov is overwhelmed by our ugh 'contributions to the discussion' Aug 13 22:40:32 well oddly enough, the only way I could get it to work was by declaring a boolean velocityCheck = (Math.abs(velocityX)) > 120.0); Aug 13 22:40:47 g00s, no I just don't get what you're saying, you're not verbose enough Aug 13 22:40:47 :p Aug 13 22:40:53 Jack3k3 thats not odd :) Aug 13 22:41:08 what is the result of '>' ? Aug 13 22:41:10 i can see that gets activated to true when i do a left to right swipe, so I changed all the if statements to use that bool in them, although the scroll still doesnt work Aug 13 22:41:27 g00s 0 or 1? Aug 13 22:41:43 oh sorry thought it was a syntax question Aug 13 22:42:08 Jack3k3, a boolean expression NEVER returns a number Aug 13 22:42:19 we're not writing C here, dammit Aug 13 22:42:22 oh well true/false then haha Aug 13 22:42:37 s/returns/evaluates to/ Aug 13 22:44:21 still doesnt make any sense why if(Math.abs(velocityX) > 120.0) fails to evaluate, but boolean velocityCheck = (Math.abs(velocityX) > 120.0); does Aug 13 22:44:33 how is that even possible Aug 13 22:48:13 anything cool in android land today? AS 0.8.6 is promoted to beta Aug 13 22:48:42 Jack3k3, I suspect you really used to code in C or similar language before, haven't you Aug 13 22:48:52 yeah guilty Aug 13 22:48:58 I'm not sure if "120.0" is a float in java Aug 13 22:49:02 hm I guess it probably is Aug 13 22:49:06 I always write 120f Aug 13 22:49:09 ah Aug 13 22:49:35 Napalm are you still eating ? O.o Aug 13 22:50:06 When should one use a service? Aug 13 22:50:28 g00s: no Aug 13 22:50:44 whats up Aug 13 22:51:20 To get a One Plus you gotta enter a miami style booty shaking contest Aug 13 22:51:21 Napalm heh, nothing. thought that was a big long meal Aug 13 22:51:35 lol Aug 13 22:52:18 aren't those the best Aug 13 22:52:19 ? Aug 13 22:56:05 they should fire all the executives from the company, and stop the stupid competitions Aug 13 22:56:32 they had already lost me at smash your phone and send us a video of it Aug 13 22:56:48 what is the non support version of http://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter.html Aug 13 22:57:33 https://developer.android.com/reference/android/support/v13/app/FragmentPagerAdapter.html Aug 13 22:58:04 now they want ladies to send them pictures of drawings on their bodies Aug 13 22:58:36 who's this "they"? Aug 13 22:58:58 One Plus One, or as I like to call them, One Minus One Aug 13 22:59:19 ah Aug 13 22:59:51 its a good phone but you have juvenile executives acting silly Aug 13 22:59:52 would be funny if I had their phone already, then smashed it and sent them a video Aug 13 23:00:05 s/a/the/ Aug 13 23:12:39 Is it possible to have like an activity independent thread, that stores the user's location and does some operations with it, and can report back to a single activity? Aug 13 23:13:38 goddddddddddddddddddd Aug 13 23:14:11 syndarion, that would be a service that is set up to only responds to your activity Aug 13 23:14:52 ravilov: may I explain the reason for my question? Aug 13 23:15:26 sure? Aug 13 23:16:37 I have an app, containing a db table with street names and their latlng. Aug 13 23:16:44 In the app, each street needs to be checked by the user. Aug 13 23:17:08 So the main activity displays a MapView, and should display something like "Go to street X" Aug 13 23:17:26 right now, I'm fetching the location in this main activity Aug 13 23:18:02 so every time this activity goes to the background and back, this process restarts Aug 13 23:18:23 I was thinking about keeping the location and next street in like a service or thread or something Aug 13 23:18:32 um ok Aug 13 23:18:35 and continue to update this, even when the main activity is not visible Aug 13 23:18:40 not sure why you thought my answer would change, lol Aug 13 23:18:45 I still say a service Aug 13 23:18:54 and when the main activity is visible again, it just "asks" the service Aug 13 23:18:55 you can make it be non-exported, ie. private Aug 13 23:19:09 that would be an appropriate use case for a service? Aug 13 23:19:15 yes Aug 13 23:19:30 and would this be a regular service, being no intentservice? Aug 13 23:19:36 rxjava Aug 13 23:19:45 um Aug 13 23:19:54 I don't know what you mean by regular service Aug 13 23:20:02 just a service like any other Aug 13 23:20:07 ravilov: the docs mention Service and IntentService Aug 13 23:20:08 you start it, then you bind to it Aug 13 23:20:17 yeah not sure what the latter is Aug 13 23:20:20 I meant Service Aug 13 23:20:41 but the make it like: you create a service, give it a task, let it finish and destroy itself Aug 13 23:20:49 which is not exactly what I need Aug 13 23:20:52 therefore my question :p Aug 13 23:20:56 not quite Aug 13 23:21:13 if you bind to it, then yes it will terminate as soon as you unbind Aug 13 23:21:25 but if you start it first and THEN bind, it will just keep running Aug 13 23:21:35 at least according to my experience Aug 13 23:21:47 guess I'll have a lot of reading to do :p Aug 13 23:21:49 you could also keep a record in your database of what streets have been "checked" Aug 13 23:21:59 and update it as soon as possible Aug 13 23:22:14 that way you don't even need a background job Aug 13 23:22:28 An intentservice will generally listen for intents, and do nothing until it receives one, then execute that one and finish (unless more intents queue up in the meantime). Aug 13 23:22:41 isn't it bad that the locationclient and locationupdates aren't updated when the main activity is in the background? Aug 13 23:23:16 huh? Aug 13 23:24:30 the streets all have a latlng, so when the user comes close enough to this coordinate, the "next street" should be updated Aug 13 23:24:44 right now, the location updates happen in the main activity Aug 13 23:24:55 ok? Aug 13 23:25:09 isn't that bad? Aug 13 23:25:16 I don't know Aug 13 23:25:18 too little info Aug 13 23:25:20 since the location isn't updated when going to another activity Aug 13 23:25:21 it doesn't seem bad really Aug 13 23:25:36 hm Aug 13 23:25:39 ok, no idea Aug 13 23:25:47 your case seems increasingly complicated Aug 13 23:27:22 ravilov: I've sent you a PM Aug 13 23:27:29 syndarion: you dont need a service Aug 13 23:27:49 you can just get the latest location everytime onresume of your activity is called and update it correspondingly Aug 13 23:27:51 syndarion, PMs are generally not preferred, it's better to have a public discussion than one-on-one Aug 13 23:27:59 ravilov: ok np Aug 13 23:28:07 thought I was bothering the rest in the channel :p Aug 13 23:28:08 unless you want to bug your users with notifications Aug 13 23:28:18 that's what the channel is for... Aug 13 23:28:44 lasserix: but what if the activity is left for a while? Aug 13 23:28:55 I believe I am indeed making things way too complicated :p Aug 13 23:29:01 *left off? Aug 13 23:29:04 does it matter? Aug 13 23:29:09 well Aug 13 23:29:12 unless you are tracing the streets Aug 13 23:29:12 maybe you just need to study the android activity lifecycle Aug 13 23:29:41 are you tracing the streets, so if i am walking down street a b c d e f and your app is in the background during b c d you need to colorize b c d on the mapview or something? Aug 13 23:29:52 lasserix: only the "next street" needs to be updated appropriately.. which, is in fact only viewable in the main activity Aug 13 23:29:59 overcomplicated much? :p Aug 13 23:30:01 yeah Aug 13 23:30:02 so Aug 13 23:30:17 when onResume gets called, determine the location and update nextStreet accordingly Aug 13 23:30:27 no need for a background service Aug 13 23:30:31 indeed Aug 13 23:30:32 syndarion, the main question is - do the streets get "checked" manually by the user, or semi-automatically by simply going there (and then using GPS)? Aug 13 23:30:44 ravilov: going there Aug 13 23:30:48 ah Aug 13 23:30:58 Hi all Aug 13 23:31:03 but they're not checked in the db or something Aug 13 23:31:13 maybe they should be Aug 13 23:31:13 the user just needs a hint of where to go next Aug 13 23:31:20 if you dont need to keep a history of the streets traversed, then you only need to do it when your activity is showing Aug 13 23:31:26 indeed Aug 13 23:31:42 that's why I said you probably just need to study the app lifecycle Aug 13 23:31:58 maybe that's something I'll have to communicate to my employer :p Aug 13 23:32:11 the street checking thing in the db, not the app lifecycle ;) Aug 13 23:32:20 ...so? Aug 13 23:32:28 oh wait Aug 13 23:32:29 nevermind Aug 13 23:32:33 I'm tired Aug 13 23:32:36 I should probably go Aug 13 23:33:03 Tired as well :p Aug 13 23:33:23 probably the reason why I'm thinking of all these whack theories :p Aug 13 23:33:29 Please does anyone know the development environment XAMARIN? Aug 13 23:34:51 *shudders* Aug 13 23:35:30 so why do people always hestitate to ask the main question and instead like to beat around the bush? Aug 13 23:36:11 this is not helpdesk, you don't mention a topic and then wait for an agent's undivided attention Aug 13 23:36:11 same reason people start sentences with 'so' Aug 13 23:36:18 Did I? My sincerest apologies… Aug 13 23:36:25 no, not you Aug 13 23:36:43 bankai_au, I sense you have a problem with me, why is that? Aug 13 23:37:25 if you do, you should be straightforward and not passive-aggressive about it Aug 13 23:42:02 is there any reason why gcm registration id would invalidate daily? (i am not calling gcm.unregister() or gcm.register() at all) Aug 14 00:15:00 so whats the way i can do the thing with the sdk to make my app work when it is not running like i expect it to? Aug 14 00:18:57 okay guys can someoone please help me out, http://imgur.com/a/6JRx8 Aug 14 00:19:20 g00s that whoosh transport tech is crazy Aug 14 00:19:34 the first view is how i want the image to display, but as soon as i encapsulate the imageview in a scrollview, it fucks up my scaling Aug 14 00:19:42 i want to scroll left right Aug 14 00:35:44 my question on stackoverflow if anyone can take a look: http://stackoverflow.com/questions/25298318/scrolling-a-wide-image-using-imageview-android Aug 14 00:40:52 Jack3k3: why not subclass a view and override ondraw Aug 14 00:43:14 lasserix, im not very familiar with that, (i just am learning to work on android), is such a method well documented? Aug 14 00:43:25 sure Aug 14 00:43:30 subclass a view Aug 14 00:43:34 override ondraw Aug 14 00:43:39 hold the current offset Aug 14 00:43:54 that is determined by the diff on touch.move event Aug 14 00:44:29 looks like you might have to wrap your imageview in a parent relative / linear layout inside the scrollview if imageview in scrollview itself is not working Aug 14 00:44:46 tho thats a reall big image so you sure you want to load it all into memory at once? Aug 14 00:45:41 oh i didnt think it would take a ton of memory, but yeah maybe you're right, though its a MB or so but I guess that's compressed heh Aug 14 00:46:07 yeah thats compressed... uncompressed it'll be huge Aug 14 00:46:19 actually i upped its size by a factor of 10 Aug 14 00:46:28 it was normally 190x1280 or something like that Aug 14 00:46:47 just cause i was trying to get it to scale right.. so that may make it less of a burden? Aug 14 00:47:21 yeah Aug 14 00:49:51 mm time to go home Aug 14 00:52:47 android studio is so annoying.. i restarted my project in a new path and it keeps copying it to the old one… wtf is that Aug 14 01:04:24 luist: try trashing that iml file, then reimporting it Aug 14 01:10:11 anyone know if there's a standard way to implement bottom sheets yet in Android? http://www.google.com/design/spec/components/bottom-sheets.html# Aug 14 01:21:13 barbs yeah http://developer.android.com/reference/android/widget/SlidingDrawer.html Aug 14 01:23:49 g00s: I don't think that's a bottom sheet Aug 14 01:23:59 i cant tell the difference :) Aug 14 01:28:33 where do i define the first screen being called by my app? manifest? Aug 14 01:29:02 What do you mean first screen? The first activity it opens? Aug 14 01:34:43 any reason why embedding imageview in scrollview only lets me scroll up/down but not left/right Aug 14 01:36:49 Jack3k3 did you put it in a HorizontalScrollView? Aug 14 01:37:06 ah no didnt kknow that was a thing haha Aug 14 01:37:27 Haha that'll do it! Put a horizontal scroll view in the scroll view Aug 14 01:47:39 jabza, that helped, its close now, only 2 problems. 1) the image doesnt start at its far left (and in fact i cant scroll left to see the rest of the image).. 2)) i can keep scrolling right past the end of the image Aug 14 01:48:34 Did you try setting the gravity of the imageview to be centered? Aug 14 01:51:32 jabza, changing the gravity doesnt seem to make any change? Aug 14 01:53:29 It depends on the way you're doing your layout, really. Is there anything that would make the image align to the left? Aug 14 01:57:44 jabza, not that i can tell, this is my simple xml http://pastie.org/9471995 Aug 14 02:01:33 So you only want it to scroll horizontally, not vertically? Aug 14 02:04:22 Also, do you need that TextView there? I don't use FrameLayout very often, so I'm not 100% sure why it would be putting your image to the left. Maybe try changing the LinearLayout's width and height from "match_parent" to "wrap_content" Aug 14 02:19:02 jabza, sorry ran out for a sec, yes only scroll horizontally, which it does now, and no i dont ned the textview(i commented it out), i also changed linearlayout to wrap_content like oyu suggested Aug 14 02:19:05 still no luck Aug 14 02:19:24 ignore the old code on the left here but look : http://i.imgur.com/OWkPNqp.png Aug 14 02:19:46 that is kinda how it shows up, to the left there is more image that you cant scroll to Aug 14 02:20:51 also when scrolling i can see the little scroll indicator bar and it's position indicates that it thinks that is the beginning of the image Aug 14 02:25:28 I'd try using a relative layout instead of a linear layout, now that I look at it. You can also try setting the width of the linear layout to something specific, like 150dip, but a relative layout is better for scaling anyways Aug 14 02:26:58 nobody here? Aug 14 02:28:10 baronz there's people here Aug 14 02:39:14 jabza, the only thing that made the left side of the image viewable was setting the scrollviews width to a size similar to that of the image (3000px) but that completely fucks up the scrolling so that doesnt work Aug 14 02:39:57 Did you try changing to a relative layout rather than linear? Aug 14 02:41:54 yeah no luck though ive never used that before so i dunno if i need to do some more modifications other than just changing to a relative Aug 14 02:42:41 i mean are there different attributes than linear that i should be playing with Aug 14 02:43:20 ALIGN_PARENT_LEFT maybe? Aug 14 02:43:34 Yeah, layout gravity works a little differently, and you can set it to align against the edges of other views Aug 14 02:43:52 Sure, you can try that, but it would align it to the left of that parent. I'd try top or bottom Aug 14 02:44:17 If you press shift + F1 when your text cursor is over RelativeLayout, it should open the Android docs on it which should help out Aug 14 02:48:44 jabza, interestingly enough, the problem is fixed if i remove the linear/relative layout and just have horizontalscroll + imageview Aug 14 02:49:34 That would make sense. It was the linear layout width that was making a weird size. Glad you got it figured out finally! Aug 14 02:50:40 yea thanks for the help **** ENDING LOGGING AT Thu Aug 14 02:59:59 2014