**** BEGIN LOGGING AT Mon Apr 16 02:59:59 2012 Apr 16 03:01:01 Hey, how should I set up the layout of an activity I'm going to populate with some undetermined number of elements parsed from a website? Apr 16 03:01:28 I was looking at the reddit-is-fun source but I can't quite figure out how they did it. Apr 16 03:01:50 maybe a ListView would be appropriate. Apr 16 03:02:17 Can I add elements programatically? Apr 16 03:02:22 yeah. Apr 16 03:02:25 you can always do that Apr 16 03:02:36 but a ListView manages them for you Apr 16 03:02:52 read the hello listview tutorials Apr 16 03:02:55 what do I need to do to support ant compilation of ABS? Apr 16 03:03:17 I already compile ABS with ant... Apr 16 03:03:23 $ ant release? Apr 16 03:03:34 t0mless: and it works out of the box? Apr 16 03:03:39 what do I need to do to set up some continuous integration with maven :)? Apr 16 03:03:43 just needed to generate the build.xml Apr 16 03:03:44 because that's what I think I need Apr 16 03:03:56 used android update project -p ./ Apr 16 03:03:59 readme: cloud bees has free hosted Jenkins Apr 16 03:04:01 in the library folder Apr 16 03:04:11 t0mless: so if I include that build.xml in the repo I should be good Apr 16 03:04:22 In theory Apr 16 03:04:48 i think at work we have an ant target that cds into ABS and runs that exact command Apr 16 03:04:59 readme: I can still have other elements (like buttons) inside of listview elements, correct? Apr 16 03:05:10 JakeWharton: have you ever set up something to do this: build debug, run tests, and build release + sign & zipalign if tests pass? Apr 16 03:05:17 yes Apr 16 03:05:22 as long as the project.properties has the right path for the support lib Apr 16 03:05:26 so maven + jenkins is a good choice? Apr 16 03:05:27 or maybe that's in local.properties? Apr 16 03:05:36 local.properties should only have the SDK path Apr 16 03:05:42 but that obviously can't go into the repo Apr 16 03:05:50 Indeed Apr 16 03:05:58 readme: yeah i've used it many times Apr 16 03:06:03 I have something in my project that points to the the ABS dir Apr 16 03:06:11 forget what properties file it's in Apr 16 03:06:16 culmor30: you can have a button inside a ListView element, but it's kind of a pain in the arse to do so. Other elements will just outright not work. Like, dont' try to put an EditText in there. Apr 16 03:06:27 readme: at work we have a few one-off apps that all basically do that procedure and then SCP the final .APK to a webserver Apr 16 03:07:02 I think I'm going to have to use the rest of my waking hours tonight to figure that out Apr 16 03:07:06 we include an upload.sh script as a Jenkins post-build script that just scp's target/whatever.apk to another server Apr 16 03:07:11 let me know if you have any questions Apr 16 03:07:16 i'll happily send you a pom.xml example Apr 16 03:07:25 sweet Apr 16 03:07:27 thanks Apr 16 03:07:50 readme: Ah, good to know. I want something that will allow me a few TextViews and two buttons. Is a ListView still the best choice, or should I go with a ScrollView containing a LinearLayout like I have now? Apr 16 03:08:04 I actually just updated ABS to have a debug keystore inside the repo so all dev builds will be zipaligned and signed using the same key Apr 16 03:08:11 I got sick of uninstalling and reinstalling when I changed machines Apr 16 03:11:02 what's the normal ant step to build something? Apr 16 03:11:05 so I can test this Apr 16 03:12:01 release or debug, depending Apr 16 03:15:26 is there a way to detect when an options menu is opened? Apr 16 03:15:45 onCreateOptionsMenu() seems to only be called the first time it's opened Apr 16 03:17:25 read Apr 16 03:17:30 mt Apr 16 03:17:31 nvm, got it, learned to use onMenuOpened() :P Apr 16 03:17:40 onPrepareOptionsMenu is called each time the menu is displayed as well Apr 16 03:17:49 gives you a chance to modify it Apr 16 03:18:14 JakeWharton, I'll keep that in mind, but I just need to know WHEN it's opened Apr 16 03:18:31 to pause a game :P Apr 16 03:18:53 oi oi Apr 16 03:24:09 Is a LinearLayout inside of a ScrollView a good way to make a UI similar in appearance to reddit-is-fun/twitter/baconreader? I'm parsing some number of elements from a webpage and listing them vertically, but I'll need several TextViews and at least two buttons on every element. Apr 16 03:24:09 I see Apr 16 03:24:20 that would be a ListView Apr 16 03:24:35 readme said that buttons inside of a ListView can be a pain. Apr 16 03:25:01 So I'm unsure where to go from here. Apr 16 03:27:39 ListView is definitely the best choice. Apr 16 03:27:49 but I think you should rethink butting buttons in your listview elements. Apr 16 03:27:56 of course it's doable, but it might not be worth it Apr 16 03:28:14 putting* Apr 16 03:28:28 for one, each listview element is already clickable Apr 16 03:28:36 and that's a much more expected behavior to most android users Apr 16 03:29:32 Hm, good point. I can get away with that in this activity here, but in another one I'll still need at least one other button. Apr 16 03:31:17 just read hellolistview and write the listview. putting a button inside is not rocket science. Apr 16 03:32:11 just need to set the View.OnClickListener in getView() Apr 16 03:32:19 Cool, will do. Thanks for the help! Apr 16 03:35:51 Hmm, no still haven't figured out how to handle Contextual ActionBar events :/ the documentation doesn't help much since they call a method without passing anything to it, which doesn't help me figure out which item was selected :/ Apr 16 03:40:13 edude03: show me the docs that you are having trouble dissecting Apr 16 03:40:21 edude03, what's to understand, you pass it an ActionModeSetup Apr 16 03:40:37 rather, ActionMode.Callback Apr 16 03:40:43 you control that object Apr 16 03:40:54 http://developer.android.com/guide/topics/ui/menus.html#options-menu Apr 16 03:40:54 so you create/configure it with any contextual information you need Apr 16 03:41:04 readme the part about CABs Apr 16 03:41:35 pfn, I'm having trouble understanding how I figure out what item triggered the CAB Apr 16 03:41:47 you're the one that triggers the CAB Apr 16 03:42:04 For example, in gmail long pressing an email brings up the CAB, then pressing delete deletes the email that I long pressed Apr 16 03:42:31 but the 'onActionItemClicked(Mode, Item) method doesn't tell me what item was long pressed Apr 16 03:42:49 Item doesn't tell you what Item was long pressed? Apr 16 03:42:59 No, it's what button on the CAB was pressed Apr 16 03:43:15 edude03: save the item when you long press it Apr 16 03:43:40 and yeah, save the item when you long-press it Apr 16 03:44:12 How would I save it> Apr 16 03:44:16 *? Apr 16 03:44:29 private int mPressedItem; Apr 16 03:44:51 if I have caching turned on for a webview, it shares it's cache with the browser cache, correct? Apr 16 03:50:47 Ahh thanks readme and pfn; Apr 16 03:51:59 Also, what's the best way to persist an array of a custom class across activities? I know I can parcel them, but my problem is putting the item back into the array after it's edited Apr 16 03:55:35 fucking tab wont turn on T_T Apr 16 03:55:50 edude03: huh? the array only ever has a reference to the item Apr 16 03:55:56 edude03: objects are not copied with =, only assigned. Apr 16 03:56:14 unless its a primitive type, = is not "copy" Apr 16 03:56:22 sure it is Apr 16 03:56:25 it copies the reference Apr 16 03:56:37 you are technically correct Apr 16 03:56:42 which is of course, the best kind of correct Apr 16 03:56:48 :D Apr 16 03:57:02 Well OK so I have an array of my object, and I pass it to my events like putExtra(class, ArrayOfObk[someint]) Apr 16 03:57:09 Err to my activities I mean Apr 16 03:57:48 make your class implement Parcelable Apr 16 03:57:57 It does Apr 16 03:58:21 hmm wait, can I pass and return the whole array in the bundle? Apr 16 03:58:25 so are you just annoyed that you need to change 5 places in your class whenever you add a field? Apr 16 03:59:18 No, I'm just confused about how to persist it :P For example, the main screen shows all the events right? Opening one in edit mode then going back to the main activity should show the changes Apr 16 04:00:00 parcel is not for persisting for long time, just for IPC Apr 16 04:00:22 for persisting your data, I strongly recommend just using SQLite. Apr 16 04:00:59 but if you want to be a lazy hack you can implement Serializable Apr 16 04:01:03 Not in the database, I mean just within the app Apr 16 04:01:11 err not on the disk I mean, Apr 16 04:01:15 oh Apr 16 04:01:22 use a static field :) Apr 16 04:01:26 I'm going to implement ORM later Apr 16 04:02:00 extend application, use a static field. it will last as long as the class remains loaded in the jvm. Apr 16 04:02:52 Can I make the entire array static? And that would make it a global var right? Apr 16 04:03:36 readme, I like to use ron_frown_db Apr 16 04:03:47 edude03: static is not a property of the array, but a property of the reference to the array. Apr 16 04:03:53 so you only need *one* static reference. Apr 16 04:04:18 ron_frown: oh, what's that entail? Apr 16 04:04:19 edude03: do you want the information to persist across application runs? Apr 16 04:04:41 my own mf database engine =) Apr 16 04:04:49 jeppy_ I do, which is why I'll dump it into the database, but my concern is how to persist it between activities Apr 16 04:04:51 is it open source? Apr 16 04:05:03 although I make no claims abotu its performance or viability in mobile environemnt Apr 16 04:05:13 just that it works and to me is easier to use than sqllite etc Apr 16 04:05:28 not open source Apr 16 04:05:30 not yet anyway Apr 16 04:05:36 sounds like bob-x http://thedailywtf.com/Articles/We-Use-BobX.aspx Apr 16 04:05:38 well if it's in a db, you can reach it from any of your activities Apr 16 04:06:05 you can send it as Intent extras Apr 16 04:06:14 readme - the goal of it is much diff than traditional sql db's or nosql dbs Apr 16 04:06:39 I'll disclose more when I have some benchmarks and other metrics Apr 16 04:06:39 =) Apr 16 04:07:14 I would just be weary of using static members to share information between activities unless you keep it quite simple. I tried it before and would sometimes get weird results Apr 16 04:07:18 cool Apr 16 04:07:34 jeppy_: i agree he shouldn't do that either.. but he kept asking for more ways. Apr 16 04:07:39 makes it a mess Apr 16 04:08:18 almost always run into tons of NPEs when people have stuff that depends on the state of some global static junk. Apr 16 04:08:36 Hmm, so you're saying I should just retrieve it from the DB every time I need it? Apr 16 04:09:01 maybe you would like to use a Service to handle your database ops Apr 16 04:09:08 there are many options. Apr 16 04:09:23 i think you're overthinking it Apr 16 04:09:28 just code and see what happens Apr 16 04:09:33 Quite possibly :P Apr 16 04:09:52 OK so this is my first android app I'm not sure what the best practices are here :P Apr 16 04:09:55 adhere to KISS Apr 16 04:10:10 avoid globals Apr 16 04:10:24 globalls Apr 16 04:11:33 dude Apr 16 04:11:35 OK, anyone want to recommend an ORM? I'd like to use SQLite but I don't want to write SQL Apr 16 04:11:42 if its in the db locally... sql lite is lightning fast Apr 16 04:12:07 meh, simple SQL is pretty simple Apr 16 04:13:01 edude03: in android you won't write SQL unless you absolutely want to anyway. Apr 16 04:13:08 well, you'll write a little, to define tables. Apr 16 04:13:18 but your cursor has wrappers for the basic sql statements Apr 16 04:13:21 but there is ormlite Apr 16 04:14:27 How do you retrieve objects without SQL? Apr 16 04:15:19 edude03: there's a basic Java-ish layer over sqlite which lets you query by a method call rather than raw SQL Apr 16 04:21:55 probability is so strange. Apr 16 04:27:32 that is probably correct Apr 16 04:27:40 (see what I did there) Apr 16 04:28:14 derp Apr 16 04:28:26 How can I disable automatic linewrapping in a TextView? I don't need it single-line either, the data is already wrapped as it should be Apr 16 04:29:25 OK so, if I use ormlight, then do I not use parcelable? Do I (can I) pass the id of the object in the database and just query it in every activity I use it? Apr 16 04:29:32 Then save when leaving the activity? Apr 16 04:30:16 i would just use parcelable. Apr 16 04:31:04 what is the object you are passing, and why would it change? Apr 16 04:32:19 An "Event" which is like a listing like date description of the event location date time etc Apr 16 04:32:42 uhh cant you make a serializable object and pass it? Apr 16 04:32:49 It's parcelable Apr 16 04:32:51 I thought that was one of the bundle supported types Apr 16 04:33:12 Parcel is Apr 16 04:33:19 My problem is getting it back Apr 16 04:33:20 So Apr 16 04:33:36 When you put a serializable into a bundle, the bundle holds on to the object reference UNTIL it needs to be marshalled across processes. At that point it will get serialized into a byte stream, the bundle will be written into a parcel, and the other side will receive a new bundle object with a different serializable object. Apr 16 04:33:38 edude03: i would think your Event should not be read from the database BY the activity Apr 16 04:33:41 according to dianne Apr 16 04:33:43 but sent in the Intent Apr 16 04:33:51 because that way your activity is more reusable Apr 16 04:34:03 other apps can send an intent with their data, to show an "event" in your activity Apr 16 04:34:09 without needing to be in your database. Apr 16 04:34:17 You open the app and you see a list of your events (loaded from a file right now), and you want to edit it, you long press it and hit edit, this passes the event as a parcel to the edit event activity Apr 16 04:34:38 So you change some stuff in there and you want to save it, this is where I'm currently stuck Apr 16 04:34:41 heres how I'd do it Apr 16 04:35:06 the list of events should be a table obv. use CursorAdapter. Apr 16 04:35:23 when you click an item, run the select and create the event object and then pass it to the activity you start. Apr 16 04:35:42 or, you can pass the id Apr 16 04:35:43 it's up to you Apr 16 04:35:51 might be easier to do it the id way. Apr 16 04:37:27 OK, well I'm passing the object right now, but then how do I store it? Do a database save in the edit activity? Apr 16 04:37:28 seems like the sqlite implementation stuff that came with android... is not good Apr 16 04:37:30 not good at all Apr 16 04:39:27 I can't find an answer I understand anywhere: What do I do to handle an orientaiton change with an ASyncTask + progress dialog? Apr 16 04:40:08 what action should I use on an intent-filter if I am starting an activity after logging in? Apr 16 04:40:15 I get a "java.lang.IllegalArgumentException: View not attached to window manager" Apr 16 04:40:31 I am opening a normal activity with a listview and some other items in it Apr 16 04:40:37 using startActivity() Apr 16 04:41:39 culmor30 - dude Apr 16 04:41:44 are you using managed dialogs? =) Apr 16 04:42:01 Probably not, since I don't know what that means. Apr 16 04:42:13 this.showDialog(int) Apr 16 04:42:23 vs creating a dialog programatically and calling .show() on it Apr 16 04:42:45 also if you are fragment enabled Apr 16 04:42:50 dialog = new ProgressDialog(context); dialog.setMessage("Querying Banner..."); dialog.show(); Apr 16 04:42:51 probably should be using dialogfragment Apr 16 04:42:56 yeah Apr 16 04:42:59 thats unmanage Apr 16 04:43:11 Ah, how should I be doing it? Apr 16 04:43:15 when the ui gets destroyed on orientation change, android isnt goign to go try recreating the instance Apr 16 04:43:17 I think i figured it out Apr 16 04:43:30 http://developer.android.com/guide/topics/ui/dialogs.html Apr 16 04:43:36 see oncreatedialog(int) part Apr 16 04:44:23 * ron_frown mumbles something about android setting folks up for failure.... Apr 16 04:45:15 Did they just link me to a deprecated method. Apr 16 04:45:31 who is 'they' Apr 16 04:45:40 that link ^ Apr 16 04:45:44 oh Apr 16 04:45:52 well if you are using 3.0 or compat stuff Apr 16 04:45:55 use dialogfragments Apr 16 04:45:58 showDialog(int) Apr 16 04:46:05 if you are targetting sdk 8 or something straight up Apr 16 04:46:19 So far my code works all the way back to 1.6, so may as well try to keep it that way Apr 16 04:46:26 well you can Apr 16 04:46:28 support lib works back to 1.6 Apr 16 04:46:31 compat lib + dialogfragments Apr 16 04:46:39 it is different tho Apr 16 04:46:49 may suck to go back and change your dialogs over to dialogfragments etc Apr 16 04:46:56 does the dialogfragment shit have the builder still? Apr 16 04:47:11 yeah Apr 16 04:47:15 you just create a normal dialog Apr 16 04:47:15 Only got one dialog, no big deal Apr 16 04:47:18 without calling show Apr 16 04:47:33 DialogFragment is just a thin wrapper around a normal dialog Apr 16 04:50:07 ron_frown: How do I use showDialog(int)? Where do I set the dialog up and such? Apr 16 04:50:17 Hmm, OK eclipse broke my menu lol, I have a preferences button with the ID 'preferences' and I have a switch to catch it case R.id.preferences: which used to work but now it goes to the default case :/ Apr 16 04:50:24 onprepare, oncreate whatever you want Apr 16 04:50:33 basically the idea is, youcreate the dialog and reference it by an int id Apr 16 04:50:38 Is there a way to make eclipse rechecked the ids? Apr 16 04:50:40 actually Apr 16 04:50:50 I think its diff Apr 16 04:50:57 just copy the example I sent you Apr 16 04:51:01 thats how its supposed to work Apr 16 04:51:09 edude03: Try a Project > Clean... ? Apr 16 04:51:18 you switch id that comes in, and create the appropriate dialog Apr 16 04:51:19 OK just tried that Apr 16 04:51:23 I think its onPrepareDialog Apr 16 04:51:51 sweet that worked, thanks culmor30 Apr 16 04:51:58 Sure! Apr 16 04:52:26 ron_frown: Which example you sent me? Apr 16 04:52:39 the android reference Apr 16 04:52:40 Oh wait sorry, I'm blind Apr 16 04:52:44 edude03: do you have the correct R import? Apr 16 04:52:48 those syntax highlighted code blocks arent there for nothing =) Apr 16 04:52:49 haha Apr 16 04:52:56 I'm importing mypackage.r Apr 16 04:53:06 i'm uploading my package into... Apr 16 04:53:09 oh wait wrong channel Apr 16 04:53:12 Because of another similar issue where it wasn't detecting my menu.xml file Apr 16 04:55:11 LOL, is it paranoid of me if I bring a clone of my internal hard drive tomorrow incase it fails Apr 16 04:55:43 yes Apr 16 04:55:44 this is the future Apr 16 04:55:47 use the cloud Apr 16 04:56:18 ron_frown: I guess I don't see why this would change anything about my app crashing during an orientation change. Why will this work, or is there something more I need to do? Apr 16 04:56:29 because when orientation changes Apr 16 04:56:33 JakeWharton the cloud won't save me if my computer doesn't turn on :P Apr 16 04:56:44 true Apr 16 04:56:45 android calls onpreparedialog with the dialog that was shwoing when orientation changed Apr 16 04:56:51 it can recreate the reference to the dialog Apr 16 04:57:11 then your progress update etc from asynctask can still be referencing a valid dialog Apr 16 04:57:18 on config/orientation change Apr 16 04:57:22 it breaksdown the UI Apr 16 04:57:25 and recreates Apr 16 04:57:31 But how does it know to call that method? This is inside an ASyncTask's onPreExecute, and not within an Activity Apr 16 04:58:27 * culmor30 does need sleep badly so it is possible that he's not making obvious connections. Please bear with him :) Apr 16 04:58:40 your AsyncTask won't survive orientation changes either Apr 16 04:58:46 FYI Apr 16 04:59:01 Yeah I'm wondering what I should do about that too. Apr 16 04:59:15 From what I understand it's a bit of a pain Apr 16 04:59:18 I can tell you what you absolutely shouldn't do: handle configuration changes in the manifest Apr 16 04:59:41 Loader+DialogFragment Apr 16 04:59:42 JakeWharton: why not? assuming he's not using abs Apr 16 04:59:59 because it's unnecessary and the documentation tells you to use it as a last resort Apr 16 05:00:11 I want to support at least down to 2.1 Apr 16 05:00:23 support library is 1.6+ Apr 16 05:00:31 has both Loaders and DialogFragments Apr 16 05:00:56 and once you overcome the API stupidity it's far less easy to shoot yourself in the foot with leaking contexts or anything related to rotation Apr 16 05:01:10 I've never heard of a DialogFragment - investigation time. Apr 16 05:01:10 public class DialogFragment / Since: API Level 11 Apr 16 05:01:18 SUPPORT LIBRARY IS 1.6+ Apr 16 05:01:39 http://developer.android.com/reference/android/support/v4/app/DialogFragment.html Apr 16 05:01:46 Yeah you'll have to explain this a little further because I have no idea what's going on Apr 16 05:02:04 I cannot, I'm in the middle of a release process Apr 16 05:02:11 start with AsyncTask for now Apr 16 05:02:12 get something working Apr 16 05:02:20 don't try to do everything at once Apr 16 05:02:28 Do you understand the concept of the support library, culmor30? Apr 16 05:02:30 how can I get my program to always be paying attention to a value? I found a shake monitor, and I want it to do a certain action if it goes past a certain point, but I'm not sure how to do it :C any tips? Apr 16 05:02:47 http://stackoverflow.com/questions/2317428/android-i-want-to-shake-it I used this T_T Apr 16 05:02:56 Library to support newer features on an older version? Apr 16 05:03:33 so what would happen if i (or how should i handle) update a textview after an AsyncTask in a way that doesn't blow up if there was an orientation change in the middle of the task? Apr 16 05:03:58 Yes, it is jar you can include that gives you alternate import locations to access support versions of newer functions Apr 16 05:07:00 How do I get it? Apr 16 05:07:44 I want to capture a snapshot from the camera (using the default GUI), but can't seem to find a good tutorial for an android newbie like myself. Anyone have an example I can use? Apr 16 05:08:05 More information here: http://developer.android.com/sdk/compatibility-library.html Apr 16 05:08:11 I used the method involving ACTION_IMAGE_CAPTURE, but the thumbnail isn't much use to me Apr 16 05:08:37 Essentially you can use the SDK manager to download it Apr 16 05:09:17 Oh, cool. Thanks Apr 16 05:10:00 No problem Apr 16 05:10:02 http://developer.android.com/training/camera/photobasics.html Apr 16 05:10:07 Artifice: ^^^^^^ Apr 16 05:10:14 Thanks Apr 16 05:13:05 If I go back from one activity to the other, is onCreate called again? Apr 16 05:15:44 Also, wtf :/ I need to extend ORMLite Activity to use it's adatabase Apr 16 05:15:54 Err, to use that ORM, that's weird Apr 16 05:16:36 edude03: no u dont need to Apr 16 05:16:49 its just an helper Apr 16 05:17:18 What does it help with? Apr 16 05:20:51 'Running Android Lint' has encountered a problem. Failed. NPE. Apr 16 05:21:49 orm nom nom Apr 16 05:21:56 It's kind of ridiculous that I need to output a snapshot to file, instead of directly to memory. Apr 16 05:22:27 <`teh1> can i use the same location listener to listen to updates from multiple providers? Apr 16 05:22:39 edude03: read the doc, i think it take cares of the db lifecycle for you Apr 16 05:23:17 `teh1: I think you can. Apr 16 05:23:40 <`teh1> OK thanks... Apr 16 05:23:46 * `teh1 is already trying… 1 min Apr 16 05:23:54 *boom* Apr 16 05:24:01 <`teh1> just wanted to make sure i wasn't trying somrthing horribly… ^wrong Apr 16 05:24:02 <`teh1> :P Apr 16 05:24:49 balls Apr 16 05:24:54 maven is triggering the release profile :( Apr 16 05:24:57 *isn't Apr 16 05:26:58 <`teh1> stupid you can't attach adb to multiple phones Apr 16 05:27:05 i like how this channel is just a constant stream of developer frustrations Apr 16 05:27:19 we should just rename it #android-circlejerk Apr 16 05:27:19 Oh good, it's not just me. Apr 16 05:27:26 <`teh1> readme: i think that says something about android and its development tools... Apr 16 05:28:09 <`teh1> whenever i go into an ios development room complaining, i am shot down with: "this is how it's done and why, don't be stupid"… here, it's "just accept that's how it is, even though it sucks" Apr 16 05:28:11 android is a young platform Apr 16 05:28:18 If I weren't being paid a suprisingly large amount of money to do android dev, I would have given up before I spent my weekend learning this. Apr 16 05:28:32 <`teh1> if it was done correctly from the start then there wouldn't be any issues :P Apr 16 05:28:47 <`teh1> i think the #1 issue is the lack of a good system to update the OS across every device that uses it Apr 16 05:28:53 <`teh1> the second is the lack of consistency in hardware Apr 16 05:29:14 neither are really Android's problem Apr 16 05:30:01 perhaps Google's problem Apr 16 05:30:02 <`teh1> JakeWharton: sure it is, just not directly Apr 16 05:30:10 The dev tools are better in some ways than iOS (no security crap causing problems), but the docs are terribad. Apr 16 05:30:18 it's not a fault of the OS that OEMs are archaic idiots Apr 16 05:30:27 `teh1: android is an open source platform Apr 16 05:30:29 <`teh1> xcode 4 is pretty nice, Artifice Apr 16 05:30:41 <`teh1> readme: like i said, not directly Apr 16 05:30:45 I dislike xcode4, luckily I don't need to use it much Apr 16 05:30:55 `teh1: but as JW points out, you mean Google, not Android. Apr 16 05:31:02 <`teh1> xcode 4 is a stupendous improvement over 3 Apr 16 05:31:10 <`teh1> readme: google creates android :P Apr 16 05:31:20 I like how it tab completes absolutely everything Apr 16 05:31:23 quite well Apr 16 05:31:27 i think android should be more modular and allow for easier updating, though Apr 16 05:31:30 <`teh1> wabz: that's pretty standard Apr 16 05:31:32 `teh1: no, apple writes android Apr 16 05:31:34 <`teh1> even in IRC clients Apr 16 05:31:45 <`teh1> readme: darn, i thought i had it all figured out... Apr 16 05:31:46 Steve Wozniak designed the dalvik vm Apr 16 05:31:47 it does much more than say... eclipse Apr 16 05:32:09 also, Bill Gates is the new CEO of Google. Apr 16 05:32:16 <`teh1> sure, eclipse can do a lot, but it is also very bloated and slow incomparison... Apr 16 05:32:22 <`teh1> also ugly as a dirty dick Apr 16 05:32:49 sounds like you're on a mac Apr 16 05:32:49 spoken like someone who doesn't have enough ram Apr 16 05:33:30 <`teh1> readme: i shouldn't need more than 4 gigs of ram to see a few colored lines of code. xcode 4 proves that perfectly, with a memory footprint that is at least 5 times less Apr 16 05:33:47 don't open a full-blown IDE for that! Apr 16 05:33:48 <`teh1> just saying. Apr 16 05:33:56 well then, go develop in xcode. Apr 16 05:34:04 <`teh1> i do, for iphone :] Apr 16 05:34:07 <`teh1> and for games Apr 16 05:34:12 <`teh1> not nawt java. Apr 16 05:34:51 btw if you're on a mac, 4 gigs isn't enough ram because your bloated OS probably uses around 2 just to run. Apr 16 05:35:04 Real programmers use vim. Apr 16 05:35:08 <`teh1> readme: are you _actually_ retarded? Apr 16 05:35:17 can you take this elesewhere? Apr 16 05:35:21 <`teh1> os x has a pretty small ram requirement for an OS of its calibre Apr 16 05:35:23 "Sergey Brin Says Facebook, Apple and Gov't Biggest Threats To Internet Freedom", funny this one. Apr 16 05:35:27 <`teh1> win7 is huge :\ Apr 16 05:35:30 calibre, ha Apr 16 05:35:35 <`teh1> caliber Apr 16 05:35:51 either way that's a funny word to describe a common OS these days. Apr 16 05:36:02 now ah... #android-dev Apr 16 05:36:19 /rename channel #android-off-topic Apr 16 05:36:23 My mac does fine with 4gb, because I use it for nothing but xcode/unity Apr 16 05:37:15 <`teh1> Artifice: my mac does fine with 4gb using photoshop, illustrator, xcode, itunes, coda, and querious all at once Apr 16 05:37:18 `teh1: run top and check out your memory usage then you tell me. Apr 16 05:37:23 <`teh1> but as soon as i open eclipse, all hell breaks loose Apr 16 05:37:36 `teh1: eclipse is going to use about 600mb for its heap, just by default Apr 16 05:37:37 <`teh1> readme: i keep activity monitor open Apr 16 05:37:48 I read that 2GB (which i have on my ubuntu and is fine for eclipse) is not enough for xcode 4 Apr 16 05:38:03 <`teh1> readme: system memory usage: http://cl.ly/2q1V0d1j1J2v3y2X3u0F Apr 16 05:38:09 all at once? are you sure no swap is being used Apr 16 05:38:11 <`teh1> ive had my compy on for over 2 weeks now Apr 16 05:38:26 that little spec means nothing Apr 16 05:38:36 <`teh1> same things at "top" :P Apr 16 05:38:51 top will say swap being used and other nifty stats that spec isn't saying. Apr 16 05:38:57 yeah Apr 16 05:38:59 your screenshot is dumb Apr 16 05:39:13 Hey guys. How do I make a progress spinner dialog with some text for an ASyncTask using the DialogFragment compatibility library? Apr 16 05:39:28 support library, rather Apr 16 05:39:34 if you can't get eclipse to run nice on the computer, you should consider going to the apple store and consulting one of those mac geniuses Apr 16 05:39:37 <`teh1> http://cl.ly/2i2O3L123D0y2w393318 Apr 16 05:39:45 they will probably tell you they can upgrade your ram for $100 per gig Apr 16 05:39:55 <`teh1> eclipse uses a lot, and causes window server and kernel task to use a lot Apr 16 05:39:56 <`teh1> :\ Apr 16 05:40:10 <`teh1> readme: i can buy 8 gigs for 43 bucks on newegg Apr 16 05:40:14 culmor30: have you seen ProgressDialog? Apr 16 05:40:16 swap used: 2gb Apr 16 05:40:27 so to begin with your computer did not have enough memory for everything. Apr 16 05:40:37 jeppy_: I was using : dialog = new ProgressDialog(context); dialog.setMessage("Querying Banner..."); dialog.show(); Apr 16 05:40:45 But apparently that's wrong. Apr 16 05:40:47 <`teh1> vadi2: not a problem when eclipse is closed :P Apr 16 05:40:57 yes it will be, eclipse is only using 1gb... Apr 16 05:41:05 2-1=1 Apr 16 05:41:07 <`teh1> 1.44 inactive Apr 16 05:41:09 culmor30: why is it wrong? Apr 16 05:41:12 `teh1: oh. i didn't know mac users upgrade their own ram. Apr 16 05:41:23 Because it dies when the orientation changes during the ASyncTask Apr 16 05:41:24 <`teh1> readme: your points of view are extremely outdated... Apr 16 05:41:42 I think your mac is extremely outdated. My computer has 8gb ram. Apr 16 05:41:50 `teh1: i'm not being sincere. Apr 16 05:42:04 jeppy_: because it will leak the context on rotation Apr 16 05:42:05 vadi2: ++ Apr 16 05:42:08 <`teh1> then stop saying dumb things Apr 16 05:42:09 moar ram Apr 16 05:42:22 culmor30: look at showDialog from activity class Apr 16 05:42:25 shouldn't it just dismiss the dialog? Apr 16 05:42:31 but its deprecated too Apr 16 05:42:31 01:32 < `teh1> sure, eclipse can do a lot, but it is also very bloated and slow incomparison... Apr 16 05:42:34 01:32 < `teh1> also ugly as a dirty dick Apr 16 05:42:37 Estragon: is deprecated Apr 16 05:42:46 the man who spoke of dirty dicks has told me to stop saying dumb things Apr 16 05:42:48 <`teh1> readme: have you seen how most OS X apps look?> Apr 16 05:42:50 I shall definitely listen. Apr 16 05:42:52 Estragon: it's deprecated in favor of DialogFragment but it's still perfectly fine to use Apr 16 05:42:54 <`teh1> eclipse is as ugly as a dirty dick Apr 16 05:43:10 can you provide us with a side by side comparison Apr 16 05:43:14 so I can see exactly what you mean Apr 16 05:43:34 culmor30: showdialog will take care of config changes issues for you Apr 16 05:43:42 <`teh1> readme: here's coda, by comparison Apr 16 05:43:44 <`teh1> http://cl.ly/0L151R1w2g0Y2k3n1G3a Apr 16 05:44:05 `teh1: that looks more like a text editor than an IDE Apr 16 05:44:29 <`teh1> regardless of what it is, i am referring to the graphics Apr 16 05:44:38 <`teh1> it is not butt-ugly Apr 16 05:44:40 ah, yes, the graphics are the important part Apr 16 05:44:55 Estragon/all: Okay, but how do I do that when this ASyncTask is its own class and is not within an activity? (started android a few days ago) Apr 16 05:45:03 <`teh1> aesthetics are as important as functionality. it makes utilizing the functionality much more pleasant Apr 16 05:45:32 so then, what does eclipse need to fit your bill Apr 16 05:45:34 a new icon set? Apr 16 05:45:39 <`teh1> that's a start Apr 16 05:45:49 it's open source. feel free to contribute one. Apr 16 05:46:44 Also, what do I do with the asynctask when orientation changes? It's not a complicated task, and it would be okay to start it over. Apr 16 05:46:47 <`teh1> another part would be to create the UI using Cocoa Apr 16 05:47:27 <`teh1> culmor30: doesnt the activity stay how it was, but onCreate is called again when it's flipped? Apr 16 05:47:34 <`teh1> so can't you just keep it in an instance varaible? Apr 16 05:48:31 Keep what? Apr 16 05:49:04 ron_frown, hi Apr 16 05:49:20 <`teh1> culmor30: the asynctask Apr 16 05:49:20 I have a reference to the activity which launched the asynctask, as a context Apr 16 05:49:24 `teh1: "An activity will do all setup of "global" state in onCreate(), and release all remaining resources in onDestroy()." Apr 16 05:49:28 culmor30: use a static field Apr 16 05:49:36 to persist the AsyncTask on orientation changes. Apr 16 05:49:42 <`teh1> readme: good point. Apr 16 05:50:00 hang on, I have to look over this lifecycle business again. Apr 16 05:50:07 erwt Apr 16 05:50:10 whats crackin Apr 16 05:51:13 skulls Apr 16 05:51:22 this is pretty cool http://venturebeat.com/2012/04/15/unemployed-game-designer-solar-system-app/ Apr 16 05:51:37 Okay so what I understand is: The UI gets destroyed on orientation change, so I need to keep a reference to my ASyncTask from the activity which started it. Is that right? Apr 16 05:51:52 for now it is Apr 16 05:52:35 culmor30: use a static field. Apr 16 05:52:36 And if I use showDialog, that stupid spinner should handle itself and show up again magically. Apr 16 05:52:42 wow Apr 16 05:53:00 friday is my first meeting with people I may start a new dev studio with Apr 16 05:53:21 3 real talented 3d guys, a 2d guy and html guy Apr 16 05:53:31 There are HTML guys? Apr 16 05:53:32 and for now, I'm the software =) Apr 16 05:53:38 yes, yes there are Apr 16 05:53:46 But.... there are only like 50 tags Apr 16 05:54:01 He does other stuff too, right? CSS and Javascript at least? Apr 16 05:54:30 thats what I mean when I say html Apr 16 05:54:36 mainly js, ui, css etc Apr 16 05:54:40 not just straight html Apr 16 05:54:41 Oh okay Apr 16 05:54:43 dude why would you even use javascript and css Apr 16 05:54:52 javascript <3 Apr 16 05:54:54 just use basic tags like Apr 16 05:54:55 ...if you're making a website? Apr 16 05:54:56 readme corporate website =) Apr 16 05:55:03 I hate js Apr 16 05:55:03 ron_frown: i be trollin Apr 16 05:55:16 I think its retard of programminglanguages Apr 16 05:55:26 its pc to like it, so everyone confesses their undying love for it Apr 16 05:55:33 but its just completely shit Apr 16 05:56:07 yeah its not that good Apr 16 05:56:22 ooh, my shitty javascript thing is suddenly relevant Apr 16 05:56:32 Brandon Eich only wrote the original javascript in about 1 week. Apr 16 05:56:38 http://dl.dropbox.com/u/13228613/ohNo.html Apr 16 05:56:40 check it out Apr 16 05:56:53 Brendan* Apr 16 05:57:34 who in the FUCK just called me Apr 16 05:57:36 at 11pm Apr 16 05:57:57 <`teh1> ron_frown: that is not late. Apr 16 05:58:19 I'm a parent now... dont appreciate loud things after 7pm =) Apr 16 05:59:26 <`teh1> lame Apr 16 05:59:36 <`teh1> i blast music all night Apr 16 05:59:43 <`teh1> nah but i enjoy listening to my music pretty late Apr 16 06:00:26 thats what I got my sennheisers for Apr 16 06:00:32 Okay I have no idea what I'm doing. Does anyone have a reference for that asynctask orientation change business? Apr 16 06:00:51 god damn my cat is irritating Apr 16 06:02:37 and man vzw visual voice mail app is complete garbage Apr 16 06:02:44 makes me want to reverse engineer the shit and write it better Apr 16 06:02:50 give it to them for free Apr 16 06:03:41 lol@you for using VZW apps Apr 16 06:03:45 does anyone know how to make a spinner use a different layout for its collapsed view/prompt and the list items it displays? Apr 16 06:03:53 every single verizon app that came with my phone is garbage Apr 16 06:04:05 readme is there a vzw visual voicemail app that doesnt suck Apr 16 06:04:05 Napalm: use a custom adapter Apr 16 06:04:13 specify two views for drop down resource and regular resource Apr 16 06:04:21 ron_frown: you just said it's garbage! Apr 16 06:04:55 JakeWharton: sorry, im not following, you mean make an adapter that has multiple types? Apr 16 06:04:56 but I suppose you may be locked in, as it's probably the only app that can access your voicemail. Apr 16 06:05:14 Why not use google voice for voicemail? Apr 16 06:05:30 oh wait Apr 16 06:05:36 Napalm: getView and getDropDownView Apr 16 06:05:38 I can tell verizon to use a diff provider for my voicemail Apr 16 06:05:39 cant i Apr 16 06:05:40 extend BaseAdapter Apr 16 06:05:43 culmor30: that would be a good option Apr 16 06:05:51 I dont have google voice sitting between my phone number and my phone Apr 16 06:05:57 JakeWharton: i just released that its a Spinner Apr 16 06:05:58 Don't need it Apr 16 06:05:58 that too. Apr 16 06:05:59 i mean Apr 16 06:06:06 vzw charges money too Apr 16 06:06:06 SpinnerAdapter and not a generic Adapter Apr 16 06:06:11 2.99 a mo for that feature Apr 16 06:06:13 now i feel stupid Apr 16 06:06:45 womanizer woman womanizer womanizer oh Apr 16 06:06:48 Napalm: feel better now? Apr 16 06:07:00 :) yes Apr 16 06:07:11 had that song in my head, no idea why Apr 16 06:07:29 Has anyone here ever used asynctask and accounted for orientation changes? And if so, can I see your source? I'm desperate and losing motivation. Apr 16 06:08:06 culmor30: private static MyAsyncTaskSubclass mTask; Apr 16 06:08:13 it will survive orientation change Apr 16 06:08:54 but his problem is the dialog he tries to show has a stale context Apr 16 06:09:04 No that's a seperate problem Apr 16 06:09:09 I have lots of problems. Apr 16 06:09:15 haha Apr 16 06:09:47 So I make this thing an instance variable Apr 16 06:10:04 and then instantiate it with myVariable = new SubmitQuery(parameters).execute(); Apr 16 06:10:08 "Must have around 247 characters or fewer" - I _love_ fuzzy web form error messages. Apr 16 06:10:14 culmor30: if you want to take the easy way out Apr 16 06:10:24 I don't! Apr 16 06:10:27 just add android:configChanges="orientation" to the activity tag in your manifest Apr 16 06:10:50 culmor30, check out ignition's ASyncTask Apr 16 06:10:54 Apparenly jesus himself will come down from heaven and punch me in the face if I do that. Apr 16 06:10:59 throw in a keyboardHidden for good measure Apr 16 06:11:16 culmor30: you mean come up from mexico Apr 16 06:11:26 oh, right Apr 16 06:11:36 culmor30, https://github.com/kaeppler/ignition/wiki/Sample-applications Apr 16 06:12:18 http://www.eclipsecolorthemes.org/ i am sick of purple and blue Apr 16 06:12:57 ignition reminds me of Spring Apr 16 06:13:13 Ologn: thanks, will look over this Apr 16 06:15:24 anyone ever got a "javax.net.ssl.SSLPeerUnverifiedException: No peer certificate" while NOT using SSL? :( Apr 16 06:16:49 yay Apr 16 06:16:57 setup google voicemail on my phone Apr 16 06:17:31 it'd be bitchin to get rid of vzw mail Apr 16 06:17:48 I wonder if I can port my number to voice, and just get a new shit number on my mobile acct with vzq Apr 16 06:19:01 I don't even use voice, I just forward my voicemail there Apr 16 06:19:33 I'd like to use voice Apr 16 06:19:40 it can do some neat stuff for you automatically Apr 16 06:22:26 I really really dont want to go back to work tomorrow Apr 16 06:22:45 so dont go Apr 16 06:23:26 call in sick and spend the whole day coding your own app Apr 16 06:24:00 most heart attacks occur at this time, btrw Apr 16 06:24:02 ron_frown: i have my vzw # calls go to google voice vm, and it will play them and transcribe them without having to call vm Apr 16 06:24:33 http://en.wikipedia.org/wiki/Kar%C5%8Dshi Apr 16 06:24:49 what the japanese acknowledge but westerners dont, is that work kills us Apr 16 06:24:52 readme: 2:30am? Apr 16 06:25:04 jeppy_: eh, monday morning (before work) Apr 16 06:25:23 the night before going back to work is stressful for a lot of people Apr 16 06:26:12 are there any good free rescources out there to learn some basic java? Apr 16 06:26:23 meeyay: search: thinking in java Apr 16 06:26:30 meeyay: sun's java tutorial is a great start Apr 16 06:26:37 not a complete picture, but a great start none-the-less Apr 16 06:26:46 ok and ok thank ya Apr 16 06:27:12 HAHAH Apr 16 06:27:20 karoshi Apr 16 06:27:22 badass term Apr 16 06:28:02 I used to work with this guy years back... probably 3-4 years ago... he was probably 21-22 somewhere in there... Apr 16 06:28:19 come to find out shortly before I was hired at my current employer... he died of a heart attack Apr 16 06:28:36 unfortunately that's not the only story like that I have heard Apr 16 06:28:39 I figured he had conditions Apr 16 06:28:47 but now that I wokr here, I am not so sure thats the case Apr 16 06:28:49 at 26 damn Apr 16 06:28:49 about 6 months ago I had like a tachycardia Apr 16 06:28:56 hehe Apr 16 06:28:58 I only realized it because I was working with medical equipment Apr 16 06:29:05 i got it undercontrol since then Apr 16 06:29:13 i'm like the laziest person at every company i've ever been at Apr 16 06:29:16 :) Apr 16 06:29:21 jasta good plan Apr 16 06:29:32 honestly in my experience, you'll go further than a go getter like myself =) Apr 16 06:29:39 but actually, being lazy is a good thing if you do it smart. Apr 16 06:29:51 i really, really don't like hard work. Apr 16 06:30:00 it's not the grinder who wins Apr 16 06:30:04 I love hardwork and building beautiful elegant shit Apr 16 06:30:16 it's the guy who just shows up at 9 and leaves at 5, but focuses well the whole time Apr 16 06:30:17 but I've found that standing out, is like putting a big ass target on the back of your head Apr 16 06:30:43 I remember frequently going into meetings getting ready to bask in the glory that is the response to things I did Apr 16 06:30:49 only to get thrown under the bus for something else Apr 16 06:31:13 * culmor30 is a university student and not liking what he's hearing Apr 16 06:31:14 I've got probably 10yr more experience than anyone I've worked with in the past 5yr Apr 16 06:31:32 and even though I am constant go to guy for advice in architecture and design Apr 16 06:31:42 you sure do sound like a douche right now ;) Apr 16 06:31:44 and I've consistently exceeded expectations with deadlines Apr 16 06:31:45 culmor30: working at a company is a choice. you can start your own, or stay in academia, or work in a lab. there are lots of places to work. Apr 16 06:31:46 yet to be promoted Apr 16 06:32:00 you don't have to apply to work in hell. Apr 16 06:32:01 culmor30 - shitloads of polotics and egos Apr 16 06:32:10 just know that going in, you'll be fine Apr 16 06:32:18 if you can, start your own Apr 16 06:32:30 build things the way you want to, dont have to deal with being told to do stuff the wrong way Apr 16 06:32:35 That's why I'm learning this stuff... good to have some backup if I can't take the corporate world Apr 16 06:32:52 ron_frown: actually, i frequently advise my co-workers to ignore our bosses when they begin to dictate _how_ something should be built. Apr 16 06:33:09 especially when things like "just make it work" start coming out. Apr 16 06:33:26 ABS 4.0.2 is out Apr 16 06:33:31 get it while it's hot Apr 16 06:33:41 it's not going very well, to be honest. my coworkers are apparently really happy being so miserable :) Apr 16 06:34:03 jasta Apr 16 06:34:05 I do to Apr 16 06:34:06 too Apr 16 06:34:21 I don't believe that in the lower 99% of jobs anyone is truly happy. Apr 16 06:34:28 infact a lot of the time my boss will change my priorities on the fly because his actions are like one knee jerk reaction after the next Apr 16 06:34:37 I just ignore and continue business as usual Apr 16 06:34:41 and usually the outcome is good Apr 16 06:34:49 readme: oh i'm definitely sure that's wrong. Apr 16 06:35:14 jasta: ignorance is bliss Apr 16 06:35:17 I recently got to the point where I was planning on quitting software Apr 16 06:35:18 readme: i've really been very happy with my career so far. i find what i do to be very low stress, high paying, and very intellectually rewarding. Apr 16 06:35:28 jasta: maybe your job is in the 1%? Apr 16 06:35:34 I wanted to go work with my dad at the power plant and he tells me "...there are plenty of idiots out there too..." Apr 16 06:35:37 you sure you don't have one of the 1% of happy jobs? Apr 16 06:35:38 i doubt it. depends how you define that. Apr 16 06:35:48 the 1% of jobs that people are content with Apr 16 06:35:48 but the thing is, if I am not a master of my craft, I wont know when I am being told to do dumbshit Apr 16 06:35:51 also, i think it is me that makes this statement true, not my jobs. Apr 16 06:35:54 I can just do my job, go home Apr 16 06:36:07 software is my passion... I dont believe in compromise Apr 16 06:36:15 jasta: I agree that individual attitude towards the job is probably the most important part Apr 16 06:36:20 I think with experience you can build stuff elegant without sacrificing timeline Apr 16 06:36:29 the thing is.. you can only lie to yourself for so long before you snap and realize what you truly feel. Apr 16 06:36:31 nobody else seems to give a shit Apr 16 06:36:36 JakeWharton: Thanks for shipping Apr 16 06:36:38 I decided I wanted to go into woodworking Apr 16 06:36:54 afterall its the same thing as software engineering, except people seem to care more when they can see the beauty in what you build Apr 16 06:36:56 readme: you know i really think that where most people fail is taking things too literally. you need your "ah-ha" moment when you realize no one actually is certain that what they're doing is the right thing to do. Apr 16 06:37:12 and really all anyone at the top wants is to just make money, they don't actually know how that's done. Apr 16 06:37:20 JulienDev: wanted to get r7 support lib support out there ASAP. Now on to the really hard bugs for a v4.1.0… Apr 16 06:37:27 so that realization gives you a lot of freedom to just kind of do whatever you want Apr 16 06:37:33 just get it the fuck done jake Apr 16 06:37:34 so long as you think it is in support of that overall goal in some way Apr 16 06:37:46 I'm going to base v2 on your product... and its going to be fucking beautiful Apr 16 06:38:11 well don't use tab navigation with action modes just yet... Apr 16 06:38:13 my other huge peice of advice for those diving into tech industry Apr 16 06:38:22 jasta: i'm pretty happy with living on a beach and doing contract work from home :) Apr 16 06:38:33 dont assume people with more experience are actually better suited, or more knowlegeable Apr 16 06:38:40 I can't imagine after this I'd like working in most offices. Apr 16 06:38:41 I was a total pussy when I got my first software job Apr 16 06:38:44 readme: but the compromise is that you really need to study your industry, your trade, etc. you need to have some reasonably idea that doing "whatever you want" is in fact in support of that goal. Apr 16 06:38:46 only if it was really a cool company Apr 16 06:38:52 and when I realized how not bad I was compared to other dipshits in the office Apr 16 06:38:52 JakeWharton: Ok great. Thanks for all, I'm using it for my app https://play.google.com/store/apps/details?id=fr.mp.suiviconso Apr 16 06:39:06 reasonably good idea* Apr 16 06:39:32 JulienDev: awesome! I have no idea what any of that says, but it sure looks pretty :) Apr 16 06:39:33 readme: well yeah, that works too. i've been wanting to move to Santiago de Chile and do the same :) Apr 16 06:39:48 that would be pretty awesome Apr 16 06:40:09 I want to make some apps that can build a passive income then I can have more freedom in life. Apr 16 06:40:19 anyway Apr 16 06:40:21 so far my app has only done $8 in revenue after 2 days though :| Apr 16 06:40:22 i'm definitely doing it, it's just a matter of timing. my gf is still in school, so i don't wnat to disrupt that. Apr 16 06:40:28 for 2 days, I think it's decent. Apr 16 06:40:31 jasta: yeah, same Apr 16 06:40:36 i'm waiting for her to graduate in may Apr 16 06:40:55 my hugely negative attitude can hopefully change.... with my dev studio and another software group that focuses on quality, and elegance Apr 16 06:41:04 readme: my gf is a ways off. we're trying to get her into a study abroad program so we can move there :) Apr 16 06:41:23 nice Apr 16 06:41:31 JakeWharton: It's an app to follow consumption for the new french mobile provider called "Free" :) Apr 16 06:41:38 ron_frown: you know, it's not very often that external influences change your attitude. at least, it's not a smart bet. Apr 16 06:42:19 readme: a close friend of mine is moving there in October. i wish the timing would have worked out to have us both there at the same time Apr 16 06:42:44 if you are not happy, it means that you are not getting something that you need Apr 16 06:42:47 i mean i'll still visit of course, but it would've been that much more fun to have been living there at the same time as him Apr 16 06:42:59 readme: hehe, what? Apr 16 06:43:01 we're just discussing here that we should decamp to the pool for the rest of the day, with cocktails and naked ladies... Apr 16 06:43:04 jasta: @ron Apr 16 06:43:11 readme: yeah that's still just not true. Apr 16 06:43:19 given that neither of our 'bosses' seem likely to put in an appearance today Apr 16 06:43:32 at least your semantics are all screwy. Apr 16 06:43:38 jasta: nah, it's true. trust me, the lying to yourself to win is temporary at best. Apr 16 06:44:06 readme: i guess it depends on what you think need means. Apr 16 06:44:14 I mean psychological needs Apr 16 06:44:27 most of the time being happy is just about letting go of what you think you do need. Apr 16 06:44:32 like, autonomy Apr 16 06:44:37 oh, then sure. Apr 16 06:44:55 but needs in that sense really aren't that likely to change by, for example, getting a new job. Apr 16 06:44:57 i am pretty minimalist. we don't spend a lot of $ at all. Apr 16 06:45:05 righ Apr 16 06:45:07 hehe yeah, i'm the same. Apr 16 06:45:13 i drive the junkiest beater car you could imagine Apr 16 06:45:16 I believe that some people just won't be happy with a plain-old job. Apr 16 06:45:33 that's why tons of people are self employed or have businesses. Apr 16 06:45:42 or homeless Apr 16 06:45:42 ;D Apr 16 06:46:01 anyway, im off to bed Apr 16 06:46:37 night Apr 16 06:50:50 contract work from home? Apr 16 06:50:56 spending your days on the beach? Apr 16 06:50:57 what? Apr 16 06:51:23 pfn: to be fair, i don't go down to the actual beach. i just open the sliding door next to me. Apr 16 06:51:39 there aren't any power outlets there and the sand... Apr 16 06:51:45 anyone use intellij? Apr 16 06:51:50 Yes Apr 16 06:51:56 I do Apr 16 06:51:58 religiously Apr 16 06:52:00 im having trouble getting it set up Apr 16 06:52:06 Anyone use jsoup? Apr 16 06:52:07 it wont find android sdk Apr 16 06:52:09 its setup out of the box Apr 16 06:52:13 oh Apr 16 06:52:26 i installed android sdk manager Apr 16 06:52:35 and updated packages Apr 16 06:52:42 did you install the API packages? Apr 16 06:52:54 everything under 4.0.3 yes Apr 16 06:53:14 then you just have to crate the SDK in intelliJ and assign it to your module Apr 16 06:53:23 JakeWharton: the graphic on the abs site is pretty sweet Apr 16 06:53:47 is there some repository of stock photos of nice devices that I am not aware of Apr 16 06:54:46 well Apr 16 06:54:48 i create android project in intellij but on the next page it shows 'adnroid sdk: [none] ' Apr 16 06:54:50 there's the device frame generator Apr 16 06:54:57 there's also a device DB on android.com Apr 16 06:55:45 Life cycle question. I have an activity in which I declare some variables and give them some values. On orientation change, when the UI is recreated, onCreate is called again (correct?) and will those variables have the same values? Apr 16 06:55:55 nice! Apr 16 06:56:35 mahamoti go create the SDK you want to use in intelliJ Apr 16 06:56:56 culmor30: yeah, the activity is a new instance and onCreate is called again. Apr 16 06:57:15 that's why you need static. static lasts from when the class is loaded by the jvm, until the time it is unloaded. Apr 16 06:57:18 t0mless, what do you mean by 'create the SDK' ? Apr 16 06:57:33 mahamoti goto project structure window, under the platform settings goto SDKs Apr 16 06:57:40 click the plus, select Android SDK Apr 16 06:57:42 Ah okay. Thanks! Apr 16 06:57:45 pick a name for it Apr 16 06:58:08 where is project structure window? Apr 16 06:58:16 in intellij? Apr 16 06:58:19 yes Apr 16 06:58:27 File->project structure Apr 16 06:58:37 or there is a button on the toolbar when you have a project open Apr 16 07:00:02 fuck YEAH Apr 16 07:00:05 2 MORE SALES OF MY APP!@ Apr 16 07:00:12 \o/ Apr 16 07:00:18 2 days on market, 6 sales. Apr 16 07:00:23 no free version. Apr 16 07:00:23 nice nice Apr 16 07:00:23 What app? Apr 16 07:00:33 https://play.google.com/store/apps/details?id=com.tomdignan.android.LEDCallerID Apr 16 07:00:53 phew, got it.. Apr 16 07:01:18 readme: Oh cool, it's like those old caller ID boxes Apr 16 07:02:02 :) Apr 16 07:02:20 hey, i'm extending a LinearLayout and adding an ImageView to it. for some reason it's not at the top of the LinearLayout. I tried setting the gravity and stuff but can't get it to go any higher. sound familiar to anyone? Apr 16 07:02:23 This item cannot be installed in your device's country. Apr 16 07:02:27 * culmor30 would buy if(!broke) Apr 16 07:02:32 Ravenheart: sorry, its currently us only. Apr 16 07:02:45 not because I like the US or anything Apr 16 07:02:53 i'm sure your country is somewhat better, lol Apr 16 07:02:55 its racism towards us europeans Apr 16 07:03:58 i should probably look into making it work in other countries. Apr 16 07:04:23 what does it do actually? Apr 16 07:04:37 That will require a lot of research of course :) Apr 16 07:04:38 so far i haven't really needed an alternative caller id Apr 16 07:04:38 just displays some data that the phone company has Apr 16 07:04:45 aha Apr 16 07:04:46 Mikellip: yeah.. a *lot* Apr 16 07:04:58 there's another app called mr number that just asks you to opt your contact database in. Apr 16 07:05:06 not sure if I want to do that Apr 16 07:05:34 i'm just trying to drop an ImageView into something that will expand to show it, and fit it Apr 16 07:05:49 readme was it hard to get it to display on lockscreen? Apr 16 07:06:10 wish android would do what a lot of people have been asking for lately Apr 16 07:06:20 which is have user be able to grant priveliges on install Apr 16 07:06:33 and likewise have something in the sdk to check for privileges Apr 16 07:06:39 ron_frown: it's a system alert window Apr 16 07:06:40 some roms do it, like MIUI Apr 16 07:06:58 well tehre is no way to handle it gracefully Apr 16 07:07:12 eg, fi you say this app can use this that and the otther priv but not some critical one Apr 16 07:07:26 ron_frown: https://gist.github.com/2396848 Apr 16 07:07:53 nice Apr 16 07:07:56 learn something new every day Apr 16 07:07:59 params.gravity = CENTER is voodoo code Apr 16 07:08:02 i should remove that Apr 16 07:16:14 This is probably very basic but I can't wrap my mind around it: Apr 16 07:17:04 I have an asynctask, and in the onPreExecute() method I want to display a dialog. Apr 16 07:17:16 But this asynctask is its own external class Apr 16 07:17:46 How can I display the dialog and, I guess, attach it to the activity which launched the asynctask? Apr 16 07:20:17 culmor30 any reason its not anonymous implementation out of curiousity? Apr 16 07:20:28 you can pass it in via constructor or execute Apr 16 07:20:31 or you can Apr 16 07:21:12 It's not the anonymous implementation because I have no idea what that means. Apr 16 07:21:18 * culmor30 is novice Apr 16 07:21:29 AsynTask task = new AsyncTask(){ onPostExecute(Void void){}}; Apr 16 07:21:30 etc Apr 16 07:21:43 then you can access final variables from within the asynctask implementation Apr 16 07:22:07 and what would I do with that access? Apr 16 07:23:27 culmor30: he means if you made an anonymous class, you could use final variables to access them inside the scope of the anonymous class Apr 16 07:23:36 kind of like a closure Apr 16 07:24:03 http://en.wikipedia.org/wiki/Closure_(computer_science) Apr 16 07:24:03 You know what. Why don't I just make the dialog outside of the stupid asynctask? Apr 16 07:24:50 http://developer.android.com/reference/android/os/AsyncTask.html#onPreExecute() Apr 16 07:25:36 Oh man, I'm too tired for this. I'm just working around it for now... I'll have to look at this after I sleep Apr 16 07:26:43 Every time I try to use AsyncTask I end up doing something inefficiently Apr 16 07:26:58 that would require almost an entire rewrite to fix Apr 16 07:27:29 good thing these computations shouldn't actually take too long in most cases :p Apr 16 07:28:35 haha Apr 16 07:28:44 you'll have to do that anywya if you really want to run on 3.0+ Apr 16 07:28:52 Wait, I can't do it this way. Apr 16 07:28:58 anything is possible Apr 16 07:29:07 No it really isn't Apr 16 07:29:18 yes Apr 16 07:30:08 Every example of asynctask I see, they've declared it as a class inside of another class Apr 16 07:30:17 I didn't even think to do that Apr 16 07:30:30 But does it actually give any advantage? Apr 16 07:31:16 yes Apr 16 07:31:24 you can reference final scoped variables form within that class Apr 16 07:31:32 so no having to pass stuff around manually Apr 16 07:31:44 Scoped? Apr 16 07:32:02 public final String Message = "OH FUCK!"; Apr 16 07:32:08 or from a method Apr 16 07:32:20 public void doSomething(final String message) Apr 16 07:33:08 All my asynctask does is load/parse a webpage with jsoup. And all I want to do is display a pretty spinner dialog while that happens. Apr 16 07:33:16 But it's becoming very difficult Apr 16 07:33:18 variables in outer classes need not be final to be references from an inner class. variables only need to be final when they are local variables inside a method being referenced from an anonymous inner class. Apr 16 07:33:42 you can reference the outer class explicitly ClassName.this Apr 16 07:34:24 I can get my spinner Apr 16 07:34:38 your analysis is right.. AsyncTask is really best used as an inner class. Apr 16 07:34:43 But when the orientation changes during the computation, everything crashes and burns Apr 16 07:35:15 Because, I guess, the dialog has nowhere to go Apr 16 07:36:03 heres teh deal Apr 16 07:36:09 http://evancharlton.com/thoughts/rotating-async-tasks Apr 16 07:36:10 create dalog with managed dialog stuff Apr 16 07:36:21 then you can showDialog(int) in your preexecute stuff Apr 16 07:36:33 it can update the dialog with onPublishProgress Apr 16 07:36:44 else on postExecute() dismiss it Apr 16 07:36:45 But I can't create it that way because my asynctask class isn't an activity Apr 16 07:36:55 create it in the activity Apr 16 07:36:58 yes Apr 16 07:37:22 created as anonymous implementation, you should be able to call that method on start Apr 16 07:37:50 How can I tell the other activity to kill the dialog from the external asynctask's onPostExecute()? Apr 16 07:38:21 Can I just address it by otherActivity.dialog.dismiss()? Apr 16 07:38:32 culmor30: put it inside the activity, and instead of storing a reference to the context, use MyActivity.this Apr 16 07:38:40 managed managed managed Apr 16 07:39:09 Also at the end of the asynctask, I switch the activity to a completely different one. Apr 16 07:39:23 http://developer.android.com/reference/android/app/Activity.html#dismissDialog(int) Apr 16 07:39:29 so wht Apr 16 07:39:47 conceptually I dont think android is very crazy Apr 16 07:39:54 but there are java concepts you absolutely need to master Apr 16 07:40:10 closures or anonymous implementations or whatever they are officially called Apr 16 07:40:15 asynctask Apr 16 07:40:19 * culmor30 is not done with his programming curriculum, but thinks that he should be able to do this because it seems pretty simple Apr 16 07:40:27 it really isnt that bad Apr 16 07:40:45 I dont know what classes cover... I am completely self taught Apr 16 07:40:46 heh Apr 16 07:41:15 Well I'm in Data Structures right now (stacks, trees, heaps, etc) which is unrelated to this issue Apr 16 07:41:28 culmor30: i've never taken formal CS classes, either. Apr 16 07:41:40 I have taught myself some data structures, though. Apr 16 07:41:42 culmor30 - hopefully prof explains how to apply those concepts =) Apr 16 07:41:53 seen a lot of people spend a lot of time learning that shit Apr 16 07:41:56 you can only learn to code by coding. Apr 16 07:42:01 and have no practical idea about how to apply it Apr 16 07:42:04 coding binary trees all day won't teach you app dev Apr 16 07:42:05 readme - I dont know Apr 16 07:42:10 coding an app to visualize a binary tree might. Apr 16 07:42:18 meh Apr 16 07:42:25 it'll help you understand how they work Apr 16 07:42:29 now how they are usefull NECESSARILy Apr 16 07:42:50 Well I have another issue potentially Apr 16 07:43:12 If there's an orientation change during the task, I've set it up to just discard whatever it had and start over Apr 16 07:43:19 I've always said theres more value in someone who knows how to use resources to get at the solution to the problem than someone that knows a little about a lot, and no practical application abilities Apr 16 07:43:28 because it's seriously like 2kb, it can't take very long to do again Apr 16 07:43:29 culmor30 you shouldnt need to do that Apr 16 07:43:39 No, but it's much easier Apr 16 07:44:45 I will code an example. Apr 16 07:45:07 You should do it with an external asynctask, just for fun Apr 16 07:46:14 h, i really have this chocolate craving, but it will probably keep me from falling asleep if i eat it now Apr 16 07:46:35 Oh actually some of this just clicked with me, but it brought up another question Apr 16 07:46:37 culmor30 - you can easily do it with constructor params, or generic params Apr 16 07:47:15 The asynctask is running in another thread, which means that even if the UI is destroyed, it will still finish up in the background Apr 16 07:47:26 but does that mean that the onPostExecute will still run too? Apr 16 07:47:26 technically true Apr 16 07:47:27 BUT Apr 16 07:47:44 if need be you can cancel it if you have set your code up to work accordingly Apr 16 07:48:29 * ron_frown thinks documentation on cancelling asynctask is vague at best Apr 16 07:48:33 at least last time I looked Apr 16 07:49:07 I should never need to cancel it. It has a relatively short timeout anyway Apr 16 07:49:09 culmor30: required reading for asynctask http://stackoverflow.com/questions/3357477/is-asynctask-really-conceptually-flawed-or-am-i-just-missing-something/3359003#3359003 Apr 16 07:49:29 see response from DH, ron_frown 's fav Apr 16 07:50:00 err, hackbod Apr 16 07:50:45 I honeslty have no problem with her Apr 16 07:51:02 seems like she gets short with people, which I think is side effect of dealing with people =) Apr 16 07:51:58 Hmm, is it better to make apps in 2.2 or 2.3.1? Apr 16 07:52:02 I think its easy to assume everyone is trying to fuck with people when doing things that arent how in most cases it would be wrong Apr 16 07:52:11 eg, I do a lot of system side dev Apr 16 07:52:27 I need to do stuff for specific reasons, like interrupt users functionality etc Apr 16 07:52:42 my case is a niche case, but I get blasted when I ask even though I have valid justification Apr 16 07:53:22 culmor30: https://gist.github.com/2396993 Apr 16 07:53:27 here, i coded an example. Apr 16 07:54:16 Alright, I'll have a look Apr 16 07:55:19 well another night down the shitter Apr 16 07:55:24 yep Apr 16 07:55:25 back to work tomorrow =( Apr 16 07:55:30 damn, it's 4am Apr 16 07:55:52 at least I got like 90% of one of my contract gigs done Apr 16 07:56:16 until tomorrow gentleman Apr 16 07:56:46 Okay fuck it, time for an (almost) complete rewrite Apr 16 07:57:08 First though... snacks Apr 16 08:03:03 dude i am confusing irc channels with each other. Apr 16 08:03:10 I have decided against sleep thoughg Apr 16 08:03:20 i'll just jump in the ocean when i get tired. it's going to be 80 F. Apr 16 08:05:39 I ran out of caffeine money. Apr 16 08:09:33 culmor30: https://gist.github.com/2396993 Apr 16 08:09:35 i updated it Apr 16 08:09:41 get a coffee pot Apr 16 08:10:14 not only do you get constant supply of caffeine and water, sugar is optional, so it's less lethal. Apr 16 08:10:33 caffeine itself isn't nearly as harmful as sugar is Apr 16 08:11:05 Yeah, the soda is getting to me Apr 16 08:11:41 Although they have "Pepsi Next" now, which uses a combination of sweeteners from Pepsi, Diet Pepsi, and Pepsi MAX Apr 16 08:12:17 fine in extreme moderation Apr 16 08:12:28 diet soda increases your risk for a heart attack Apr 16 08:12:40 * readme cracks open a diet coke Apr 16 08:16:07 I see this a lot in examples readme, but not in yours Apr 16 08:16:14 mWorker = (Worker)getLastNonConfigurationInstance(); Apr 16 08:17:53 lastnonconfigurationinstance is deprecated by fragments. Apr 16 08:19:34 What are fragments? Apr 16 08:19:41 culmor30: i just did mine intuitively Apr 16 08:19:45 let me know if you find a flaw Apr 16 08:19:58 I was just wondering if you know what it means, because I dont "[ Apr 16 08:20:00 uh Apr 16 08:20:01 :p Apr 16 08:22:04 Return any Object holding the desired state to propagate to the next activity instance. Apr 16 08:22:15 onRetainNonConfigurationInstance () ^^ Apr 16 08:22:27 but, deprecated! Apr 16 08:23:00 I have no idea what fragments are Apr 16 08:23:26 i know what they are, because I read the fragment doc :P Apr 16 08:24:18 So did I, but why would that replace that function? Apr 16 08:24:54 and actually it doesn't matter, because I'm not targeting 3.0 Apr 16 08:26:47 I'm not super crazy about fragments. Apr 16 08:27:25 I have one app that I used fragments in a bunch Apr 16 08:28:17 when I'm writing code I am not thinking about what is the cool hot new thing but what do I need to do to get the job done and make sure the code is maintainable. Apr 16 08:28:48 reddita for honeycomb used them nicely Apr 16 08:29:19 but I don't see much use for them in the phone world Apr 16 08:29:47 and i think android is mostly going to stay on the phone so ... Apr 16 08:29:48 :D Apr 16 08:30:22 I have a tablet. They're pretty nice Apr 16 08:30:33 Flashed ICS Apr 16 08:31:35 http://www.joelonsoftware.com/items/2009/09/23.html Apr 16 08:34:51 Hah, funny Apr 16 08:35:53 Using deprecated code bothers me because I come from a bit of a web-dev background Apr 16 08:36:10 and you in most cases do *not* use deprecated web code Apr 16 08:38:00 i did not paste that to rationalize using deprecated code Apr 16 08:38:38 but hey. last i checked they haven't deprecated the static keyword. Apr 16 08:38:48 . Apr 16 08:39:05 I thought you posted it because of the fragment discussion above Apr 16 08:39:11 I did Apr 16 08:39:31 I'm just saying, it's a lot more common that I have to use deprecated features right now Apr 16 08:39:39 but it makes sense, since I'm targeting a deprecated OS Apr 16 08:39:41 Q: If I want to make a simple application which only lies in the background and shows a notice at a pre-determined time every day (or selected days) - where should I start? What functions/classes should I use for that? Apr 16 08:40:25 Like... an alarm clock? Apr 16 08:40:26 frankhovin: AlarmManager Apr 16 08:41:22 Yah, kind of an alarm click. But eventually I want to include it in another app to keep track of things and give notices of existing tasks etc. But I need to start somewhere. Apr 16 08:41:39 I'll look at AlarmManager, thanks Apr 16 08:52:34 hmm Apr 16 08:52:45 i'm using SQLiteOpenHelper Apr 16 08:53:07 greetings Apr 16 08:53:11 and query with a LIKE and use the ? for selectionArgs Apr 16 08:53:28 however if I add a ' in the selectionArg it won't escape it... Apr 16 08:54:03 quick question, how much can you do with sl4a vs an actual app? Apr 16 08:54:40 is it an option for developing quick apps? Apr 16 08:54:43 I would've thought that I could add anything in place of the ? and not worry about what is in there...? Apr 16 08:55:50 doesnt' ContentValues solve that problem? Apr 16 08:55:53 I am skeptical about value of sl4a. It is probably a liability rather than a gain. Apr 16 08:56:03 with ' ? Apr 16 08:56:10 alankila: how come? Apr 16 08:56:29 afaik there's no query with ContentValues zhulikas? Apr 16 08:56:39 only updating/inserting uses ContentValues Apr 16 08:56:44 yeah, that's kinda true Apr 16 08:56:45 Just my prejudice. It's not widely used, and I don't think writing java code is especially difficult, given that sl4a will expose the same APIs to your scripting language Apr 16 08:56:48 * tga likes the idea of being able to edit apps directly on the phone Apr 16 08:57:00 alankila: right, but you still need a machine to build the java app Apr 16 08:57:13 how do I escape ' in sqlite though? Apr 16 08:57:20 Oh, fine, but I don't think phone is suitable for a development environment. Apr 16 08:57:20 otherwise i'll just do the escaping myself Apr 16 08:57:35 alowaniak: program without putting the values directly in your queries. Apr 16 08:57:36 alankila: it's not too bad over ssh Apr 16 08:57:43 alankila: any practical problems with sl4a? Apr 16 08:57:46 well alankila, i've got a search function Apr 16 08:58:03 pick a keyboard then Apr 16 08:58:09 which doesn't support strange characters Apr 16 08:58:12 tga: I haven't used it. But I advice you to look at the dates of various releases. It seems to me that there's not much active development there. Apr 16 08:58:24 I see Apr 16 08:58:32 I guess there's no alternative either, right? Apr 16 08:58:38 ye but why shouldn't it though... I think it should be legal to have '/" in my database Apr 16 08:59:17 ouch, the latest python is from one year ago Apr 16 08:59:38 latest perl from 2010?! Apr 16 09:00:08 Python 3.2.3 was released on April 10, 2012. Apr 16 09:00:20 I was talking about sl4a Apr 16 09:00:26 oh, sorry Apr 16 09:00:42 * tga likes the idea of Tasker but not the UI Apr 16 09:00:48 readme, you still around? Apr 16 09:00:50 at the very least sl4a should help with that Apr 16 09:01:53 alowaniak: look, people just don't do String sql = "select * from y where x = '" + x + "'". They write "x = ?" or "x = :x" depending on which kind of abstraction is provided for the value Apr 16 09:01:57 tga: sl4a may not be under active development, but hey, it works :-) Apr 16 09:02:15 for now Apr 16 09:02:17 learn to use either the ? or the :foo methods Apr 16 09:02:45 afaik i'm using the ? ... Apr 16 09:02:54 tga: considering that's practically impossible to use 3rd party libraries, the need for language upgrade is really low Apr 16 09:02:58 good, so what's the problem? There's no need to escape ' in that case Apr 16 09:03:13 how do you like OrmLite, guys? Apr 16 09:03:39 dada: it should be possible to use any libs that don't need native code, right? Apr 16 09:03:46 like app engine Apr 16 09:04:00 If you're still around readme: I've organized my code to be more like yours, but I need a context (for launching a new activity) in the onPostExecute() of my AsyncTask Apr 16 09:04:14 well i got no idea how it works but afaict ? gets replaced with the content I put in selectionArgs and it didn't seem to escape it there Apr 16 09:04:22 Intent i = new Intent([what do I put here?], SearchResultsActivity.class); Apr 16 09:04:22 tga: oh, those yes. but the real cool libraries all need native code :-) Apr 16 09:04:26 i'll have to do some more testing though Apr 16 09:04:48 you can still do a lot with pure python Apr 16 09:05:15 alowaniak: hmm. A proper implementation does not do something so primitive as that. I wonder if sqlite is somehow worse than other databases. Apr 16 09:05:38 I think not, not doing such substitution as string is essential for performance too Apr 16 09:05:48 culmor30, usualy you put 'this' Apr 16 09:06:04 oh, wait Apr 16 09:06:08 onPostExecute Apr 16 09:06:12 I'm not within an activity class, yeah Apr 16 09:06:18 put the context which you got in AsyncTask Apr 16 09:06:40 I didn't get any? Apr 16 09:06:44 tga: that's also my point. but you rarely need the latest version, unless you depend on some external libraries that only work with that. if you're writing (small) scripts yourself, the version from one year should be more than ok Apr 16 09:06:46 damn :D Apr 16 09:06:55 * zhulikas forgot everything about android apparently Apr 16 09:07:05 culmor30, provide one Apr 16 09:07:08 *one year ago Apr 16 09:07:17 It's my second day, so you're probably right and I have no idea what I'm doing Apr 16 09:07:25 AsyncTask one of them is parameter to your task Apr 16 09:07:32 Should I just pass a reference to the parent activity? Apr 16 09:07:47 I already have a constructor with a bunch of other paramaters Apr 16 09:07:54 include context as one of them Apr 16 09:08:40 so Result of AsyncTask is Object[] { YourResult, Context } or something Apr 16 09:08:50 where you get that Context from Params in doInBackground Apr 16 09:08:53 just pass around... Apr 16 09:09:27 alowaniak: so you do ... db.rawQuery("select ... from foo where x = ?", new String[] { "x value" }) kind of code? Apr 16 09:09:43 Hi, could someone advise regarding apk signing? I am failing to understand how to get eclipse to sign the apk with developer key (since it just uses its own key instead) Apr 16 09:09:49 I think more of a db.query(table, columns, selection, args ...) Apr 16 09:10:01 i do Apr 16 09:10:01 oh, wait Apr 16 09:10:06 SQLiteDatabase#query(String table, String[] columns, String selection, Strnig[] selectionArgs, String groupBy, String having, String orderBy) Apr 16 09:10:08 ah, you can do that with like. Apr 16 09:10:20 with selection having LIKE ? Apr 16 09:10:32 and selectionArgs containing the replacements for ? Apr 16 09:10:35 yes Apr 16 09:10:50 is anybody using mac tokens for oath 2? Apr 16 09:10:55 oauth 2 Apr 16 09:11:27 Intent i = new Intent(this, SearchResultsActivity.class); Apr 16 09:11:36 Eclipse says: The constructor Intent(CourseSearchActivity.SubmitQuery, Class) is undefined Apr 16 09:11:43 true Apr 16 09:11:53 alowaniak: oh, fine, but one certainly should work correctly, provided your selection doesn't directly contain the values Apr 16 09:11:57 culmor30, try using my suggested approach Apr 16 09:12:02 but +that one Apr 16 09:12:10 pass Context to AsyncTask parameters and the pass it to results Apr 16 09:12:51 This worked though, before I moved it inside of another class Apr 16 09:13:10 alowaniak, http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType Apr 16 09:13:15 force this instead Apr 16 09:13:47 culmor30, though you can try MyActivity.this Apr 16 09:13:51 it should be accessible Apr 16 09:13:52 well i don't know if I want that though zhulikas, I think the database could contain weird characters, will have to look more into it though Apr 16 09:14:07 SQLite isn't miracle Apr 16 09:14:22 client-side validation might be a good option Apr 16 09:14:38 * alankila is pretty sure sqlite is binary clean if properly used Apr 16 09:14:45 zhulikas: Never mind, made a silly mistake Apr 16 09:15:11 culmor30, actually onPostExecute is run on UI thread Apr 16 09:15:26 provided that AsyncTask is a inner class in your Activity Apr 16 09:15:36 I know Apr 16 09:15:39 you can use MyActivity.this in onPostExecute Apr 16 09:15:45 as a context Apr 16 09:15:47 hmmm Apr 16 09:16:05 I had accidentally put "this" when I meant to use the variable "context" I had passed in Apr 16 09:16:11 ah, ok Apr 16 09:16:22 well, passing around context is ok as well Apr 16 09:16:31 I usually put my AsyncTasks as external classes Apr 16 09:16:35 not inner ones Apr 16 09:17:26 That's what I had before but I couldn't get it to survive an orientation change Apr 16 09:17:54 it seems to be working now i guess? srry =S ty though zhulikas & alankila Apr 16 09:18:08 :D Apr 16 09:25:48 readme: Thanks for the example, works grerat :) Apr 16 09:25:51 great, even* Apr 16 09:26:56 java not android question. But what is the different between "Object myObj;" and "Object myObj = null;" in java? Apr 16 09:27:44 what's the best way to debug touch events? My collegue created a custom viewgroup that should include 2 view, one of them is a ScrollView but doesn't scroll... The custom viewgroup do not handle any event and I need to understand why Apr 16 09:28:14 i'm asking since "= null;" solves the "Variable not initialized" error in eclipse. (e.g. if the variable is initialized inside a try/catch statement) Apr 16 09:28:52 As4xk: well, technically java guarantees that the value must be initialized before it is used if you don't set a value for it Apr 16 09:29:28 it's not very smart about it though, you can relatively easily write code that actually results in initialization of the variable in all code paths before use, but the path is too complicated for compiler to follow Apr 16 09:29:53 any idea whether I can access the camera or speaker from the command line? Apr 16 09:30:07 * tga tries to figure out what he can do directly on the device without writing apps Apr 16 09:30:15 semantically there is therefore a difference. I leave variables uninitialized and even declare them final to signal that this variable becomes assigned-to once across this code path. Typically before a switch-case or something Apr 16 09:30:34 Programming wise, I need to store per-day data... what would be the best way about converting each date to a key? Apr 16 09:31:02 vadi2: MessageFormat.format("{0,date,yyyyMMdd}", new Date()) ? Apr 16 09:31:03 alankila: Ok. Thanks :) Apr 16 09:31:34 am writing a code to check if the contact is already there, if it is then i have to update the contact, my code is working perfectly fine but in htc explorer its creating a new contact Apr 16 09:31:36 alankila: didn't know about MessageFormat! thanks Apr 16 09:31:38 As4xk: I also have a habit of throwing an exception in an errorneous code path to plug all holes when sometimes due to error or failure conditions something I need doesn't happen Apr 16 09:31:52 is there a prefered postgresql version to use with django? my hoster is offering 8.4 / 9.0 / 9.1 Apr 16 09:33:09 As4xk: typiclly "swtich (derp) {case FOO: ...; break; case BAR: ...; break; default: throw new RuntimeException("Unhandled value: " + derp); } Apr 16 09:33:32 * pragma- points at alankila Apr 16 09:33:47 * pragma- covers his mouth and whispers something to the person next to him. Apr 16 09:33:54 I'm programmatically changing the margin of a layout inside a framelayout. Is it possible to avoid this layout to be resized? Apr 16 09:34:09 alankila: that's a brilliant little thing, thanks Apr 16 09:34:28 alankila: Good idea. Thanks again :D Apr 16 09:34:41 vadi2: yeah only complaint I have about that is that MessageFormat.format has no means to provide non-default locale Apr 16 09:34:59 MainApp.sAppContext.getContentResolver().applyBatch(ContactsContract.AUTHORITY, contact); Apr 16 09:35:11 so when you need a simple expression to get a date formatted according to user's locale which is not the same as system locale, it needs some extra work, may have to use SimpleDateFormat directly Apr 16 09:35:18 am writing a code to check if the contact is already there, if it is then i have to update the contact, my code is working perfectly fine but in htc explorer its creating a new contact Apr 16 09:35:19 only happens in web apps anyway, I guess Apr 16 09:35:20 yeah Apr 16 09:35:48 can do new MessageFormat() though ... and then set locale ... and ... Apr 16 09:37:18 where can I find some more information about `am`? Apr 16 09:37:26 "man am"? Apr 16 09:37:37 on the device? Apr 16 09:37:38 I wish Apr 16 09:37:39 Actually, sorry, what IS am? Apr 16 09:37:55 apparently it's used to start apps from the command line Apr 16 09:38:06 how do i use google? Apr 16 09:38:09 I see, activity manager command line utlity Apr 16 09:38:19 install busybox for lots of command-line goodies Apr 16 09:38:27 Looks like the stdout help is pretty comprehensive to me Apr 16 09:38:46 it is if you know what you're doing Apr 16 09:39:05 I was hoping for some kind of manual / reference Apr 16 09:40:19 why the hell did I ask a django question here... geez Apr 16 09:40:22 * iivvoo needs weekend Apr 16 09:40:26 * tga installs busybox Apr 16 09:40:42 tga: what are you trying to use am for? Apr 16 09:41:25 android 4.0.4 is pretty ass-kicking fast Apr 16 09:41:46 * Ge0rG wants! Apr 16 09:41:49 I keep on trying to come up with reasons to upgrade my galaxy s & I never get around to do this if every version of android seems to be better than the one before Apr 16 09:42:16 * tga has a Desire Apr 16 09:42:31 4 was already a huge improvement responsivity-wise compared to 2.3 and these minor updates would subjectively appear to have improved it further Apr 16 09:42:48 is there a list of what each phone can run? Apr 16 09:42:56 Can't wait until Samsung gives an S2 update to ICS. Archos already upgraded my tablet... Apr 16 09:43:11 tga: you know this channel is for app development, right? Apr 16 09:43:16 I'm stuck with 2.3 on my shitty tablet :-p Apr 16 09:43:23 vadi2: S2->ICS is out in a lot of places - I've had it for weeks Apr 16 09:43:35 From Samsung? Apr 16 09:43:36 not even official archos update, archos official updates only go up to 2.2.1 Apr 16 09:43:52 alankila: they upgraded my g9... Apr 16 09:43:55 Maybe one day it will be running 4.0 too, but the hardware is pretty much shit :-p Apr 16 09:43:55 the samsung update, although I sourced/applied it independently Apr 16 09:44:15 Oh. I've got no clue how to do that, and my phone isn't rooted Apr 16 09:44:23 I receive android dependency doesn't allow modifications to source attachments <--- I used to attach the source code to android support jar.. I can't now... after the last update to the eclipse plugin, do someone know of a way to make the Eclipse lookup work again? Apr 16 09:44:55 vadi2: go to #android-root and ask :) Apr 16 09:45:21 what a mess Apr 16 09:47:13 tga: what are you trying to use am for? Apr 16 09:47:28 launching sl4a scripts Apr 16 09:47:34 figured it out I think Apr 16 09:49:07 * alankila idly wonders if anyone has managed to make apk building work from the phone. It shouldn't be impossible or anything, I guess it's mostly pure java Apr 16 09:49:31 maybe there's some dex tool which needs to be built for arm, but that's almost certainly possible Apr 16 09:51:14 the next step is to get the phone to run eclipse, of course. Apr 16 09:51:48 alankila: have you seen aide? Apr 16 09:51:57 no Apr 16 09:52:04 https://play.google.com/store/apps/details?id=com.aide.ui&hl=en Apr 16 09:52:10 onboard IDE, can build APKs Apr 16 09:52:39 I see, good going. I suppose android should eventually become self-hosting. Apr 16 09:52:41 supports git, dropbox to load source, eclipse projects, etc. Apr 16 09:54:06 How can I uninstall my app via ADT in Eclipse? Apr 16 09:54:23 besides the cmd line way Apr 16 10:00:10 hi Apr 16 10:00:17 i change icon image on my app Apr 16 10:00:27 but how can i change the text under it? Apr 16 10:00:49 beStKodeReveR: you should change your nick :) Apr 16 10:02:05 hi Apr 16 10:02:06 Snuffel bad answer Apr 16 10:02:13 anyone? Apr 16 10:02:35 isn't that text the name of your app? Apr 16 10:02:43 try the manifest or something Apr 16 10:03:38 nopp Apr 16 10:03:40 its not Apr 16 10:03:51 then I don't know what you're talking about Apr 16 10:04:08 android:icon="@drawable/ic_launcher" Apr 16 10:04:13 thats the icon.. Apr 16 10:04:21 and? Apr 16 10:04:25 where does one set the text for it.. Apr 16 10:04:35 the text that goes under every icon.. Apr 16 10:05:19 you mean in the apps list? Apr 16 10:05:34 what does android:name say? Apr 16 10:05:35 Hey, anyone know how I can make the back button return to a fresh instance of the previous activity rather than the previous instance? Apr 16 10:06:07 ill try iy Apr 16 10:06:07 alankila if you only want to do game dev, you can also try this tiny thing: https://play.google.com/store/apps/details?id=com.glbasic.gacknonfree Apr 16 10:06:08 it Apr 16 10:07:27 android:label="@string/app_name" Apr 16 10:08:17 that d one! i had copy pasted the @string file from another app..so i got an old apps name.. :-S that was why.. Apr 16 10:08:27 right Apr 16 10:09:15 apparently it happens to the best Apr 16 10:09:31 lolol Apr 16 10:10:09 Snuffel ;-) its ok. Apr 16 10:10:38 i copy-paste all the time Apr 16 10:22:57 What's the appropriate way of handling this (probably simple)?: I have an Activity which displays a ProgressDialog while an AsyncTask runs, which then opens a new Activity when it's finished. If I hit back from this new activity, I get the previous one, but the ProgressDialog is still displayed even though I called dismissDialog(id); Apr 16 10:23:34 Hitting back again dismisses it, but it's very strange and unintuitive Apr 16 10:28:20 i find this interesting. http://www.theverge.com/2012/4/16/2951686/microsoft-pushing-windows-8-ultrabook-touch-hardware-rumor Apr 16 10:28:45 if the ultra books do a good enough job of being slim, and the kb can fold behind the screen so it can be used as a tablet, Apr 16 10:28:51 this is pretty damn awesome Apr 16 10:29:09 I don't doubt it... have you tried the Win8 consumer preview? Apr 16 10:29:16 but it's windows... Apr 16 10:29:24 It's clearly made for a gigantic touch screen. And it blows. Apr 16 10:30:09 if it blows, ms will try again with windows 9 :) Apr 16 10:30:27 Seems to be the pattern, yup Apr 16 10:30:51 the days of toy operating systems like iOS and android are numbered Apr 16 10:31:01 i don't think android will ever 'grow up' Apr 16 10:31:01 Eh? Apr 16 10:31:13 we're like peter pan :) Apr 16 10:31:17 instead, windows will be scaled down. iOS and os x will merge Apr 16 10:31:23 It's not a desktop OS... Apr 16 10:31:40 Perhaps someday it could merge with ChromeOS, though Apr 16 10:31:55 i thought google said that would happen a while back ? Apr 16 10:32:04 but anyhow, chrome os blows too Apr 16 10:32:13 I like android Apr 16 10:32:19 ChromeOS does blow though, yeah Apr 16 10:32:43 Also, bump on my question ^ I seriously need some sleep but it's killing me Apr 16 10:33:49 hm, not sure Apr 16 10:36:56 you know what else blows? Apr 16 10:37:05 fans Apr 16 10:37:06 hair dryers Apr 16 10:37:32 no, fans rock. without fans, you are nothing. Apr 16 10:37:44 you cannot be famous without supporting your fans Apr 16 10:37:50 so i guess android is a huge hair dryer ? Apr 16 10:37:55 :) Apr 16 10:37:57 right now I have public void onResume() { try{ dismissDialog(DIALOG_QUERYING_BANNER); Apr 16 10:38:20 Only problem is that this catches an exception whenever the activity is started Apr 16 10:38:30 and most of the time there *won't* be that dialog to close Apr 16 10:38:36 So it seems like a backward solution. Apr 16 10:46:19 use a static bool Apr 16 10:49:13 Oh readme, you're back Apr 16 10:49:19 Thanks for yor help earlier :) Apr 16 10:50:26 naptime\ Apr 16 10:50:40 Later o/ Apr 16 10:55:47 mmmm naps Apr 16 10:58:22 hi.. has anyone tried running valgrind on android? Apr 16 11:01:12 do i need root for wireless adb? Apr 16 11:09:54 Hey readme, you still here? Apr 16 11:10:48 I need a beta tester, preferably one who has root; though one without root would be nice to test the non-root case, too. Apr 16 11:12:14 For this app: http://code.google.com/p/iptableslog/downloads/list Apr 16 11:14:05 how can I have my app require a second apk (where I would put my image resources for example) ? Apr 16 11:15:38 am writing a code to check if the contact is already there, if it is then i have to update the contact, my code is working perfectly fine but in htc explorer its creating a new contact Apr 16 11:17:04 faeezkadiri: please hold while I fantasize and imagine what your code could be Apr 16 11:17:14 hello, I have a question about SMS sending in Galaxy S2 with 4.0. There is firmware bug that causes SmsManager.sendTextMessage sends message twice http://code.google.com/p/android/issues/detail?id=27024 Apr 16 11:17:54 I have also read that some apps (GoSMS) have found workaround, and I am interested how they did it Apr 16 11:18:21 hi there what could be the problem, compiler says no error, avd launches but not the app? Apr 16 11:18:26 for notepad: if you happen to see this, I did find one potential problem with your example code. The value of sCountingTask is never reset to null, so only one task can ever be run. I solved this by setting (my equivalent of) it to null in onResume(). Talk to you later! Apr 16 11:19:07 pragma : http://pastebin.com/11W9j9HS Apr 16 11:20:09 I have tried to send messages via ISms service, however with same result. Apr 16 11:21:41 hi, in the src android, where is define the splash screen please ? Apr 16 11:22:16 am writing a code to check if the contact is already there, if it is then i have to update the contact, my code is working perfectly fine but in htc explorer its creating a new contact here is d link for cde http://pastebin.com/11W9j9HS Apr 16 11:36:47 emulator is running but not in the ddms list? Apr 16 11:37:21 any idea whats the problem? Apr 16 11:37:52 does anybody know a good tutorial on telephony and itelephony? im looking into making my personal call blocker and i know its possible apps such as mr number and call blocker elite use methods to pick the call up and hang it up right away Apr 16 11:38:25 if you just reject it sends to voicemail which defeats the purpose Apr 16 11:40:02 I have a bound service with music player, and when it's playing I can't see it in "running services" why is that? Apr 16 11:40:55 pastbin it ? Apr 16 11:58:43 hrm, 04-16 11:56:56.383: E/AndroidRuntime(280): java.lang.NoSuchMethodError: android.widget.TextView.getY Apr 16 11:58:57 how is getY done in 2.2 ? (API 8) Apr 16 12:03:29 Why is it when I scale the size of a component in my xml, it only enlarges the component but not the space it takes up? Instead of pushing the surrounding components away to make room it just overlaps them; is there any more proper/elegant way to resize something? Apr 16 12:04:32 feed it a mixture of corn grains, shredded chicken feathers and manure; it'll plump right up Apr 16 12:04:52 If only that were a viable solution; I live next door to a farm Apr 16 12:07:16 Hello people. Is it possible to find text + highlight it, inside a webview in 4.x ? Apr 16 12:08:23 EnRohbi, you're doing it wrong :( Apr 16 12:08:28 what kind of viewgroup are you using Apr 16 12:09:26 Any Intent filter guru here ? How it is possible the Intent { Uri=http://somehost/somepath.mp3, mimeType=audio/mp3 } does not pass the intent filter here: http://pastebin.com/VVySS6X9 , unless I replace " " by ? Apr 16 12:10:01 why would you tink sceme="content" would work? Apr 16 12:10:10 that would mean content://somehost/... Apr 16 12:10:45 hey guys can u limit how things can be shared when u use a sharing intent or is that out of our control? Apr 16 12:10:50 I've got them in a RelativeLayout right now, I tried the same thing in a LinearLayout first and had the exact same behavior. Apr 16 12:11:00 dont believe you Apr 16 12:11:12 canadiancow: This filter specify that I can play http:// Uri and content://Media uri but it seems the host part or the content filter get in the way for http Uri. That doesn't make sense Apr 16 12:11:35 so use two intent-filters? :P Apr 16 12:11:56 canadiancow: might be a good hint actually Apr 16 12:12:13 i used two because i wanted http://mysite.com and http://www.mysite.com to work Apr 16 12:12:49 canadiancow: I didn't even realize there could be several intent-filter. Though block were or'ed Apr 16 12:12:57 *thought Apr 16 12:13:13 maybe they are, and that would work too Apr 16 12:13:24 but i wouldnt try to match two URIs with one data block Apr 16 12:13:27 hey guys can u limit how things can be shared when u use a sharing intent or is that out of our control? Apr 16 12:13:31 no Apr 16 12:13:33 well Apr 16 12:13:37 clients complaining of too many sharig options. Apr 16 12:13:45 then tell your clients they're stupid Apr 16 12:13:53 they are Apr 16 12:13:54 it is not as if the intent-filter is uber-complicated. Even RTFMing triggers WTFs Apr 16 12:13:56 theyre killing me Apr 16 12:14:20 problem these days is clients expect an exact clone of iphone apps Apr 16 12:14:23 so this is where you say "I'm the expert. This is how Android works. This is how it's supposed to work. This is what users want." Apr 16 12:15:13 It's only they who see both apps, pretty much Apr 16 12:15:25 The users won't care if they are exact copies Apr 16 12:15:34 problem is im working for a client who works for a client who works for a client Apr 16 12:15:39 i agree entirely with u guys Apr 16 12:15:44 but its not gonna help :( Apr 16 12:15:57 whatever Apr 16 12:16:00 that's where i'd find a new job Apr 16 12:16:01 hrm, how do I get the Y position of a textview on android 2.2 ? Apr 16 12:16:14 Insayne, you RTFM and stop asking stupid questions Apr 16 12:16:21 i feel bad for you gaz` :( Apr 16 12:16:33 if u could see what i been thru youd feel even worse Apr 16 12:16:37 canadiancow, it isnt on android dev ? Apr 16 12:17:11 canadiancow can afford to say "get a new job" because a) he lives with his mom; b) he's canadian Apr 16 12:17:32 gaz`: you should tell them sincerely that they are ruining the app, and if they continue down to this path it's going to get even worse Apr 16 12:17:47 no, i can afford to say that becasue a competent android dev can get a great job offer in a matter of days Apr 16 12:17:55 theyve even forbidden the use of toast messages Apr 16 12:18:08 toasts are stupid Apr 16 12:18:09 good, toast messages are lame Apr 16 12:18:16 so, canadiancow where is it then in TFM ? Apr 16 12:18:21 if you can use a toast, the user doesnt need to know Apr 16 12:18:34 i think toasts are decent Apr 16 12:18:45 use a notification Apr 16 12:18:53 i think your client should fire you and hire canadiancow Apr 16 12:19:03 whats a notification? top bar? Apr 16 12:19:03 my app displays toast messages with smiley faces every 300-400 seconds, just so the user knows they are loved Apr 16 12:19:09 anyway im going to work Apr 16 12:19:10 bye Apr 16 12:19:11 if you think that's lame, well fuck you sir. Apr 16 12:20:17 i think your client should fire canadian cow and hire a japanese kobe beef cow Apr 16 12:20:28 anyone knows how to get the Y position of a textview on android 2.2 ? Apr 16 12:20:38 Insayne: :/ Apr 16 12:20:47 no no, hear me out Apr 16 12:20:55 The visual y position of this view, in pixels. This is equivalent to the translationY property plus the current top property Apr 16 12:21:10 getY() on it, but it crashes on 2.2 Apr 16 12:21:59 yes, i saw that, does that mean there is a .translationY() and .top() ? Apr 16 12:22:13 oh translation is api level 11 too Apr 16 12:22:18 yes Apr 16 12:22:20 its not 8 Apr 16 12:22:28 hence why I am wondering how it used to be done Apr 16 12:22:48 noone cares about it Apr 16 12:22:54 why do you need this? Apr 16 12:23:16 because I scroll within a scrollview to a textview Apr 16 12:23:31 .getLocationOnScreen or getLocationInWindow Apr 16 12:23:35 canadiancow: do you know if it is possible to write an intent-filter that would handle all http Uri whose path ends with an extension, for example ".mov". From the doc it doesn't seem possible since wildcards cannot be used for android:host (it is only possible for the path part of the Uri) ? Apr 16 12:23:43 ok Apr 16 12:24:17 well im not sure thats gonna work for that anyway Apr 16 12:24:18 but go ahead Apr 16 12:24:30 heh Apr 16 12:24:33 i shall try Apr 16 12:24:58 http://android-er.blogspot.com/2011/09/scroll-view-scrollby-and-scrollto.html Apr 16 12:25:23 i didnt actually read that so it may not be applicable Apr 16 12:26:12 yeah, it isnt, its using static values Apr 16 12:26:37 blogspot was my first clue Apr 16 12:27:14 so there is no way i can get the Y position of a textview ? Apr 16 12:28:06 I think you're better off redesigning your UI as a 3D game Apr 16 12:29:34 rofl Apr 16 12:29:50 oh noes! someone makes their app work different,! shoot him Apr 16 12:31:51 btw, TextView.getTop() works Apr 16 12:34:54 select top from girl; Apr 16 12:35:10 where hot=1 Apr 16 12:38:31 update users set sexism = 0 where name = 'monsti' Apr 16 12:46:16 is a sweep gesture supported on a tableview row ? Apr 16 12:50:26 I meant listview Apr 16 12:58:10 gnu_d: You can do it if you want but it's not supported by default by the framework (that's not the case either on iOS except if you use the editing mode of the UITableView) Apr 16 13:00:36 cyrilmottier: yes, I wanted to replicate the sweep of UITableView from ios :) in this world, thought Android had some similar feature :/. Apr 16 13:03:30 gnu_d: Nope. The Android framework is pretty lacky on that :( You have to do it on your own. Apr 16 13:03:56 anyone managed to share with tiwtter and get a hashtag working? they seem to get stripped off Apr 16 13:04:20 cyrilmottier: by my own you mean implement a new gesture or ? Apr 16 13:06:53 is there a coding example that shows how to monitor wifi connection? for example know if the wifi is on, what's the name of the access point, and whether or not the device has obtained an IP address? Apr 16 13:07:43 hey guyZ Apr 16 13:07:58 how do you present your apps for people/customers? Apr 16 13:08:07 oO find*() @ webview are undocumented functions Apr 16 13:08:08 video? screenshots? ..? Apr 16 13:08:20 in a nice crystal studded box Apr 16 13:08:29 aha Apr 16 13:08:34 "coool" Apr 16 13:08:50 iphone Apr 16 13:08:52 :D Apr 16 13:09:49 ok but seriously? Apr 16 13:10:24 . Apr 16 13:11:07 can you elaborate? Apr 16 13:11:14 presnt tot hem over what medium? Apr 16 13:11:20 your website? the market? Apr 16 13:11:23 ads? Apr 16 13:11:29 and for what purposes Apr 16 13:13:54 gnu_d: most of the time this is implemented adding an in-layout 'Delete' button in your ListView itemview. Apr 16 13:14:42 cyrilmottier: I see, but how to trigger the visibility of that button ? Apr 16 13:15:43 setVisibility(View.VISIBLE) + notifyDatasetChanged ? You can also use the new animation framework Apr 16 13:17:08 Anoia let say you have done 10 apps. Apr 16 13:17:25 Anoia and you want to show them for you customers.. Apr 16 13:17:46 whould you show them live, installed, or just stream a video of them.. Apr 16 13:17:55 or any other method?.. huh.. Apr 16 13:18:04 if demoing in perosn, I;d do it live Apr 16 13:18:06 there is not so much to choose from i guess,. Apr 16 13:18:13 mmm Apr 16 13:18:25 i guess showing a working app is the most impressive Apr 16 13:18:29 on a website, videos and screenshots alongisde normal sales speil Apr 16 13:18:31 a video is like..ok.. Apr 16 13:18:37 you can;t sell an app on a screenshot Apr 16 13:18:44 mmm right Apr 16 13:18:50 no..but video? Apr 16 13:18:56 of a user using it? Apr 16 13:19:01 like most commercial products, you sell it based on what it can do Apr 16 13:19:48 Anoia hmm? Apr 16 13:19:55 oki Apr 16 13:20:21 like you sell it .. by showing what it can do.. Apr 16 13:20:22 :D Apr 16 13:20:25 unless your apps are gimmicky then use screenshots/videos :) Apr 16 13:20:36 http://www.youtube.com/watch?v=pfW3_Di99Y0&list=PLE4B292D1FF5583DD&index=9&feature=plpp_video Apr 16 13:20:52 that kind of videos are ok..when a actuall person uses it.. Apr 16 13:21:20 but what exactly do you mean by 'like most commercial products, you sell it based on what it can do' Apr 16 13:21:29 like a car should be driven Apr 16 13:21:30 ? Apr 16 13:21:31 haha Apr 16 13:21:38 not really right..? Apr 16 13:21:52 cars are sold by putting a sexy lady next to it.. Apr 16 13:22:03 what about an app..same..? Apr 16 13:22:06 ;-) Apr 16 13:24:45 why do random people add me on G+ Apr 16 13:25:00 it's a trap Apr 16 13:25:17 you're famous yo Apr 16 13:25:30 G+ ? chat gmail!? Apr 16 13:25:40 move ur body.. Apr 16 13:26:02 at least you probably created your profile yourself. on linkedin, I got "connect invitations" by not even visiting the site before. apparently now I have an (empty, apart from email address) profile there... Apr 16 13:26:51 hey beStKodeReveR Apr 16 13:26:55 talk like you're an adult, not a child. Apr 16 13:27:04 use things like punctuation, spelling, and grammar. Apr 16 13:27:10 maybe that would help your presentation Apr 16 13:27:32 Hello guys, I've to integrate a telephone interface in my own app. Is there an api for performing a phonecall? I've checked the TelephonyManager, but there are no methods for performing a call and so on. Anyone can give me a suggestion? Apr 16 13:27:48 Number5: nope. That's protected by design. Apr 16 13:27:59 Number5: http://developer.android.com/guide/appendix/g-app-intents.html Apr 16 13:28:02 Number5: the best you can do is provide a call uri, and present the dialer to the user. Apr 16 13:28:19 "A proof is a proof. What kind of a proof? It's a proof. A proof is a proof. And when you have a good proof, it's because it's proven." - Oh Canada... Apr 16 13:28:32 lov: or just request the CALL_PHONE permission and go for it? Apr 16 13:28:34 that's not how oh canada goes. Apr 16 13:28:47 Leeds: follow the telphony stack down the rabbit hole Apr 16 13:28:47 tha towuld be O Canada Apr 16 13:28:49 no H Apr 16 13:28:56 that quote is from a former prime minister Apr 16 13:28:58 Oh Pedant Apr 16 13:29:07 Oh Canadiancow Apr 16 13:29:29 Leeds, I already suggested this way, but the client rather want it in the app. They migh call a secret number, no idea how to solve that :S Apr 16 13:29:56 Number5: implement a VoIP stack. Apr 16 13:30:01 lov, I understand, but I'm afraid that's not what the client want... Apr 16 13:30:10 Number5: sometimes clients don't get what they want Apr 16 13:30:16 Then what the client wants is impossible, and you have to tell them as such. Apr 16 13:30:23 or rather... often clients aren't willing to pay enough for what they want Apr 16 13:30:29 Tell them that they either pay you to develop/reuse a VoIP stack, or they show the number to the user. Apr 16 13:30:32 Leeds, it depends how well they pay you for it ;-) Apr 16 13:30:36 isn't there a voip stack in android? Apr 16 13:30:42 lov ur free to xpress yourself as you want... its all up to u! Apr 16 13:30:54 beStKodeReveR: careful Apr 16 13:31:02 But I don't get the money, my boss does :( Apr 16 13:31:28 storkme: yeah, http://developer.android.com/reference/android/net/sip/package-summary.html Apr 16 13:31:37 if you're feeling saucy, you could ACTUALLY do something with that. Apr 16 13:31:56 but I sincerely doubt that the client actually wants that. Apr 16 13:32:01 or understands the scope of what they're asking Apr 16 13:32:03 Actually an own sip service is not a bad idea. Apr 16 13:32:33 I need to implement a library that is written in C/C++ so I will need to learn how to use the native tools. However I am working on mac. Are there any special considerations I must take in this case? Apr 16 13:33:11 The problem is, you have to depend on the network connection, which depends on location and provider] Apr 16 13:33:12 we were thinking of implementing some voip functionality into our app, but i haven't gotten round to checking out the api just yet Apr 16 13:35:14 My collegue developed a service to interconnect a group of callers to each other using gsm. Since the number is secret, they want to integrate it in the app, so the there will be no number shown at all. Apr 16 13:35:16 Number5: yep. Apr 16 13:35:22 jiduvah: you should be able to use the NDK on a mac. Apr 16 13:35:41 jiduvah: http://developer.android.com/sdk/ndk/index.html Apr 16 13:35:56 lov: thanks Apr 16 13:36:06 the only consideration is that you have that funny celtic cross key instead of ctrl, since macs are icky and weird Apr 16 13:36:20 hi, i know this might seem stupid but is NULL undefined in NDK / C++ or should i include somthing ? Apr 16 13:36:21 haha Apr 16 13:36:31 here's my number, so call me maybe Apr 16 13:36:46 asterisk-Tester: use 0? There's nothing special about the NDK here. Apr 16 13:36:47 lov: i agree there are weird not to mentioned overpriced Apr 16 13:37:09 asterisk-Tester, NULL is defined in C++ (at least in Visual C++, which is for Windows). Apr 16 13:37:31 I think it's for all C++ compilers Apr 16 13:37:44 Number5: unless you feel like redoing the telphony stack and distributing custom firmwares, you'll probably be unable to do this via GSM :( Apr 16 13:38:13 lov, thnx Apr 16 13:38:59 but no one knows an opensource implementation, I've read it's possible to access the RIL interface, which is the lower layer for talking to the baseband, from an article. Apr 16 13:39:39 technically true but that method requires at a bare minimum rooting and a strong understanding of the implementation of the RIL on that device. Apr 16 13:39:47 so, again, modifying firmware :P Apr 16 13:40:03 I pity the user who is not root Apr 16 13:40:09 just to be clear - its *impossible* to the change the list of things that come up when you share via intent right? i mean if I want twitter but no flickr, im out of luck ? Apr 16 13:40:11 wow, the toasts in my app are *tiny* on the OneX screen Apr 16 13:40:12 lov, hmm I was afraid the device should be rooted. Apr 16 13:40:24 bear in mind that Android lives as the topmost layer, and only provides interfaces for the lower layers to contact it. Apr 16 13:40:37 between android and the RIL is the manufacturer's implementation of whatever libraries Apr 16 13:40:46 gaz`: only thing you can do is try to tweak the share to match twitter's intent-filter but not flickr's... not easy or robust Apr 16 13:40:57 oh Apr 16 13:41:01 how would i do that? Apr 16 13:41:31 with great care and skill Apr 16 13:41:38 any hints or linsk Apr 16 13:41:49 links Apr 16 13:41:51 sigh Apr 16 13:41:53 lov, thank you for thinking with me... Apr 16 13:41:54 lov: Number5: i though NULL was part of the standard but it's ok i can change my code to 0 :-) Apr 16 13:41:56 this app is killing me Apr 16 13:42:03 see, now I just assume you're drunk :) Apr 16 13:42:09 asterisk-Tester: #ifndef NULL #define NULL 0 #endif :P Apr 16 13:42:21 haha Apr 16 13:42:22 iwish! Apr 16 13:42:24 either trial and error, or pull the flickr app apart to have a look at its intent-filters Apr 16 13:42:27 asterisk-Tester, finally NULL is just 0 if I remember Apr 16 13:42:40 #ifndef NULL #define NULL 12345 #endif Apr 16 13:42:44 that's how you fuck with people Apr 16 13:42:44 I didn't say it would work, and I was trying to suggest it could stop working at any time Apr 16 13:42:56 haha Apr 16 13:42:57 :-x Apr 16 13:43:06 #ifndef 0 #define 0 1 #endif Apr 16 13:43:08 ggggggggggggggggggggggggggggg Apr 16 13:43:31 in C++ you can do like: if(!object) {printf("oops, it's empty");} where NULL/0/false are all the same in an if-statement. Apr 16 13:43:41 Number5: Oh wait, just noticed it is defined in : stddef.h Apr 16 13:44:10 asterisk-Tester, well there you go :) Apr 16 13:45:16 NULL is indeed 0. Apr 16 13:45:32 lov, I understand that to talk to an RIL interface it's nothing more than a socket connection and send "AT-adt" for calling etc... Apr 16 13:45:42 Nope! :D Apr 16 13:45:58 So I think the phone don't need to be rooted at all, but I'm not sure. Apr 16 13:46:03 haha nope Apr 16 13:46:24 if that were the case the devices would be flooded with garbage Apr 16 13:46:47 I can tell you from working at Samsung that Sammy developed their very own RIL protocol Apr 16 13:46:52 s/garbage/more garbage/ Apr 16 13:46:56 lov: http://www.linuxjournal.com/magazine/java-api-androids-telephony-stack?page=0,1 Apr 16 13:46:56 ^^ Apr 16 13:47:32 right, and the RIL Daemon and RIL module are most likely totally opaque Apr 16 13:47:36 lov, who is Sammy? I have a cousin named Sammy :P Apr 16 13:47:44 but he's just 2 years old :) Apr 16 13:47:45 samsung. Apr 16 13:47:53 look, don't let me discourage you Apr 16 13:48:01 but you're DEFINITELY in for a world of pain if you really seriously try this path Apr 16 13:48:03 Number5: can I point out that you're arguing with someone who a) has demonstrated that they are an op in this channel, and likely therefore senior/expert and b) just subtly mentioned they have experience at a hardware manufacturer... he knows more than you about this stuff Apr 16 13:48:38 I actually tried looking into the exact same thing for some reason I forget, and it was just following the rabbit hole of telephony crap to the point where I no longer even tried Apr 16 13:48:47 Leeds, no I don't know, well right now I know :) Apr 16 13:48:56 op doesn't necessarily translate to aptitude Apr 16 13:49:06 point is, there's no standard ATDT 1800BALLSAC command you can give Apr 16 13:49:22 and even if there was you'd have to give it as the "telephony" user Apr 16 13:49:32 pragma-: translates to "optitude" :D Apr 16 13:49:40 or sometimes attitude Apr 16 13:50:30 ah, there we are... evening theneb Apr 16 13:50:32 lov, well, it's better for me, now I can convince my boss that it's not possible :) Apr 16 13:50:43 Hi all, I've been using the Android Market APK expansion files as from Google. However this code crashes (including the same app) if a user isn't signed into Google Play Apr 16 13:51:02 NullPointerException error: http://pastebin.com/MUqXVqrX Apr 16 13:51:22 Now, do I attempt to fix the Google code or is there a way to tell if a user is signed into Google Play? Apr 16 13:51:44 Hey Leeds :) Apr 16 13:51:55 please don't try to "fix" their code ._. Apr 16 13:51:59 at most open a bug on b.android.com Apr 16 13:52:10 but look through the docs, this might already be mentioned as an edge case Apr 16 13:52:45 lov: Yes, I'd prefer to keep referencing to the external projects. Apr 16 13:53:06 Which docs will contain info about this? Apr 16 13:53:14 THE docs Apr 16 13:53:16 ^^ Apr 16 13:53:18 you know. Apr 16 13:53:20 THE docs. Apr 16 13:53:26 whats up docs Apr 16 13:53:35 (I actually don't know; I'm assuming the docs for the expansion files, if any, or maybe LVL) Apr 16 13:53:52 it looks like this is a failure in LVL code, so check the LVL documentation for what happens if the user isn't signed in Apr 16 13:53:56 lov, so you're still working for Samsung? Apr 16 13:53:58 How to develop a listView adapter, if the listview should show different type of items? Apr 16 13:54:12 Okay, I've seen nothing about edge cases. But I will double check through apk exapansion and licensing. Though I believe this is only occuring with the apk expansion stuff. Apr 16 13:54:27 lov: Cheers Apr 16 13:54:56 napster, you should check the examples for items with a different layout Apr 16 13:55:20 Number5: Do we have something in the APIDemos? Apr 16 13:56:34 pfff, I don't know. I played with it since I had to show a list of items which has ratings, title, description etc... I just used examples from the web,, but don't remember where Apr 16 13:57:29 I do know that Google android has 1 hour video about listview. Just watch it on youtube. Apr 16 13:58:45 That's why I love Android/Google. If you want to write Windows application, you had to buy Visual Studio (before the express versions). Apr 16 13:58:57 Is there a way to automatically stretch a background image to fill the screen? Apr 16 13:59:20 napster: it's actually quite easy - you override getViewTypeCount() and return the appropriate thing, then you create/reuse the correct type of layout in getView() depending on the position number you're passed Apr 16 13:59:24 yes, you could pass an argument or even define it in the xml Apr 16 14:01:07 There are a lot of Android screen sizes... Do I have to make a bacckground image for each one? Apr 16 14:01:12 look at android:scaleType in xml Apr 16 14:01:17 Number5: no, I quit samsung about 18 months ago. Apr 16 14:01:38 lov, you started your own company? Apr 16 14:01:47 Jonathan_Eyre: no. Apr 16 14:02:06 When using the 'android:layout_span=2 Apr 16 14:02:07 Jonathan_Eyre: only if you want your background image to be pixel perfect, and you're playing a losing game supporting all the configuration types, anyway Apr 16 14:02:25 Jonathan_Eyre: http://developer.android.com/training/multiscreen/index.html Apr 16 14:02:29 hey, I just met you and this is crazy, so here's my Number5, call me.. maybe Apr 16 14:02:32 trolololol Apr 16 14:02:43 When using the 'android:layout_span="2"...why does it say 'unknown xml attribute' in eclipse in the properties tab...is there another attribute I should be using? Apr 16 14:03:09 lov Leeds Yep, found it at http://code.google.com/p/android/issues/detail?id=26722&q=NullPointerException%20LicenseValidator.verify&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars Apr 16 14:03:28 im singing Apr 16 14:03:38 http://open.spotify.com/track/6ol4ZSifr7r3Lb2a9L5ZAB Apr 16 14:03:41 as much as i know u canty change the optiosn that come up when you call a share intent, i cant also find any evidence of this on google to show client Apr 16 14:04:07 gaz`: you can also implement your own intent picker, if necessary Apr 16 14:04:14 ohhh Apr 16 14:04:16 you can? Apr 16 14:04:20 lot: I tried to run the ndk-build tool it says I need to install Cygwin. Is this correct or have I done something wrong along the way? Apr 16 14:04:21 think so, yes Apr 16 14:04:21 so you can define whats available? Apr 16 14:04:35 lov: I am just a little confused as you said they should work Apr 16 14:04:51 hmm Apr 16 14:04:54 dont thionk u can leeds Apr 16 14:05:18 you can't *control* what is in the list, but you could filter out specific apps - AFAIK Apr 16 14:05:33 any keywords i can look for? found no evidence of this Apr 16 14:06:27 anybody? Apr 16 14:06:28 I think there is a way to say "give me a list of the apps/activities/etc which would match intent I" - looking for it now Apr 16 14:06:39 thanks man Apr 16 14:06:50 i just wanna be able to share pics/urls but only to certain things Apr 16 14:07:16 oO Apr 16 14:07:40 why only certain things Apr 16 14:07:45 thats pretty nazi'ish Apr 16 14:08:00 dunno really client doesnt want ppl to be bale to share stuff to certain places Apr 16 14:08:09 That kinda ruins the point of share intents Apr 16 14:08:10 i told them that the whole pint of sharing is to share surrely Apr 16 14:08:12 so you are working for hitlet? Apr 16 14:08:15 hitler Apr 16 14:08:33 for some odd reason they dont want ppl to be able to share on picasa or bluetooth Apr 16 14:08:39 but they come up in the list Apr 16 14:08:56 throw them in the oven Apr 16 14:09:03 heh Apr 16 14:09:15 gaz`: possibly http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int) Apr 16 14:09:36 The only way to ensure that is pretty much by whitelisting apps.. If you just blacklist the user could install any other app that integrates with e.g. picasa Apr 16 14:09:46 If you whitelist you ignore all the other twitter clients out there Apr 16 14:10:02 theyd be ok with that, how do i do it tho? Apr 16 14:10:40 Dunno :p Apr 16 14:10:46 lol Apr 16 14:10:58 i just want some proof that its impossible that might make them realise lol Apr 16 14:11:49 need some food and a walk Apr 16 14:11:53 bbiab Apr 16 14:12:12 not impossible... Apr 16 14:18:30 Is there a way to put "padding" in between elements in a linearlayout? Apr 16 14:18:40 yes Apr 16 14:19:24 Is that an element parameter, or is it its own element? Apr 16 14:23:30 what is the actual pixel dimensions of a single cell row widget 72dp x 72dp but setting the image for the widgt leaves a padding of like 5px on top when there is no padding tag det Apr 16 14:25:04 dominicdinada: try again with punctuation Apr 16 14:25:28 jiduvah: That's awful strange. Apr 16 14:25:34 jiduvah: you're doing this on a Mac, right? Not windows? Apr 16 14:26:25 ok i have a widget that i set an image to its a single cell,row. 72dp by 72dp but using those exact pixel dimension in GIMP i have an overflow on top and bottom. There are no padding tags set Apr 16 14:26:54 lov: it has the strange celtic cross so I am pretty sure its a mac ;) Apr 16 14:27:43 lov: I presume I am calling the terminal command wrong if I don't been to install cygwin Apr 16 14:29:49 cygwin??? Apr 16 14:32:36 Leeds: Thank You Apr 16 14:32:48 ddd Apr 16 14:37:16 fixed it ;/ Apr 16 14:39:22 so netflix says "We rely on the onReceivedTitle notification as a way to communicate back to our Java code when some Javascript is executed in the HTML5 UI." Apr 16 14:39:27 why the fuck didnt they just use the bridge? Apr 16 14:39:36 in a generic normal way Apr 16 14:42:23 how do you declare a shared preference object? Apr 16 14:42:23 I have this line SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext()); Apr 16 14:43:12 looks about right, but you can just use "this" most likely Apr 16 14:43:42 how do I declare a shared preference correctly? Apr 16 14:43:47 I have this line Apr 16 14:43:48 a Apr 16 14:47:29 How does one pad the items in a LinearLayout? Right now everything is crushed together at the top of the screen. Apr 16 14:47:42 SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext()); Apr 16 14:47:43 I get a null pointer Apr 16 14:47:48 I'd prefer a percentage padding, if at all possible Apr 16 14:48:02 sorry I keep getting logged off Apr 16 14:48:10 buggy internet Apr 16 14:48:16 eddi3x3i: that's not helpful at all. Pastebin your actual code (more than just that line) and stacktrace from logcat Apr 16 14:48:21 so does anyone know? Apr 16 14:48:32 SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext()); Apr 16 14:48:47 eddi3x3i: that's not helpful at all. Pastebin your actual code (more than just that line) and stacktrace from logcat Apr 16 14:48:49 sorry Apr 16 14:48:59 eddi3x3i Apr 16 14:49:08 use context.getSharedPreference Apr 16 14:49:53 if there is no padding tag set why do u have to set a padding tag with 0dp to clear Apr 16 14:50:08 for the String parameter I just put what I want to call it jug6? Apr 16 14:50:39 eddi3x3i: are you trying to create a new shared preference xml or are you trying to add an entry into your _preferences.xml? Apr 16 14:50:41 *yawn* Apr 16 14:51:03 what up, JakeWharton ? Apr 16 14:51:14 woke up early to go to the gym Apr 16 14:51:17 don't feel like going Apr 16 14:51:18 I'm trying to make a shared preference with no xml, just to hold a few settings Apr 16 14:51:32 whaaa? Apr 16 14:51:46 eddi3x3i: just use Context#getSharedPreferences Apr 16 14:53:18 eddie3x3i the string param is the name you want for you preferenec file, the identifier Apr 16 14:53:24 the second param is the read mode Apr 16 15:05:05 Anyone know which effect causes the software keyboard to dim to dot's, as in the camera app? Apr 16 15:05:28 dw, found it Apr 16 15:05:37 SYSTEM_UI_FLAG_LOW_PROFILE Apr 16 15:07:02 is android:layout_column and android:layout_span zero based? Apr 16 15:08:08 layout_column is Apr 16 15:08:10 not sure about span Apr 16 15:08:16 span is not Apr 16 15:09:26 Hey guys... I'm getting this odd stacktrace only in honeycomb when attempting to tap on a text field inside a webview: http://pastie.org/3798600 Apr 16 15:09:30 Anybody ever see this before? Apr 16 15:12:31 i'm trying to build aosp in an ubuntu 64bit chroot, and it always break with ":collect2: collect2: cannot find -lGL". libgl1-mesa-dev:i386 is installed, and i also tried with libgl1-mesa-dev, but no difference. any ideas? Apr 16 15:14:41 What can cause a onEventListener to stop listening? Apr 16 15:17:08 SYSTEM_UI_FLAG_LOW_PROFILE Apr 16 15:17:43 I've used it in context, however each time setLightsOn(true) shows in the log. Is something overriding it? Apr 16 15:18:04 jiduvah: if you haven't solved it yet, it's probably doing some checking in a bash script to try to figure out what environment it's in. See if you can trace what it's doing, and file a bug on b.android.com about it. Apr 16 15:19:27 lov: nope still stuck. But it also says "define the GNUMAKE variable to point to it" Apr 16 15:19:32 does this make sense? Apr 16 15:19:40 or do you still think it is a bug? Apr 16 15:20:08 hey guys, I have an audio player service, and I want it to stop after 5 mins of idling, what is the best solution for that? Apr 16 15:20:46 Handler#postDelayed Apr 16 15:21:47 evancharlton, you saved me a lot of time and code here mate! thanks Apr 16 15:22:29 lol Apr 16 15:22:48 or an alarm, or [insert >9000 other solutions] Apr 16 15:23:03 Hi all Apr 16 15:23:22 canadiancow|work: don't need an alarm since his process will be alive Apr 16 15:23:44 jiduvah: if the ndk scripts don't detect your environment out of the box, it's a bug. Apr 16 15:23:56 I'm working with an activity/intent pair, and i'm finding that even thought I use getIntent() to get the provided, stuff some data into it, and return it with setResult(), the data I'm putting into the extras bundle...isn't actually making it back to the previous activity. Apr 16 15:23:57 lov: shit Apr 16 15:24:27 canadiancow, evancharlton I have an activity and the service, I want to stop the service on idle time of 5 minutes, but only if my activity is onPaused Apr 16 15:24:31 like, here's my onClick code Apr 16 15:24:32 http://pastie.org/3798690 Apr 16 15:24:45 See anything wrong with that? Apr 16 15:25:24 yeah, your indentation is crap, Sh0rtWave Apr 16 15:25:41 lol Apr 16 15:25:45 http://pastie.org/3798690 Apr 16 15:25:47 ctrl/cmd shift f ftw Apr 16 15:26:01 yeah, you're not helpful Apr 16 15:26:04 That's how it pasted in. Apr 16 15:26:37 Sh0rtWave: I don't see anything obviously wrong, but why are you using getIntent()? just use new Intent() Apr 16 15:26:44 I did that. Apr 16 15:26:50 I've tried it both ways. Apr 16 15:27:09 For some reason, the intent that gets returned is the same intent that got sent. Apr 16 15:27:42 Sh0rtWave: how are you getting the returned intent? Apr 16 15:27:57 onActivityResult handle Apr 16 15:28:01 handler Apr 16 15:28:04 Intent data; Apr 16 15:28:14 then Bundle record = data.getExtras(); Apr 16 15:28:27 The extras bundle comes out null no matter what I do Apr 16 15:29:18 This IS the world's dumbest app Apr 16 15:29:34 but the content shouldn't be affecting the operation of the code that much Apr 16 15:29:35 heh Apr 16 15:30:36 I'm getting this odd stacktrace only in honeycomb (fine in gingerbread) when attempting to tap on a text field inside a webview. The stacktrace doesn't point to any of my code: http://pastie.org/3798600 Apr 16 15:30:58 using 2.3 platform Apr 16 15:31:08 fuck i cnat use google chrome sync with my corporate gapps account Apr 16 15:31:21 is there a way to save your tabs, and import them into another instance of chrome? Apr 16 15:33:04 aight, here it is Apr 16 15:33:06 http://pastie.org/3798742 Apr 16 15:33:20 The top method is the click handler in the detail view Apr 16 15:33:28 I want that to return the bundle to the calling activity Apr 16 15:33:44 Which is of course called by that onClick handler Apr 16 15:33:51 and handled by the onActivityResult handler Apr 16 15:33:57 I can't figure out why the intent is empty Apr 16 15:34:06 or rather, it's got the right action name Apr 16 15:34:15 but it doesn't have the extras bundle, and I'm lost as to why Apr 16 15:34:38 Sh0rtWave: try putExtra(..) on the intent directly Apr 16 15:34:44 instead of building the Bundle separately Apr 16 15:34:53 evancharlton: I was doing that first. Apr 16 15:35:15 evancharlton: I modified it to that, to see if doing putExtras( bundle ) would force it to stick. Apr 16 15:37:05 The silly part is a near identical class that collects slightly different data, but uses the exact same technique to return the data...works. Apr 16 15:38:31 Sh0rtWave: there's something missing here that I'm not seeing Apr 16 15:38:38 There must be Apr 16 15:38:39 there's gotta be a stupid mistake somewhere Apr 16 15:38:41 I can't figure it out Apr 16 15:39:00 That's the sum total of the code, right there Apr 16 15:39:07 I have an interesting question: my IM app is currently listening to both android.intent.action.BOOT_COMPLETED and android.net.conn.CONNECTIVITY_CHANGE, however even if my boot-up handler is inactive, it is triggered by the connectivity change after bootup anyway. Is the connectivity change event guaranteed to trigger after a bootup, as soon as the device gets connected? Apr 16 15:39:21 That data coming from the EditTexts isn't null... Apr 16 15:39:40 I can inspect the intent right there and see the bundle in the intent extras just fine Apr 16 15:40:02 It just doesn't seem to make it back to the calling intent. Apr 16 15:40:07 errr, activity Apr 16 15:40:45 Ge0rG: you can't assume that boot == has connection (wifi-only devices, airplane mode, etc) Apr 16 15:41:19 Hi. how can i throw an exception without using throws after method signature? Apr 16 15:41:22 Ge0rG: I would assume that, yes, CONNECTIVITY_CHANGE would always be sent Apr 16 15:41:30 and if you get conenctivity_change, that also means yyou have booted up Apr 16 15:41:35 As4xk: make your exception extend RuntimeException Apr 16 15:41:44 i dont think it can occur if the phone is off though Apr 16 15:41:49 mikedg: sigh Apr 16 15:41:50 There's gotta be something really stupid that I'm missing somewhere. Apr 16 15:41:52 evancharlton: Great. Thanks Apr 16 15:42:35 The service details activity is the simplest possible thing it can be to collect the data it is. Apr 16 15:42:51 Get data out of two fields, stuff into the intent, and go Apr 16 15:42:58 anyone else cringe when people write 'a code' instead of 'code' ? Apr 16 15:43:37 xorgate: I got a code from a retailer recently, for some price-off... Apr 16 15:43:42 depends on context Apr 16 15:44:07 why isnt stopSelf working? Apr 16 15:44:22 evancharlton: interesting. So I assume I do not need to have the boot-up permission at all then... mhm.. Apr 16 15:44:29 I have a service and call stopSelf() but it isnt destroying Apr 16 15:44:55 Ge0rG: BOOT isn't the event that's relevant to your application; connecting to a network is Apr 16 15:45:13 stiggpwnz, anything bound to it will prevent destruction, I think Apr 16 15:45:53 what is the difference between `awake` and `screen on`? Apr 16 15:45:55 pfn, so I need to unbound first, yeah? Apr 16 15:46:02 You may find it in the battery manager of your settings Apr 16 15:46:09 evancharlton: you are right. I implemented boot a long time before the connection listener, so I didn't even realize the boot event became irrelevant Apr 16 15:46:23 everythingWorks: The processor will be running if the device is awake. If the screen is also on, then "screen on" is true. Apr 16 15:46:45 Uninstall, clean...recompile... Apr 16 15:46:49 everythingWorks: note that in modern smart phones, the radio processor and the application processor are generally 2 separate processors, so it is possible for the application layer to completely power off. Apr 16 15:46:53 let's se if that fixes it Apr 16 15:47:11 lov: very interesting, where did you get the info from? Apr 16 15:47:21 personal experience, the internet? Apr 16 15:47:31 nope... Apr 16 15:47:31 WTF Apr 16 15:47:32 just couldn't find any resource on that :/ Apr 16 15:47:43 the upshot is that if you want to perform any calculations even if the screen is off, you need to hold a partial wakelock. Apr 16 15:48:37 hi. I'm not android dev, but I have dev Q. I found this class: http://developer.android.com/reference/java/util/UUID.html Apr 16 15:48:54 how do I know what permissions does it need ? Apr 16 15:49:04 I mean application access Apr 16 15:49:12 Sh0rtWave: sorry, i don't have any other ideas other than to take a close look at what you're doing that's different between your two implementations Apr 16 15:49:18 can ANY application run this uuid generator on android ? Apr 16 15:49:19 Sh0rtWave: let me know if/when you figure it out! Apr 16 15:49:30 sobersabre: yes, of course Apr 16 15:49:35 why would there be a permission for that? Apr 16 15:49:36 I'm noticing that while the extras bundle is null in the intent Apr 16 15:49:39 it's got parcelableData Apr 16 15:49:51 err, parcelledData Apr 16 15:49:54 which Apr 16 15:49:56 it shouldn't have Apr 16 15:50:00 lov: thanks for the info, though :) Apr 16 15:50:11 so, when a company says they need to read my device EDID, and call data, for uuid generation, they're full of shit? Apr 16 15:50:34 sobersabre: well, it depends on what they're doing Apr 16 15:50:38 evancharlton: I am not android developer, so I don't know what kind of security restrictions. Apr 16 15:50:59 evancharlton: the app is called iOnRoad. Apr 16 15:51:22 I asked them why they need my phone's call and id data, they say "to generate unique user id" Apr 16 15:51:23 sobersabre, under normal circumstances, the deviceID should be all they need to id you Apr 16 15:51:23 sobersabre: UUID is just a way to generate UUIDs; if they want a UUID that will persist across uninstall/reinstall, then they can't just use UUID Apr 16 15:52:20 evancharlton: I understand the company's response as if they want to generate a UID. Apr 16 15:52:40 (like on unix), and the user also has a username (probably the email address) Apr 16 15:52:43 What ??? there isn't a permission to run every CPU opcode ? ANDROID IS INSECURE !!! Apr 16 15:53:31 onohesback Apr 16 15:54:09 jcase: device id is something one can forge (like MAC address), and call with my phone's device ID. am I confused ? Apr 16 15:54:23 WTF Apr 16 15:54:29 NOW it works and I didn't change ANYTHING Apr 16 15:54:38 0.0 Apr 16 15:54:48 how to unbind from service without stopping it? Apr 16 15:54:50 Sh0rtWave: I don't know what you're talking about, but you're wrong. Apr 16 15:55:02 Well Apr 16 15:55:09 I didn't change anything in the detail activity Apr 16 15:55:19 what ARE you doing ? Apr 16 15:55:37 I switched from Bundle record = data.getExtras(); Apr 16 15:55:57 stiggpwnz: use startService() to start it Apr 16 15:56:14 sobersabre, if they want to modify the client software, all of that can be "forged" Apr 16 15:56:20 and went with data.getStringExtra("name") and that works, curiously, but that being all that I change, it makes no sense to my why the when I inspect the intent at method entry, it now says it has extras when before it was null. Apr 16 15:56:40 Sh0rtWave: there is a simple and widely accepted explanation Apr 16 15:56:50 pragma-: What would that be? Apr 16 15:56:53 Sh0rtWave: aliens Apr 16 15:56:58 pragma-: Could be Apr 16 15:57:19 Sh0rtWave: it usually are gremlins. Apr 16 15:57:45 if you don't expect the LAST change to have fixed this, think of the last but one. Apr 16 15:57:52 Sh0rtWave: you said it worked by you not changing anything then you went on to say "... that being all that I changed" Apr 16 15:57:58 or the combination of the two. Apr 16 15:58:01 so you changed something and it worked... why are you surprised? Apr 16 15:58:06 No no Apr 16 15:58:07 Pragma, here's the thing, I need to stop the service when it did its work, but I can't, because it still bound, so I tried to unbound it first, but now it stops before it did it's work Apr 16 15:58:12 ok. Apr 16 15:58:19 I changed something in a place that would make no sense that it had that effect. Apr 16 15:58:25 I didn't change the detail activity at all Apr 16 15:58:37 Someone here plays football betting ???? Apr 16 15:59:13 Hrm, this should explain things Apr 16 15:59:33 how to stop service without unbounding or unbound without stopping? Apr 16 15:59:44 https://skitch.com/sh0rtwave/8uc42/debug-readynovaandroid-src-org-readynova-familyemergencyplanner-emergencycontactslistactivity.java-eclipse-sdk-users-bobbyparker-documents-workspace Apr 16 15:59:45 ack Apr 16 15:59:49 long URL there Apr 16 16:00:36 does getExtras() return a reference to a bundle or does it copy the bundle from the intent and create a new one? Apr 16 16:01:00 If I'm looking at the ids there, those are two different bundles Apr 16 16:01:21 regardless it returns a reference to a bundle, independent of if it's the same one or a copy. Apr 16 16:01:33 what abaratican said Apr 16 16:01:47 Certainly Apr 16 16:02:05 The question is then why the one returned doesn't contain the data I expect. Apr 16 16:02:16 when data.getStringExtra("name") does Apr 16 16:04:12 I mean it would stand to reason if data.getStringExtra("name") works, then Bundle record = data.getExtras(); record.getString("name"); would work also, no? Apr 16 16:05:32 hi all Apr 16 16:05:39 For the moment it doesn't matter as long it overall works, but it's still a curious bug Apr 16 16:07:48 can I unbindService while Activity is onPaused? Apr 16 16:08:55 I mean can I run any code when activity is paused? Apr 16 16:09:14 and how to unbind from service when activity is paused? Apr 16 16:10:35 stiggpwnz: you probably don't want to do that; displaying a dialog in front of your activity will generate an onPause. You should probably consider this in onStop. Apr 16 16:12:53 lov, but I want to unbind from service when the service did its work and I no longer need it Apr 16 16:13:37 lov, and I need to stop it when activity is paused/stopped whatever Apr 16 16:14:16 ok, so./ Apr 16 16:14:18 lov, but I can't unbind onPause or onStop because it will stop my service and I need it working Apr 16 16:14:28 1) You need to seriously read the activity lifecycle docs; pause != stop Apr 16 16:14:43 2) You should consider something like an IntentService Apr 16 16:14:57 noone says pause drop and roll Apr 16 16:15:00 it's stop suckah Apr 16 16:15:03 it's true,. Apr 16 16:15:30 lol Apr 16 16:15:40 ive never had an activity catch fire though Apr 16 16:15:58 ... yet Apr 16 16:16:15 is there any way to unbind from service without stopping it? and then call stopSelf() when I need to? Apr 16 16:17:39 jesus dude Apr 16 16:17:44 I think we solved this problem for you like 5 times Apr 16 16:17:50 have the service call stopSelf Apr 16 16:18:00 lov do you have a minute ? Apr 16 16:18:03 no Apr 16 16:18:04 I really don't Apr 16 16:18:08 ok Apr 16 16:18:10 I only have time for yelling at people Apr 16 16:18:20 and even that is usually low by noon Apr 16 16:18:30 lov, it won't stop cuz it's bound Apr 16 16:18:33 so I broadcast the question ... maybe you find it interesting Apr 16 16:18:45 stiggpwnz: Apr 16 16:18:46 READ Apr 16 16:18:47 TGE Apr 16 16:18:51 DOCS Apr 16 16:18:55 (the, not tge) Apr 16 16:19:05 you don't HAVE to start a service via binding. Apr 16 16:19:23 you also don't HAVE to do something with a service, even if you bound to it Apr 16 16:19:27 stiggpwnz: start the service from within the service Apr 16 16:19:45 bind ... then the service start itself Apr 16 16:20:09 just call Service#onDestroy() Apr 16 16:20:09 this API key business is dodgy Apr 16 16:20:35 Sicp ? Apr 16 16:20:37 every once in a while (yes, literally, that's the metric by which I am noticing this error) the maps layout fails to show because of an erroneous API key Apr 16 16:20:48 oh Apr 16 16:20:51 yea i dont get it Apr 16 16:20:51 canadiancow, is it ok to call onDestroy for service? Apr 16 16:20:58 the maps javascript api no longer needs an api key Apr 16 16:20:59 but android does Apr 16 16:21:02 I get a new one and the map is there again, but that damned "Couldn't get connection factory settings" is still showing up Apr 16 16:21:05 stiggpwnz, no, i'm just fucking with you Apr 16 16:21:54 canadiancow, why? I just need to stop a bound service when my activity is paused Apr 16 16:22:14 so unbind ? call stop? Apr 16 16:22:17 do something? Apr 16 16:22:18 omy question is on the relation between Model and View. In my case the View is an Observer and the Model is na Observable. So the Model call View.update(Observable m, Object data){postInvalidate();} . Then View.onDraw(canvas){model.getData(); super.draw(Canvas);} Apr 16 16:22:40 I am thinking in refactoring in: Apr 16 16:22:42 canadiancow, can activity run code when it's stopped? Apr 16 16:22:50 canadiancow, or paused Apr 16 16:23:01 I'm in adb shell. I go to data/app and typing 'ls' I get "opendir failed, Permission denied" Apr 16 16:23:05 yes Apr 16 16:23:15 panda81: you are not root :> Apr 16 16:23:31 View.update(Observable m, Object data){ Model tmp = (Model)m; tmp.getData(); postInvalidate();} Apr 16 16:23:37 what do you think ? Apr 16 16:23:39 panda81: /data/data is not user visible; each app gets its own user / userid and can only see its own app private data. Apr 16 16:23:47 lov: hehe, I'd think I have the privilage, being the physical owner Apr 16 16:23:56 panda81: is your phone rooted? yes/no Apr 16 16:24:00 in that way I don't need to store a local reference to the model in the View Apr 16 16:24:21 I spoke to someone from the Google Maps dev team when they were here in Beirut, and she said something about how I can have a geopoint derived from a hostname Apr 16 16:24:29 if no, root it, start again. Otherwise, use 'su' and try again. Apr 16 16:24:29 or an IP address; just a string, meaning Apr 16 16:24:32 lov: no. Trying to see where the app is. I wish to place a folder with some files besides where my apk was sent to. Apr 16 16:24:36 aLeSD: I think this is like the third consecutive week that you've been trying to figure out MVC Apr 16 16:24:43 adb shell ls /data/data -prettyplease Apr 16 16:24:50 evancharlton, I am on the right way Apr 16 16:24:57 panda81: the apk itself resides in /data/app or something. The app private storage is in /data/data/your.package.name/. Apr 16 16:25:07 and I like to understand things really deeply Apr 16 16:25:23 panda81: strongly consider just having your app check for your content on the SD card, or extract it / inject it itself on startup Apr 16 16:26:00 evancharlton,what do you think of my refactor idea ? Apr 16 16:26:23 lov: Hmm, I'm using Adobe air and converting flash to android app. It has its own abstraction. Apr 16 16:26:27 dont refactor until you can first factor Apr 16 16:26:38 lov: and probably doesn't know or have access to sdcard/ Apr 16 16:26:49 aLeSD: I don't Apr 16 16:26:55 lol Apr 16 16:27:09 Grumpy Old Bots Apr 16 16:27:25 panda81: Good luck with your weird api! :D Apr 16 16:27:30 well ... maybe a better question could be : my refactoring idea breaks the MVC pattern ? Apr 16 16:27:34 lov and evancharlton remind me of the old muppets who make jokes Apr 16 16:27:42 Waldorf and Statler Apr 16 16:27:45 the BEST muppets. Apr 16 16:27:48 and can we ban everythingWorks since its a pain to autocomplete evancharlton Apr 16 16:27:57 yay, MVC pattern Apr 16 16:28:01 [12:24:36] aLeSD: I think this is like the third consecutive week that you've been trying to figure out MVC Apr 16 16:28:05 aLeSD: it's your app; I highly doubt anyone can give you any worthwhile feedback on the fine-grained design details of your particular app Apr 16 16:28:11 panda81: you are, of course, encouraged to look at http://developer.android.com/guide/index.html Apr 16 16:28:11 i interviewed an intern who siad he knew MVC Apr 16 16:28:13 he didn't Apr 16 16:28:17 i forced people to watch the muppets iwth me for my birthday Apr 16 16:28:17 lol Apr 16 16:28:26 canadiancow|work: he went to the MVC to renew his driver's license Apr 16 16:29:44 lov: Thanks. It's nice to confirm the limitation that I can't just copy a few files besides my apk. Apr 16 16:30:19 panda81: first mistake: using Air Apr 16 16:30:47 "Are you familiar with X?" -- "Yes" -- "What is X" -- "....... I don't know" Apr 16 16:30:56 yep Apr 16 16:31:14 readme: it's the standard Linux/*nix windowing system Apr 16 16:31:19 next time just make up an acronym Apr 16 16:31:21 Leeds: clever Apr 16 16:31:39 it will be funnier when the candidate says he knows what is not even real Apr 16 16:31:49 it's quite clever - the network transparency stuff is cool Apr 16 16:31:52 X == XTC ? Apr 16 16:32:12 evancharlton: I think Android's file access limitation is sensible. If everyone has access, pirates will have a field day Apr 16 16:32:13 XTC the ice cream company? Apr 16 16:32:22 kind of Apr 16 16:32:27 XTC the new wave band? Apr 16 16:32:54 * Ankhwatcher slinks back in to hide in the corner Apr 16 16:32:56 aLeSD: damn you! it's 12:30 in the morning and you've got me wanting ice cream! Apr 16 16:33:16 What does Google Play check against to know if an app is installed, ie if a user has an apk installed but hasn't purchased it through the market. Does is show 'BUY' or 'UPDATE' ? Apr 16 16:33:18 ice cream rules Apr 16 16:33:28 * aLeSD italians make it better Apr 16 16:33:42 theneb: Google play does not know about APKs installed not through the market. Apr 16 16:33:48 unfortunately, I'm thousands of miles from Italy and haven't actually been there since January Apr 16 16:33:57 readme 1 week I have my new app Apr 16 16:33:57 Leeds: look at the upside, it's a lot easier to get ice cream than say... a morgage at 12:30 am Apr 16 16:34:04 aLeSD: awesome Apr 16 16:34:15 readme: not entirely true... I've seen it get confused when I've legitimately installed an app from outside the market Apr 16 16:34:30 readme: Okay, we're hoping to redirect users to the market to purchase if we detect they've pirated. Apr 16 16:34:32 canadiancow, thanks mate, but I'm still confused that activity can run code while paused Apr 16 16:34:52 Leeds: i've got my app installed on 3 phones non-market and it hasn't shown up. Is that an edge case or? Apr 16 16:34:56 rofl Apr 16 16:35:01 in particular, with one of the games in one of the humble bundles, which it showed was PURCHASED - although I hadn't bought it from the market - and available for update - which always failed when it tried Apr 16 16:35:16 odd Apr 16 16:35:34 I guess they used the same package name for the HB build, and the market got confused Apr 16 16:35:36 Leeds: Okay, good to know this is an issue Apr 16 16:35:40 that reminds me. i need to see if amazon accepted my app yet. Apr 16 16:35:42 signed with the same key, etc Apr 16 16:36:14 aLeSD: incidentally, I wasn't joking :) http://www.xtc.com.hk/ Apr 16 16:36:15 So are there any other ways round being able to let the user purchase the app from the market if they've got a pirate version installed? Apr 16 16:36:57 My own apps show up as installed in market, even tho it's only ever been pushed from my ide Apr 16 16:37:16 SimonVT: weird. I've never seen this happen with mine Apr 16 16:37:25 my active installs reflect the amount of market downloads Apr 16 16:37:31 SimonVT: the problem I had was that I hadn't bought it from the market - I'd bought it elsewhere - so updates failed because the market servers wouldn't let me download it Apr 16 16:37:57 * readme got his first cancelled order today :| Apr 16 16:37:58 Leeds, you remembered me that I have to be reach soon and strike my PC on the wall Apr 16 16:38:12 theneb: unless your app is already very popular, or there's something specific about it which makes you think pirates will target it... maybe take some crude precautions, but don't let them waste your time Apr 16 16:38:25 anyone with paid apps, what % is usually cancellation for you Apr 16 16:38:52 1%-ish Apr 16 16:38:54 10 people bought my app in 2 month than I put it free Apr 16 16:38:58 Leeds: We've taking all the certain precautions in terms of protection. We're just looking for an easy click option for people to legitimetely purchase if they have already pirated it Apr 16 16:39:15 Someone sent me an email the other day.. "someone hacked my market account and bought apps, including yours. It was my moms credit card and she is freaking out, can I please have a refund" Apr 16 16:39:18 theneb: they uninstall the app, then go to the market and buy it Apr 16 16:39:35 SimonVT: lol. i assume you gave the refund Apr 16 16:39:47 Yeah Apr 16 16:39:48 Leeds: Looks like the only option. Unless I can remove the app for them ;) Apr 16 16:39:52 Lol'd a bit, then refunded Apr 16 16:40:00 But that'll go against the ethos Apr 16 16:41:46 what's happens here http://pastebin.com/WCcAaG4x is that I get the overlayitem thrown off to a totally different location than I am and after I leave the activity the toast (on line 42) keeps appearing infinitely Apr 16 16:42:19 most of this is boilerplate from the example on d.android Apr 16 16:43:35 SimonVT: what is your app? Apr 16 16:43:59 Sicp: you are calling the Toast from your onLocationChanged, so it will be called as long as you haven't unregistered your LocationListener Apr 16 16:44:42 if you don't want to see the toast, you need to unregister it in onPause or at least throw a boolean around it to exclude it when the activity is not showing Apr 16 16:44:58 but the Location stuff should all be moved into a Service, if you're going to use it in the bg. Apr 16 16:45:22 override onPause() Apr 16 16:45:29 why would I want to do that though? a service just for this activity? Apr 16 16:46:13 I don't know the actual technical details of why one shouldn't leave an Activity hanging around for a background task. What I do know is that is not what the documentation says to do. Apr 16 16:46:48 I was asking about turning the location finding into a service Apr 16 16:46:52 not overkill? Apr 16 16:47:09 if you're going to use the location outside of the activity Apr 16 16:47:12 then put it in a service. Apr 16 16:47:22 I am not Apr 16 16:47:34 well, just register it in onResume and unregister it in onPause, then. Apr 16 16:47:36 it's only for this activity, I just want to track down the location of the phone Apr 16 16:52:00 apparently, the onLocationChanged() is always working..so when I send it off to go there it never comes back until I leave the activity Apr 16 16:53:12 readme: my cancellation is around 30% for my 2 themes Apr 16 16:53:27 wongk: ah, thanks Apr 16 16:53:50 does anyone know how to log into the amazon android seller portal... I signed up, uploaded my app, and now for the life of me I cannot find that portal again. Apr 16 16:54:30 readme: they should have provided a link in the email notification Apr 16 16:54:33 developer.amazon.com Apr 16 16:54:43 Long shot, is it possible to launch an activity to prompt the user to uninstall an app? Apr 16 16:55:08 wongk: ++ excellent, thanks Apr 16 16:55:11 theneb: yes Apr 16 16:55:23 evancharlton: Example? Apr 16 16:55:46 http://stackoverflow.com/questions/7868460/implicit-intent-to-uninstall-application Apr 16 16:55:46 QubeZ: dunno, I was looking through my email and didn't find it Apr 16 16:55:50 theneb: ten seconds on Google Apr 16 16:56:03 evancharlton: gets mixed with lots of android howtos Apr 16 16:56:46 EXCUSES Apr 16 16:56:57 10 SEARCH GOOGLE Apr 16 16:56:59 20 FIND ANSWER Apr 16 16:57:02 30 GOTO 10 Apr 16 16:57:30 ... aren't you looking for an Android how-to? :) Apr 16 16:58:47 take your basic and gtfo! Apr 16 16:58:55 ;) Apr 16 16:58:58 lov: Your loop sucks. It just does the same thing over and over. Apr 16 16:59:10 (behold my mighty code analysis!) Apr 16 16:59:22 If he already found the answer, why would he search again Apr 16 16:59:29 That's just bad design Apr 16 16:59:34 21 IF(FOUND) RETURN ANSWER Apr 16 16:59:35 Or perhaps it's a DOS attack. Apr 16 16:59:37 fixed Apr 16 16:59:43 There you go Apr 16 16:59:48 SimonVT: to answer that very question! Apr 16 16:59:51 22 REPHRASE QUERY Apr 16 17:00:08 i found the answer, why search again? google "why search again?" -> loop Apr 16 17:00:18 search for "recursion" on google Apr 16 17:00:19 stack overflow Apr 16 17:01:16 can I have multiple instances of the same fragment object in an activity. for a nested list, for example. Apr 16 17:02:33 it looks like its inflating the view for the 2nd instance, but then calling onActivityCreated on the first one again. Apr 16 17:02:43 A list in a list? Apr 16 17:02:47 But yeah, you can Apr 16 17:03:01 a list, then when you click it, slides out anothe fragment with the sub list items Apr 16 17:03:07 They're completely separate objects Apr 16 17:03:22 yeah, i'm new()'ing it. Apr 16 17:04:37 yo dawg, i herd u liek lists Apr 16 17:24:32 how to keep wifi or 3g connection for my service when phone screen is off? Apr 16 17:25:00 hmm. yup, fragmentTransation.add(R.id.here, newInstanceofFragment); is inflating into the right fragment, but then is calling onActivityCreated on a previously added fragment... any ideas? Apr 16 17:25:52 hmm. yup, fragmentTransation.add(R.id.here, newInstanceofFragment); is inflating into the specified viewgroup, but then is calling onActivityCreated on a previously added fragment in a different viewgroup... any ideas? Apr 16 17:25:57 Is it possible to do a "in-app" share like Gallery does in ICS? The different alternatives are shown directly from the share action inside the app. Apr 16 17:26:32 pakerfeldt: ShareActionProvider Apr 16 17:26:39 SimonVT: ty! Apr 16 17:37:15 crap, I see what's happening. It's all one merged view once it's attached to the activity, duh. Apr 16 17:42:33 getView().findViewById() vs. getActivity().findViewById() Apr 16 17:43:11 speak of this to no one. Apr 16 17:45:25 this code, http://pastebin.com/hiCrVUKJ keeps producing this -> http://dl.dropbox.com/u/19390574/log.txt in the LogCat as long as the activity is running Apr 16 17:46:17 and why would removing lines 47 to 63 cause the app to crash if nothing inside is implemented? Apr 16 17:46:42 ah, nevermind the 2nd question, just the first Apr 16 17:46:44 :\ Apr 16 17:51:18 sicp: maybe decode the resource once and not in draw() Apr 16 17:51:54 How can I put resource files into another APK and use it from there? Apr 16 17:52:03 or basically, how do you do it to split the package size ? Apr 16 17:52:09 how do i inport such things into eclipse as import com.google.android.gtalkservice.IChatListener; Apr 16 17:52:39 dominicdinada, requires the google API prolly? Apr 16 17:52:49 ok ty :P Apr 16 17:56:08 Sicp: that's the garbage collector. it's running because you're creating objects constantly and throwing the references away Apr 16 17:56:21 it uses reference counting Apr 16 17:56:45 it is not "wrong" to have it keep working like that? Apr 16 17:56:52 when an object has no more references or only weak references, it can be collected. Apr 16 17:57:02 Sicp: if you see the GC running constantly yeah it's not a very good solution Apr 16 17:57:06 try not to create so many objects Apr 16 17:57:11 try reusing some Apr 16 17:57:39 are you sure its' your app that's causing it? Apr 16 17:58:07 yes Apr 16 17:58:13 it happens when I access that activity Apr 16 17:58:41 readme, if you make a game on android, and you want the resources to be outside the APK (so the apk itself is small) how would you handle this? Apr 16 17:59:05 I don't know Apr 16 17:59:09 :( Apr 16 17:59:25 Insayne: why would you do this? Apr 16 17:59:33 Sicp: my guess is on either draw() or CountDownTimer Apr 16 17:59:35 mess with those Apr 16 18:00:09 ctate, like most games, to have a small apk - so older phones that can run it, but dont have 40MB of freespace can install it, content then goes to the SD Card or into another APK thats on SD Card Apr 16 18:00:27 thus, the code is in a 2-3MB APK, and the resources are in the 30MB APK Apr 16 18:00:40 http://developer.android.com/guide/market/expansion-files.html Apr 16 18:00:42 Insayne: ^ Apr 16 18:00:50 fwiw, the answer is to use the expansion files infrastructure: http://android-developers.blogspot.com/2012/03/android-apps-break-50mb-barrier.html Apr 16 18:00:54 evancharlton, before i read it all, and I will Apr 16 18:01:07 start with the blog post i linked, then the formal docs that evancharlton linked Apr 16 18:01:11 i can check and require the 2nd apk, right ? Apr 16 18:01:28 It's not an apk Apr 16 18:01:48 Insayne: yes Apr 16 18:01:52 hrm Apr 16 18:01:58 and it's not an apk; it's essentially a zip archive Apr 16 18:02:02 so its a zip? Apr 16 18:02:03 awesome Apr 16 18:02:17 and how can I test this on the emulator ? Apr 16 18:02:21 it's whatever you want it to be Apr 16 18:02:44 and how do you access files from within ? Apr 16 18:02:51 Insayne: RTFM :) Apr 16 18:02:58 Insayne: you can't test it on the emulator Apr 16 18:03:00 ah its in there Apr 16 18:03:03 i just got it Apr 16 18:03:06 and on a real phone ? Apr 16 18:03:23 it goes through Market so it works on any compatible retail device Apr 16 18:03:37 (just not on the emulator because the SDK isn't shipped with Market) Apr 16 18:03:40 Insayne: dude, RTFM: http://developer.android.com/guide/market/expansion-files.html#Testing Apr 16 18:03:45 but ==evancharlton :) Apr 16 18:03:47 s/Market/Play Store/ Apr 16 18:04:23 how to prevent loosing internet connection on screen lock? Apr 16 18:04:34 *losing Apr 16 18:05:09 stiggpwnz, its a setting on your phone - settings, wifi, sleep policy Apr 16 18:05:55 Insayne, wow, and what about 3g? I haven't really tested my app with it Apr 16 18:06:22 stiggpwnz: wifi is dropped after some period of inactivity (typically ~ 15 minutes, but selectable and it varies by handset) to save power Apr 16 18:06:23 3G works the same I think - not sure Apr 16 18:06:28 you shouldn't drop 3G when your screen turns off Apr 16 18:06:29 3G is never dropped in that way Apr 16 18:06:51 you can set wifi to always on though Apr 16 18:06:56 in generally you must assume that you can lose internet connectivity at any time Apr 16 18:07:00 the radio have 3 different states though Apr 16 18:07:08 has Apr 16 18:07:08 Insayne: why do you hate battery life? :) Apr 16 18:07:12 thanks guys Apr 16 18:07:32 ctate, my nexus, with wifi constantly on, lasts me 2 days without charge Apr 16 18:07:36 it's fine now, readme Apr 16 18:07:37 so, i dont really give a damn :P Apr 16 18:07:44 plus, y'know, your user could wander into the basement and then you kiss your connection goodbye, whether wifi or cell Apr 16 18:07:56 When are they going to invent a battery that charges itself using the energy from your gait when you walk? Apr 16 18:08:07 oh, i wasn't forcing wifi always on from an app or anything Apr 16 18:08:12 readme: it wouldn't help much Apr 16 18:08:26 it's fine for very low power devices like analogue wristwatches Apr 16 18:09:02 wow, is there a way to force wifi stay alive while my service is alive? Apr 16 18:09:12 read about WifiLock Apr 16 18:09:20 there shouldn't be Apr 16 18:09:26 wongk: ORLY Apr 16 18:09:41 imo Apr 16 18:09:54 wongk = wrongk Apr 16 18:10:11 it's a good thing your opinion doesn't matter when it comes to APIs, then :P Apr 16 18:10:14 (I kid, I kid) Apr 16 18:10:20 * abaratican doesn't kid. Apr 16 18:11:29 readme, I have a function in that activity that enables GPS after setContentView; but with or without it I am able to get the location and the pin is showing Apr 16 18:11:38 it has nothing to do with that, right? It always keeps setting that pin Apr 16 18:11:47 from lastKnownLocation? Apr 16 18:11:49 Sicp: i don't really follow Apr 16 18:12:04 to get locations you need to register a LocationListener.. Apr 16 18:12:05 which you did Apr 16 18:12:09 Is there a guide for seamless transition to a larger capacity or higher class microSD card ?, I'm also unsure if their are any extensions which are using ext4 ATM which i'm concerned about because they don't show up in older linux distributions . And fdisk -l isn't working in terminal on the device as well for some reason. Apr 16 18:12:11 what is it that you're trying to do and can't do? Apr 16 18:12:24 sicp: are you still trying to fix the GC? Apr 16 18:12:26 I need the phone to have GPS enabled to do what Im doing in that activity, right? Apr 16 18:12:29 Oh right Apr 16 18:12:32 we were on the GC issues. Apr 16 18:12:35 no smit Apr 16 18:12:38 XDS2010_: this is #android-dev, but just cp -R Apr 16 18:12:39 I fixed that Apr 16 18:12:44 Sicp: yes, GPS must be enabled Apr 16 18:12:51 sicp: was it the bitmap decode? :) Apr 16 18:12:54 you should read the doc on how to prompt the user to turn it on if necessary. Apr 16 18:13:01 no it was the Point creation Apr 16 18:13:07 booo Apr 16 18:13:08 heh Apr 16 18:13:09 alright but even when it isn't enabled I still get that pin showing that I am where I am Apr 16 18:13:19 is the network location enabled? Apr 16 18:13:28 yea Apr 16 18:13:37 did you register for updates from the network provider? Apr 16 18:14:08 network *i think* is just GPS via approximation from known wifi nodes. Apr 16 18:14:11 one moment Apr 16 18:14:14 want to test something Apr 16 18:15:37 Gentlemen! how could this: "new SimpleCursorAdapter(this, R.layout.item, cursor, new String[] { cursor.getColumnName(1) }, new int [] {R.id.x})" - fail complaining that there is no coulmn name "qqq" ? Apr 16 18:16:20 alright, well, whatever..tomorrow it will be tested anyways and I will find it Apr 16 18:16:23 find out* Apr 16 18:16:30 for now, I will keep enableGPS() Apr 16 18:16:46 what about getting the location of "wu.ourproject.org" for example and setting that on the map? ;) Apr 16 18:17:00 vovkav: are you asking for "qqq" in your projection map? Apr 16 18:17:53 I asked someone from Google Maps dev team about that and she said that there was a method that takes a string and returns the location Apr 16 18:18:03 geocoding or somewhat or other Apr 16 18:18:07 yes, Geocoding Apr 16 18:18:24 a Geocoder object? Apr 16 18:18:32 instead of Geopoint Apr 16 18:18:34 evancharlton: I am asking the name of the first column in cursor:"cursor.getColumnName(1)" - it happens to be "qqq" (as example) - and fails Apr 16 18:21:30 Perhaps there is no column named 'qqq' :) Apr 16 18:21:46 [that is: are you certain the database & tables etc have actually been created successfully at this point?] Apr 16 18:23:37 every table has a column nmed qqq Apr 16 18:23:42 it's where the metadata is stored Apr 16 18:24:45 ctate: how could the column with the name=crusor.getColumnName(1) not be a cursor column? Apr 16 18:26:10 aliens Apr 16 18:26:45 or do i get somothing wrong about getColumnName, cursors and adapters? Apr 16 18:27:29 mikedg: sigh Apr 16 18:27:33 oh good point vovkav Apr 16 18:28:56 vovkav: you are aware that the column indexes are zero based, right Apr 16 18:30:17 readme: yes, but it's irrelevant in the example above - cursor should have an _id and at least one data column - as is the case Apr 16 18:37:35 vovkav: does your cursor reference ever change to point to another cursor? Apr 16 18:39:58 readme: it's the same cursor - that is given as an argument and that is asked about it's columns - in a single constructor call Apr 16 18:40:26 vovkav: i was just wondering if maybe another thread was changing the cursor reference. Apr 16 18:40:36 i don't think that constructor call and object creations nested inside it are atomic. Apr 16 18:41:22 ALIENS?!? Apr 16 18:41:53 aliens in my android emulator ;) Apr 16 18:46:12 Trying to debug an apk without source code. Any way to monitor potential messages it generates via LogCat? Apr 16 18:46:15 I'm making a BT file transfer program, but the receiving end always force closes if the file is larger than 204 KiB. I tried sending a file exactly 204 KiB in size and sent the full file but closed immediately afterwards. There was also an error at one point in the file so I'm assuming it crashed before it could do error checking. Apr 16 18:47:13 panda81: adb logcat Apr 16 18:47:30 adb logcat -v threadtime Apr 16 18:47:34 the default is not so useful :( Apr 16 18:49:55 adb longcat Apr 16 18:50:26 * readme was hoping for an easter egg Apr 16 18:50:35 there is at least 'adb lolcat' Apr 16 18:50:50 same effect as logcat :)? Apr 16 18:51:15 no one thought of dogcat eh Apr 16 18:52:25 loldog? Apr 16 18:55:47 yea Apr 16 18:55:49 like lolcat Apr 16 19:07:46 So when's google docs going to support syntax highlighting and vi-like bindings, then? Apr 16 19:08:03 its google docs, not google latex Apr 16 19:08:14 it's google Apr 16 19:08:40 when does google ever get anything right? Apr 16 19:08:44 lol Apr 16 19:08:47 yea.. Apr 16 19:09:00 vi-like bindings Apr 16 19:09:43 Use Vimperator or something for your browser? Apr 16 19:09:52 Or access google docs using Uzbl Apr 16 19:10:04 Gumboot: ... when did MS Word start supporting those things? :) Apr 16 19:10:28 it'd be awesome if it ever did... Apr 16 19:10:43 one day, I'd like to learn to write documents in latex Apr 16 19:10:44 what the fuck for anyway! Apr 16 19:10:45 http://blog.milford.io/2010/06/sweet-use-vim-with-google-docs/ Apr 16 19:10:52 but I've said that for the last 20 years almost... Apr 16 19:11:08 ctate: MS Word is probably old enough that some nutter's given it a go. Apr 16 19:11:30 Is crap like that possible? I don't know. I rarely use Word. Apr 16 19:11:39 http://dready.org/projects/viWord/ Apr 16 19:11:51 Someone can help me?... My apps work with one activity and somes fragments. How can I call and show a fragment from another one Apr 16 19:12:01 Internet search engines are really something, huh? Apr 16 19:12:29 if I'm new to the internet, how do I search for a search engine to search for stuff? Apr 16 19:12:38 ctate: There you have it. Rhetorical question gets answer. You've basically PROMISED that google will do it, now. Apr 16 19:13:03 hmm, nice Apr 16 19:13:08 google command line tool Apr 16 19:13:09 Gumboot: get cracking! http://code.google.com/chrome/extensions/getstarted.html Apr 16 19:13:18 ahahah.... -.- If I'm there, it's because I have try the search engines and I didn't find anything... Apr 16 19:14:04 Gumboot: i see no syntax highlighting there :) Apr 16 19:14:08 key bindings are the easy part Apr 16 19:17:58 does anybody have a good tutorial link about making a splash screen using the alerg dialog ? Apr 16 19:18:14 I think this is one: http://www.codeproject.com/Articles/14160/A-Word-add-in-to-syntax-highlight-selected-text Apr 16 19:18:48 dominicdinada, try this http://blog.iangclifton.com/2011/01/01/android-splash-screens-done-right/ Apr 16 19:19:09 dominicdinada: why do that instead of just drawing the splash as your main activity's layout, doing your initialization, then setting the main layout? Apr 16 19:19:38 if you must use a dialog i suppose this is a reasonable way Apr 16 19:19:40 Sicp: i think i read that one i made a fullscreen splash now i am trying an alert dialog splash Apr 16 19:19:42 but ew :) Apr 16 19:19:55 Splash screen, ew Apr 16 19:19:56 have you considered not having a splash screen at all? :) Apr 16 19:20:00 hi, which permissions do I need to add to my app to have access to /dev/msm_vidc_dec ? Apr 16 19:20:30 pespin: You cannot have direct access to that, not in any portable way Apr 16 19:20:44 is there an easy way to recover a vector of float from a file ? I have it in an .h and I can't define it static cause excedes the 65K limit Apr 16 19:20:50 ctate, so... no way to access hw decs? Apr 16 19:20:53 yes :) but a splashscreen like layout has many purposes one being forced ads such as the guy who did the virtualdj app Apr 16 19:20:54 correct Apr 16 19:21:18 plus, of course, note the "msm" in the name you quoted: that means that device node only exists on a small minority of Android devices in the first place Apr 16 19:21:19 ctate, I'm trying to use OpenMAXIL shared libs when posible Apr 16 19:21:35 simular to words with friends but those are full screen :/ Apr 16 19:21:37 that open of /dev/msm_vidc_dec comes from OMX_GetHandle() Apr 16 19:21:45 on MSM hardware it does Apr 16 19:21:50 on non-MSM hardware, that does something else :) Apr 16 19:21:57 ctate, I know Apr 16 19:22:24 ctate, I need hw accel Apr 16 19:22:26 I would've thought that a blog post on "Android Spash Screens Done Right" would just have three words: Don't do it. Apr 16 19:22:31 for decoding Apr 16 19:22:36 <[twisti]> Note: Java 1.7 is currently problematic in combination with Android. Please make sure your project uses Java 1.6 <- i saw this in a programming tutorial, is that still the case ? Apr 16 19:22:46 evancharlton: to each their own Apr 16 19:23:19 but the point is missed a "SplashScreen" yes it is a splash but may apps now have forced full screen or dialog sized ads Apr 16 19:23:24 same concept Apr 16 19:23:26 ctate, any idea on how to achieve that? Apr 16 19:23:31 dominicdinada: good reason not to run those apps Apr 16 19:23:53 pespin: like i said: if the platform isn't giving it to you automatically through the public APIs, then you're out of luck. from an app you cannot get direct access to video encode/decode. Apr 16 19:24:09 funny 100 million ppl play scable scramble and words with friends Apr 16 19:24:25 dominicdinada: (i personally dislike it intensely when an app's first interaction with me is to force me to wait a bit before i can use the app) Apr 16 19:24:29 and those who dont want ads well there phones are rooted Apr 16 19:24:39 ctate, even if there is loading involved? Apr 16 19:24:44 scrable* Apr 16 19:24:52 e.g. fetching remote data Apr 16 19:24:54 pfn: different case. show me a progress bar and i'm happy. Apr 16 19:25:05 if you have to fetch remote data more than once then i'll take a dim view though :) Apr 16 19:26:13 Depends on how much loading Apr 16 19:26:39 angry birds splash screen lol all these apps most popular and all have such things anyhow its not a debate it has many purposes and i asked how to alert splash not if i should or not Apr 16 19:26:56 ctate: random Q for you that you can easily say "not my dept" on, and which is only vaguely on topic... any idea what would control the timezone the calendar thinks its in on android? My wifes phone is set to EST (proper), her calendar under the web access is set to east coast, but it acts 5-6 hours off, making me suspect its behaving as if it's GMT. This has persisted over multiple phones. Apr 16 19:27:06 Angry Birds splash screen is tap-dismissable, fortunately Apr 16 19:27:15 then there's hte loading screen, which irritatingly does not show progress Apr 16 19:27:28 lol Apr 16 19:27:53 dragorn: hm yeah, that does sound like GMT. i dunno how the calendar handles times; not my department. :) Apr 16 19:27:55 dragorn: the time zone should be getting set by the carrier. What is the calendar on the device? Is it aosp or some jerkoff carrier app? Apr 16 19:28:12 lov: It's persisted from the droid1, which was pretty much aosp Apr 16 19:28:21 lov: up through motorola jerkoff land on the droid3 Apr 16 19:28:26 heh Apr 16 19:28:30 lov: on a phone which didn't exhibit the problem on my account Apr 16 19:28:37 oh hmm. Apr 16 19:28:46 which makes me think it's got to be a setting in the google calendar, but we checked all her calendars and its set to eastern Apr 16 19:28:48 it's very odd Apr 16 19:28:51 This is a Google account calendar? Apr 16 19:28:53 yeah Apr 16 19:28:59 Yeah, it sounds an awful lot like it's some sort of setting Apr 16 19:29:05 especially if different users cause different behavior Apr 16 19:29:18 it's so odd I've, over the last few years of trying, exhausted just about everything and am reduced to hassling googlers who don't work in the calendar dept :P Apr 16 19:29:20 speaking of loading screen, on line 44 of this code http://pastebin.com/PfDBbBLQ the loader doesn't spin with that line there Apr 16 19:29:31 do the calendar things look wrong when viewed in a desktop google calendar page, not just on device? or are they wrong only on device? Apr 16 19:29:32 Settings -> Date/Time controls what the device thinks the time/timezone is Apr 16 19:29:39 and if its removed it spins but well it just doesn't do what I want it to do in that line Apr 16 19:29:42 if that looks correct, then there's a bug in the app or in the backend Apr 16 19:29:51 lov: yeah, the device thinks it's in eastern Apr 16 19:30:47 Sicp: does line 8 there even compile? you're constructing an AsyncTask but not assigning it to a variable? Apr 16 19:31:02 oh no this is part of my code, the code is huge Apr 16 19:31:39 it's just that the loading thing doesn't spin, but it does show and when its done i am where I want to be Apr 16 19:31:43 just doesn't spin Apr 16 19:31:44 Sicp: so should that read something like "AsyncTask task = ...." ? Apr 16 19:31:45 <[twisti]> ctate: did you read it wrong ? Apr 16 19:31:46 <[twisti]> AsyncTask task = new AsyncTask() Apr 16 19:31:54 <[twisti]> it looks perfectly fine Apr 16 19:31:59 oh oh yeah i missed that, doink Apr 16 19:32:42 poit Apr 16 19:32:52 narf Apr 16 19:32:53 hm. well, this asynctask is doing a small amount of very fast work Apr 16 19:33:00 so it probably finishes before you think Apr 16 19:33:09 there's a considerable time that I wait Apr 16 19:33:22 it would still spin for a half-second even Apr 16 19:33:24 why is this even an AsyncTask? nothing here is slow / blocking Apr 16 19:34:17 alright, I will change that, but what about the loader? Apr 16 19:34:28 you show a dialog (which is an asynchronous operation itself; that returns immediately and the dialog will be displayed later), then create an intent and populate it, then start a service Apr 16 19:34:34 there's no loader here. Apr 16 19:34:38 if that line on 48 is removed it spins but does not do what I want it to do (to start the service) Apr 16 19:35:10 *what* spins? Apr 16 19:35:18 the progress dialog? Apr 16 19:35:23 yes Apr 16 19:35:26 it Apr 16 19:35:30 *it* spins Apr 16 19:35:36 * lov points Apr 16 19:35:39 *them!* Apr 16 19:35:53 i need my laptop back :( Apr 16 19:35:55 so what does the service do when it starts? does it close the dialog, or put up some other activity? Apr 16 19:36:30 with NotificationCompat, can you display a largeicon pre 3.0? Apr 16 19:36:48 it starts the connection service which SSH's to the desired server Apr 16 19:36:56 canadiancow|web: that'll teach you to take it apart Apr 16 19:37:14 pragma-: i didnt, IT did Apr 16 19:37:23 now im on my chromebook Apr 16 19:37:29 never thought this would be useful Apr 16 19:37:36 the user clicks on the user account and enters their password, upon which the progress dialog appears and the connection is established to the server using the user's credentials; when that's successful the user is dropped into the main activity Apr 16 19:37:40 Sicp: when is the dialog dismissed? Apr 16 19:38:01 I'm having trouble making my android table look nice...I tried stretching the columns but it does look good...any ideas how I can get this table to look nice? Apr 16 19:38:12 it's possible the connection is happening fast enough that the dialog is simply never shown Apr 16 19:38:34 it shows, the dialog shows but the little spinning circle inside it doesn't move Apr 16 19:39:03 ahh interesting Apr 16 19:39:12 i wonder whether you're doing something that blocks the UI thread Apr 16 19:39:25 becuase that has to be running smoothly for the animation to step Apr 16 19:40:08 the progress dialog I'm talking about is in an asynctask Apr 16 19:40:13 nope Apr 16 19:40:15 :) Apr 16 19:40:22 dialog != asynctask Apr 16 19:40:32 it may be shown* from an AsyncTask, but that's just bookkeeping Apr 16 19:40:48 yea otherwise it wouldn't have appeared on the screen to begin with Apr 16 19:41:28 hi all Apr 16 19:41:38 vibration is really soft on my phone, any idea on where I can edit vibration values? or something like that Apr 16 19:41:52 I'm using a custom ROM with a custom kernel Apr 16 19:42:09 bash`: probably you can't, and that's just the way the hardware is Apr 16 19:42:13 bash`: #android-root would probably be your best resource Apr 16 19:42:16 bash`: if it's changeable anyhow Apr 16 19:42:19 (that is the limiting factor on most phones) Apr 16 19:43:04 the rom I installed is 4.0.4, if I back to 2.3.6 then vibration level is ok Apr 16 19:43:13 so I guess isn't related to the hw Apr 16 19:43:23 I'll ask in android-root anyway Apr 16 19:43:24 thank youi Apr 16 19:43:32 What is that technology called where phones are used to pay in stores? They have some chip inside. I think googles nexus has such a chip. Apr 16 19:43:51 NFC Apr 16 19:44:01 how do layout_weights work in android? Apr 16 19:44:45 does GPU emulation work for gingerbread AVDs? Apr 16 19:45:23 john_doe_jr: reasonably well. Read the docs :> Apr 16 19:45:51 lov: read http://stackoverflow.com/questions/3995825/what-does-androidlayout-weight-mean but don't understand it Apr 16 19:46:29 john_doe_jr: make a layout and try it. it's easier to understand if you use it Apr 16 19:46:56 put two buttons inside a linearlayout and set the orientation to vertical, set the height of both buttons to 0dp and the layout_weight of the first to 1, and second to 2. Apr 16 19:47:05 see the preview then play with the weights. Apr 16 19:47:17 i bet pen will be happy, new version of stable scala :) Apr 16 19:47:20 *pfn Apr 16 19:47:51 readme: alright Apr 16 19:48:48 * readme is nervous because his old bank account is stuck in google checkout and it cant be changed until google returns my email. Apr 16 19:49:10 is it possible to use admob in a widget ? Apr 16 19:49:24 anybody know licenses here? Apr 16 19:49:27 elec29a:no, admob is broken. Apr 16 19:49:55 if a software is open sourced under say GPLv3 and I use it in my own project, I cannot then close-source it Apr 16 19:50:06 g00s, I don't really care mostly, I'm using 2.8.2 currently Apr 16 19:50:08 Sicp: correct. Apr 16 19:50:11 2.10 sounds interesting when it comes out Apr 16 19:50:19 alright..and so let's take Nmap for Android from WJHolden Apr 16 19:50:24 :P Apr 16 19:50:35 Sicp: if he is simply opening a pipe to android, that doesnt' count as a change Apr 16 19:50:40 s/android/nmap/ Apr 16 19:50:46 it's probably just some IPC code Apr 16 19:51:05 ah, here we go, their GPL Apr 16 19:51:17 depends on how you use it within your project Apr 16 19:51:21 it's GPLv3 :) so I can use it happily in my app without worrying, I'm under AGPL Apr 16 19:51:27 for gplv2, derivative works have an at-arms-length clause Apr 16 19:51:32 that is not how it works, Sicp Apr 16 19:51:45 * pfn has never bothered reading gplv3 Apr 16 19:51:45 well, i guess it may mean you don' thave to switch from AGPL to GPL3 Apr 16 19:51:53 brrr Apr 16 19:52:12 I've also attributed the source right back to them Apr 16 19:52:45 just do what it says in the license Apr 16 19:52:48 alright I'm still not understanding what layout_weight is doing (even though I have a test.xml file and I'm playing around with it). Apr 16 19:52:52 Sicp: what app did you make Apr 16 19:53:04 john_doe_jr: it's like a fraction. Apr 16 19:53:11 you understand fractions, right Apr 16 19:53:14 john_doe_jr: fixed-size elements are placed, then the weights are considered for purposes of calculating the sizes of the remaining elements Apr 16 19:53:16 brb call Apr 16 19:53:21 hmm... coders debating copyright/contract law.... methinks in this sort of thing a quick consultation with a lawyer/your company's legal might prevent some hurt down the line especially with weird/ambiguous license mixes Apr 16 19:53:40 or more easily you could try and get in contact with the author of the component, if possible Apr 16 19:53:46 the weights are all added together, then each variable item gets a proportion of the total width equal to (its own weight) / (sum of all weights) Apr 16 19:53:49 I'm just a student though Apr 16 19:53:49 I'm trying to figure out how to disable the history feature in ShareActionProvider. Is that possible? Apr 16 19:53:54 gpl3 is buuhhhhroken. Apr 16 19:53:54 "have mercy!" I will say Apr 16 19:53:58 Sicp: that's irrelevant Apr 16 19:54:02 do extra research on it Apr 16 19:54:13 I don't recall if gpl3 can coexist with agpl. I know it can't coexist with gpl2. Apr 16 19:54:38 and they will laugh mercilessly as they bankrupt your parents if you're in high school and you if you're not Apr 16 19:54:42 and a gpl2 binary can't be distributed with gpl3 libraries (string of obscenties here) Apr 16 19:54:43 it's possible you will have to switch to using GPLv3 if you include code that is itself GPLv3. I'm not a lawyer; i do not know details. Apr 16 19:55:09 AGPL IS GPLv3 Apr 16 19:55:10 or, more likely a Cease and Desist Apr 16 19:55:42 "By contrast, GPLv3 and AGPLv3 each include clauses (in section 13 of each license) that together achieve a form of mutual compatibility for the two licenses." Apr 16 19:56:14 yeah, it looks like the FSF at least wants them to be compatible Apr 16 19:56:33 AGPL3 is more restrictive? i think? Apr 16 19:56:41 You school may have a lawyer you can consult with as well Apr 16 19:56:45 Your, even Apr 16 19:57:08 ctate: that would be my 30-second armchair reading too, that AGL is GPL3 + network service clause Apr 16 19:57:17 yeah Apr 16 19:57:27 i mean, it's pretty clear that the FSF *wanted* them to be compatible like that Apr 16 19:57:43 but of course intention is irrelevant; it's only what the license actually *says* that matters, and that's very much a matter for lawyers Apr 16 19:57:55 GPLs are notoriously inaccurately written. Apr 16 19:58:26 If I do a FragmentTransaction.replace() and a commit(), is it enough to show a fragment already created? (Because it doens't do anything Apr 16 19:58:33 nice Apr 16 19:58:50 I click the 'Learn more' button and it sends me to google's 404 page Apr 16 19:59:08 Fortunately, MOST of the problems with the GPL stem from blatant mis-use, and PROBABLY all you'll get is a nastygram and maybe the app pulled from the market, if they complain to google. Most likely you'll get a "figure out how to make this legit please" letter, if anything. Apr 16 19:59:23 Not that I'd encourage you to knowingly mis-use code Apr 16 19:59:43 would you encourage me to unknowingly misuse code? Apr 16 19:59:57 pragma-: Yes. Yes I would. :P Apr 16 20:00:26 * Ge0rG knows of a gpl violating app sold on android market, and the original authors dont care Apr 16 20:00:40 The only problems I've had with GPL licensing messes was when some system libs went to gpl3 and distros complained they couldn't package a binary licensed under gpl2 Apr 16 20:01:03 I decided I didn't want to deal with any of it and just nuked that functionality entirely since it was barely functional anyhow Apr 16 20:01:26 I just slap 'public domain' on my apps and don't worry about it Apr 16 20:01:46 dragorn: unless you end up with anal-retentive lawyermongering, just putting a link in the app to source code should be enough Apr 16 20:02:10 :( Apr 16 20:02:13 I don't think you have to do even that Apr 16 20:02:24 the source just has to be accessible Apr 16 20:02:30 you don't have to make it easy to find Apr 16 20:02:35 p_l: yeah it's only a problem when a) you distribute it under something less permissive (BSD people taking GPL for example) or b) someone whines to the market/distributor Apr 16 20:02:45 p_l: (within the oss/free realm anyhow, as you say) Apr 16 20:03:19 you can just put it on github and let them find it or write you a letter asking you where it is Apr 16 20:03:26 well, the problem with GPL and LGPL without linking exception is that you need to use them as license if you put it on market Apr 16 20:03:46 pragma-: I do some stuff BSD license Apr 16 20:03:46 (well, linking to code licensed under them) Apr 16 20:04:00 pragma-: Other stuff I don't; I've already caught companies running it in commercial boxes w/ their own badge Apr 16 20:04:00 ... and now you all know (part of) why Android is not GPL :) Apr 16 20:04:27 is the absolute path mnt/sdcard/ or /sdcard? DDMS shows the mnt/sdcard/. adb shell shows /sdcard/ Apr 16 20:04:40 panda81: /sdcard should be a symlink Apr 16 20:04:47 ctate: well, there's both the Linking Exception, LGPL, and GPL3's system framework exception ;) Apr 16 20:04:51 panda81: and you should use the API to get the external storage location regardless Apr 16 20:04:58 p_l: nevertheless. Apr 16 20:05:06 but yeah, it's a bloody mess Apr 16 20:05:07 LGPL is actually a huge PITA Apr 16 20:05:51 dragorn: no way to load directly from /sdcard/? Or any visible directory? Apr 16 20:05:56 though it might have forced proprietary bits to be better interfaced (that is, redo "linking definition" as not including that weird text about memory mapped interface) Apr 16 20:06:03 panda81: you can, sure, but it's a brittle approach Apr 16 20:06:24 the mount point of external storage varies by product Apr 16 20:06:30 just ask the framework where to find it Apr 16 20:06:44 panda81: the API will tell you where the external storage is. It's PROBABLY /mnt/sdcard, but sometimes, it won't be Apr 16 20:06:50 http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory() Apr 16 20:06:51 panda81: it can even be /mnt/sdcard/external-sdcard ;) Apr 16 20:07:27 panda81: so if you're trying to sue the sdcard, use the API. INfact on some phones there's /mnt/sdcard and /mnt/sdcard-external and a system prefs option to pick which to use by default; users will not appreciate you changing that Apr 16 20:07:36 s/sue/use/ obviously Apr 16 20:07:53 haha I see. For now, I just care about one device. Apr 16 20:07:59 note that you also cannot rely on e.g. the /data mount point Apr 16 20:08:04 always, always use the APIs. Apr 16 20:09:39 Hi everyone. Any idea why this doesn't cause the virtual keyboard to show up? http://paste.lisp.org/display/128986 Apr 16 20:09:45 FWIW, neither .SHOW_FORCED does Apr 16 20:10:08 panda81: the api is so simple to call you really should just use that, but sure, you COULD hardcode paths if you really insist on it Apr 16 20:10:32 I am trying to set the font size of a textView to be related to the parent's height. I want to use TypedValue.COMPLEX_UNIT_FRACTION_PARENT as the unit type, but I am unable to find what the actual float value should be. I assume it should be .50 for 50%? But, that doesn't seem to work. I guess I'm not sure how to represent a fraction. Apr 16 20:12:36 dragorn: I'm using Adobe Air to convert a sample to Android. The original actionscript code loads file from a local desktop directory. Since Air knows nothing about sdcard/, I'm thinking of supplying the actionscript loading code the absolute path of my files on Android Apr 16 20:16:47 is in-app communication between devices done using TCP/IP? Apr 16 20:18:02 you want a peer to peer connection, or through a central server? Apr 16 20:19:25 wongk: either. do they use different protocols? Apr 16 20:19:59 that's your decision, though I am not sure a peer to peer connection is possible Apr 16 20:20:21 never looked into it Apr 16 20:20:37 wongk: so via central server uses tcp/ip? Apr 16 20:20:42 or can use Apr 16 20:20:49 sure, it can Apr 16 20:21:17 nice Apr 16 20:21:19 thx Apr 16 20:21:42 just have the apps email each other Apr 16 20:23:39 Why something like this: ft.replace(R.id.fiche_fragment, fiche); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); ft.commit(); can't show my fragment! Apr 16 20:23:59 It's really frustrating ...... -.- Apr 16 20:24:23 you added the fragment previously and it was visible? Apr 16 20:25:47 No, it's the first time I want to show it. But before I did: FicheFragment fiche = new FicheFragment(); FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.add(fiche, "ficheTag"); ft.commit(); Apr 16 20:26:00 wongk: could it be done p2p via bluetooth? Apr 16 20:26:19 what you're replacing, was it visible before? Apr 16 20:26:22 diverdude: i don't know, but that is the foundation of Android Beam in 4.0 Apr 16 20:28:16 Nic007: is there something in onCreateView? Apr 16 20:28:43 Yep, View mainView = inflater.inflate(R.layout.fiche, container, false); Apr 16 20:29:26 Nic007: I think your use of add doesn't add it to a container. Apr 16 20:29:39 Nic007: try add(R.id.someplace, fiche, "ficeTag"); Apr 16 20:30:36 Yeah, but it's because I tried to add it at the launch of the activity, I don't want to show it... I'll try, I have nothing to lose Apr 16 20:32:45 Arf, I get this: java.lang.IllegalArgumentException: No view found for id 0x7f030002 for fragment FicheFragment{4115ce00 #2 id=0x7f030002} Apr 16 20:37:43 I have three fragments, so I did one xml file for each fragment with a and I did three others XML files for the layout of the fragment (listview, etc....)... Am I doing it right? Apr 16 20:38:00 you can't programatiicaly add a fragment to a element Apr 16 20:38:04 either or Apr 16 20:38:11 make it a frameview Apr 16 20:38:16 for programatiic adds Apr 16 20:38:21 or use for a static fragment Apr 16 20:42:01 Pffffffffff....! I didn't understand ><' I'll try to find a working full sample (with the xml files, not like the APIdemo.....) Apr 16 20:42:20 I need 3 tables with all kinds of items in each of the 3 main tables...how would I make sure that they were centered? Apr 16 20:43:18 how do you launch the video player on kindle fire? Apr 16 20:44:24 chouman, play a video? Apr 16 20:45:46 j2: sort of, like normally if we want some other app to handle video playing such as watching youtube video we would use Intent(INTENT.ACTION_VIEW, SOME_URI) to launch a native video player Apr 16 20:46:02 that doesn't work on the kindle fire Apr 16 20:46:30 oh gross. Apr 16 20:46:44 (also, note that the Kindle Fire is not officially a compatible device) Apr 16 20:47:24 ctate: it's a bug on my queue that i am trying to knock out Apr 16 20:47:30 =( Apr 16 20:47:42 i certainly understand wanting to do it Apr 16 20:47:45 you might need to ask Amazon Apr 16 20:48:10 yea been trying to search on the web but seems like no one ran into this problem Apr 16 20:49:07 youtube videos are in flv format right? Apr 16 20:51:00 why can't I see my bound service in "running services" list? Apr 16 20:51:26 chouman: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs Apr 16 20:52:07 Frikish: thanks Apr 16 20:52:19 np Apr 16 20:53:21 yup kindle fire doesn't support playing flv... i think it uses some remote service to convert it on demand... since i see some MPEG4Extractor running when i try to watch youtube stuff on it Apr 16 20:53:58 I'm trying to compile ABS(ActionbarSherlock) for devices pre 3.0.. But I dont see where I'm am doing it wrong, Is there anything spesific I should add, subtract from my code? :) Apr 16 20:54:17 your error is? Apr 16 20:54:27 "not compatible" xD Apr 16 20:54:36 Having a device running 4.0 and one 2.3 Apr 16 20:54:52 I compile it with 4.0.3 goog api. Apr 16 20:55:00 google* Apr 16 20:55:14 And ABS with android 4.03 Apr 16 20:55:26 where does one get a "not compatible" error? Apr 16 20:55:29 paging JakeWharton :) Apr 16 20:55:38 yes Apr 16 20:55:44 how can I be of assistance? Apr 16 20:56:00 Anyone here use Android X86 for debugging? Apr 16 20:56:10 I can get my app to launch, but I can't get a debugger connection. Apr 16 20:56:10 Compiling the ABS for pre 3.0.. Cant seem to get it to work. Apr 16 20:56:20 you have to compile with Android 4.0 Apr 16 20:56:27 your minSdk can still be as low as 7 Apr 16 20:56:30 I compile ABS with 4.0.3 and and my app with 4.03 Apr 16 20:56:55 Yes to both :) Apr 16 20:57:04 what error do you get? Apr 16 20:57:07 I have done that. minsdk 7 and target 15 Apr 16 20:57:17 finally back online Apr 16 20:57:28 ;d Apr 16 20:57:38 when trying to push to the emulator on 2.3 I get Apr 16 20:57:46 2 sec.. Apr 16 20:58:25 It states not compatible. Apr 16 20:58:32 and missing shared libs. Apr 16 20:58:47 sounds like you're not using a Google APIs emulator Apr 16 20:59:23 Ayone? Apr 16 20:59:24 err Apr 16 20:59:26 anyone? Apr 16 20:59:41 #android-x86 Apr 16 21:00:32 Frikish: you're compiling with Google APIs? ABS doesn't require that, do you need that for another reason? Apr 16 21:01:22 No, how embarrassing, changing now Apr 16 21:03:41 Hrm Apr 16 21:03:53 I can push files and install them, but no debugging ability Apr 16 21:03:54 odd Apr 16 21:07:04 is your app not marked debuggable? Apr 16 21:07:19 [in its manifest] Apr 16 21:07:29 wongk JakeWharton, Worked fine now. I'm sorry for the trouble Apr 16 21:07:42 no trouble at all Apr 16 21:08:43 Is there any way to scale down the preferences in pre 3.0? they seem so big on the emulator ? :) Apr 16 21:08:49 @ JakeWharton Apr 16 21:09:04 use an HVGA screen Apr 16 21:09:09 what Apr 16 21:09:17 …preferences? Apr 16 21:09:19 sorry. Apr 16 21:09:34 Preference view. Apr 16 21:10:12 Is there anyway to make the preference view, any less huge. Apr 16 21:10:45 picture: http://www.box.com/shared/3da6f2f651ad3fa09d50 Apr 16 21:11:09 I want it to be smaller overall. Apr 16 21:11:33 (please do ask again, if you dont understand me) Apr 16 21:13:39 anyone encountered a run config requiring the debugger to be connected when it's not a debug config??? Apr 16 21:14:06 Sometimes I get a window that pops up, I just hit "disconnect" Apr 16 21:15:48 Frikish: you can supply your own layout with a ListView that has an id "@android:id/list" if you want to add outer padding or something Apr 16 21:16:06 you can also customize the preference headers through styles Apr 16 21:16:14 I'm confused, where is 'default.properties' supposed to be? I'd like to enable proguard there Apr 16 21:16:30 I've got a strange issue using onCreateDialog() - on orientation change, I get an IllegalArgumentException for no reason I can see. Anyone have experience with this? Apr 16 21:16:50 what's the exception stack trace? Apr 16 21:16:54 * ctate points to the imgur link in the channel topic Apr 16 21:17:13 Lemme recreate it, hang on Apr 16 21:17:43 Frikish, wow, I wonder how did you do this? I mean custom preferences header Apr 16 21:19:51 i'm using the ActionBarSherlock from JakeWharton, and there its easy to make something like that :) acctually just editing a xml file :P Apr 16 21:20:56 ctate: http://pastebin.com/1P3yMucQ Apr 16 21:21:14 stiggpwnz, actionbarsherlock.com and download the demoes onto your phone and look at the example code in the zip from the site ;) Apr 16 21:22:09 Frikish, wow, but you might want to look at this: http://stackoverflow.com/questions/2697233/how-to-add-a-button-to-preferencescreen Apr 16 21:22:59 I've structured my code exactly (as far as I can tell) like AlertDialogSamples Apr 16 21:23:25 and Apr 16 21:23:26 CourseSearchActivity(Activity).dismissDialog(int) line: 2575 Apr 16 21:23:27 is what? Apr 16 21:23:40 my guess is that you're caching the dialog pointer, but the dialogs are managed Apr 16 21:23:42 guys, the android 4.0 can run only on specific processor if yes on which? I have a MTK phone with Arm7 and 600 Mhz. Apr 16 21:23:43 stiggpwnz, thank you :) Apr 16 21:23:57 so when the orientation change happens, the dialog is being replaced by a new one in the new orientation Apr 16 21:24:06 but you're trying to dismiss the old (already gone) one Apr 16 21:24:19 Frikish, yeah, just found that myself, and gonna use it Apr 16 21:25:06 ctate: I'm just dismissing in my AsyncTask's onPostExecute() using context.dismissDialog(MY_DIALOG_ID); Apr 16 21:25:10 should I not do that? Apr 16 21:25:16 oh interesting Apr 16 21:25:22 what is 'context' ? Apr 16 21:25:34 ok JakeWharton evancharlton ctate anyone else.... im going to be in SF the night of may 4th and 5th Apr 16 21:25:50 letsgetdrunk.com Apr 16 21:25:56 clark4: a quick google will turn up that there is even an x86 port of android 4.0+ Apr 16 21:26:08 Context is a reference to the actitivy which is handling the dialog Apr 16 21:26:18 canadiancow|work: thats our most sacred holiday Apr 16 21:26:19 The Fifth of May Apr 16 21:26:26 remember, remember Apr 16 21:26:30 no wait, that's november Apr 16 21:26:34 lol Apr 16 21:26:37 ANYWAY Apr 16 21:26:44 if anyone wants to go for a drink Apr 16 21:26:47 i do Apr 16 21:26:48 culmor30: which activity? the now-destroyed one that created the AsyncTask, or the new one that was created out from under the orientation change? :) Apr 16 21:26:49 you owe me one Apr 16 21:26:52 in SF Apr 16 21:26:56 how do i owe you a drink? Apr 16 21:26:57 Why is a super.whatever call required? I mean, if it should always be there, shouldn't it just be compiled in? Wtf does it even do? Apr 16 21:26:59 what about NY Apr 16 21:27:06 ctate: Oh good point. Apr 16 21:27:12 we made a bet that i wouldnt get google i/o tickets Apr 16 21:27:12 and i won Apr 16 21:27:23 ctate: How do I do this, then? Apr 16 21:27:44 freecandy: it's JUST to bug you. Apr 16 21:27:47 loader + dialogfragment Apr 16 21:27:48 * JakeWharton runs Apr 16 21:27:51 ctate: Just do a dismissDialog(id) ? Apr 16 21:28:06 there's no actual reason. It's just because someone decided "Man, if only there was a way we could piss off devs via overriding Apr 16 21:28:28 culmor30: hmm hrm. you might also pass getApplicationContext() when creating the AsyncTask, rather than pass the Activity Apr 16 21:28:34 Mission accomplished. Apr 16 21:28:54 i.e. use the enclosing context with a lifetime that survives orientation change Apr 16 21:29:10 that's a guess too; i am alas not really a UI-code person most of the time Apr 16 21:29:30 how to make user know that I have a ViewPager im my activity and to make him realise that he can switch between screens easily with simple gesture Apr 16 21:29:30 ctate: Ah, I had no idea that existed. (started android two days ago so this is all very confusing, haha) Apr 16 21:30:18 stiggpwnz: put one of those transparent overlays with the white arrow and cool handwriting font Apr 16 21:30:22 "Swipe here" Apr 16 21:31:00 if you need an example, download the app "todomapr" Apr 16 21:31:01 it has one Apr 16 21:31:02 ctate: Did a simple dismissDialog(id) and I still got the exception while changing orientations Apr 16 21:31:26 readme, lol I thought you were kidding Apr 16 21:31:34 nah i'm totally serious. Lots of apps have this Apr 16 21:31:46 not sure how effective it is, but it looks cool Apr 16 21:33:41 culmor30: oh! your AsyncTask is an inner class of your Activity? Apr 16 21:33:51 that means it's implicitly bound to specific instances of that Activity Apr 16 21:34:11 but hte Activity instance is being destroyed & recreated at orientation change, so the async task is bound to a now-stale activity instance Apr 16 21:34:16 don't do that :) Apr 16 21:35:23 Oh man I spent like an hour last night merging my external AsyncTask class into my other class. Apr 16 21:35:23 I ran my app through proguard, and now I get 'installation error code: -103' whily trying to install it Apr 16 21:35:36 ctate: if the inner class references OuterClass.this, then it's destroyed and recreated, will OuterClass.this be a reference to the new instance or the old instance? Apr 16 21:35:44 old instance Apr 16 21:36:10 Is there any way to get the reference to the new class? Apr 16 21:36:14 I don't believe that, I need to see it for myself Apr 16 21:36:16 instance, rather Apr 16 21:36:16 brb Apr 16 21:36:34 culmor30: http://evancharlton.com/thoughts/rotating-async-tasks Apr 16 21:36:48 culmor30: did you try passing getApplicationContext() to your AsyncTask and using that as the context for showing the dialog and dismissing it? Apr 16 21:37:09 and yes read what he said Apr 16 21:37:27 where are the installation error codes documented ? Apr 16 21:38:19 Beket: like what? (also, check what's in logcat to see the message about why installation failed) Apr 16 21:38:37 ctate: in logcat i see only that 'installation error code: -103' Apr 16 21:40:04 ctate: like this? pageTask = new SubmitQuery(this.getApplicationContext(), Apr 16 21:40:06 damn proguard. one more variable to my problems. if I disable it, it installs fine Apr 16 21:40:17 culmor30: yeah (alhtough of course you don't need "this." to call it) Apr 16 21:40:42 sup folks Apr 16 21:41:03 Beket: really only that line? that's pretty strange. can you pastebin the ~ 10 lines leading up to that message? [edit for secrecy if you need to first] Apr 16 21:41:19 ctate: and then the method should ask for it like this? public SubmitQuery(Context c, params...) Apr 16 21:41:33 yeah Apr 16 21:41:40 Because then I had to do a @Override protected void onPreExecute() { ((Activity) context).showDialog(DIALOG_QUERYING_BANNER); } Apr 16 21:41:53 don't cast to Activity Apr 16 21:41:57 is it possible for a non-rooted phone to turn itself back on after it's been turned off? Apr 16 21:42:08 ... or is showDialog() specifically an Activity method? Apr 16 21:42:09 no Apr 16 21:42:11 or I guess... can I just do showDialog(int)? Apr 16 21:42:19 yes it is Apr 16 21:42:23 oh argh Apr 16 21:42:26 then you have to do this by hand Apr 16 21:42:44 anyway, i *suspect* what is going on is that by the time you call dismissDialog(), the live activity instance has been swapped Apr 16 21:42:53 and yoru AsyncTask is invoking dismissDialog() on the old one Apr 16 21:43:19 read the page that evancharlton linked -- it describes how to carry your AsyncTask pointer across from the old activity instance to the new one Apr 16 21:43:25 my sdk is downloading at ~90KB/s Apr 16 21:43:26 funfunfun Apr 16 21:43:50 then set up a method in your AsyncTask that lets you call in and say "oh hey you need to use this Activity pointer now instead of the old one" Apr 16 21:44:01 and call that when the new Activity instance is set up Apr 16 21:44:13 I'm not quite following it... I've seen getLastNonConfigurationInstance() before but I have no idea what it does Apr 16 21:44:14 so that when your onPostExecute() runs, it has the up-to-date Activity pointer to call through Apr 16 21:44:18 hi readme, how's it going? Apr 16 21:44:20 ctate: =o oh god, it is Apr 16 21:44:28 readme: i TOLD you! Apr 16 21:44:30 helo MasterZuFu Apr 16 21:44:36 ye of little faith Apr 16 21:44:55 ctate: http://paste.lisp.org/display/128988 Apr 16 21:45:03 i updated the website, changed the way it looks and all. tell me whatcha think :) Apr 16 21:45:09 culmor30: the "last non-Configuration instance" stuff is a pair of callbacks that are provided for exactly this sort of case Apr 16 21:45:14 "Installation error code: -103" Apr 16 21:46:02 * ctate | 04-17 00:42:12.511: E/PackageParser(135): Package org.egalinos.activities has no certificates at entry assets/egal.db; ignoring! Apr 16 21:46:28 if you attempt install from the commandline with "adb install" it might tell you somethign less cryptic, as well Apr 16 21:46:47 MasterZuFu: looks great. needs users though Apr 16 21:47:01 This class is ending in 4 minutes so I'll be back in a few minutes. I'll let you know if it worked ctate, thanks for the help Apr 16 21:47:02 yep, working on that :P. Apr 16 21:47:08 np culmor30; good luck Apr 16 21:47:15 Thanks ^^ Apr 16 21:47:31 pkg: /data/local/tmp/e-galinos.apk Apr 16 21:47:32 Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] Apr 16 21:47:37 I think there's a bug report on this ? Apr 16 21:47:43 http://code.google.com/p/android/issues/detail?id=830 Apr 16 21:48:53 what version of the OS are you installing to? Apr 16 21:49:10 readme: getting members is going to require a bit of advertising to really get it up there. Apr 16 21:49:44 ctate: 4.x, but it happens with 2.x as well Apr 16 21:50:02 are you certain that your apk is actually being signed properly? Apr 16 21:50:05 MasterZuFu: i would recommend moving your forum into a separate directory called /forum and making the front page a blog. then you can get users by blogging about slavery related issues and linking the articles to reddit. Apr 16 21:50:24 this is off-topic though. sorry. Apr 16 21:50:32 ctate: I export it as unsigned and have enabled my 'trust other sources' in my phone, or how it is called that option Apr 16 21:50:43 I just wanted to see if the proguard'ed app runs ok Apr 16 21:51:07 ahh Apr 16 21:51:14 that's your problem, then. you have to sign it. Apr 16 21:51:19 you still need to sign it Apr 16 21:51:22 even if it's just with the dev key provided with the SDK Apr 16 21:51:33 a ha! Apr 16 21:51:45 "trust other sources" just lets you install apks downloaded via the browser or email or whatever Apr 16 21:52:05 ("untrusted sources" that is) Apr 16 21:52:08 but I put the unsigned .apk in my dropbox folder and download it from there Apr 16 21:52:23 anyway, I'll sign it and see if it persisths. thanks ! Apr 16 21:52:33 "Untrusted sources" is what lets you do *that*, but it still must be signed Apr 16 21:53:09 how did it work then with the other version prior to enabling proguard ? Apr 16 21:53:24 due to the debug mode or ? Apr 16 21:54:25 debug mode exports are automatically signed by the debug key Apr 16 21:55:05 man, I'm so clueless. thanks pfn / ctate + sorry for the spam. will read the app-signing section now Apr 16 21:55:23 App certificates. Learn them. Love them. Apr 16 22:14:15 how would I go about hiding a menu option (in an inflated menu), then making it visible again later on? Apr 16 22:14:33 MenuItem#setVisibility or whatever it's called Apr 16 22:14:58 setVisible Apr 16 22:15:06 yayaya Apr 16 22:15:40 evancharlton may 4/5 Apr 16 22:15:45 thanks Apr 16 22:15:53 canadiancow|work: k Apr 16 22:16:15 <`teh1> yo yo Apr 16 22:16:54 Hi, I have been stuck for days now. How do I make my "ListPreferences" change my map mode in my MapActivity class? So if I press "Satellite" for instance, the map in my MapActivity changes to MapView? Apr 16 22:17:06 FUCK MY LIFE Apr 16 22:17:09 Please see: http://stackoverflow.com/questions/10161057/how-to-listener-on-listpreference-to-change-google-map-mode/10164129#comment13039631_10164129 Apr 16 22:17:15 canadiancow|work: ? Apr 16 22:17:15 i forgot to git add before git commit before git push before wiping my hard drive Apr 16 22:17:22 ... OUCH Apr 16 22:17:30 oh FML Apr 16 22:17:33 I have posted for clarification Apr 16 22:17:36 hopefully not a security wipe? Apr 16 22:17:47 well let me rephrase: i got a new drive Apr 16 22:17:50 i no longe rhave the old one Apr 16 22:17:51 IT has it Apr 16 22:17:55 it was just an xml file Apr 16 22:17:56 a layout Apr 16 22:17:58 but stilll... annoying Apr 16 22:18:01 <`teh1> i am using in-app billing, and i am confused about how it's actually secure - for example, how do i ensure that the purchase is real? my server controls what is displayed on my app. is there a way to have my server ask google play if a user has bought something? Apr 16 22:18:09 canadiancow|work: wow, that could have been 1100 lines of code!!1 Apr 16 22:18:20 LOL Apr 16 22:18:33 OSNAP Apr 16 22:18:34 you, sir, win two internets Apr 16 22:18:38 `teh1: your responses are signed with your key; you're responsible for validating them Apr 16 22:19:17 Anyone? Apr 16 22:19:35 <`teh1> evancharlton: yeah but whats to stop a user from just duplicating the response and sending it up to my server, making it think that they are purchasing things when they are not Apr 16 22:19:43 mMapView.setSatellite(true) ? Apr 16 22:19:57 But how do I do that from ListPreferences? Apr 16 22:19:58 evancharlton: heh. I looked at first ~50 lines of that layout and couldn't make myself look further ;) Apr 16 22:20:09 you store the preference and then load it later? Apr 16 22:20:24 How do I go about doing that? I have already registered a listener Apr 16 22:20:29 it reads the user response Apr 16 22:20:38 but how do I get it to update? Very confused my friend. Apr 16 22:20:46 in OnResume() Apr 16 22:21:37 <`teh1> evancharlton: ? Apr 16 22:22:21 Hey ctate: Back from class, have a question about implementing http://evancharlton.com/thoughts/rotating-async-tasks Apr 16 22:22:40 `teh1: are you talking about a replay attack? Apr 16 22:22:55 no Zukky, that absolutely does not mean PM me Apr 16 22:23:08 thats juist a good way to get a permanent ignore Apr 16 22:23:14 culmor30: note that this writeup is about how to keep track of your AsyncTask from your Activity instances, when the Activity instances themselves are swapped about due to an orientation change Apr 16 22:23:18 or a kick/ban depending on how annoyed i am and how much ctate lieks me Apr 16 22:23:19 `teh1: have you read this? http://developer.android.com/guide/market/billing/billing_best_practices.html Apr 16 22:23:25 <`teh1> evancharlton: sounds like it? basically, when they purchase something, my server adds the item to the serverside database. but whats to stop them from sending a fake request to myserver? Apr 16 22:23:26 <`teh1> sec Apr 16 22:23:30 Sorry, first time. Apr 16 22:23:31 canadiancow|work: oh, you need a kick/ban? Apr 16 22:23:46 /mode +b canadiancow*!*@* Apr 16 22:23:58 thx Apr 16 22:24:01 It is really amusing to write anti-antilvl code Apr 16 22:24:17 bubbleguuum yea i did that Apr 16 22:24:18 `teh1: sounds like you'd need to sign the responses from client -> server as well Apr 16 22:24:19 it's also trivial Apr 16 22:24:22 yup Apr 16 22:24:25 you rename the enum shit and it fails Apr 16 22:24:27 ctate: Yeah, that's what I'm trying to do, right? I'm just wondering how I launch the dialog from the AsyncTask's onPreExecute(), now that it is a static class Apr 16 22:24:32 except google removed the enum and replaced with ints Apr 16 22:24:34 so.... Apr 16 22:24:46 "Cannot make a static reference to the non-static method dismissDialog(int) from the type Activity" Apr 16 22:24:47 <`teh1> evancharlton: ok thanks Apr 16 22:24:55 culmor30: your AsyncTask subclass should have a member variable that is an Activity Apr 16 22:24:58 culmor30 i hoep you're kidding Apr 16 22:25:09 you can polute your code to make antilvl go positive on wrong places Apr 16 22:25:15 give the creating Activity's object to the AsyncTask instance when you constructu Apr 16 22:25:20 canadiancow: Dude I started android 2 days ago. Apr 16 22:25:28 thats not android Apr 16 22:25:40 then, when the activity is shuffled at orientation change, give the *new* Activity pointer to the async task Apr 16 22:25:44 [if it's still around] Apr 16 22:25:52 or dont, and leak it Apr 16 22:25:59 so the asyncTask object always holds the live activity pointer Apr 16 22:26:39 (anti-lvl? laminated veneer lumber?) Apr 16 22:26:59 Now I have a registerOnSharedPreferenceChangeListener, it reads the user input when they press Map, Satellite or Traffic. How can I make that option change be read in my MapActivity and update the MapView? Apr 16 22:27:17 ctate: But I thought I wanted to pass in getApplicationContext(). Apr 16 22:27:40 culmor30: that was before i realized that the dialog methods are Activity, not just Context Apr 16 22:27:47 Ahh, okay Apr 16 22:27:48 so you need a proper activity pointer Apr 16 22:28:06 So I just pass it "this"? Apr 16 22:28:09 you wouldn't need this little dance at all if you could just use the application context Apr 16 22:28:14 'this' when calling from the Activity, yes Apr 16 22:29:41 Anyone: http://stackoverflow.com/questions/10161057/how-to-listener-on-listpreference-to-change-google-map-mode/10164129#comment13039631_10164129 Apr 16 22:30:08 I'll give someone my soul if they can help me with this. Apr 16 22:31:36 Is anyone here? Apr 16 22:31:39 cheap Apr 16 22:32:58 TheBunny - can you lend me a hand with this mate? Apr 16 22:34:42 I like the 1st answer Apr 16 22:34:55 use onResume and check for a mode Apr 16 22:35:11 cheers for responding, how to I check for a mode? Apr 16 22:35:22 This is where i'm stuck Apr 16 22:35:32 I have been on the same spot for days. Apr 16 22:35:53 google for how to read from SharedPreferences Apr 16 22:35:54 zhul deserves your soul now. Apr 16 22:36:16 If you don't transfer it, you should be cast into outer FORTRAN. Apr 16 22:36:35 Doing that now. Apr 16 22:36:48 If this works, you will have my soul gratefully. Apr 16 22:50:50 Still don't understand. Anyone care to PM me to help me find a solution? Apr 16 22:52:02 ctate: Still getting the exception :\ Apr 16 22:52:12 I'm lost now. Apr 16 22:52:55 can you pastebin the exception message from logcat again? Apr 16 22:53:07 i mean, i've been guessing about what is triggering it; i could be wrong :) Apr 16 22:53:07 Oh hang on. I might know what the problem is, let me try a thing Apr 16 22:53:31 ctate: can you give me a hand with my Preference problem? Apr 16 22:54:10 ListPreference? alas nope. Apr 16 22:55:23 ctate: Come on man, I know you can sort this easy. I can't figure this out. It's so mind boggling. Apr 16 22:55:49 seriously, i have never used ListPreference Apr 16 22:55:55 Zukky, what's the problem? Apr 16 22:55:58 nor have i ever used the Maps APIs Apr 16 22:56:13 oh I don't know the maps api Apr 16 22:56:18 ctate: Oh, no worries mate. Cheers bro Apr 16 22:56:58 wow Apr 16 22:57:02 bug in NotificationCompat.Builder Apr 16 22:57:15 where are the sources for the support lib? Apr 16 22:57:33 Hey Ginto, I don't think you really need to know the Maps Api. Just need to read a ListPreference that a user chooses and update my MapView to (let's say) Satellite Apr 16 22:58:03 I know the code of how to change it. But I don't know how to make my class read the update. Even though i've tried so many combinations of SharedPreferences Apr 16 22:59:06 ctate: Figured it out with some code shuffling! Thanks so much for helping me understand this :) Apr 16 22:59:13 ha ha yay Apr 16 22:59:45 Zukky, your question has been asked on stackoverflow: http://stackoverflow.com/questions/2500488/android-using-listpreference-and-retrieving-key-string Apr 16 23:00:28 OO! Let me see mate. I'll get back to you Apr 16 23:01:16 BLAHGHG Apr 16 23:01:20 how do i submit a patch to the support lib? Apr 16 23:01:23 JakeWharton Apr 16 23:01:25 is there some way to define a drawable of a specific size? it seems when the drawable is used as a background the size is ignored and it's always stretched to the full background dimensions. I'm trying to have a layer drawable that contains some shapes with explicit sizes (in dp) Apr 16 23:01:30 what Apr 16 23:01:35 canadiancow|work: r.android.com Apr 16 23:01:37 s.android.com Apr 16 23:01:46 wheres the source Apr 16 23:01:49 ctate: Actually, this has raised another question. If the uses goes back to my searchpage activity and wants to run another search, clicking search does nothing because the task already exists and therefore another is not created Apr 16 23:01:51 second one Apr 16 23:01:57 fuck why cant google turn on warnings Apr 16 23:02:01 the source for the support lib Apr 16 23:02:17 they would have got an "unused parameter" warning Apr 16 23:02:21 and this bug would be gone Apr 16 23:02:50 culmor30: you need to bring that activity to the top; there are intent flags for this Apr 16 23:02:51 make sure when you submit your patch you add Adam Powell as a reviewer Apr 16 23:03:04 lol Apr 16 23:03:06 this is complicated Apr 16 23:03:12 if i send you a diff, can you do it for me? Apr 16 23:03:16 sure Apr 16 23:03:30 even submitting to AOSP doesn't mean someone will look at it Apr 16 23:03:30 or rather Apr 16 23:03:37 can you upon up NotificationCompatHoneycomb.java Apr 16 23:03:43 so I just add Adam and then bother him about it Apr 16 23:03:44 and add the line: .setNumber(number) Apr 16 23:03:51 because 3 ridiculous bugs have been present since r4 Apr 16 23:03:53 and submit that as a patch? Apr 16 23:04:06 canadiancow|work: email me that Apr 16 23:04:12 meh i'll give you a diff Apr 16 23:04:16 canadiancow|work: what's the bug? Apr 16 23:04:23 it ignores hte number param Apr 16 23:04:47 in what context? Apr 16 23:04:49 canadiancow|work: i'll just make you the author when I commit :) Apr 16 23:04:54 go for it Apr 16 23:04:55 culmor30: about the intent flag - if this is any help: myIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); Apr 16 23:05:06 wongk, in the context of that file Apr 16 23:06:57 canadiancow|work: essentially this method is a no-op: http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#setNumber(int) ? Apr 16 23:07:08 yes Apr 16 23:11:20 :| I can't get paid for my apps because my google checkout is b0rked. Apr 16 23:11:42 I've got a mean $8 to collect. Apr 16 23:12:24 I contacted them through their automated script but this thread entially this method is a no-op: Apr 16 23:12:33 disregard after "this thread" Apr 16 23:12:41 http://productforums.google.com/forum/#!topic/websearch/K11Z-1Z7UGU --- Is making me very pessimistic Apr 16 23:14:23 canadiancow: commit message? Apr 16 23:14:31 50-char summary + paragraph explaining Apr 16 23:15:55 readme: b0rked how? Apr 16 23:16:48 ctate: I've got an old bank account in there from 2 years ago that has since been closed and it won't allow me to change my information to reflect my current bank account. Apr 16 23:17:09 won't let you change it? wtf? Apr 16 23:18:04 ctate: i'll screenshot Apr 16 23:19:37 well, it isn't like i have any contact with Checkout Apr 16 23:20:30 thank you for asking, though. Apr 16 23:20:36 JakeWharton, I have started the same app in emulator(2.3) and on phone(4.0), and do see that one activity is missing the actionbar totaly in the emulator, its an MapActivity. Apr 16 23:20:47 I think they will probably contact me eventually, I am just very nervous. Apr 16 23:20:58 which is Apr 16 23:21:11 http://i.imgur.com/Vov5x.png Apr 16 23:21:31 of course I clicked the contact us link :) Apr 16 23:27:04 How can I get a Actionbar without extending the SherlockActivity? Apr 16 23:28:15 target API level 11 or later? Apr 16 23:29:24 How can I get a Actionbar without extending the SherlockActivity, the activity is a mapactivity? JakeWharton Apr 16 23:29:35 SherlockMapActivity Apr 16 23:29:45 I didnt find that one. Apr 16 23:30:28 cant resolve that one Apr 16 23:31:19 http://abs.io/download Apr 16 23:32:48 thank you! Apr 16 23:37:03 I'm reading the disclosure policy Google is forced to provide in Australia, and it mentions this: "Google Australia will not be obligated to settle funds to a Seller where Google Wallet has not received the funds in full from the Buyer, or the Seller's 'earned balance' at the time of payment or transfer is less than one dollar." Apr 16 23:37:04 Does anyone know what does the 'earned balance' mean - is it in total history of the account? Apr 16 23:38:13 earned balance... I think it's defined somewhere (it's a banking term) Apr 16 23:38:38 ah, I'll look it up then Apr 16 23:40:07 why i couldnt write ʇıxǝ fliptext on a button or even here ʇıxǝ Apr 16 23:40:23 I read it here Apr 16 23:40:31 here ok :) Apr 16 23:48:02 I need a listview that can manage upto 7 sections, any one know about a listview, custom, that supports that? Apr 16 23:52:58 I saw an implementation of a listview that added sections recently. I don't have a link, but you should find it with google Apr 16 23:53:10 It was http://code.google.com/p/android-amazing-listview/ Apr 16 23:54:13 thank you vadi2 :) Apr 16 23:56:07 sections? Apr 16 23:56:17 isn't that what view type is for? Apr 16 23:56:26 wtf is scratchpad and how did it get installed Apr 16 23:56:45 yes, sections could be better Apr 16 23:57:25 view type, could you please explain what you meant by that? Apr 16 23:59:37 yoyoyo Apr 16 23:59:42 I have a noobie java question Apr 17 00:00:32 if I send int myInt = 2; to method myMethod(int intParam) Apr 17 00:00:44 is there anyway to get the name of the int sent Apr 17 00:00:49 (myInt) Apr 17 00:01:49 why do you want that? Apr 17 00:02:36 I think the answer is no, since "myint" is just for you to understand and keep track of. Apr 17 00:03:04 im just curious of the responses Apr 17 00:31:51 right now I'm using onUserInteraction in order to update something whenever the user interacts! (obviously) However, I want it to call while scrolling a scrollview both when the scroll starts and when it finishes. It only gets called when it starts. Is there a way to get an update function to be called when the scrollview has finished moving? Apr 17 00:54:41 These CSV's from Google Play are pretty cool, I should have downloaded them before Apr 17 00:54:43 I' Apr 17 00:55:22 ? Apr 17 00:55:26 I'm probably going to put some LAMP chart thing together with the CSV's as input Apr 17 00:55:58 I guess I could do an APK with SQLite, but I don't feel like doing that yet Apr 17 00:56:41 canadiancow, the csv's which tell you almost everything about who has been downloading your stuff. Beyond the top 9 or 10 Apr 17 00:58:30 hmm cool Apr 17 00:58:38 we'd probably like that at work more than on my personal apps though Apr 17 00:58:54 now when can wew download ratings as a csv :P Apr 17 00:59:55 i hope they add some new options to user accounts though Apr 17 00:59:58 financial is meh Apr 17 01:00:07 what we need is read-only and read-write accounts Apr 17 01:00:22 (for now - tehy can make it more fine grained later) Apr 17 01:01:02 What I'm unhappy with is Admob Apr 17 01:01:19 I have been able to put my earnings into my ad budget up until now Apr 17 01:01:32 But they're doing away with that May 1st. Makes no sense. Apr 17 01:02:06 I guess I'll up my Millennial Media % on Adwhirl if it goes down like that Apr 17 01:11:26 is rtti simply class name stuff at runtime, or can you go further with it, eg, determine function names or fields at runtime? Apr 17 01:11:32 shit Apr 17 01:17:44 ron_frow_: in what language? Apr 17 01:17:51 and specifically on Android? Apr 17 01:17:58 wrong channel =0 Apr 17 01:18:01 aha :) Apr 17 01:18:18 I know what you can do with it in le java Apr 17 01:18:28 in C++ i believe it is pretty much just type information Apr 17 01:18:33 hence the name Apr 17 01:18:47 just type name is of little use Apr 17 01:18:54 ron_frow_, in C++ I think it's mainly for typeinfo() and dynamic_cast Apr 17 01:18:58 yeah Apr 17 01:19:08 dynamic_cast is nice Apr 17 01:35:26 hello what are the .odex files in /system/app? Apr 17 01:36:38 Hi, if I want to hide only one textView to gain space. Is the ExpendableList the easiest solution? Apr 17 01:37:51 i was trying to adb install foo.apk but it doesnt work, can i just adb push foo.apk /system/app without breaking anything?? Apr 17 01:38:02 or would i need .odex files? Apr 17 01:38:49 What is the skin option exactly do in AVD manager? Apr 17 01:39:31 soroc: actually some random foo.apk, or are you trying to replace one of the system-installed apks? Apr 17 01:39:53 ctate: Superuser.apk Apr 17 01:40:26 * ctate wonders why adb install fails Apr 17 01:40:39 on dialogs, setNeutralButton, when clicked, it dismisses the dialog too? Apr 17 01:40:59 anyway, you've rooted the phone; you can do whatever you want. it should work to put it in /system/app and reboot Apr 17 01:41:26 ok thanks ctate and i learned in #android that the .odex files are just cahce files so i dont need any of those right? Apr 17 01:41:37 correct Apr 17 01:41:40 cache Apr 17 01:41:44 ok thanks Apr 17 01:41:46 not cache per se, but they're generated on the device on the fly Apr 17 01:41:53 also, you really want #android-root and not this channel Apr 17 01:42:03 on dialogs, i want to create a button, that dont dismiss the dialog.. just do some other work.. and the dialog still stays.. any ideas? Apr 17 01:42:23 ah ok ctate Apr 17 01:42:45 ctate: but unrelated to root, if they are not cache what else are they? Apr 17 01:42:46 Pasq89: why not just make a dialog-themed activity? Apr 17 01:42:49 just out of interest Apr 17 01:43:01 soroc: they're the actual runnable code, the result of the linkage step Apr 17 01:43:27 oh ok so apk files are like source coude and odex are like compiled binaries? Apr 17 01:43:28 the bytecode in the apk itself needs to be linked in a device-specific way Apr 17 01:43:34 ok Apr 17 01:43:41 it's more like .o files and final executables Apr 17 01:43:50 hmm ctate .. actually its a game.. and i m creating a dialog, that has a listview, and i want a simple refresh button to refresh the listview... thats why i dont want to make a new activity Apr 17 01:43:58 linked, ok Apr 17 01:43:59 the result of compilation, but still needs external linkages to be resolved Apr 17 01:44:18 Pasq89: nothing you just said is a reason not to make it an Activity :) Apr 17 01:44:19 so it is not just cache, it is the actual app. but it can be easily generated again if i accidentally delete the .odex but not the .apk Apr 17 01:45:00 and in general as soon as you start thinking about doing *any* sort of complex UI in a dialog, you should just make it a dialog-themed layout in an Activity. It's actually a lot cleaner to work with. Apr 17 01:45:14 soroc: it *will* be generated again, iirc Apr 17 01:45:23 excellent =) Apr 17 01:45:51 yes.. i know.. i was trying to convince you.. :P emm.. can the background of the new activity be transparent? and have the same look it has now Apr 17 01:45:57 * soroc does rm -f *.odex for fun Apr 17 01:46:13 * soroc observers everything crashing Apr 17 01:46:14 reboot, yo :) Apr 17 01:46:28 you can't just nuke everything out from under the RUNNING system Apr 17 01:46:31 sheesh :) Apr 17 01:46:38 i bet you didn't even 'adb shell stop Apr 17 01:46:40 first Apr 17 01:46:41 * soroc gasps for air Apr 17 01:47:05 kidding XD Apr 17 01:55:48 Hep, if you see the Play Store. There is a view for the descriptions for hide a part of the text. What is it? Apr 17 01:55:56 for any app Apr 17 01:58:41 JakeWharton did you fix my bug? :3 Apr 17 01:58:48 did you have one? Apr 17 01:58:55 the one i emailed Apr 17 01:58:59 NotificationCompatHoneycomb Apr 17 01:59:00 oh Apr 17 01:59:01 no Apr 17 01:59:05 i will this week sometime Apr 17 01:59:12 it takes a month for shit to get merged in AOSP anyways Apr 17 01:59:23 unless you badger ctate constantly Apr 17 01:59:53 oh i do Apr 17 02:00:00 and thats just a reason to start now :) Apr 17 02:00:14 I have patches going on 3 months :( Apr 17 02:01:06 https://android-review.googlesource.com/31270 Apr 17 02:01:15 ctate: actually shouldnt it still work if i rm -f /system/app/*odex because all the running odex files are in memory anyways? Apr 17 02:01:27 obvious bug, still present in r7 Apr 17 02:01:39 ctate: also how could i do it in the first place if not from a running system? Apr 17 02:02:00 lol JakeWharton Apr 17 02:02:07 https://android-review.googlesource.com/31261 Apr 17 02:02:11 there's a good one too Apr 17 02:02:13 also obvious Apr 17 02:02:39 whats AOSP btw? Apr 17 02:03:51 JakeWharton: ? Apr 17 02:05:42 ctate: ? Apr 17 02:06:41 %-( Apr 17 02:07:18 @-}--- Apr 17 02:07:45 @}-'-,-'-,--- Apr 17 02:08:34 >:< Apr 17 02:09:57 JakeWharton i think i'll check out the android source on my macbook so i can do this myself Apr 17 02:15:30 soroc, What do you mean by, what is the Android Open Source Project? Apr 17 02:15:56 oh ok thanks Apr 17 02:16:00 Google Adwords now rates your ads by relevancy, I didn't know that...haven't used Adwords in a few years Apr 17 02:16:25 does ctate merge shit into the AOSP? Apr 17 02:16:36 ctate: are you an android core developer? Apr 17 02:18:17 pouring out dalvikan manna from the heavens of code to us the people who long for answers to ios Apr 17 02:18:23 pretty cool Apr 17 02:18:25 ctate: are you? Apr 17 02:18:44 canadiancow: it's somewhat straightforward Apr 17 02:18:48 and then it's not Apr 17 02:19:06 anyone in here available for finishing a started app? it's a pretty complex one and I don't really have the skills to complete it. Apr 17 02:19:08 lol Apr 17 02:19:12 ive done source building before Apr 17 02:22:42 calm down there Mr. Badass Apr 17 02:24:55 anyone available for helping me develop an app? Apr 17 02:26:23 is it possible to round corners in a widget using xml ? ive googled and found the shape tag and nothing else Apr 17 02:30:54 MasterZuFu: read the topic, "Ask your question, don't ask to ask" Apr 17 02:31:32 i am asking the question. Readme has helped me write about 1/3 of this application, and I just need someone to help me finish it. Apr 17 02:31:43 it's a bit in-depth to explain what it does. Apr 17 02:31:55 basically it works hand-in-hand with this website: www.slaveryreport.com/forum Apr 17 02:33:55 you can ask specific questions Apr 17 02:34:06 ok. Apr 17 02:34:35 can someone offer me their services on developing an android application for the following website: www.slaveryreport.com/forum Apr 17 02:35:11 dominicdinada: sure... just apply a rounded-corner shape :) or a rounded-corner 9-patch, if you want more control... Apr 17 02:35:12 $50/hr Apr 17 02:35:13 MasterZuFu: surely you have a specific question about a specific piece of technology that you're having trouble with... Apr 17 02:35:32 MasterZuFu: are you asking for someone to write it for you, or for help writing it yourself? Apr 17 02:35:42 Leeds: i will look into that thanks Apr 17 02:35:53 dominicdinada: hang on a mo Apr 17 02:36:00 ok Apr 17 02:36:01 *sigh* I'm asking someone to write it for me: [22:18] anyone in here available for finishing a started app? it's a pretty complex one and I don't really have the skills to complete it. Apr 17 02:36:31 MasterZuFu: very few ppl will can try rentacoder Apr 17 02:36:57 Leeds, ever looked into 3d location on accelerometer andd giroscoe? Apr 17 02:37:15 dominicdinada: I'm using http://pastebin.com/Qw5cST4g in an app - just setting that as the background for a LinearLayout Apr 17 02:38:13 my question is do u use relative or linar or shape is a valid root tag ? Apr 17 02:38:17 dominincdinada: rentacoder? I know there are several android devs in here who are more than capable in making android apps. the question is how much does someone want to charge and are they willing to work with me on this project? Apr 17 02:38:34 didn't someone already say 50 an hour? Apr 17 02:38:48 I didn't see anyone say anything about money. Apr 17 02:38:53 MasterZuFu: yes many ppl will help for a fee Apr 17 02:39:16 dominicdinada: that is 100% of my res/drawable/dashborder.xml, and I simply use it as android:background="@drawable/dashborder" Apr 17 02:39:45 MasterZuFu: this channel will give u free help to guide u but doing the work is never free Apr 17 02:40:22 Leeds: thanks for pointing me in the direction :) Apr 17 02:40:43 dominicdinada: my pleasure... always nice to be able to point someone at something you've already solved :) Apr 17 02:40:44 Well...I'm trying to get the app out as soon as possible, I'm not rich or anything and this is all coming out of pocket for a non-profit organization. I'll do what I can though, even if it takes a little longer to come up with the money. Like I said, 1/3 of the project is already done and I've gotthe source code. Apr 17 02:41:10 open source it Apr 17 02:41:28 MasterZuFu: it's not really fair (and technically against the topic) to ask for people to contribute time and effort towards your pet project Apr 17 02:41:39 does slavery still exist today? Apr 17 02:41:42 i won't open source it unless I can get a team to work on it. Apr 17 02:41:52 *bong* wrong answer Apr 17 02:41:54 Leeds: yes i could always do it in gimp or photoshop but the easier way is to write an xml Apr 17 02:42:00 MasterZuFu: if it's for a non-profit, why do you care about the source? Apr 17 02:42:09 MasterZuFu: so you are trying to find slaves? Apr 17 02:42:21 soroc, yes slavery still exists. it's the second grossing crime in the world next to drug traffic Apr 17 02:42:35 people just dont want to be slaves hence you have to offer something in return for their work Apr 17 02:42:40 soroc: yes. you know, like the kids kidnapped from their parents back yards, stuff like that. Apr 17 02:43:01 bull yOk Apr 17 02:43:12 ok MasterZuFu thats not good but i agree, you wont find a team if you dont open source and if you dont open source it unless you find a team.. Apr 17 02:43:13 okay, guys, really - not the place to discuss modern slavery Apr 17 02:43:17 cough cough " I have an app i will make tons of $$$$ in i know it will be a great app there will be a free version i get paid through ads... and a paid version, Someone CODE it for me" :) Apr 17 02:43:49 code it yourself you dominicdinada Apr 17 02:44:23 actually i think dominicdinada is just tyring to trick us into something Apr 17 02:44:38 I'm just asking if there's an android app developer here who wants to offer me a price for developing an app for me. that's all. Apr 17 02:44:51 std0s: I was being facetious you tool and i was quoting MasterZuFu hence the quote Apr 17 02:45:01 soroc: ^^^^^ see above Apr 17 02:46:06 MasterZuFu: ok no problem with that but you sounded like dominicdinada ironically (which i of course noticed) did on purpose Apr 17 02:46:39 dominicdinada, excuse my impatience - being in a chatroom doesn't exclude you from potential a$$holes Apr 17 02:46:40 dominicdinada: i was also facetious u tool Apr 17 02:46:44 I never said I wasn't going to pay anyone to do the work on the application. Apr 17 02:46:57 honestly I don't know why people have to be such assholes when people ask for fucking help. shit....>_> Apr 17 02:47:12 MasterZuFu: it sounded like taht because you seemed to ignore jeppy_ offering you $50/hr Apr 17 02:47:34 i wasn't ignoring, i didn't see his comment. my apologies. Apr 17 02:47:39 asking for help is asking a question like Is there a way to round corners in widgets via xml. Apr 17 02:47:41 ok Apr 17 02:47:44 tell us more about the app Apr 17 02:48:25 basically the app lets you upload this data to the website: http://www.slaveryreport.com/forum/showthread.php?tid=2&pid=2#pid2 Apr 17 02:48:25 widgets can be styled Apr 17 02:49:22 the upload ini incidental to the functioning of the app Apr 17 02:49:31 *is Apr 17 02:50:02 MasterZuFu: and as I said, this isn't the right place to solicit for developers Apr 17 02:50:19 MasterZuFu: an irc channel is still a bad choice for a question like this. i would post it into an android dev forum so it will reach thousands of developers instead of just the few currently reading until your question vanishes in the scrollback Apr 17 02:50:19 Ok. Apr 17 02:50:57 and if you open source it you will attract even more developers Apr 17 02:50:58 MasterZuFu: as dominicdinada suggested, rentacoder - or elancer, or lots of similar "hire people for a one-off job" sites Apr 17 02:51:24 not to plug a website as topic says :) Apr 17 02:51:27 MasterZuFu: also try http://www.vworker.com Apr 17 02:51:42 ok. thanks guys for the help Apr 17 02:51:54 MasterZuFu: u could even try craigslist Apr 17 02:53:09 MasterZuFu: and rentacoder also allows ppl to bid on the job Apr 17 02:53:24 and they wont charge per hour but per project Apr 17 02:53:30 I'll check there. Apr 17 02:53:31 so you get a better cost estimate Apr 17 02:53:40 vworker works the same Apr 17 02:54:04 rentacoder.com and vworker are the same site Apr 17 02:54:09 and in their profile is ratings of work they hsve done Apr 17 02:54:24 kinda like ebay seller ratings Apr 17 02:54:30 MasterZuFu: and they are usually from low wage level countries so it will be cheap for western standards and still earn them good money so they dont have to become slaves Apr 17 02:54:56 soroc: lmao Apr 17 02:55:47 like india or indonesia or the philippines Apr 17 02:55:54 dominicdinada: i am serious tho Apr 17 02:56:20 soroc: i know u are but the irony is his app is about that Apr 17 02:56:27 yeah :) Apr 17 02:57:15 I personally don't find jokes about Human Trafficking to be funny and they're a bit offensive. Just saying. I wouldn't be dedicating this much of my time and life to something if I wasn't totally serious about it. So please, spare me the jokes. Apr 17 02:57:38 btw there not slaves it costs smugglers to sneak them into the country and they gotta work it off somehow :) Apr 17 02:58:41 and in test 2 that guy was russian Apr 17 02:58:54 didnt mean to offend you or anybody Apr 17 02:59:26 http://slaveryreport.com/?p=1 <---- over 200,000 victims of human trafficking are from Europe. So a russian male isn't such a bad choice. Apr 17 02:59:36 i just phrased it badly, i meant it is a win win situation because little money for you means much money for them Apr 17 02:59:50 soroc, you're ok mate. **** ENDING LOGGING AT Tue Apr 17 02:59:59 2012