**** BEGIN LOGGING AT Sun Dec 08 02:59:58 2013 Dec 08 03:00:15 getItem(position) should be the equivalent of mycollection.get(position) Dec 08 03:00:18 I thought taht would be getItenID Dec 08 03:00:22 i.e. return the positionth index within a collection Dec 08 03:00:39 getItemId returns the ID of an item - unless you haven't implemented it in which case returning position will be fine. Dec 08 03:02:15 I remeber there was a sample project that used ListView and an array to populate the list view with countries, but I can't find it anymore Dec 08 03:03:34 dodobrain I tried helping you through it... Dec 08 03:03:40 seem to have just ignored me lol Dec 08 03:03:45 Anthaas, no i haven't.. Dec 08 03:03:46 i Dec 08 03:04:00 i'm trying to add code to the MyAdapter class Dec 08 03:04:05 aahhh OK :-) Dec 08 03:04:25 Ill help you with the getView() mehtod Dec 08 03:06:00 so in my constructor since i am receiving a context, i assume i need to save this in a local class variable as well? Dec 08 03:06:13 a member variable, yeah Dec 08 03:08:01 same with the collection you are passing in Dec 08 03:08:54 for now, i have created MyAdapter(Context c, ArrayList objs) { this.context = c; this.objects = objs; } Dec 08 03:09:07 thats cool Dec 08 03:09:20 right, you have the 4 functions in? Dec 08 03:09:24 have you implemented any of them?> Dec 08 03:10:13 nope.. i public int getCount() { return objects.size(); } public Object getItem(int arg0) { return objects.get(arg0); } Dec 08 03:10:24 dunno what to do with getItemId() Dec 08 03:10:28 return arg0 Dec 08 03:10:34 ah, ok Dec 08 03:11:06 done.. so only getView() remains Dec 08 03:11:31 right Dec 08 03:11:58 have you named the arguments in the signature: position, convertView, and root? Dec 08 03:12:27 not yet.. renaming now Dec 08 03:12:32 .part #android-dev gotta get back to coding Dec 08 03:12:52 lol Dec 08 03:12:58 right.. method sig is done Dec 08 03:13:00 what was that? lol Dec 08 03:13:02 ok Dec 08 03:13:15 he mistyped, he meant to do /part Dec 08 03:13:18 seand, i know i'm kinda spamming #android-dev.. please bear with me Dec 08 03:13:28 i don't care Dec 08 03:13:29 first in the body, we need to make sure that we only inflate each item if it hasn't been done before. so... Dec 08 03:14:25 if (convertView == null) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(R.layout.your_item_view, null); } Dec 08 03:17:16 got it / understood it? Dec 08 03:17:19 i don;t understand the phrase 'inflate each item' Dec 08 03:17:24 ok Dec 08 03:17:43 Well, what "getView" does is return the layout to be implemented within each item of the list Dec 08 03:17:52 So, of course, we want each item to have slightly different content Dec 08 03:18:09 But by inflating the same view. So, each item will have the same layout, but different stuff in it Dec 08 03:18:11 Make sense? Dec 08 03:18:16 yes. so why not just create a new view that is of our own new type ? Dec 08 03:18:33 Inflating one each time is costly. Dec 08 03:18:46 If we can, we want to keep reusing one we have already inflated. Dec 08 03:19:17 right.. so inflate here means creating it anew ? Dec 08 03:19:21 Not quite Dec 08 03:19:38 What it means is taking our XML layout, and opening it up so we can edit it dynamically. Dec 08 03:19:48 So it takes the XML layout and makes it a View by inflating it. Dec 08 03:20:30 ah, ok. so inflation means reading the xml layout and then generating the graphical representation of it, yes? Dec 08 03:20:36 Exactly :D Dec 08 03:21:01 So what we are inflating is the XML layout you have already defined for your list items Dec 08 03:21:07 and it is expensive because theres no need to generate 1000 ui elements (if my arraylist has 1000 elements) if only 7 or 8 are going to be on screen? Dec 08 03:21:16 No Dec 08 03:21:20 expensive becuase the xml has to be read everytime Dec 08 03:21:26 forgot to mention it previously Dec 08 03:21:59 Inflating is computationally expensive. Yes, it has to read it every time it has a view. If there are 1000 views, we have to do so 1000 times. If we can inflate it and read it once, and use it 1000 times, thats a LOT better. Dec 08 03:22:54 ah.. so it is *a* graphical representation of the xml layout.. and it can be reused to generate as many graphical layouts as necessary Dec 08 03:22:55 Understand? Dec 08 03:23:01 Exactly! Dec 08 03:23:04 i was thinking in terms of the views themselves Dec 08 03:23:25 Each time, we are ultimately just changing the content of the stuff in the view after we have inflated it once. Dec 08 03:23:26 Ok? Dec 08 03:23:31 i.e. 8 are on screen but the astual list itself has 1000 elements. so no need to have 1000 views Dec 08 03:23:45 Yeah! Dec 08 03:24:07 The list will generate a few off of the screen for scrolling smoothly's sake, but thats it Dec 08 03:24:17 right, so give that we can show 8 list items and there are a total of 1000 items. how many times do we inflate the layout? 8 or just once? Dec 08 03:24:18 After that, it will call the getView() function as an when it needs Dec 08 03:24:28 Just once :D Dec 08 03:24:42 (Unless the GC needs to recycle the convertView ) Dec 08 03:24:46 thanks.. i was confused and thought it would need to be inflated 8 times :) Dec 08 03:24:59 Hahah nope Dec 08 03:25:03 Right understand now? :-) Dec 08 03:26:28 yes, i do. Dec 08 03:26:30 Cool Dec 08 03:26:33 thanks for being patient Dec 08 03:26:43 Hahaha np, we all need to start somewhere. Dec 08 03:26:48 Right Dec 08 03:26:58 Next, you need to grab the views you want to edit! This should be simple! Dec 08 03:27:18 so after this if block, convertView is holding a view that is ripe for population ? Dec 08 03:27:26 Yes! Dec 08 03:27:27 If I have a textview in the view you inflated that holds the name thats in an object in your collection, you do this (for example) Dec 08 03:28:06 TextView nameTextView = (TextView) convertView.findViewById(R.id.list_item_name_textview); Dec 08 03:28:25 nameTextView.setText(objects.get(position).getName()); Dec 08 03:30:01 and then Dec 08 03:30:04 right at the end Dec 08 03:30:11 you call return convertView; Dec 08 03:30:13 So I'm planning on the ability to display news in my app. What's the best way to do this? I could do something simple where it gets some json which contains the title, post date, content, etc, or I could go for something closer to markup. Dec 08 03:30:44 Eviltechie: XML (RSS) and JSON are valid options Dec 08 03:30:56 dodobrain: Let me know when you've done this. Dec 08 03:31:13 Anthaas, yes i will.. i'll post it to pastebin or something Dec 08 03:31:20 dodobrain: Yeah - I was about to suggest that Dec 08 03:32:09 gotta be away from keyboard for about 10 mins or so.. but i'll definitely finish it and let you know and post it rto pastebin as well. thanks :) Dec 08 03:32:19 dodobrain: I need to go soon! :( Dec 08 03:32:34 I'm more interested in what I do once I get the xml/json Dec 08 03:32:48 Eviltechie: Once you've parsed it into objects etc? Dec 08 03:33:38 I would be displaying something along the lines of blog posts. I wouldn't want to have to write my own parsing stuff for images, videos, etc Dec 08 03:34:01 Well, what you do depends on the content of the feeds Dec 08 03:34:43 It wouldn't be too complicated. Text and images would likely be the scope of it, but it would be nice to not have to push out an update one day if we decided to throw in a youtube video or a song Dec 08 03:35:04 Maybe I could use a webview and display some basic html Dec 08 03:35:12 that wouldnt look good Dec 08 03:35:18 Then you'd have to plan ahead, what would the structure be and code for it to expand Dec 08 03:37:57 Why wouldn't the webview look good? Dec 08 03:38:48 WHy not use the YouTube app? Dec 08 03:38:52 There is an API for it Dec 08 03:39:12 I can't say Im a huge fan of webviews in an app Dec 08 03:39:28 No, I wouldn't try to play the youtube video in my app Dec 08 03:39:41 You mean launch to a browser? Dec 08 03:40:35 Let me rephrase Dec 08 03:41:57 So I want to display news, but I also want to have some futureproofing Dec 08 03:45:10 Might even be able to still use VideoView Dec 08 03:45:16 http://android-coding.blogspot.in/2011/03/simple-example-using-videoview-to-play.html Dec 08 03:46:04 https://github.com/Urucas/youtube-url2rtsp Dec 08 03:46:13 2nd link will help with the first Dec 08 03:46:14 My question is more along the lines of "if the marketing guy asks me if we can display X, I don't want to have to tell him that I need to push out an update first" Dec 08 03:46:32 That's why I was thinking html Dec 08 03:46:55 You have to balance performance and aesthetics against the updates etc. Dec 08 03:47:05 You cannot be expected to have an application that allows for everything Dec 08 03:47:22 You are given requirements, and develop accordingly, being as futureproof as possible in the process Dec 08 03:47:42 If X requirement wasnt in the original requirements, of course you'll need an update. Dec 08 03:47:55 Yeah.... Dec 08 03:48:15 I'm thinking I'm just going to go with json or xml, keep things simple Dec 08 03:51:16 dodobrain: Back yet? Dec 08 03:51:50 dodobrain: Ok. Ill send this now because Im going Dec 08 03:52:44 Anthaas, just got back.. Dec 08 03:52:47 oh noes.. Dec 08 03:52:52 Im still here lol Dec 08 03:53:00 Was writing a big message hahah Dec 08 03:53:06 anyway, i wanted to ask about the layout. i generated one that just has 2 textviews Dec 08 03:53:14 Ok Dec 08 03:53:15 do i need to set id for them? Dec 08 03:53:19 Yes Dec 08 03:53:26 Because your getView() method needs them Dec 08 03:53:41 if i don;t i don;t know how to set the values within.. if i do, i don;t kknow how it works if there are multiple text views having the same id Dec 08 03:53:58 Its fine with them having the same ID Dec 08 03:54:03 cos each listitem with end up having 2 textviews with ids txtv1 txtv2 Dec 08 03:54:07 ah, ok Dec 08 03:54:13 because your getView() function only refers to one instance of convertView at a time Dec 08 03:54:51 so call one something like list_item_textview1 or something more meaningful Dec 08 03:54:58 and the other one something meaningful but different Dec 08 03:56:38 ok, so paste your code so far in pastebin. Dec 08 03:59:41 Anthaas, http://pastebin.com/Un9ve2UM <- MyAdapter.java http://pastebin.com/xEuDinxg <- dodolayout.xml Dec 08 04:00:21 Regarding your Adapter Dec 08 04:00:23 ALMOST Dec 08 04:00:37 Is there any better way to do this - http://pastie.org/8536726 Since a layout can only have 1 background this has to be done but i wonder if there is a better way Dec 08 04:00:50 except you are setting the same value in both textviews? Dec 08 04:01:50 yeah for now :_ Dec 08 04:01:52 :) Dec 08 04:02:10 Also, your textview variables are called the same thing Dec 08 04:02:17 Im not sure that matters actually Dec 08 04:02:17 cos i'm just playing around with the idea. once i understand it better i will use the correct layout and the right values Dec 08 04:02:22 Because of how you've used it Dec 08 04:02:31 Yeah that should work Dec 08 04:02:33 Right now Dec 08 04:02:35 sure. i need 1 tmp reference to set the values in different textviews Dec 08 04:02:37 In your main activity Dec 08 04:02:51 unless i made a booboo and copy pasted the same textview id :) Dec 08 04:02:55 In somewhere that logically makes sense in your code Dec 08 04:03:20 (Where the collection is generated, and the listview is already referenced by findViewById) Dec 08 04:03:35 You need to do MyAdapter adapter = new MyAdapter(MainActivity.this, objects); Dec 08 04:03:46 myListView.setAdapter(adapter); Dec 08 04:07:33 dodobrain: Done? Dec 08 04:07:50 almost.. testing now.. Dec 08 04:11:33 grr.. getting a null pointer exception.. but not in the adapter in the activity i am linking the listview activity from Dec 08 04:11:37 grrr.. lemme check again Dec 08 04:11:56 Okie doke. Dec 08 04:13:14 wee.. it works Dec 08 04:13:22 ;-) Dec 08 04:14:30 Anthaas, http://pastebin.com/1tm6gNxH <- the code for DodoActivity.java Dec 08 04:14:31 Just remember - you need to keep your getView function's body as computationally light as possible. Dec 08 04:14:45 right.. Dec 08 04:15:34 The longer it takes to get a view, the more laggy/jittery your scrolling AND the longer it will take the view to load in the list. Dec 08 04:15:58 Anthaas, nos the one thing i want to know is where do i insert the call to my server to retrieve the data? it would be in place of the String[] and ArrayList I am creating right? Dec 08 04:17:02 you want to do the retrieval in onCreate() Dec 08 04:17:08 and set the listAdapter in onResume() Dec 08 04:17:26 In fact Dec 08 04:17:30 you COULD do it in onCreate Dec 08 04:17:33 umm.. but i don;t have an onResume() in this activity Dec 08 04:17:40 but if you plan on every modifying the content of the list Dec 08 04:17:40 ah, ok Dec 08 04:17:44 it should be done in onResume() Dec 08 04:18:09 I have to go now Dec 08 04:18:11 what about the very first occasion.. is onResume called immediately after onCreate? Dec 08 04:18:15 Yes Dec 08 04:18:22 Look up the activity lifecycle Dec 08 04:18:25 great.. then i;ll put in onResume Dec 08 04:18:27 thanks for the help Dec 08 04:18:41 onCreate is only called the very first time, and if the Activity was removed from memory Dec 08 04:18:49 oh before you go.. how do i put a spinner while i am loading my data from the server? Dec 08 04:18:49 or if* Dec 08 04:18:58 Haha! Dec 08 04:19:04 Look up ASyncTask Dec 08 04:19:04 OR Dec 08 04:19:16 Run your server data fetch in a runnable on a separate thread Dec 08 04:19:31 show a dialog with a spinner Dec 08 04:19:37 and then call thread.start() Dec 08 04:19:43 i want the activity to show a spinner while i am retrieving data from my server. sure i will run it in a separate thread. Dec 08 04:19:53 and have the runnable send a broadcast to a broadcast receiver which will remove the dialog once the download is done Dec 08 04:19:56 just that i've never done a spinner on android. Dec 08 04:20:02 However Dec 08 04:20:10 The method I gave above isnt the cleanest or the best Dec 08 04:20:14 but probably the easiest. Dec 08 04:20:30 You probably want to look up another technique like showing spinner on the list, or in an action bar or something Dec 08 04:20:35 I have to go through, soryr. Dec 08 04:20:49 thanks again for the help Anthaas Dec 08 04:21:05 np :-) Dec 08 04:21:07 Cya! Dec 08 05:08:37 well, so my first 'ant debug' build is failing with: http://fpaste.org/59839/86441606/ and I have no idea why bin/res has crunch/ I originally created the project with eclipse/adt and later ran 'android update project --path . --subprojects' to create the build.xml file Dec 08 05:12:03 is there anything in bin/res/crunch? Dec 08 05:13:38 I think pretty much everything in bin should be generated by the build - so it's probably okay to just delete it Dec 08 05:15:04 try ant clean Dec 08 05:15:08 and then rebuild Dec 08 05:18:36 and make sure you don't have src/res/crunch Dec 08 05:20:45 yes: drawable-hdpi drawable-mdpi drawable-xhdpi drawable-xxhdpi Dec 08 05:21:32 I only had bin/res/crunch for some reason, ant clean deleted it Dec 08 05:21:45 Hi. I'm writing an app using the NDK that wants to talk serial in USB host mode. I'm on an n7 w/cyanogenmod. Is it possible to "break out" of the sandbox and access the serial device files in /dev and inteact with serial devices in a "unixy" way? Dec 08 05:22:08 ok, build successful, thanks! Dec 08 05:22:18 This is obviously an "internal" app, not something I'm looking to publish. Dec 08 05:41:11 "In most cases you need to adjust the actions in the CAB dynamically as the user adds more items to the selection. Actions that apply to a single selected data item don't necessarily apply to multiple selected data items of the same kind." … i find implementing this to be surprisingly difficult Dec 08 05:41:55 guess i have to do it all form AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged Dec 08 05:43:44 hmm, should i allow one to delete an item representing an active connection, or disable delete until its disconnected Dec 08 05:45:30 does delete imply disconnect? Dec 08 05:46:10 either way, I'd probably say a confirmation dialog would be appropriate Dec 08 05:49:57 yeah,, delete implies disconnext Dec 08 05:55:24 what is the recommended way to show user two options in case of a long click Dec 08 05:55:51 contextmenu seems a bit over kill for two options Dec 08 05:57:11 How can I get gson into my app? My reading suggests it is as simple as including it as an external lib, but when I try to run, it complains that it can't be found Dec 08 05:57:50 Actually, nvm Dec 08 05:59:27 Looney: need more info Dec 08 06:00:07 option menu to be displayed when someone long clicks an item in listview Dec 08 06:00:31 there will be only two possible options from which user will choose Dec 08 06:00:37 Looney: are these options able to be executed on multiple list items? Dec 08 06:01:11 Looney: if that's true, then you can do the long click to select multiple pattern Dec 08 06:01:50 yup, for every long click on any of the listview item, I need input from user Dec 08 06:02:05 user has to choose B or A Dec 08 06:22:13 Is there a blog or tutorial or something that explains every single file that appears in a new android studio project, and how you're expected to interact with them. \.idea \.gradle \gradle etc Dec 08 06:32:52 I think that I will try my luck with alertdialog Dec 08 06:48:13 hello i want to publish my app. i am using android studio. Do i need to use zipalign or the signed app from android studio menu is ready for upload Dec 08 06:48:14 ? Dec 08 07:38:33 lg g2 vs htc one ? ? Dec 08 07:38:41 http://madison.craigslist.org/mob/4229501629.html Dec 08 07:38:47 http://madison.craigslist.org/mob/4228887766.html Dec 08 08:07:54 guys, i have a loginactivity question.. Dec 08 08:09:35 dodobrain: ? Dec 08 08:09:55 i have created a new app with 2 activities, LoginActivity and AppMainActivity. LoginActivity is the main activity, i.e. shows up on app startup. here i check if the user is logged in(checking from sharedprefs). if yes, i bump the user to AppMainActivity Dec 08 08:10:00 tell to us Dec 08 08:10:12 it feels very weird the first time user logs in Dec 08 08:11:09 i.e. loginactivity shows up. i login with username / passwd. i quit app. now i start app again, it briefly shows the loginactivity and then bumps to AppMainActivity Dec 08 08:11:32 is what i describe the standard way of handling persistent logins ? Dec 08 08:12:09 do the opposite Dec 08 08:12:16 default to the main activity Dec 08 08:12:20 punt to login if not signed in Dec 08 08:12:42 interesting.. i didn;t think of that. Dec 08 08:12:43 you can also overridePendingTransition(0, 0); when calling startActivity to make it instantly appear Dec 08 08:12:54 since the main activity never rendered content this is probably what you want Dec 08 08:13:07 solve for the 99% case Dec 08 08:13:13 99% of the time the user is already logged in Dec 08 08:13:44 which one should i try now? the overridependinstransition or jumping to mainactivity as the root? Dec 08 08:13:52 both Dec 08 08:14:00 use the overridePendingTransition when going from main -> login Dec 08 08:14:07 ah, ok Dec 08 08:14:19 i need to edit manifest to get this to be intent.MAIN right? Dec 08 08:14:34 correct Dec 08 08:14:56 thanks, i will try it out now Dec 08 08:17:08 JakeWharton, so i put this in onCreate() of the AppMainActivity, right? Dec 08 08:17:13 yep Dec 08 08:17:43 and i have to do this loggedin check *before* the call to setContentView(R.layout.activity_main); right? Dec 08 08:17:45 i have a question, we are developing a simple social network in our company and we at the android team, preparing to write an android application for it. i was wondering, what platform/method or framework should be used to connect to the site's infrastructure? i mean for every "like" or "comment", how should the android side be implemented? does REST a good option? Dec 08 08:17:56 * omid8bimo such a long qeustion! Dec 08 08:22:14 such a long question that doesn't really ask anything at all Dec 08 08:23:36 omid8bimo: yes, actually the best option Dec 08 08:25:57 bankai_: sorry about that. im confused! i dunno how to explain what's in my mind. i wanna implement something that i dont know how to do it. Dec 08 08:26:01 hello android developers! Dec 08 08:26:28 i have a question about google warning Dec 08 08:26:37 onr: so no other options? if i use REST frameworks, does that mean i should make a new REST request for every action user take on the app? Dec 08 08:26:47 omid8bimo: yes Dec 08 08:27:15 is here anyone from googlke.. that can help with google warnings on google play_ Dec 08 08:27:23 onr: wouldn't be a little overwhelming? Dec 08 08:28:05 omid8bimo: what about storing user actions in a sql file, then sync it with the server every 24-hour? Dec 08 08:28:08 for example, facebook android app or google+ android app are using REST? Dec 08 08:28:42 you're not facebook Dec 08 08:28:49 onr: no, it has to be in realtime, like pushing every action user takes, (such as liking a post or commenting on a photo) Dec 08 08:28:57 onr: fair enough! :) Dec 08 08:28:58 most apps use rest :3 Dec 08 08:29:08 REST is also usually misdefined Dec 08 08:29:09 Twitter uses rest iirc Dec 08 08:29:32 Or, at least, they have API that supports HTTP REST Dec 08 08:30:43 omid8bimo: I personally like Square's REST client Dec 08 08:30:54 http://square.github.io/retrofit/ Dec 08 08:31:47 so if i say, for every action user does on the app, that i should push the data to the sever, im going to create a new httpClient, httpGet and httpPost, is this correct? Dec 08 08:32:38 ya Dec 08 08:32:53 just like you use twitter api Dec 08 09:05:45 anyone here ? Dec 08 09:05:53 ??????? Dec 08 09:05:53 anyone Dec 08 09:06:15 <_Auron_> if you need to ask something just ask Dec 08 09:06:21 +10 Dec 08 09:06:21 I cant set up NDK Dec 08 09:07:06 Windows - > NDK - > Select Path -> Not a valid NDK directory Dec 08 09:07:13 Im On Ubuntu 13.10 Dec 08 09:07:17 Using Eclipse Dec 08 09:07:34 <_Auron_> I haven't used ndk and I'm on windows so I can't help you but someone else might be able to Dec 08 09:08:48 ... Dec 08 09:11:07 it seems no one here know anything about NDK at all then ? Dec 08 09:12:19 was here yesterday for hours no one even responded Dec 08 09:15:38 so no one at all ? Dec 08 09:15:59 knows about Not a valid NDK directory even when I directed to the correct NDK Path ? Dec 08 09:16:02 is it a bug ? Dec 08 09:33:18 hi. as i export the signed package when i press finish, there is like an infinite loop i face and increases the cpu temperature. Dec 08 09:33:31 and eclipse stalls Dec 08 09:34:16 would someone tell me what should i do? Dec 08 09:34:28 .. to fix it? Dec 08 09:38:21 superlinux-hp do u have build automatically checked? Dec 08 09:51:25 lasserix: Do you have any clue what could be a problem ? Dec 08 10:10:28 bluesm what do you need this for? Dec 08 10:10:30 http://pastebin.com/8G6ShLL9 Dec 08 10:10:38 my guess is it is just not accurate Dec 08 10:10:41 within the ms Dec 08 10:11:04 if you want hard core lasserix: So when you done metronome, you just said - "this inaccuracy is ok" ? Dec 08 10:16:04 no Dec 08 10:16:14 i polled the clock myself Dec 08 10:16:32 lasserix: Oh.. Dec 08 10:16:45 ie while (now() < lastTimeStamp + elapsedDuration) { //vrooom } Dec 08 10:16:48 lasserix: in a loop ? Dec 08 10:17:01 in two loops actually Dec 08 10:17:35 lasserix: two ? Dec 08 10:18:37 while (isRunning) { long lastTimeStamp = Clock.UpTime(); while (Clock.upTime() < lastTime + durationToElapse) { } } Dec 08 10:19:26 but i warn you if you _are_ making a metronome that's the least of your troubles: android audio api is known to suck for low-latency implementations Dec 08 10:20:00 lasserix: I don't. I just want to learn something. Dec 08 10:20:10 (Clock.upTime() < lastTime + durationToElapse) --> (Clock.upTime() < lastTimeStamp + durationToElapse) Dec 08 10:21:30 so that way the inner while loop whiles away as long as the time is less than the future time to trip it, ie. say lasttimeStamp starts off at 1000, and elapsedDuration is 500, then the inner while loop will continue to loop until clocktimeUp reads a greater value than 1500, at which point lasttimegets recent to 1500 and then the inner again runs till 2000 etc Dec 08 10:26:30 <_Auron_> long lastTimeStamp = Clock.upTime(); while (isRunning) { if ((lastTimeStamp+durationToElapse) > Clock.upTime()) { do stuff } else { lastTimeStamp = Clock.upTime() } } // this is my preferred way to prevent the inner loop from soaking up the outer loop Dec 08 10:27:44 <_Auron_> er Dec 08 10:28:36 <_Auron_> long lastTimeStamp = Clock.upTime(); while (isRunning) { if ((lastTimeStamp+durationToElapse) <= Clock.upTime()) { /*do stuff*/; lastTimeStamp = Clock.upTime() } } Dec 08 10:28:41 <_Auron_> I need to sleep Dec 08 10:33:14 auron Dec 08 10:33:17 that's not the point Dec 08 10:33:20 there is no "do stuff" Dec 08 10:33:54 the point of the inner loop is to mindlessly loop away while the duration has not been met Dec 08 10:35:01 also that last code will never enter the if Dec 08 10:35:16 err as long as duration is a positive number Dec 08 10:35:40 lasserix: By the way. Reffering to your example : http://pastebin.com/8G6ShLL9 Dec 08 10:36:09 lasserix: You do the --> timeStamp = SystemClock.uptimeMillis(); <--- After "if" and counting and logging... Dec 08 10:36:25 lasserix: And because of it. you sometimes get the "999" Dec 08 10:36:52 lasserix: It seems that "postDelayed" is always "late" not ealier :) Dec 08 10:37:21 umm Dec 08 10:37:29 just removed the if startment all together Dec 08 10:37:36 and still get 999 sometimes, 10002 sometimes Dec 08 10:39:24 JakeWharton, you atill around? Dec 08 10:40:39 I have setup MainActivity to start LoginActivity if the user is not logged in. But the user is able to press the back button to go to the MainActivity. I want to prevent this from happening or just go back to the android home screen if the user presses the back button on the login activity Dec 08 10:40:51 finish() after startActivity() Dec 08 10:41:18 oh.. but then if the user successfully logs in, I have to start the main activity again, right? Dec 08 10:41:38 right Dec 08 10:41:47 i thought i would simply call finish() in the loginActivity if the user successfully logs in Dec 08 10:42:07 it's better to start+finish in both places Dec 08 10:42:08 lasserix: If you removed it.. the "timeStamp should be always 0 :P Dec 08 10:42:15 ah, ok Dec 08 10:42:22 no Dec 08 10:42:23 lasserix: Ah.. "if" statemtent... Dec 08 10:42:26 lasserix: Ok. Dec 08 10:42:35 since it is postDelayed i don't need to do that check Dec 08 10:42:46 but yeah Dec 08 10:42:56 just seems it is not ms reliable Dec 08 10:43:02 so if you need something finer Dec 08 10:43:13 you'll have to do that while while nonsense with nanotime or uptimemillis Dec 08 10:43:20 JakeWharton, startActivity(intent); finish(); overridePendingTransition(0,0); Dec 08 10:43:35 the order of override...() and finish() doesn;t matter, right? Dec 08 10:43:39 just remember to either use System.nanoTime or SystemClock.upTimeMillis because the other get time methods are not monotonic Dec 08 10:43:41 right Dec 08 10:43:45 thanks Dec 08 10:43:49 don't override transitions when going from login -> main Dec 08 10:44:01 only main -> login in onCreate Dec 08 10:44:22 ah yes.. that would indeed be the correct choice Dec 08 10:44:55 its going to become slightly more complicated once i put in a Dec 08 10:45:24 'sign up' button (in the loginActivity) that leads to a signupActivity Dec 08 10:45:35 anyway, i'll try it out and see what i come up with Dec 08 10:55:31 Fragments and activities are like oil and water Dec 08 10:57:48 lasserix: I mean this : https://gist.github.com/anonymous/7855881 Dec 08 10:57:52 *gasoline and water Dec 08 11:01:46 bluesm: again you are using clock time stamps from two different threads Dec 08 11:02:55 also i dont know what you are trying to solve anymore :) Dec 08 11:03:05 comp[away]: turn off your scripts please Dec 08 11:03:06 is postDelayed accurate to the millisecond? no. Dec 08 11:03:17 JakeWharton, what do i pass in for the first arg for my new Intent(context, LoginActivity.class); ? Dec 08 11:03:29 "this" Dec 08 11:03:42 i'm deep within an inner ananymous class when checking for login success. so this doesn't refer to the MainActivity Dec 08 11:03:52 MainActivity.this Dec 08 11:04:28 or can i just use getApplicationContext() ? Dec 08 11:04:33 sure Dec 08 11:04:49 great.. i was getting confused a bit there Dec 08 11:12:32 lasserix: You didn't answered to me: if you call the Thread.currentThread().getName(); in the "onCreate()" and that Runnable's run() you get two times "main" name. Dec 08 11:13:19 what exactly is the difference between AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE AUDIOFOCUS_GAIN_TRANSIENT? Is it only that the first one only affects system notifications? Dec 08 11:23:20 does anyone knows anybody that can help with google warnings Dec 08 11:28:37 mapiko_, what kind of google warnings? Dec 08 11:31:32 lasserix: By the way: Thank you very very very much for your precious time :) Dec 08 11:31:45 30-Day Notification of Google Play Developer Term Violation Dec 08 11:31:59 REASON FOR WARNING: Violation of the dangerous products provision of the Content Policy: Dec 08 11:32:23 for library of Applovin ads.. even tho i dont have any lib or ads in my applicaiton for more than 2 versions.. Dec 08 11:33:50 hm, they didn't tell you which app they think is violating the terms? Dec 08 11:33:55 email support Dec 08 11:34:16 whats their email? Dec 08 11:34:37 https://support.google.com/googleplay/android-developer/?rd=1#contact=1&topic=3450769 Dec 08 11:35:22 bluesm i'm not sure actually, runnables should be off the main thread, don't know why it has same name as the main Dec 08 11:35:51 no emails here.. Dec 08 11:36:08 only anserwers to questions.. Dec 08 11:37:53 just use the form with the Application Publishing Issues option and Application development questions Dec 08 11:38:09 or what ever option brings up an input form Dec 08 11:38:50 idk they've changed the form since i last used it Dec 08 11:39:03 e.g., this one https://support.google.com/googleplay/android-developer/contact/publishing Dec 08 11:51:09 Hello anyone know why a runnable will return main for its currentThread name? Isn't it supposed to be in its own thread? Dec 08 11:51:21 what are you using for the handler Dec 08 11:52:23 AFAIK handlers use the looper from the thread it's being called on, so if you call this on a ui thread, it'll use the UI looper Dec 08 11:54:11 ahh Dec 08 11:54:27 so you _have_ to use a runnable in conjunction with a new thread instance? Dec 08 11:54:27 http://developer.android.com/reference/android/os/Handler.html#Handler() Dec 08 11:54:40 *to do it on a seperate thread Dec 08 11:55:00 it seems like the tutorials online don't nccessarily use a seperate thread instance Dec 08 12:03:50 are there explanations on how the framaroot exploits work? Dec 08 12:03:57 or at least source code Dec 08 12:08:23 I'm having a bit of trouble Dec 08 12:08:38 I'm trying to use a view defined in a fragment in the host activity Dec 08 12:08:52 but no matter what i do i get an NPE Dec 08 12:15:43 the fragment's null? or the view Dec 08 12:15:51 or the activity? Dec 08 12:19:30 the fragment's null? or the view, or the activity? Dec 08 12:21:34 i get a nullpointer when i try to use the views in the activity Dec 08 12:21:55 the layout inflates just fine but i can't use stuff from there Dec 08 12:23:43 Like when i do mediaPlayerFragment.getView().findViewById(R.id.media_view); in the parent activity i get a nullpointer Dec 08 12:24:09 does it work if you try it in the actual fragment? Dec 08 12:24:12 getView.findview... Dec 08 12:26:10 Yeah i does Dec 08 12:27:52 hmm Dec 08 12:28:09 github down? Dec 08 12:28:52 timemage: thanks again for your help yesterday. I now have a working HTTPS connection. Now going to work on adding verification Dec 08 12:29:18 CallumTaylor: not for me Dec 08 12:29:33 CallumTaylor: http://www.downforeveryoneorjustme.com/ Dec 08 12:29:42 it's being awfully slow Dec 08 12:29:55 probably just my crappy internet Dec 08 12:30:07 it did load slowly Dec 08 12:30:10 but it did Dec 08 12:31:00 DarkSlay3r: https://gist.github.com/scruffyfox/4039476 Dec 08 12:31:00 try dumping fragment.getView Dec 08 12:31:00 and see what it actually consists of Dec 08 12:31:23 you need to call getIdValues first before dump() Dec 08 12:37:51 CallumTaylor: Thanks Dec 08 12:38:27 But you left out StringUtils Dec 08 12:38:36 oh erm Dec 08 12:39:02 https://github.com/scruffyfox/X-Library/blob/master/src/x/util/StringUtils.java Dec 08 13:05:15 ok so the entire fragment returns null Dec 08 13:05:28 fragment.getView() returns null Dec 08 13:05:35 this is madness Dec 08 13:21:20 Hi. Dec 08 13:31:27 hey all Dec 08 13:36:58 hey fusion44 Dec 08 14:13:08 This is infuriating Dec 08 14:13:17 Has anyone attempted to use this? Dec 08 14:13:27 https://github.com/umano/AndroidSlidingUpPanel/blob/master/README.md Dec 08 14:26:18 uys.. i'm trying to get google maps api working in an x86 emulator Dec 08 14:26:37 odes this procedure work for 4.3 x86 image? http://38911bytes.blogspot.com.au/2012/03/how-to-use-google-maps-api-in-android.html Dec 08 14:32:19 Anyone know why logcat scroll lock has a mind of its own sometimes? Dec 08 14:33:27 lasserix: I think it's because it's updating Dec 08 14:33:43 I had the same problem today Dec 08 14:37:02 like an update to logcat or it's updating the output? Dec 08 14:37:27 i just mean if i am at the bottom, then scroll up with the scroll lock off, it'll turn the scroll lock on, and i have to click/unclick it to keep it turned off Dec 08 14:38:36 is there a list of accepted inputs for android:fontFamily anywhere Dec 08 14:38:37 ? Dec 08 14:51:29 CallumTaylor, you should get this: https://news.ycombinator.com/item?id=6869803 Dec 08 14:51:43 "No such item." Dec 08 14:55:41 ergh why can you access protected methods outside of the class Dec 08 14:56:07 lasserix, plasma shield. they are protected. Dec 08 14:56:24 help me please, i wanna code an app. Dec 08 14:56:29 lasserix: protected =/= private Dec 08 14:56:40 i need to learn Dec 08 14:57:03 cortexA9: developer.android.com Dec 08 14:57:04 cortexA9: take basic programming first. Dec 08 14:57:07 I want to declare an abstract class with fields / methods that are private to that class and its subclasses, but you can't use private since subclasses can't access them Dec 08 14:57:08 stackoverflow Dec 08 14:57:10 youtube Dec 08 14:57:12 and college Dec 08 14:57:27 i need a point Dec 08 14:57:28 of start. Dec 08 14:57:34 do you know java Dec 08 14:57:40 no Dec 08 14:57:45 do you know any language Dec 08 14:57:55 please say no Dec 08 14:58:05 no Dec 08 14:58:06 lasserix: try ##java , just dont mention android Dec 08 14:58:07 :( Dec 08 14:58:17 lasserix: Protected methods can be accessed by subclasses and classes in the same package Dec 08 14:58:21 right, go learn the fundamentals of programming with languages such as javascript Dec 08 14:58:27 CallumTaylor: No Dec 08 14:58:32 i reject that idea Dec 08 14:58:41 cortexA9: Start with C Dec 08 14:58:44 wat Dec 08 14:58:54 yea C it's hard. Dec 08 14:58:57 i tried. Dec 08 14:59:07 in the past. Dec 08 14:59:10 start with pascal, vb or javascript just to understand the fundamentals of programming Dec 08 14:59:16 If you survived then you have what it takes Dec 08 14:59:21 SimonVT: right, but there is no way to have methods private to a class and its subclasses without making them accessable to other classes? Dec 08 14:59:21 Move on to java Dec 08 14:59:22 start with c .. and go on to java.. Dec 08 14:59:23 :) Dec 08 14:59:48 what is the fundamentals. Dec 08 14:59:49 people have differing opnions of where to start. for me, javascript -> c -> java. Dec 08 14:59:52 c isn't very noob friendly IMO, the IDEs can be complicated and there's a lot of hidden stuff. Dec 08 14:59:58 fundamentals Dec 08 14:59:59 but you should find your own. Dec 08 15:00:03 what ifs do, loops, classes etc Dec 08 15:00:03 CallumTaylor: it's not supposed to be Dec 08 15:00:13 DarkSlay3r yeah I know Dec 08 15:00:15 I like to call it the C-filter Dec 08 15:00:22 paulo_ heh yeah i know Dec 08 15:00:27 most people start with web languages Dec 08 15:00:30 oh yea Dec 08 15:00:36 then they think they know how to program Dec 08 15:00:38 never understood that. Dec 08 15:00:38 lasserix: Put the abstract class in its own package :p Dec 08 15:00:43 but if you have 0 knowledge you need so start with languages that give you functionality on a plate Dec 08 15:01:06 then you can dive deeper and learn more complex stuff Dec 08 15:01:08 CallumTaylor: Thats why we end up with Healthcare.gov Dec 08 15:01:12 SimonVT: ah ha i see i was refactoring someone elses code in sandbox mode, no wonder thanks Dec 08 15:01:14 ohsnap Dec 08 15:01:24 i personally started on PHP and then moved onto java Dec 08 15:01:36 Use the C filter to get rid of bad coders before they gain power Dec 08 15:01:36 mmm Dec 08 15:01:43 i always tried to tinker with c/c++ but there's so many references that don't make sense at such a starting stage Dec 08 15:01:46 CallumTaylor: You are one of the exceptions Dec 08 15:02:01 Those glorious exceptions to the rule Dec 08 15:02:06 why there isn't an easy way to learn. Dec 08 15:02:11 code. Dec 08 15:02:11 there is Dec 08 15:02:19 take a course/go to college Dec 08 15:02:25 cortexA9: It's hard if you learn it the wrong way Dec 08 15:02:26 there's so many tutorials its unbelievable Dec 08 15:02:37 yea i know Dec 08 15:02:40 the internet is literally full of information Dec 08 15:02:45 Trust me. Get a book and pay attention to the details Dec 08 15:02:47 how do you think most of us got here Dec 08 15:02:48 majority of it wrong ;) Dec 08 15:02:54 Then discover Googles true potential Dec 08 15:03:00 p_l yeah but you pick the right from each of them Dec 08 15:03:25 yea tell me a good book Dec 08 15:03:27 please Dec 08 15:03:31 knowing how to correctly use google helps tremendously Dec 08 15:03:36 Depends on what language Dec 08 15:03:36 not C programming language please Dec 08 15:03:44 Just do java Dec 08 15:03:49 http://www.codecademy.com/ Dec 08 15:03:55 I recommend the deitel javabook Dec 08 15:04:02 Java, How to program Dec 08 15:04:07 what is codecademy Dec 08 15:04:15 -_- Dec 08 15:04:16 Ignore CallumTaylor for now. Dec 08 15:04:17 click the link Dec 08 15:04:18 :P Dec 08 15:04:25 ok Dec 08 15:04:29 He is awesome but not right now Dec 08 15:05:41 DarkSlay3r: can i found it online ? Dec 08 15:05:55 DarkSlay3r1: can i found it online ? Dec 08 15:05:55 Not sure Dec 08 15:06:10 It's a really big book Dec 08 15:06:20 everything you need on Java programming Dec 08 15:06:42 oh i found the 9th edition DarkSlay3r1 Dec 08 15:06:47 pdf Dec 08 15:07:06 i have a good java for dummies book Dec 08 15:07:10 its pretty big Dec 08 15:07:16 Pay for IP Dec 08 15:07:30 Disclaimer: If you like it, buy the book Dec 08 15:07:38 cortexA9: just so you know all of that is useless if you dont code. the only way you're going to be able to make android apps is by coding. you can buy all the books you want, take all the classes you can, read all the tutorials you want, talk all about all the ideas you have for apps forever, but it won't mean anything unless you sit down and code and code and code Dec 08 15:07:57 yea code. Dec 08 15:07:59 CallumTaylor: Java for dummies? Dec 08 15:08:00 right lasserix Dec 08 15:08:01 http://www.amazon.co.uk/Java-All---One-Dummies-Doug/dp/0470371722/ref=sr_1_1?s=books&ie=UTF8&qid=1386515269&sr=1-1&keywords=java+for+dummies+9+in+one Dec 08 15:08:10 well sounds like an oxymoron i know Dec 08 15:08:29 i need theory and experience. Dec 08 15:08:43 cortexA9: Learn then come up with an idea Dec 08 15:08:48 Attempt to code Dec 08 15:08:55 Swear at your computer Dec 08 15:08:58 calculators are always a good thing to make Dec 08 15:08:59 succeed Dec 08 15:09:13 dealing with algorithms, events, IO and stuff Dec 08 15:09:39 Calculator is a must Dec 08 15:10:33 because i have some great idea. Dec 08 15:10:35 because i have some great ideas. Dec 08 15:10:40 for android apps. Dec 08 15:10:43 write them somewhere Dec 08 15:11:07 Believe me you will need them later Dec 08 15:11:37 there isn't a dummy app ? Dec 08 15:11:43 for build Dec 08 15:11:46 without code Dec 08 15:11:59 cortexA9: by the way one of the best things about coding is when you sit down with a plan in mind and spend a dozen hours until your eyeballs are bleeding and you haven't yet "run program" and when you do, unlike many times before, it actually works on the first try. that is a very, very nice feeling :P Dec 08 15:12:14 surely that happens every time? Dec 08 15:12:19 lasserix: That is only a myth Dec 08 15:12:20 you must be doing it wrong then ;) Dec 08 15:12:21 hehe Dec 08 15:12:27 Don't feed the boy legends Dec 08 15:13:00 This is what it's like most of the time Dec 08 15:13:01 http://weknowmemes.com/2012/09/the-truth-behind-programming-problems/ Dec 08 15:13:23 because i'm not good in maths. Dec 08 15:13:30 is that eclipse he's using? Dec 08 15:13:33 cortexA9: to expand on that, what makes a really good coder is the ability to plan everything before hand. because most programmers get stuck debugging problems, that, ideally, sufficiently planning and design would avoid Dec 08 15:14:13 CallumTaylor: That explains the look of frustration Dec 08 15:14:14 which is a nice perk if you can manage it because it means you can actually spend very little time behind a computer relative to the amoutn of time you spend thinking about what you are programming Dec 08 15:14:33 not that that ever works out because there's always more to do :) Dec 08 15:15:03 lasserix: I think you've forgotten what it's really like working on a project Dec 08 15:15:31 You start of with a plan... Dec 08 15:15:31 DarkSlay3r I have been 14+ hours a day last three weeks chin deep in someone else's protocode Dec 08 15:15:33 i read some tutorials of java Dec 08 15:15:36 yesterday Dec 08 15:15:56 gotta love reviews like this http://s.scruffyfox.me/fnja21s.png Dec 08 15:15:57 Then, the detours could run a line round the planet Dec 08 15:16:03 hehe Dec 08 15:16:24 tell me about: hired to do x y z and then by the way can you do a b c while you're at it? Dec 08 15:16:37 CallumTaylor: Why don't i ever get reviews like that... Dec 08 15:16:52 because you don't pay people to post reviews for you Dec 08 15:16:56 oh did i say that out loud Dec 08 15:16:57 hehe Dec 08 15:17:01 lol Dec 08 15:17:20 CallumTaylor: i bet if i paid people to do that... they'd laugh and take my money Dec 08 15:17:53 maybe i can say my ideas here Dec 08 15:18:00 :) Dec 08 15:18:04 I warn you Dec 08 15:18:07 i will steal them Dec 08 15:18:14 i have no moral compass Dec 08 15:18:18 hehe Dec 08 15:18:32 because it's good to develop it. Dec 08 15:19:18 an app that detects if you have nudes on your phone and uploads them to a remote server Dec 08 15:19:34 probably wouldn't go down very well thinking about it Dec 08 15:19:37 CallumTaylor: It's already been done Dec 08 15:19:40 NSA Dec 08 15:19:44 ohsnap Dec 08 15:20:13 They are monitoring this thread right now though Dec 08 15:20:18 1. an android app, lookin for the music title in the range of 10 km. Dec 08 15:20:22 now that they know that i know about it Dec 08 15:20:27 :) Dec 08 15:20:34 they will probably come for.... Dec 08 15:20:34 I'm going to go play some dota, i could do with a break Dec 08 15:20:38 it's a good idea ? Dec 08 15:21:12 so people in the range of 10 km. Dec 08 15:21:18 can see the music title. Dec 08 15:21:25 of others. Dec 08 15:21:28 well u need a lot of ppl for that Dec 08 15:21:31 to be good .. Dec 08 15:21:35 and usefull.. and also.. Dec 08 15:21:42 If i am using a thread to update some records, and the main thread to display the records, if I use handlers with messaging do I also need to use synchronized blocks? Dec 08 15:21:59 depends Dec 08 15:22:15 If they are using shared collections Dec 08 15:22:30 and you are updating them separately Dec 08 15:22:50 ypu Dec 08 15:23:00 you'd want to sync the access to the collections object Dec 08 15:23:40 Something like that Dec 08 15:23:53 or another idea: just a button to activate mic in the center, and talk with others. Dec 08 15:24:08 others have the app. Dec 08 15:24:16 even if you are using handlers with messaging, I was thinking like onupdate set a state enum to one value, which would stop all read requests, then when its done change the state to readable, and trigger the read... Dec 08 15:25:09 then you wouldn't need to sync anything Dec 08 15:25:22 *in theory anyways Dec 08 15:25:27 so example: in one irc channel, you can put the link of the apk. Dec 08 15:25:39 and people can see your voice. Dec 08 15:25:41 There is a simpler way to set a Google Map bounds and max/min zoom level without using OnCameraChangeListener interface? Dec 08 15:25:51 *listen Dec 08 15:25:52 sorry Dec 08 15:26:10 and you can interact. Dec 08 15:26:40 cortexA9: Isn't that just push to talk? Dec 08 15:26:44 cortexA9: another tip for now is think small, you can have a lot of great ideas that seem relatively simple. but they quickly will escalate out of hand, so for now just try to make a tic tac toe game using memes or something Dec 08 15:27:01 lasserix: hence the curse of the developer Dec 08 15:27:08 DarkSlay3r1 yea Dec 08 15:27:11 until you can actually code or get enough money to hire people to do the coding for you Dec 08 15:27:12 a push to talk Dec 08 15:27:20 who have the app. Dec 08 15:27:32 for who have the app. Dec 08 15:27:59 mmm lasserix Dec 08 15:28:17 Why I need overwrite only 4 methods of BaseAdapter Dec 08 15:28:22 If there is more of abstract method ? Dec 08 15:28:45 http://grab.by/sFJQ Dec 08 15:29:03 yeah Dec 08 15:29:27 lasserix: i can write my ideas. Dec 08 15:29:32 :) Dec 08 15:29:48 and someone Dec 08 15:29:56 can do that :) Dec 08 15:30:29 well that's a question, depending on how serious you are. it's one thing to become a developer and an entirely different thing to start an app company Dec 08 15:31:00 lasserix: Those two shouldn't even be in the same sentence Dec 08 15:31:03 as my friend likes to say you just got to get the ball rolling, then hire people smarter than you and steal their ideas Dec 08 15:31:25 or he says, "learn their tricks" but not in a well meaning way ;p Dec 08 15:31:39 lol Dec 08 15:31:47 lasserix: Your friend should write a book Dec 08 15:31:49 DarkSlayer well it's kinda like wozniak and jobbs Dec 08 15:31:49 hey how do i switch the SDK that my app is compiled against? i changed the target sdk in AndroidManifest.xml but that doesn't do anything Dec 08 15:31:57 I'd read it Dec 08 15:32:06 real true Dec 08 15:32:58 nvm just found my answers Dec 08 15:33:00 answer* Dec 08 15:33:15 that code meme reminds me of http://www.google.com/imgres?imgurl=http://i.imgur.com/lLcxrwG.png&imgrefurl=http://imgur.com/gallery/lLcxrwG&h=480&w=480&sz=201&tbnid=umCp_FtHMYV4XM:&tbnh=95&tbnw=95&zoom=1&usg=__eyaPI_LA_5GP1_p6de5pjzIQCM8=&docid=-isgmRWAUMye_M&sa=X&ei=LpGkUuSeLsHP2wXrmYCACg&ved=0CDkQ9QEwBA Dec 08 15:33:22 oops Dec 08 15:33:29 there are many apps to do Dec 08 15:34:00 bluesm: i believe that is the minimum you have to ovveride Dec 08 15:34:09 *those methods Dec 08 15:35:53 lasserix: Its is shocking how true that it Dec 08 15:35:57 that is** Dec 08 15:36:27 so... i managed to successfully send a GET request over HTTPS on android after 5 hours of trial and error. now after another 2.5 hours i still can't get POST to work Dec 08 15:36:32 does anyone know what happens when you try to access a Build.VERSION_CODES on a previous version of android? for example, ICE_CREAM_SANDWICH accessed on a device with only android 2.2 Dec 08 15:36:37 and i need POST for the login sequency Dec 08 15:37:12 are u using any library? Dec 08 15:37:15 :) Dec 08 15:37:20 nope Dec 08 15:37:24 only the standard stuff Dec 08 15:37:40 java, javax, apache, android Dec 08 15:38:02 i recomend Dec 08 15:38:02 https://github.com/loopj/android-async-http Dec 08 15:38:26 does it support httpS? Dec 08 15:38:40 mmm another idea could be: an app to build easy apps with the tablet :P Dec 08 15:38:48 :) Dec 08 15:39:04 What? Dec 08 15:39:15 just automatic tasks. Dec 08 15:39:24 to code. Dec 08 15:40:06 hmm im using it to https Dec 08 15:40:09 and it works fine Dec 08 15:40:12 get post Dec 08 15:40:24 no problems really.. and its less code Dec 08 15:40:26 thas nice. Dec 08 15:40:27 do you use a self-signed certificate on your server? Dec 08 15:40:40 no.. i dont. Dec 08 15:40:43 damn Dec 08 15:40:45 thats the issue Dec 08 15:41:16 all "official" certificates are trusted in the android truststore but not mine so i can t "just" use a regular https connection Dec 08 15:41:16 could be. Dec 08 15:41:55 well thats ur problem.. u need to singn ur certificate with some ca Dec 08 15:42:10 but afaik you have to pay for that Dec 08 15:42:15 and it shouldn't be a problem Dec 08 15:42:30 because you are usually able to add the certificate to the truststore Dec 08 15:43:14 there is even a tutorial for that on android but i couldn't get it to work Dec 08 15:43:14 hey Leeds Dec 08 15:43:20 :) Dec 08 15:43:43 so i just made it so that certificates dont get verified at all Dec 08 15:43:50 which works for GET but not POST; no idea why Dec 08 15:44:44 lasserix: Right, but there are more abstract methods there ... Dec 08 15:45:14 lasserix: And I should override them all. But I don't have to. why ? Dec 08 15:46:36 well why not use just http then*? Dec 08 15:47:05 bluesm i believe they are overriden by base adapter, and they are abstract in a super class Dec 08 15:47:11 you can further override them if you need too Dec 08 15:47:15 because i want my app to log in securely Dec 08 15:47:28 (i was planning to add some kind of certificate verification later) Dec 08 15:47:32 for instance if you need to return two types of convert views, you'd additionally override getItemViewType and getItemViewTypeCount Dec 08 15:48:05 *ie if you had one row of a listview be like all text, and another be a bunch of small images or something Dec 08 15:48:20 *or if you used section dividers Dec 08 15:57:32 lasserix: I don't know what "convert views" are. Dec 08 16:09:13 If I had simple list of things, I shoudl create listview and appropriate adapters ? Dec 08 16:10:48 well u can use Dec 08 16:11:02 adapters from android sdk.. or create your own.. Dec 08 16:11:19 One annoying little thing, how can I disconnect emulator-5554? Dec 08 16:11:27 to crate your own u need to create class that extends BaseAdapter.. Dec 08 16:16:21 mapiko_: But basically I need choose ListAdapter class or it's derivatives from SDK ? Dec 08 16:18:21 yeah.. if u want to display simple text for each fow Dec 08 16:18:27 ArrayAdapter Dec 08 16:18:31 or something lik ethat.. Dec 08 16:18:40 check google for examples, its simple.. Dec 08 16:20:23 mapiko_: But also I could create TextView every time (and reusing the the "hidden" views ? Dec 08 16:20:47 well u do that with extending for baseadapter Dec 08 16:20:47 ;) Dec 08 16:23:24 mapiko_: Why not ListAdapter ? ... It is too much magic for me.. Do you know any book that learn that things from "bottom up"... not in other way.. I mean adding to much "black boxes" ? Dec 08 16:24:24 well Dec 08 16:24:51 bluesm start with an arrayadapter then once you get that working implement your own base adapter Dec 08 16:24:54 just look for tutorials Dec 08 16:25:04 keep an eye out for "convertview recycling" Dec 08 16:25:35 but basically the adapter keeps a copy of an inflated view it uses to "recycle" and bypass the inflation stage, just reseting the values (in getView) Dec 08 16:25:58 usually "simple" lists only have ony view type: ie you're just populating a string in the view Dec 08 16:26:15 u can use that .. Dec 08 16:26:19 as u wish Dec 08 16:26:23 but say your data list had two types of data, one with a string and one with an image Dec 08 16:27:28 you can set getViewTypeCount to return 2, now getView will pull from two different copies, and you have to override getViewItemType (by returning the correct one via some part of your data) so that getView will fetch the correct convertview to reuse Dec 08 16:28:16 well one row Dec 08 16:28:18 has image and Dec 08 16:28:21 text? Dec 08 16:28:21 or Dec 08 16:28:33 it doesn't matter, that was just an example Dec 08 16:28:36 well Dec 08 16:28:40 basedaptar Dec 08 16:28:44 or check if sdk contatins Dec 08 16:28:47 image + text Dec 08 16:28:59 a better example is if you want one row to have buttons x,y,z in it and another to have toggle switches a, b, c Dec 08 16:29:52 a more complicated example is if you want sections in your listview, then you return two types, but for the section indexes you also ovveride isEnabled to be false (and areAllEnabled to be false) Dec 08 16:30:24 [CTS question]: how to specify a device to run the test, when connected to multiple devices? Dec 08 16:30:43 *the example i used before, you could just as easily set the image to be view.gone if you that position in the data list doesn't have an image (without doing the whole multiple view types) Dec 08 16:35:34 not very lucky with my questions today :-( Dec 08 16:35:49 notok: this isn't really the place for CTS Dec 08 16:36:25 Leeds, is there a channel for cts/ Dec 08 16:36:27 ? Dec 08 16:36:31 nope Dec 08 16:36:49 I doubt most of the people here even know what CTS is :) Dec 08 16:37:15 maybe android-building, android-porting, android-platform google groups Dec 08 16:37:29 mapiko_: Well. The type of this would be just the view (linearview) of elements that will be updated every second. Dec 08 16:37:32 thought it would be worth trying Dec 08 16:37:38 Leeds, I'll take a look Dec 08 16:37:41 thanks Dec 08 16:37:56 ah, it seems there's an android-compatibility group Dec 08 16:38:04 http://s.android.com/compatibility/contact-us.html Dec 08 16:38:21 listbiew that updates data every second? Dec 08 16:38:22 hmm? Dec 08 16:38:37 Leeds, great Dec 08 16:38:42 Leeds, thanks mate Dec 08 16:38:49 no worries Dec 08 16:39:59 Hi.. is it possible to run adb command on my nexus 4 without having to enable the USB debugging option? Dec 08 16:40:28 i updated my phone to kitkat and now the touch doesnt work properly, basically stuck in home screen and not able to go anywhere from there Dec 08 17:06:55 hello, I am looking for a tutorial how to use visual hints on a app, for example there are some application which show you visual hints how to use them, if you start them for the first time Dec 08 17:07:24 I googled a lot but did not find anything regarding this topic Dec 08 17:08:08 I mean there application if you start them for the first time they show you some visual hints like where to click and so on, so they show you how to use the app Dec 08 17:08:11 androidBeginner: Frameoverlay Dec 08 17:08:26 + shared preference Dec 08 17:08:57 DarkSlay3r1: thx Dec 08 17:10:14 found a site: http://pranayairan.tumblr.com/post/32462108752/android-help-overlay-view Dec 08 17:10:24 (for others who may be interested) Dec 08 17:19:49 I'm running the MyFirstApp tutorial from the developer.android.com website. I've added a menu with a magnifying glass action_search icon, but the icon is coming out way to dark, almost invisible. I have tried both the holo light and dark and it's as if it's always using the holo dark and not changing the icon when I rerun the app from eclipse. Is there something that's caching the first instance of this icon? Dec 08 18:10:30 I'm running the MyFirstApp tutorial from the developer.android.com website. I've added a menu with a magnifying glass action_search icon, but the icon is coming out way to dark, almost invisible. I have tried both the holo light and dark and it's as if it's always using the holo dark and not changing the icon when I rerun the app from eclipse. Is there something that's caching the first instance of this icon? Dec 08 18:33:39 anything better than cutandslice.me for generating assets? Dec 08 18:41:03 ok so why is taking like 30 seconds to scan the filesystem for .mp4 .3gp and other media files ??? Dec 08 18:41:31 it took like 8 seconds on my 8GB phone, but on my Nexus 7 2013 it takes like half a minute Dec 08 18:41:58 funkbox: http://www.bohemiancoding.com/sketch/ Dec 08 18:42:32 shmooz: How are you scanning it? Dec 08 18:43:45 seitensei: in photoshop Dec 08 18:43:53 seitensei: i have sketch but i am so used to photoshop Dec 08 18:44:04 any tips for saving a big huge bg (1920x1920) ? Dec 08 18:44:08 can i do webp? Dec 08 18:44:21 seitensei: using a for loop with File listFile[] = dir.listFiles(); Dec 08 18:44:38 and then another inner for loop to step through the extensions Dec 08 18:46:34 shmooz: Why don't you use mediascanner? Dec 08 18:47:06 for(int i=0; i < listFile.length; i++) { for(int k=0; k < fileFormats.length; k++) ... Dec 08 18:47:25 seitensei: I couldn't find a good example of that Dec 08 18:47:45 How can I make my android device an NFC device for linux? Dec 08 18:47:56 i am debating different APKs to accomodate the images Dec 08 18:52:44 I've been watching Derek Banas tutorials on Youtube. He uses table layouts for easier design. Is this a good practice? Dec 08 18:55:59 I mean when it comes to keeping the elements aligned, is it a good practice to use table layouts? Dec 08 18:56:18 probably not Dec 08 18:56:38 I can't find a example of MediaScanner being used to scan the whole storage for multiple formats Dec 08 18:56:51 they all assume you already know what the files are and how to feed it to the MediaScanner Dec 08 18:56:54 CallumTaylor: Do you suggest an alternative? Dec 08 18:57:01 what are you trying to align Dec 08 18:57:17 relative layout/linear layout allow for child alignment just fine Dec 08 18:57:17 Just a few ttextfields and buttons. Dec 08 18:57:57 Okay, but could you tell me what could go wrong if i use table layouts? Dec 08 18:58:29 performance most likely Dec 08 18:59:03 Ok, thanks. Dec 08 19:05:28 hi, i reset the locale with a custom one with sharedPreferences fragment which works ok, but in the activity where i am coming from i have to go back and in it again to take it in effect Dec 08 19:05:52 how i can make the activity "reload" itself ? Dec 08 19:34:04 I hate how stackoverflow makes you have to drag the horizontal scrollbar to see the rest of the code in the frame Dec 08 19:34:22 xD Dec 08 19:37:00 hey guys, I am trying to do animated transitions between two activities Dec 08 19:37:21 problems is when I do my initial, the activity I want to "cover" goes to a black screen. Going back to it works fine. Thoughts? Dec 08 19:45:32 Is there a standard way to ask the user to select people from his google+ circles? Dec 08 19:46:25 Simmilar to what is used when you share something, but I want a list of people I can work with from within my app Dec 08 19:56:33 Hey guys, I'm trying to have the first element in a ListView that's contained within a fragment that's contained within a DrawerLayout, but I can't seem to set the first item to be selected no matter what I try. I can't try getChildAt(0) because it's offscreen and will return null. However, setSelection(0) should work, and it does not. Nor does setItemChecked(0,true). It does appear selected if I click the listView. Heres my Fra Dec 08 19:57:13 And heres my closeDrawerAndChangeFragment function http://pastebin.com/ppeDp4XQ Dec 08 19:57:15 thanks Dec 08 20:06:24 Hey, is there a way to find out which font size I need to get a text of X height? What I have is the required height, I need to determine the font size i required, any idea? Dec 08 20:50:50 good Dec 08 20:54:17 anyone an idea how I can debug a process (with gdb or IDA) on app start? it attaches after my breakpoint if i attach manually :/ Dec 08 20:55:06 um, you start the process with IDEA? Dec 08 20:56:06 no, from the launcher, I don't have an IDE installed atm Dec 08 21:02:49 ce3c, normally gdb has an option to give it a process id. I've used this for debugging compiled C programs, never done this with java, YMMV. Dec 08 21:04:23 what do yall think is the best way to implement a textview with a magnifying glass search button attached Dec 08 21:05:45 http://developer.android.com/reference/android/widget/SearchView.html ← Tried that first? Dec 08 21:06:54 mgrant, yes, though I would need it to jump back to app start, or attach before any breakpoints are hit Dec 08 21:07:06 let's see how fast I can enter all the commands :P Dec 08 21:07:10 Nilium oh heck, nice! going to try that Dec 08 21:10:19 hey guys, i am working on animations. whenever I go from my main activity to my secondary, i get a black screen as the animation proceeds Dec 08 21:10:45 though when I return I get the effect I want. Any ideas on why the main activity seems to disappear when the transition begins? Dec 08 21:12:56 <[7]> hm... any way how I can prevent android from going into suspend to ram? Dec 08 21:12:56 <[7]> I just want it to turn off the display (but otherwise keep running) when I press the power button Dec 08 21:12:56 <[7]> if I just disable suspend in the kernel, android crashes and restarts a whole bunch of services when I press the button Dec 08 21:13:15 ce3c, can you just fire up gdb and then start it within it? Dec 08 21:23:17 Nilium bleh, SearchView requires API 11, my min is API 10. Dec 08 21:23:48 The support library SearchView doesn't. Dec 08 21:34:55 any way to use a ListView without subclassing? Dec 08 21:41:25 Why would it be necessary to subclass a ListView? Dec 08 21:41:47 I must be missing something, seeing as I've used it and never once written a subclass of it. Dec 08 21:46:39 Nilium this worked pretty nicely http://stackoverflow.com/a/3205405/1747491 Dec 08 21:53:23 I should find a new app I can work on that won't take forever, unlike everything else I want to do Dec 08 22:01:28 Nilium, You should try working with a group on apps ;P Dec 08 22:43:43 Is there anything I need to keep in mind when publishing to the Play store that would cause a delay in my app being available? Dec 08 22:57:21 theblang, Don't they have requirements somewhere? Dec 08 22:57:49 Also, It'd probably be a good idea to possibly share what it looks like or ideas with other people to assure you aren't posting more crapware to the play store :P. Dec 08 22:57:55 Which, from what I've heard, there is a lot of. Dec 08 23:11:09 Saphiresurf yeah, I am reading through the requirements. just wanted to make sure there wasn't a gotcha I wasn't considering. the main thing I see is that Ill need to create a key to sign with Dec 08 23:12:00 Saphiresurf my coworker's deadline was days before mine due to the Apple store code review Dec 08 23:12:25 it's possible to complete decompile an apx correct? Dec 08 23:12:36 apk Dec 08 23:12:39 theblang, Yeah, the apple store can be pretty brutal when it comes to what it expects from apps :P Dec 08 23:12:41 right apk Dec 08 23:12:43 mdev: decompile, not so much. disassemble, yes. Dec 08 23:13:00 theblang, Does google do very much when it comes to reviewing what you've made? Dec 08 23:13:03 or at least, you typically can't decompile into a form that's immediately recompilable Dec 08 23:13:08 do you guys recommend any apk protector that's free Dec 08 23:13:24 or .class obfuscator something along those lines Dec 08 23:13:31 Saphiresurf that is one thing I'm curious about, but I don't think so Dec 08 23:14:26 mdev: well, there's proguard. that at least obfuscates the method/class names in most cases. Dec 08 23:15:08 as well as trimming unused classes, etc. Dec 08 23:15:11 thanks, is that pretty much the best one can hope for? no way to make code scrambled/too annoying to try and get it clean by the average joe Dec 08 23:16:15 theblang, Yeah, I don't really think so, either :P. THere's a lot of stuff on the play store that's made it through, yet looks pretty sketchy :P Dec 08 23:17:05 thought google doesn't manually approve Dec 08 23:17:05 Saphiresurf Yeah, but oh well, I'd prefer that and just based my download decisions on community review rather than have to submit to Emperor Apple's will Dec 08 23:17:26 theblang, Same xD Dec 08 23:17:37 theblang, Hence why I'm learning Java at the moment ;P Dec 08 23:18:02 anyone has a nice working approach to reset the locale from sharedPreferences Dec 08 23:18:05 i am going nuts Dec 08 23:18:13 Saphiresurf haha! great! Then you can learn Spring and work with Java for the client and server ;) Dec 08 23:19:04 why would you 'reset' the locale ? Dec 08 23:19:35 bankai: 'change' would be the better word.... for a multilanguage app Dec 08 23:20:12 user should be able to set the language of the UI and some game content, as it is a language learning app Dec 08 23:20:50 theblang, That looks pretty cool Dec 08 23:21:18 How can I play a stream with a MediaPlayer? Dec 08 23:21:52 I see lots of examples for files, but not much in the way of streams Dec 08 23:21:55 Saphiresurf yeah, it's pretty sweet being able to open both our server and android client project in the same IDE, eclipse, and use the same language, Java. Dec 08 23:22:03 onConfigurationChanged is never called Dec 08 23:22:12 theblang, Oh, that is awesome Dec 08 23:22:17 whereever i put it Dec 08 23:22:20 So you don't have to switch to PHP or anything. Dec 08 23:22:21 Though Dec 08 23:22:30 theblang, I'm sure their are some speed concerns with that. Dec 08 23:23:20 Though, then again, I still have very little idea of what I'm talking about xD. Dec 08 23:23:33 Maybe the JVM will be able to process things faster than PHP/HTML will. Dec 08 23:23:36 goanaut: it'll only be called if you tell the manifest you're interested in the call Dec 08 23:23:55 stinger is $250 ouch Dec 08 23:24:01 shame devs get so greedy Dec 08 23:24:11 i know: android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|locale|layoutDirection" Dec 08 23:24:14 Saphiresurf I wouldn't think so, due to how popular Java / Tomcat is in the corporate world. But I haven't seen any benchmarks. I hate PHP, haha. Dec 08 23:24:22 goanaut: wow, go you! lol Dec 08 23:24:27 this is what i have in my activities in the manifest Dec 08 23:25:06 there were some articles which said it is weird and sometimes it is needed to include "layoutDirection" Dec 08 23:25:24 to get it invoked for a change of locale (!!) Dec 08 23:25:53 and you have to remove a fixed android:orientation Dec 08 23:26:23 theblang, Lol, I think I might be able to get used to it if I tried, but I still need to take things one at a time and just learn how to use Java. At least sufficiently use java xD. Right now I'm working on playing a .wav file through Java to get me some more experience :P. Dec 08 23:26:24 and so on and so forth, i have been hours on the forums Dec 08 23:26:57 is it hard to just reference c code from java on android Dec 08 23:27:02 onConfigurationChanged is never called, neither in my activities, nor in the application Dec 08 23:27:21 Saphiresurf: There's definitely a lot knowing java will help you with, but almost everything you do will be with the android api Dec 08 23:27:43 this lack of protection for java is very unsettling I read something about people were taking apks and putting ad code in them and post on the play store, or something like that Dec 08 23:27:48 idk if it's the authors or what Dec 08 23:28:19 Saphiresurf: so you might look for a combo tutorial - for instance while opening a file might be the same, finding where the file is or loading it from resources would be different, and playing would be done via the android API Dec 08 23:28:37 mdev: You've probably heard about people decompiling an apk and putting malware in. Dec 08 23:28:41 mdev: But that's nothing to do with java Dec 08 23:28:45 there is a dead end here: https://code.google.com/p/android/issues/detail?id=53079 Dec 08 23:28:53 mdev: that's to do with a) not being caught in the market, yet, and b) stupid users Dec 08 23:29:16 who go "sure, why wouldn't i install that game that isn't from the company who makes it, and why not let it call any phone number it wants" Dec 08 23:29:38 google is fairly good at killing that crap from the market, the majority of that shit lives in the pirate markets Dec 08 23:29:50 so i ask you: is there a way to take language from sharedPref and refresh all resources in an activity Dec 08 23:30:02 without going over locale Dec 08 23:30:17 if you programatically know every text view in your activity Dec 08 23:30:19 it seems for me system/API do not like locale switching Dec 08 23:30:19 you could reset it Dec 08 23:30:52 dragorn, you are talking to me ? Dec 08 23:30:55 dragorn, Yeah, that would be nice, but I'd also like to be able to program Java on normal Desktops, too. Dec 08 23:31:04 otherwise, not that I know of. Changing language isn't usually a runtime thing Dec 08 23:31:10 dragorn, It helps to be able to make implementations of your application idea beyond Android ;P. Dec 08 23:31:13 I would think so, at least/ Dec 08 23:31:14 *. Dec 08 23:31:50 Saphiresurf: fair, but be aware, other than the basic language components, there won't be a lot in common Dec 08 23:32:21 ha: "Changing language isn't usually a runtime thing" Dec 08 23:32:25 Saphiresurf: the android lifecycle is pretty specific to android, same for the gui, etc. Dec 08 23:32:27 dragorn, Thanks for the warning :). Dec 08 23:32:42 Saphiresurf: It won't hurt you to know java in multiple flavors Dec 08 23:32:47 dragorn, Yeah, I've looked through some of the tutorials for Android a little and I definitely see that. Dec 08 23:32:48 :-) this point of view i don't get, what if i want an app which is multilanguage Dec 08 23:32:49 Yeah, definitely not. Dec 08 23:32:52 Saphiresurf: just managing your expectations Dec 08 23:33:37 goanaut: Android multilanguage is handled automatically by the resources; generally you make everything reference a string resource id and make a values for each supported language. Android handles it by default from the system language. Dec 08 23:34:03 goanaut: so; changing languages runtime isn't something apps generally have to do. Changing languages at all isn't something apps generally have to do, they get it from the system language setting automatically. Dec 08 23:34:21 (same as they get different layouts for different dpis and land/portrait automatically) Dec 08 23:34:30 yes, but what if a russian user wants to have an app on his russian phone, which he can switch to english, french, german Dec 08 23:34:40 in order to learn a language Dec 08 23:34:51 then you're leaving the android framework and custom-writing language support Dec 08 23:35:01 so you're stuck doing everything manually because you've made an odd decision Dec 08 23:35:16 but now i slowly get why on the appMarket they have so many apps in different versions for different languages Dec 08 23:36:03 if someone makes a different version for a different language I suspect it's because they either wanted to force users / let users force themselves into a language, as you want, or more likely, don't understand how the language system works in android :P Dec 08 23:36:39 well, fine, if i could do it manually, i would be ok with it, just need a method to re-render an activity with the resources from the specific res dir Dec 08 23:36:49 other than system locale Dec 08 23:38:46 i dont care about the philosophic background so much [to which i do not agree (hard-linking app-language to system locale)] Dec 08 23:39:17 i mean in my windows enterprise apps i have to give users also the possibility to use another language than system locale Dec 08 23:39:28 have you seen Locale#setDefault Dec 08 23:40:38 yes, i was here already: http://stackoverflow.com/questions/2264874/changing-locale-within-the-app-itself Dec 08 23:41:25 which brought me to the dead end and the open google issue, as onConfigurationChanged is never called when i use this methods Dec 08 23:43:02 if i can just write most my stuff in c then call it from java with the JNI should protect the source Dec 08 23:43:10 :) Dec 08 23:44:35 in the end it seems i can not use the res-locale stuff, but provide all resources with other ids in different languages in one and the same locale (default) Dec 08 23:45:48 last question: what is the best method to re-render all resources in onResume or something ? Dec 08 23:52:34 I'm wanting to do something similar to the QStackedWidget class in Qt, in which I have N number of android views, and I can switch between them arbitrarily in code... Dec 08 23:53:54 I can't figure out which class to use. StackView looks close to what I want, but it's totally undocumented, and doesn't have a method for selecting arabitrary children. all it has is showNext() and showPrevious() Dec 08 23:56:01 When a view is changed there is a sound played anyway i can disable that? Dec 08 23:56:11 Like the setVisibility Dec 08 23:57:15 Anyone know what they call those sounds that it starts? Dec 08 23:57:33 nvm Dec 08 23:57:34 got it Dec 08 23:57:34 yourbutton.setSoundEffectsEnabled Dec 08 23:59:25 I'll take that back. Screw it it's only a sound anyways Dec 08 23:59:28 lol Dec 09 00:22:52 How do I play a stream with a MediaPlayer Dec 09 00:25:01 the media player is a bit shit, it doesn't support many formats Dec 09 00:26:13 I was googling around, and I came across a page that seemed to hint that by default, it will try to download the entire stream, and that the way around that was to buffer though a file Dec 09 00:31:55 Eviltechie: was it from the "five" music player, by chance? Dec 09 00:32:13 http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/ Dec 09 00:32:40 Ah, nope. Same era though :) Dec 09 00:33:17 I didn't see much about live streaming when I was searching Dec 09 00:42:18 April 2008 is pre-1.0, isn't it? Dec 09 00:42:37 1.0 was oct 2007, right? Dec 09 00:43:04 oh, nope. oct 2008 Dec 09 00:43:31 yup, 2007 was the M releases, before my time Dec 09 00:45:51 is developing for mobile and tablet the same basically just have to adjust screen size? Dec 09 00:47:37 mdev: http://developer.android.com/training/multiscreen/index.html Dec 09 00:48:04 thanks Dec 09 00:50:32 oh hey, I got it working Dec 09 00:50:58 Turns out I just needed to implement the onPrepared properly Dec 09 00:52:41 whoops, tried making an Adapter an RxJava observer from an observable in a service; quickly realized its easy to leak the subscription Dec 09 00:52:55 android makes everything a pita Dec 09 00:52:58 Is there anymethod that allows you to hide/show a % of a canvas Dec 09 00:55:16 you could set the bounds yourself so then canvas wouldn't draw beyond that Dec 09 01:04:29 hey all, we just published the first part of http://upliink.aero open source project The essay is here: http://tricorder.org/eric/upliiink.html And a brand new twitter account:@upliink_aero - Please share it. :) Dec 09 01:12:34 hello Dec 09 01:12:43 I have a problem Dec 09 01:14:00 I got 99 problems Dec 09 01:19:10 how do i mirror the internal storage? im using adb to get a shell, but it's a very limited shell. im not even root here. Dec 09 01:19:20 i would like to copy all files over to my pc Dec 09 01:19:51 I get the error jave.io.FileNotFound when executing getInputStream on URL http://maps.googleapis.com/maps/api/directions/json?origin=47.21893559,%20-75.96618144&destination=47.21893559,%20-75.96618144&sensor=false&mode=walking Dec 09 01:20:38 dagerik, you need to root your device first, #android-root would be able to help you better than we can Dec 09 01:21:19 MDTech-us_MAN, can you pastebin some java? Dec 09 01:21:24 ok Dec 09 01:23:39 alex_PP: http://pastebin.com/QeUVa2Ne Dec 09 01:24:18 error is at line 27 Dec 09 01:24:43 dagerik: you can use 'adb backup', however I've had very mixed luck with that Dec 09 01:26:47 remove the setDoOutput line, it doesn't make sense for a GET Dec 09 01:27:11 and do you have the internet permission declared? Dec 09 01:27:16 that's all i can see Dec 09 01:27:33 let me see Dec 09 01:28:47 MDTech-us_MAN: you're ignoring an error on the URL Dec 09 01:29:16 figure out why it's failing, and properly handle error conditions before fetching the file descriptor. Dec 09 01:41:08 alex_PP: still ain't working Dec 09 01:41:29 can i see the whole stacktrace? Dec 09 01:41:39 dragorn: That is exactly what I am trying to do Dec 09 01:42:19 alex_PP: One sec, I will need to comment out the trys Dec 09 01:42:53 you can log the stacktrace with Log Dec 09 01:43:06 Log.d("tag", "message", exception); Dec 09 01:50:10 hi all.. Dec 09 01:50:41 any of you managed to get google play services / google maps working on x86 avd for 4.3 or 4.2 ? Dec 09 01:51:38 i managed to get play services + maps installed on an x86 4.3 avd (ported from arm 4.3 avd), but it seems the play services version is older Dec 09 02:08:23 anyone have an app get 10+ sales? Dec 09 02:08:27 10k+ :) Dec 09 02:11:36 alex_PP: verry sory for the long wait, but here it is: http://pastebin.com/3EgSUX9D Dec 09 02:17:41 mdev: I have a free app does that count? Dec 09 02:20:12 hi folks, i need my android copy my email to sd card. so i tried aqua mail but it doesn't do this. do you know any mail program copying emails to sd card for android with signature support ? Dec 09 02:21:19 alex_PP: baybe its because of the " " (space)? Should I replace it with "%20)? Dec 09 02:21:38 yeah, maybe Dec 09 02:21:49 worth a try Dec 09 02:21:53 alex_PP: let me try Dec 09 02:22:21 kansai: that would go in #android Dec 09 02:22:27 you might want to use this Dec 09 02:22:28 https://developer.android.com/reference/java/net/URLEncoder.html Dec 09 02:22:34 ok Dec 09 02:23:03 alos, you need sensor=true as a parameter Dec 09 02:23:44 *also Dec 09 02:25:15 I'm trying to limit the edittext value to just one character by overriding the filter(), but there I get the Charsequence source length as 1 even if the word length keeps increasing Dec 09 02:25:44 how can i with adb shell copy all files to my pc? i want to do cp -r / Dec 09 02:26:50 AndreYonadam sure, and congrats on its popularity Dec 09 02:27:26 mdev: Its called DNA Replication. 18k downloads and lost the keystore. Dec 09 02:33:36 alex_PP: now im getting "Protocol not found: http%3A%2F%2Fmaps.googleapis.com%2Fmaps%2Fapi%2Fdirections%2Fjson%3Forigin%3D40.21882361%2C+-74.96631763%26destination%3D40.21885361%2C+-74.96630787%26sensor%3Dfalse%26mode%3Dwalking" Dec 09 02:34:15 alex_PP: I will add sensor=true too Dec 09 02:36:29 alex_PP: "http%3A%2F%2F" = "http://" right? Dec 09 02:37:35 don't encode the whole string Dec 09 02:37:40 only the parameters Dec 09 02:37:58 the parameter values Dec 09 02:38:08 I'm witnessing very peculiar behavior of "onLayout()" method. Dec 09 02:38:10 whenever more than one quarter of screen gets refreshed, the whole screen gets redrawn including everything within it. Dec 09 02:38:25 can any1 elaborate me on this? Dec 09 02:38:42 "http://www.blah/.com?whatever=" + URLEncoder.encode("encode me"); Dec 09 02:40:14 alex_PP: ohhhhh Dec 09 02:51:58 i need my android copy my email to sd card. so i tried aqua mail but it doesn't do this. do you know any mail program copying emails to sd card for android with signature support ? **** ENDING LOGGING AT Mon Dec 09 02:59:58 2013