**** BEGIN LOGGING AT Sat Aug 18 03:00:00 2012 Aug 18 03:16:50 I have an app that includes actionbar in API 15. Is it possible to use exact the same code on Android 2.2 if I add the compatibility package to my app? Aug 18 03:25:23 hi, is this the place to ask about ndk? or is there a room set aside for ndk discussions? Aug 18 03:26:27 giantpune: Aug 18 03:26:45 sorry :) 'channel' - and you can ask here... might not be the best time of day/week to get good responses though Aug 18 03:28:18 what im trying to do is build my own kernel module for android. i tried downnloading the huge git acording to the docs on the website, but "repo sync" runs for a couple hours and then says it failed. and building the kernel modules with the latest ndk crashes my phone Aug 18 03:28:53 i read that the ndk 5b uses an older version of gcc, and doesnt cause this error. but i cant get ndk 5b to build Aug 18 03:30:32 it would be awesome if there is somewhere that has a tarball of the android brebuilt toolchain that i can grab. or even the old ndk Aug 18 03:31:07 for what it's worth, ndk for kernel building, not really on topic Aug 18 03:35:45 aha. this looks like what i was after. http://source.android.com/source/building-kernels.html Aug 18 03:58:03 hi , can anyobdy please provide me a working example for playing a video with MediaPlayer in a TextureView instead of SurfaceView ? ( im working in API15 ) Aug 18 03:59:16 how can I change a button's text that's inside a dialog but only if onActivityResult gets a valid result? Aug 18 04:49:50 I am getting "Unfortunately, Program Name has stopped" but i don't know why. Is there a way to debug this information? Aug 18 04:49:57 In the middle of the program. Aug 18 04:50:20 adb logcat Aug 18 04:50:48 ok Aug 18 04:51:48 thnks Aug 18 05:11:48 anyone know why Aug 18 05:12:24 anyone know why I might be getting an ActivityNotFound exception trying to launch an activity from a Library project? I have the activity defined in my manifest. Aug 18 05:34:57 Apparently I had it declared as instead of Aug 18 05:35:12 false alarm Aug 18 05:35:15 everyone go back to bed Aug 18 05:44:05 does anyone know how to put a space in between sequential linear layouts? Aug 18 05:44:29 basically, i followed this: http://stackoverflow.com/questions/11736658/android-heterogeneous-gridview-like-pinterest Aug 18 05:45:09 but instead of inserting ImageViews into those columns, I used another LinearLayout base XML Aug 18 05:45:25 setting margins doesn't seem to add the space Aug 18 05:45:41 and setting padding does, but of course, increases the size of the item, which isn't what I want. Aug 18 05:46:41 layout_margin Aug 18 05:47:07 jroid: right, on the child LinearLayouts right? Aug 18 05:47:12 i.e. the ones I'm populating with? Aug 18 05:48:58 yea, the child ones Aug 18 05:49:09 are you finding that doesn't work? Aug 18 05:49:15 jroid: yeah Aug 18 05:49:24 whether i use 10dip or 100dip Aug 18 05:50:45 jroid: http://pastebin.com/7z4GvN48 Aug 18 05:52:28 jroid: and this is the parent that above child item is going into Aug 18 05:52:29 http://pastebin.com/ccewaBJG Aug 18 05:53:23 any particular reason the parent linearlayout is set to horizontal and the children vertical? Aug 18 05:54:25 jroid: so that the 3 columns are laid out horizontally? Aug 18 05:54:29 isn't that how it works? Aug 18 05:54:42 you want top/bottom margin or left right? Aug 18 05:55:08 jroid: top/bottom Aug 18 05:55:27 jroid: left/right is taken care of by the paddingLeft/Right of the columns Aug 18 05:56:35 if you want three horizontal colums use a tablelayout with a table row and put your 3 linear layouts in the row. Aug 18 05:57:07 if you want 3 linear layouts in a vertical stack you need to change the parent linear layout to vertical Aug 18 05:57:10 jroid: but I don't need each of the columns scrollable, i want them to be scrollable at once Aug 18 05:58:10 I don't know if I visually understand what you're going for. Are you going for a scroll view of 3 columns. All scrollable at once? Aug 18 05:58:23 yes Aug 18 05:58:36 that's why i pasted that stackoverflow link, because it shows what i want Aug 18 05:58:42 and has code that i used to achieve it Aug 18 05:58:55 but that code populates the 3 columns with ImageViews Aug 18 05:59:18 I'm populating mine with another LinearLayout that has an ImageView and TextView as children Aug 18 05:59:29 so that I can display a caption on each image Aug 18 06:00:38 So which view do you want the top margin between? Aug 18 06:01:42 I want there to be a margin between each of my child items, whose XML code is shown here: http://pastebin.com/7z4GvN48 Aug 18 06:02:01 if you refer to that link, you'll see a layout_margin="100dip" Aug 18 06:02:12 that has no visual impact it seems Aug 18 06:02:28 so are you programmatically adding this child three times to the parent linearlayout? Aug 18 06:02:37 if you change layout_margin to padding, it does make a change Aug 18 06:02:48 jroid: yes, i'm programatically adding them Aug 18 06:06:10 ok, i'd switch your parent linearlayout to a tablelayout Aug 18 06:06:28 The linearlayout holding the 3 columns? Aug 18 06:06:38 add a table row to that layout, and nest your three linear layouts Aug 18 06:07:13 http://pastebin.com/npMEPFFE Aug 18 06:07:41 you control the margin via the tablerow Aug 18 06:08:16 so I add a table row every time I add more than 3 items? Aug 18 06:08:54 correct. you might consider storing a tablrow layout XML file that has all three linear layouts Aug 18 06:09:03 layoutinflate that row and attach to the tablelayout Aug 18 06:10:27 i don't think that will accomplish what i'm looking for visually Aug 18 06:10:41 each table row will contain 3 linearlayouts Aug 18 06:11:00 the linearlayouts dimensions will be determined by the size of its children Aug 18 06:11:16 which will make the tablerow's height be the max of the 3 linears Aug 18 06:12:01 if you're looking for a mesh of linear layouts i'm not sure its possible. But I'm not the foremost android expert. Aug 18 06:12:07 sorry if I wasn't able to help Aug 18 06:12:59 jroid: https://dl.dropbox.com/s/0z7wtleehuxjriu/Screenshot_2012-08-18-02-08-40.png?dl=1 Aug 18 06:13:14 see that for a screenshot of the problem Aug 18 06:13:24 the red you see is the background color of each child item Aug 18 06:13:46 see the gray spacing between each column? that's because i set each column's padding accordingly Aug 18 06:13:59 what I want is an equivalent margin between each item Aug 18 06:14:17 so that it's not flush with each other and all red Aug 18 06:15:54 yea, i think i understand the problem now. I just don't know how to fix it for you Aug 18 06:16:11 me neither Aug 18 06:16:15 margin should have done it Aug 18 06:16:19 not sure why it's not working Aug 18 06:16:23 tablelayout was the best I had, but hat would make everythign even horizontally which I don't think you want Aug 18 06:16:41 yeah, tablelayout wouldn't work for me Aug 18 06:33:05 jroid: figured it out Aug 18 06:33:18 jroid: needed to nest the child LinearLayout inside another one Aug 18 06:56:11 * g00s wonders what google err, moto us suing apple for now O.o Aug 18 07:00:16 is abs 4.1.0 ok with compat lib 10 ? Aug 18 08:07:50 cool, looks like google came out with play store gift cards Aug 18 08:30:36 whats a decent tool to quickly make layout mockups? Aug 18 08:51:28 I want, when the back button is pressed, for the activity stack not to only be popped but for it to reload the activity before the current one. Aug 18 08:51:50 Do I just overload it and then intent load the class and pop the stack? Aug 18 08:51:55 How do you pop the activity stack Aug 18 10:00:52 why should I set layout_height of the childview of a scrollview to wrap_content? I receive this hint from the IDE Aug 18 10:04:53 Hi, if successfully compiled Android full_x86, whoever I would like to use the gdb to see how the dalvikvm operates. How do I enable building with debug symbols and O0? Aug 18 10:13:12 hello all Aug 18 10:13:40 Is it possible to use a ListPreference to select R.style… styles? @style/x returns NULL when used as value. Aug 18 10:13:59 (Used inside string-array) Aug 18 10:14:41 one question. What is the best practice way to create an App Configuration activity. Should I just creat an activity and store the selections of the user in the shared prefs or is there something "special" (I thought I heard something about a special Configuration Activity) ??? Aug 18 10:18:52 Pinas: PreferenceActivity Aug 18 10:19:59 Knossos: beat me to it :) was just getting this for him: http://developer.android.com/guide/topics/ui/settings.html Aug 18 10:20:24 doc_savage: I may have got there first, but your link is more useful ;P Aug 18 10:20:42 :) Aug 18 10:23:59 Knossos - oh thank you :) Aug 18 10:41:45 Hi. I really don't know android but I thought OpenGL applications are compatible between hw platforms with different GPU. But I read some games are made for Mali GPU only. Is it true? Thx Aug 18 10:42:57 if the Mali GPU supports features that no other GPUs does, then sure. Aug 18 10:45:35 Is there portable generic OpenGL API and vendor dependent API? Is it possible I'd potentially buy application that won't run on my device? Aug 18 10:46:46 jkprg: there are two places where incompatibilities show up, and another regarding performance Aug 18 10:47:15 p_l: performance is clear. Aug 18 10:47:42 jkprg: most common one (outside of "does the device support GLES 2.0") that is also handled by market filters is "which texture compression formats are supported by GPU" Aug 18 10:48:37 jkprg: then you have GL extensions which have to be tested for and enabled by application Aug 18 10:48:56 it's application's duty to react to missing extensions Aug 18 10:51:40 p_l: I see. You mentioned market filters …. It looks like market tests capability of my device and offers only apps that my device meets requirements for, right? I didn't know about them … Aug 18 10:51:55 any thoughts on using an intentservice to save _many_ contentvalues during onPause? An alternative could be to have change handlers, which sounds like more work than necessary. Aug 18 10:52:04 to avoid android.os.StrictMode$StrictModeDiskWriteViolation Aug 18 10:52:05 :) Aug 18 10:52:33 can I somehow make a EditTextPreference with a seperate field for username and password ? Aug 18 10:53:21 jkprg: market will filter visibility based on what it knows from manifest about required features (bt, gps, phone, etc.), supported screen sizes, API level, supported GLES version and most recent supported texture compression formats (for GLESv2 mainly) Aug 18 10:53:47 Pinas: http://stackoverflow.com/questions/6164430/how-to-use-edittextpreference-as-a-masked-password-text-field Aug 18 10:55:15 snodnipper - yea I am aware of this, but when doing this I don't have two fields (username, password) but just one field for password. I'd like to have one "window" with to textfields - one for the username and one for the password Aug 18 10:55:37 or am i wrong ? Aug 18 10:55:43 Pinas: sounds like you want a preferences screen Aug 18 10:55:46 with two fields Aug 18 10:55:53 yes Aug 18 10:55:53 one normal textfield Aug 18 10:55:58 and one password field Aug 18 10:56:10 so take that XML and paste twice Aug 18 10:56:15 then remove the password bit Aug 18 10:56:19 sounds good? Aug 18 10:56:50 well but then i have two dialogs right ? Aug 18 10:58:52 Pinas: it depends - if you are creating a preferences screen, which sounds like what you want then you have have N number of preferences…. Aug 18 10:59:14 hi Aug 18 10:59:16 else you have create an AlertDialog or something…which is fine too…but probably a bit weird Aug 18 10:59:59 snodnipper - I'd like to get something like this (without the "Remeber me" button) https://www.witopia.net/wp-content/uploads/2012/01/android_connect_4.png Aug 18 11:00:53 I've been trying to add a custom icon to a Preference in an PreferenceScreen... I've seen complicated methods like overriding Preference and using a custom layout, but it turns out that you can just use the android:icon xml attribute in the Preference , does anyone know if this is known to work on all android versions ? Aug 18 11:01:32 oddly enough Eclipse does not show :icon when you try to autocomplete android in the xml editor... Aug 18 11:02:21 Pinas: I have to be honest, I am not sure how much progress you have made…but I would start by getting a preferences screen going…and saving values. I would personally forget the popup - as that just seems a waste Aug 18 11:02:21 but here (https://developer.android.com/reference/android/preference/Preference.html) android:icon shows up as a valid attribute... Aug 18 11:02:44 Pinas: and if you _really_ want it then I would have a look at something like: http://stackoverflow.com/questions/3426917/how-to-add-two-edit-text-fields-in-an-alert-dialog Aug 18 11:03:35 Pinas: preferences screen, username and password on there….get it working…feel happy….and then if you want to introduce some weirdness / logic then know yourself out :) Aug 18 11:03:49 *knock yourself Aug 18 11:04:01 (autocorrect) Aug 18 11:04:24 hmmm Aug 18 11:04:29 http://developer.android.com/reference/android/preference/DialogPreference.html Aug 18 11:04:58 you might be right - especially because i hate creating UIs it just has to work out somehow Aug 18 11:04:59 :D Aug 18 11:05:19 thx a lot snodnipper Aug 18 11:06:29 np - you'll be able to get what you want no problem…KISS - keep it simple s…. Aug 18 11:13:00 kiss does also mean pee in swedish Aug 18 11:13:18 which is fairly humorous Aug 18 11:18:16 Nibble: I will remember that next time I need to go for a kiss ;) Aug 18 11:57:07 Do classes have a type in Java? Aug 18 11:58:15 Oh wait, they do : Class Aug 18 12:00:00 Bacta: more correctly, that is the reflection of the class. The classes are their own type. Aug 18 12:00:34 or no type at all, depending on how you like to look at it. They are somewhat outside the system in that sense. Aug 18 12:01:06 Am I going at this the right way then? Aug 18 12:01:21 I don't know what you are doing, so it is impossible to say Aug 18 12:01:26 I'm doing collision detection for a game and for each of my agents I only want collisions with certain class instances Aug 18 12:01:27 the reflection can be used to study the class. Aug 18 12:01:40 class instance, aka object? Aug 18 12:01:52 Yep Aug 18 12:02:03 Ah wait Aug 18 12:02:04 typically java people use "instanceof" to determine if object is of some particular class, if that is what you want to do. Aug 18 12:02:07 I know what I should be doing Aug 18 12:02:12 Yes, that Aug 18 12:02:34 private Class[] allowedCollisions = {Airship.class, Bomb.class}; Aug 18 12:02:55 And then loop over that array, obj instanceof allowedCollisions[i] ? Aug 18 12:03:05 also possible to compare the object's class's reflection, like this: foo.getClass() == Foo.class, will be true for a 'foo = new Foo()' Aug 18 12:03:15 however subclasses break, probably not a good idea Aug 18 12:03:59 Bacta: hmm, I think instanceof requires the direct name of the class, not expression Aug 18 12:04:18 you write, (foo instanceof Foo), not (foo instanceof Foo.class). I admit I've never tried the latter form, or in general use instanceof to begin with Aug 18 12:04:36 Rats Aug 18 12:04:49 but you can do something like foo.getClass().isinstance(Foo.class) Aug 18 12:04:53 I thought it would be cleaner to define a property as opposed to putting it directly into my method Aug 18 12:04:58 reflection has an answer Aug 18 12:05:26 or make an interface Collidable and make Airship and Bomb implement that Aug 18 12:05:36 twobturtle: if that matches what he wants to do Aug 18 12:05:42 It doesn't Aug 18 12:05:50 I don't want collisions between bombs for example Aug 18 12:06:16 ok, I missed that Aug 18 12:06:17 so it must be a tightly specific 'canCollide(obj1, obj2)' type of thing. Aug 18 12:07:04 hi all - i'm new, just saying hello :) Aug 18 12:07:44 snodnipper, well I guess I have to wait a few years until I hear how the kiss went Aug 18 12:08:47 This may be weird, but how to make the EditText gain focus when the activity is started? Most of the answers on SOF is to make it not pull the Keyboard over. But I want to show the keyboard and focus on EditText. Can someone suggest me something apart from It does not solve the problem for me. Aug 18 12:10:58 I've just hardcoded it into my checkCollision methods Aug 18 12:11:00 Should be ok for now Aug 18 12:11:04 Bacta: I'm personally not favoring data-driven programming unless the method has to be configurable Aug 18 12:11:19 This project has approx 500 lines of code so it's not going to be terrible maintenance wise Aug 18 12:11:20 it's often clearer and simpler to just write the logic, rather than to write a generic logic that is configured by some ad-hoc data structure Aug 18 12:11:43 but when it has to be configurable somehow then of course the data-driven way is the right design Aug 18 12:12:25 I view the former style as either future-proofing -- usually for the future that never arrives -- or just habitual overcomplexification Aug 18 12:12:57 one should always write the simplest possible thing that will work first, and only consider complicating it when new requirements arrive Aug 18 12:13:21 That's actually the same advice I give to new developers where I work Aug 18 12:13:31 "Just do the simplest thing that could possibly work" Aug 18 12:14:15 I used to do a lot of data-driven junk in my youth. I don't know why Aug 18 12:14:29 One day I woke up from in the middle of spaghetti and realized that I habitually designed everything wrong Aug 18 12:15:25 I don't know, I guess I always thought that code should make no assumptions. These days I think it is the most succinct form to encode assumptions in, and if you keep it bone-headedly simple, it's probably the most maintainable too Aug 18 12:16:00 Nibble: lol - you shouldn't restrain yourself….just let it all out several times a day. Keeping things in for several years is very bad for your health ;) Aug 18 12:16:17 Well you do need to draw a distinction between business rules and data Aug 18 12:16:25 snodnipper, ? Aug 18 12:16:33 snodnipper, I was implying that you weren't going to kiss anyone Aug 18 12:16:37 This specific problem was in a grey area Aug 18 12:16:37 for several years Aug 18 12:16:53 Nibble: LOL - I know…funs on you! Aug 18 12:16:56 But anyway - after a months weekend hacking I now have a game that plays Aug 18 12:17:18 Now it just needs better graphics, menus, sound and all that crap Aug 18 12:17:22 Nibble: and I was talking about kissing! Aug 18 12:17:24 ;) Aug 18 12:17:25 The least interesting stuff Aug 18 12:17:28 Bacta: IDK, people who think business rules are different are on the road to inventing the enterprise rules engine Aug 18 12:18:27 "Application can be changed just by configuring it, only we find out that our configuration language is so complicated it is in fact an ad-hoc specified programming language, so all changes still require programmer to do only are now lot harder to make Aug 18 12:18:38 that is the ERE disease in a nutshell Aug 18 12:20:59 Well Java does encourage it to a certain extent Aug 18 12:22:57 I guess I generally lament the fact that the world could be a lot simpler if people just used tailor-made systems and refrained from inventing these complicated specifications which get used for about 1 % of their capability anyway Aug 18 12:23:13 I'm currently interfacing with such a system that is somehow tangentially based on SAML and it is horrible Aug 18 12:27:57 normal developer: "We put a service on some well-known URL and you fire a request at it & we'll put the key data in JSON". SAML developer: "we'll carry soap over http holding xml document containing digital xml signatures that authenticate the client ..." The difference in complexity is simply enormous Aug 18 12:30:05 Ah SOAP Aug 18 12:30:08 and then when you parse the response, it is wrapped in soap which wraps the saml response which wraps the principal which wraps the attributes which have name, value, and value type specified as URL Aug 18 12:30:13 Awful stuff Aug 18 12:31:03 it is so mindnumbing that I don't try to think about it very much. Aug 18 12:31:34 I haven't yet looked what the value type url for a number is. Not even xml schema goes that far in bureaucracy. Aug 18 12:32:41 I am reading the doc about fragments, and there is a FragmentLayout.java example which i should be able to run from the samples directory. However, when i try to open a new sample project in eclipse there is no "Fragment' sample program.. how can I run it then? Aug 18 12:32:46 but a lot of people used to be happy with something like 123 back in the day people thought this was baroque (because xml repeats which is sort of unnecessary) Aug 18 12:35:27 anyway, I do not fully understand why this relentless drive towards excess complexity is there, but it seems to me that any specification which is nice (because it is simple) ceases to be simple in direct proportion to its popularity. Aug 18 12:35:31 Then it gets replaced by something simple again Aug 18 12:36:53 It's safe to say that xml-related technologies went off the deep end long time ago. Curiously, it doesn't seem like the amount of bureaucracy to dealing with XML documents has actually increased in the last 5 years or so Aug 18 12:38:24 and in fact android is not even trying very hard in the xml-bureaucracy department. It has only one namespace to use as a fig leaf to hide the fact that it's not doing a lot. If XML document doesn't begin by listing 10 namespaces, it's clearly not to be taken seriously. Aug 18 12:38:41 not sure if serious Aug 18 12:38:50 anyway :-p back to my miserable xml-related existence. Aug 18 12:39:39 Hah! Try to have fun Aug 18 13:10:01 when you set a view's id from the xml editor, how do you get it to update so it can be found with code? typing R.id.whatever, it's not found in the list Aug 18 13:10:58 build once Aug 18 13:15:57 ok thanks Aug 18 13:16:16 hmm I'm having a problem where the xml gui preview for my custom view is not what is actually appearing on my device. Is there a way to solve that? Aug 18 13:24:32 guys, im having a wierd problem , trying to use this, http://www.fpaste.org/oCs2/ , but tells me "news_layouts cannot be resolved or is not a field" , im 100 percent sure its there Aug 18 13:25:11 i even have a cloned file in the same place, with a different name , but works Aug 18 13:41:51 i don't understand these resource links… i made a new project with min build 10, target 10, and it starts already having errors for R.layout.activity_main Aug 18 14:27:28 does it have to be called within some other callback? I've built a webview, called scrollTo, and added the view to a framelayout. The webview displays properly, but it doesn't scroll Aug 18 14:27:34 i can't figure out how WebView.scrollTo() works Aug 18 14:28:41 thebishop, sure the page is loaded? Aug 18 14:29:09 Nibble, no, and that was my main concern. is there a callback when the page finishes loading? Aug 18 14:29:57 .setPictureListener if I recall Aug 18 14:30:05 I read about this yesterday Aug 18 14:30:06 setPictureListener is deprecated Aug 18 14:30:21 i saw some stackoverflow questions about it, and then found it in the api docs Aug 18 14:30:44 thebishop, that was the one I read too, but I didn't expand on it as it wasn't what I was looking for Aug 18 14:31:24 Nibble, onPageFinished looks possibly right, but i couldn't get it to work Aug 18 14:31:27 http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageFinished(android.webkit.WebView, java.lang.String) Aug 18 15:04:17 Hello, how I request the ID from a clickable objekt? Aug 18 15:11:59 object? Aug 18 15:12:01 you mean view Aug 18 15:12:03 ? Aug 18 15:12:10 if so view.getId(); Aug 18 15:14:08 .getInfo().identificationDB().getId() Aug 18 15:17:39 Napalm: I use this on 3 TextViews: android:onClick="onClick" android:clickable="true" Now I want to know how i can get the id, like this: android:id="@+id/medi_cave_t" in the onClick methode Aug 18 15:18:55 As he said, view.getId.. you get the view in the click listener Aug 18 15:19:20 But view.getID give me a int and not a string Aug 18 15:19:33 The id is an int Aug 18 15:19:44 medi_cave_t is the variable name Aug 18 15:20:00 R.id.medi_cave_t is the id.. And that's an int Aug 18 15:20:17 without the attitude Aug 18 15:20:25 Ok Aug 18 15:20:44 sukramTM, it's just a way to access it without using numbers Aug 18 15:21:45 thx Aug 18 15:26:28 one question. is there a possiblity to read the emails stored on the device ? Aug 18 15:28:34 Hm the Id is 10 postions long? Aug 18 15:33:34 sukramTM, idk, does it matter? Aug 18 15:38:09 http://i.imgur.com/DrHZc.png Aug 18 15:58:08 Is it possible to request the R.id from the int wich i get with getId? Aug 18 15:59:43 sukramTM: I don't understand a thing! Aug 18 16:00:20 R.id.xxxx is an int, so you can assign it to an int variable and play around with it. Aug 18 16:00:25 sukramTM, you seem very confused about IDs, have a read of: http://developer.android.com/guide/topics/ui/declaring-layout.html#id Aug 18 16:00:27 sukramTM: What are you trying to do Aug 18 16:01:01 how can I disable/delay the screen lock? KeyguardManager is depreciated/doesn't work consistently, FLAG_DISMISS_KEYGUARD is not an option because this will run in the background and I don't want to use a WakeLock for battery reasons. Aug 18 16:02:37 In my methode I use getId and get back the ID from the view. But now I need the id wich I assigned to the view Aug 18 16:03:44 So you can compare them and see which view was clicked? Aug 18 16:03:58 if (view.getId() == R.id.your_id) Aug 18 16:04:04 sukramTM: in your onClick do this. if(view.getId() == R.id.my_button_id){ /* my code */ } Aug 18 16:05:26 This wayx I use in the moment Aug 18 16:07:26 but when i can get the R.id without if or switch, something like this: string a = R.id Aug 18 16:07:30 I want to know the visible left point of a view, getLeft() always returns 0 Aug 18 16:08:23 sukramTM: But why.. What's the point Aug 18 16:08:29 when the view is scrolled with .scrollBy(-30,0), i want getLeft() or similar to return -30 instead of 0 Aug 18 16:08:35 No matter what you're trying to do, there's most likely a better approach Aug 18 16:08:48 SimonVT can you help me Aug 18 16:09:04 prakas: You are not scrolling the view, you are scrolling the content Aug 18 16:09:08 The view doesn't move Aug 18 16:09:15 Use getScrollX Aug 18 16:09:31 oh ok Aug 18 16:09:35 thanks Aug 18 16:11:06 ?hm can I somehow read the gmail mail when requesting an auth token ??? Aug 18 16:15:13 SimonVT: When I click on a text view, i want that another textview come vissible. the id's are for example: text_1_a and text_1_b. When I click on a, b come vissibilty. I have 20 from this textviews, so I have to write for 20 textview a else or case. Now i thougt I request the the ID (for example text_1_a) save it in a String (String tvb), exchange the last 2 chars to _b and make tvb Aug 18 16:15:13 vissible.... Aug 18 16:22:05 sukramTM: make a static int[] array with your Ids and loop over it Aug 18 16:30:12 is it possible to communicate through 2 android devices via just TCP or over local WiFi access point/router? Aug 18 16:31:21 I know I can do this with bluetooth right now, but I'm trying to extend this Aug 18 16:31:30 rockap - try nativ code and just sockets Aug 18 16:49:56 when doing setContentView, is there a way to get a handle on the layout that my R.layout.bla is created IN ? Aug 18 16:50:21 so after doing setContentView Aug 18 16:51:55 another question. I have several sqlite.db files (on the sdcard) and I'd like to read those in my app - how can i do this ??? Aug 18 16:53:13 pinas, i don't know much about sqlite but i would guess you first need to read them from the sdcard like any other fileo n sd card Aug 18 16:53:49 I have a problem with some of my code Aug 18 16:53:50 rootlicker - yea of course I could just read it like a normal file, but I'd like to perform queries on this files Aug 18 16:54:40 I get 'Syntax error on token "_", ) expected' and 'Syntax error, insert ";" to complete Statement'. The code is https://gist.github.com/3388332 Aug 18 16:55:42 I am troubleshooting a boot issue where CodenameAndroid 3.3.0 (Vzn Galaxy Nexus Toro) won't mount /cache or /data during boot, but will from adb shell. Aug 18 16:56:04 I am looking for the file location to see when/where those partitions are mounted. Aug 18 16:56:24 Is there a default "fstab" type file for Android? Aug 18 16:56:35 I should mention it's on line 20 Aug 18 17:00:43 http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ Pinas Aug 18 17:01:03 that talks about loading one from the assets folder and into the application Aug 18 17:01:25 im sure loading from sd card is probably very similar Aug 18 17:18:21 SimonVT: thanks a million. that function worked like a charm Aug 18 17:28:25 hmm whats best practice for storign an api key Aug 18 17:29:28 guess it doesn't too much matter, gets sent with every request in plaintext Aug 18 17:46:06 hello guys, I have a simple app with actionbar but when calling a new activity throught actionbar menu, in order to open a webpage, that page open on fullscreen. How can I keep the actionbar menu on top? Aug 18 18:29:42 public MediaPlayer loadMusicAsset(String filename) { Aug 18 18:30:27 "loadMusicAsset", "(Landroid/media/MediaPlayer;)Ljava/lang/String;" Aug 18 18:30:52 giving me null methodid =( Aug 18 18:31:07 strange, it works for other methods of same class Aug 18 18:36:03 oh crap i reversed it Aug 18 18:46:48 How many Android developer accounts exist? Aug 18 18:47:24 42 Aug 18 18:48:54 What am I looking for if I want to push data from a server to my android-app? Can this be done through a simple TCP or UDP connection? What is best practice? Aug 18 18:49:14 google cloud messagin Aug 18 18:49:33 using it right now Aug 18 18:49:39 SimonVT, I think it are more :] Aug 18 18:49:52 Honestly, estimate! 100k? Aug 18 18:50:04 1 million? Aug 18 18:50:06 xorgate: thanks Aug 18 18:50:12 no.. 1 million is too many Aug 18 18:50:23 or? ;) Aug 18 18:51:05 johanhar are you using app engine? Aug 18 18:51:19 don't know what that is Aug 18 18:51:44 it's a platform by google so you can easily make a backend for your app in java/python/go Aug 18 18:52:02 I made an app polling (if that is the correct term) data through a HTTP REST API. Now I would like my server to push data to my app. Aug 18 18:52:11 Google host it? Aug 18 18:52:21 I think I would prefer a solution where I host my own solution Aug 18 18:52:27 platform* Aug 18 18:52:29 cloud messaging can send a little msg to your phone, so the phone knows to update. better than polling Aug 18 18:52:35 also possible Aug 18 18:52:44 ok, nice Aug 18 18:52:44 you don't want to host your own push infrastructure Aug 18 18:52:55 Hmm ok Aug 18 18:54:00 I mean... you can host your own server-side stuff, but leave the work of getting the message to the phone to Google Aug 18 18:54:23 Is it free? Aug 18 18:54:53 yup Aug 18 18:58:44 bear with me, but why can't I just a simple TCP or UDP connection to send messages from the server to my android app? This cloud messaging seems more of a "send one message to many receivers", when I want one message for one receiver. Aug 18 18:59:20 You can do that too if you want Aug 18 18:59:31 johanhar what's your phone's ip? it changes Aug 18 19:00:02 All you do is you register with GCM, send the registration key to your server, then the server can send all the messages it needs to your client Aug 18 19:00:18 if it is just a 1-1 relationship, then you dont even have to bother tracking multiple keys Aug 18 19:00:24 johanhar your phone asks 1 time 'what is my id for this app, on this phone'. then you pass that on to the server. if the server wants to call you, it has this id so it (google's wizardry) can find you Aug 18 19:01:06 hmm, ok Aug 18 19:01:15 then it wakes up your phone, and you ask the server for changes Aug 18 19:01:19 it's quite nice, actually Aug 18 19:01:27 johanhar: and wouldn't it be nice if every app on your phone listened on a different port for incoming messages, making sure it never slept? Aug 18 19:01:52 as opposed to a single multiplexed connection Aug 18 19:01:59 The problem is largely battery usage Aug 18 19:02:06 I like it! Aug 18 19:02:07 Leeds i think that sentence might be a bit abstract in this case.. Aug 18 19:04:59 johanhar GCM is nice because it allows all your apps to not have to poll, and waste batterylife Aug 18 19:05:32 I really should rewrite my RSS-polling app to use GCM :) Aug 18 19:07:55 xorgate: thanks for the many answers :) Aug 18 19:08:05 and the rest of you :) Aug 18 19:08:19 Naughty Leeds Aug 18 19:09:03 johanhar youre welcome Aug 18 19:10:00 how hard is the serverside part to implement for gcm? Aug 18 19:10:31 There are plenty of tutorials on it, I believe the official Google docs are up-to-date now Aug 18 19:11:00 k Aug 18 19:12:07 i know there was something for zend framework that handled android and ios but i got out of php dev at least for the moment...(and never used it, just found it doing research for a yii project) Aug 18 19:17:45 anyone know where I can find the sources for android-support-v4.jar? I am trying to add them to eclipse so I get javadocs Aug 18 19:17:51 SCREEN_OFF_TIMEOUT is available to change when the display sleeps, but is there something like this for the screen security/LOCK? Aug 18 19:22:48 hmm seems that the android-support-v4.jar sources is already in my built path despite it not being able to look it up, this is obnoxious Aug 18 19:24:22 android-sdk\extras\android\compatibility\v4\... Aug 18 19:24:58 I usually copy the library to project_folder\libs\... Aug 18 19:25:14 then right click add to build path in the project explorer Aug 18 19:25:18 In eclisep Aug 18 19:25:22 *Eclipse Aug 18 19:29:01 Knossos: do you actually copy it in there or just link it? Aug 18 19:29:12 I copy it Aug 18 19:29:33 ok Aug 18 19:30:39 hmm, it still can't find FragmentActivity Aug 18 19:31:27 Where does /cache and /data get initially mounted? Aug 18 19:31:44 although it appears to be trying to launch the program and being very slow at it Aug 18 19:32:48 Knossos: it still gives me the errror "The JAR of this class file belongs to container 'Android Dependencies' which does not allow modifications to the source attachments on its entries." Aug 18 19:33:20 Hm Aug 18 19:34:09 I'm not sure about that error Aug 18 19:34:15 http://stackoverflow.com/questions/2064100/the-jar-of-this-class-file-blongs-to-container-android-2-0-1-which-does-not-allo Aug 18 19:34:19 I come up with this article Aug 18 19:34:25 But I'm afraid I don't know Aug 18 19:35:37 thanks for the help Aug 18 19:35:38 does DATE_CHANGED fire at midnight or only when the date is changed manually? Aug 18 19:36:02 this thing is messed up pretty seriously, now it is saying there are tons of errors within the android-14 sources Aug 18 19:36:05 which makes no sense... Aug 18 19:37:29 perhapse I should just give up and look up the support stuff on line Aug 18 19:39:28 are there any 1.6 users at all? Should I put minimum version as 1.6 if I can? Aug 18 19:40:54 hi everyone Aug 18 19:41:11 I have a sparsearray of an object with different fields Aug 18 19:41:27 it is used by multiple thread and 2 activities Aug 18 19:41:51 should I make the sparse array volatile of should I make the class volatile or the fields in the class volatile? Aug 18 19:42:59 this will be my first time attempting to use a volatile declaration; so, if anyone has any feedback on this, let me know Aug 18 19:50:16 what does it generally mean when the container is null in onCreateView() within a Fragment? Aug 18 19:50:28 i guess I should ask how one goes about fixing that Aug 18 20:08:33 hmm i think im having trouble returning an object to jni Aug 18 20:11:18 maybe i store them all in member hash set Aug 18 20:12:33 Where does /cache and /data get initially mounted? Aug 18 20:19:28 mrjester: I imagine that varies by device and is probably more suited to #android-root Aug 18 20:21:19 guys, is there a difference between permissions on api 8 and 16? Aug 18 20:22:51 nope diff bug, but got it! Aug 18 20:27:15 just for fun Aug 18 20:27:15 https://play.google.com/store/apps/details?id=com.jahcsoft.amigagurumeditation&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5qYWhjc29mdC5hbWlnYWd1cnVtZWRpdGF0aW9uIl0. Aug 18 20:27:39 my new marketplace crapware. :) Aug 18 20:27:47 I dont want to call it an app Aug 18 20:27:53 because that implies its something useful Aug 18 20:28:12 oops I need to recompile it with a gingerbread sdk Aug 18 20:28:17 it says its only for 4.0.3. and up... lol Aug 18 20:28:40 at least that application is properly useless Aug 18 20:28:51 I also plan on selling useless application sometime in the near future Aug 18 20:28:55 I have an object that is shared between a message type of thread and a Degtail Fragment. When a message comes in, it updates the shared object which in turn sends a message to the Detail Fragment to update its views. Aug 18 20:29:05 alankila, haha Aug 18 20:29:20 I get the error about only the original thread that created the view being able to touch its views Aug 18 20:29:24 a live wallpaper that does some 3d trickery which I hope to interest some geeky people, maybe. Aug 18 20:29:29 mines a bit gimmicky.. if you remembered the amiga this is probably somethign you'd want to show your friends.. and then probably forget about it after a few minutes Aug 18 20:29:31 is there a better way to handle this or anyone have any ideas on how to fix this Aug 18 20:30:08 jahc: sure... the amigists -- of which I once also was -- are soon around 40 year old though Aug 18 20:30:19 yup Aug 18 20:30:21 even 80 Aug 18 20:30:26 or about 30 like me :) Aug 18 20:30:37 it might be more fun to run classic amiga demo effects as wallpaper or something. The more you bother to implement, the better. Aug 18 20:30:38 hey epsi Aug 18 20:30:46 guys, im using this http://www.fpaste.org/p0SA/ , which works normally on 2.2, but on 4.1 i get this http://www.fpaste.org/4oun/ Aug 18 20:30:49 thats a cool idea alankila. Aug 18 20:30:52 and the best part is, they are _dead simple_ Aug 18 20:30:58 does a static object make sense for you? Aug 18 20:31:20 alankila, I guess I'm too busy with my 40 hour work week to do anything serious in my spare time anymore. boo!! Aug 18 20:31:32 I mean, rotating pixelated landscapes? vectors? you could pretty much take say Hardwired and write most of the stuff at rate like 1 effect per day if you could steal the artwork Aug 18 20:32:20 the challenge on amiga was all about the low computational capability of the hardware, and the weird way everything was setup in terms of graphics Aug 18 20:32:41 ahhh, reminds me of my Amiga days Aug 18 20:32:46 these days you can just run complicated program for EVERY PIXEL on the screen and it will be realtime still Aug 18 20:32:47 AMOS basic Aug 18 20:32:48 lol Aug 18 20:33:05 68K anyday :| Aug 18 20:33:11 since my question dissapeared so fast ill try again :/ Aug 18 20:33:12 http://www.fpaste.org/4oun/ Aug 18 20:33:16 guys, im using this http://www.fpaste.org/p0SA/ , which works normally on 2.2, but on 4.1 i get this http://www.fpaste.org/4oun/ Aug 18 20:33:20 anyone gotten c2dm to work on emulator? Aug 18 20:34:01 * alankila has designed the amiga sound synthesis model used by a player called UADE. Aug 18 20:34:05 also in WinUAE Aug 18 20:34:41 anyone have an idea on how to access a fragments view from another thread??? Aug 18 20:34:51 designed is barely the word to cover it. In terms of complexity it is trivial bit of DSP. Aug 18 20:35:04 more like "hacked" :-p Aug 18 20:35:27 damn it, 20 minutes of my life i cannot get back, all it was was a resource qualifier Aug 18 20:35:59 taljurf: you can add property to allow this on later versions of android Aug 18 20:36:20 taljurf: or fix the program to not perform networking in the UI thread, which implies freezing the UI for some unknown period Aug 18 20:36:23 taljurf: well the error tells you the problem, dont access the network on the UI thread Aug 18 20:36:59 Napalm, alankila: so that was ok before? Aug 18 20:37:08 no Aug 18 20:37:10 taljurf: it was never OK, but it wasn't checked against Aug 18 20:37:13 its never been ok Aug 18 20:37:31 imho the change was pretty risque though... to crash outright Aug 18 20:37:45 they should have not crashed if the targetSdk is less than android 3.0 Aug 18 20:37:49 whats the command to whisper? Aug 18 20:38:01 or something ... just enabling that detection is unkind Aug 18 20:38:54 alankila, thats awesome Aug 18 20:38:58 alankila; yea, because i actually thought it was ok, when i tried it on my 2.2 emulator and it worked correctly, which made me assume it would on 4.1 Aug 18 20:39:09 alankila, I used UADE on my AmigaOneXE in 2005 or so Aug 18 20:39:22 we all wished someone would create a nice UI for it, but we just used a cli version of it Aug 18 20:39:52 well the uade is embeddable as a library... although I confess I do not like its client-server model internally Aug 18 20:40:00 imho it's pretty annoying design Aug 18 20:40:02 alankila, do you know of AmigaOS 4? and the JIT 68k emulator used for emulating old applications transparently under the new system? Aug 18 20:40:34 Almos who wrote that emulator lives in my city now. We've met a few times at my usergroup.. :) Aug 18 20:40:38 jahc: no, not really. I don't pay attention to what Amiga has become since that time when I sold my A1200 like 13 years ago, unfortunately. Aug 18 20:40:44 ah.. hehe, ok. Aug 18 20:40:47 hmm, i think its time for pizza Aug 18 20:41:25 jahc: anyway if you use UADE, you should use the sinc resampling method. I was not able to convince the lead developer to make that default because PC mod players that use "sinc" sound muffled in his opinion Aug 18 20:41:27 I'm still kinda watching the Amiga scene although i dont actively use them anymore or own any.. Aug 18 20:41:41 could never make him understand the difference between resampling and interpolation. UADE does resampling, everybody else does interpolation. Aug 18 20:42:08 nod Aug 18 20:42:17 its hard when you work with someone else and have different ideas on how to do stuff Aug 18 20:42:21 that is, UADE constructs a 3.54 MHz sample stream of Paula's output and then resamples that to target frequency, 44.1 or 48 kHz Aug 18 20:42:22 and you cant see eye to eye Aug 18 20:42:59 Paula generates pulse waveform, so it's virtually cost-free to do. Convolution becomes simply piecewise subtraction and multiplication. Aug 18 20:43:14 um, piecewise addition, of course Aug 18 20:44:07 if I have a clock timer running in another thread and I want a display on the UI to show the current state of the timer, what would be the most straightforward approach to being able to update the UI every tick, an AsyncTask or just using a Handler/Message? Aug 18 20:44:09 And we sampled some real amigas to discover how the output is manipulated by the analog filtering, and someone recognized that the toggleable "LED" filter is a 2nd degree Butterworth, iirc cut-off frequency at 3200 Hz, and Amiga 500 has a 5 kHz fixed 1st order lowpass filter Aug 18 20:44:50 adding these things made the emulation sound very convincing -- we were able to compare synthesized audio to sampled audio and found only very small difference between the two spectra in average Aug 18 20:45:17 no offence, but this is the android channel and not Amiga, as a Amiga owner don't bitch at me Aug 18 20:45:45 or is UADE for android? Aug 18 20:45:55 Well, UADE has been ported to android Aug 18 20:45:59 ahhhh Aug 18 20:46:09 cool Aug 18 20:46:13 going to get me some of that Aug 18 20:46:27 there's an application called DroidSound which has it. I'm not sure where the market version is at, it's maintained by some other guy. I have a private fork at github with some guy called lioncash Aug 18 20:46:32 I started it by releasing a gimmicky Android app that simulates the guru meditation message lol Aug 18 20:48:34 old amigists ... never get them started. ;-) Aug 18 20:50:04 jahc: where was that from then? Amiga? Aug 18 20:50:05 i think i just missed something then, convo follow fail Aug 18 20:50:09 when amiga crashed, it produced that red flickering box on the top of the screen with text like "Software Error. Guru meditation #." Aug 18 20:50:18 ah yep. Aug 18 20:50:36 I imagine the last value is the program counter Aug 18 20:50:37 oh yea Aug 18 20:50:39 i remember Aug 18 20:50:41 you know how on Windows, it does the blue screen of death and you cant do crap about it? Aug 18 20:50:41 it was flash Aug 18 20:50:44 invert Aug 18 20:50:49 well Amiga had their own version of it Aug 18 20:50:53 the former signifies the type of trap, there was word read from unaligned access trap, and division by zero trap, and so on iirc. Aug 18 20:50:55 called Guru Meditation Aug 18 20:51:01 dude, i got an Amiga Aug 18 20:51:09 500+ Aug 18 20:51:13 oops I misundersood the question.. Aug 18 20:51:20 in the loft gathering dust Aug 18 20:52:03 pretty fun machines back in the day, eh? Aug 18 20:52:12 I used to get GM #3 and #4 during my programs but I no longer remember what those meant. Aug 18 20:52:13 yup Aug 18 20:52:16 68k asm Aug 18 20:52:19 can I ask how old you are? Aug 18 20:52:25 i always remember AMOS basic Aug 18 20:52:32 ages of former Amiga users always intrigues me Aug 18 20:52:34 I'm 31 Aug 18 20:52:36 some game with Apples you had to catch Aug 18 20:52:38 28 Aug 18 20:52:44 right, address error (unaligned read) and illegal instruction (probably jumped somewhere you weren't supposed to) Aug 18 20:52:50 cool. we're relatively young former Amiga users Aug 18 20:52:55 alankila: how old are you? Aug 18 20:52:59 35 Aug 18 20:53:10 yea, i was around 8 when we got the family amiga Aug 18 20:53:48 I was around 6 when we got the family C64. I think I gamed very extensively on it. I remember days where I did nothing but bang on that computer. Aug 18 20:53:51 jahc: wanna hear about retro, see http://www.netcore2k.net/home/napalmsblog#Retro-Remembrance Aug 18 20:54:40 (I should mention that DroidSound also contains C64 SID emulation developed by Dag Lem and various other people, including me, and it's getting _very_ good.) Aug 18 20:54:53 barely runs on 1.0 GHz phone though Aug 18 20:55:00 Napalm, looks like a great blog. :) Aug 18 20:55:10 meh i hardly update it Aug 18 20:55:15 just random bits here and there Aug 18 20:55:29 bit of a hardware guy too eh? Aug 18 20:55:34 nice Aug 18 20:55:47 sure, its a hobby Aug 18 20:55:53 Napalm, very cool stuff Aug 18 20:55:58 after i did OS dev i got an interest in hardware Aug 18 20:56:06 so started it has a hobby Aug 18 20:56:34 do you like your owon scope? i haven't been able to figure out how to take jpg screenshots with it... :( Aug 18 21:00:46 dj_pi: since there pc side software is java and uses libusb, someone has reversed it and made some stuff up, sourceforge has it someplace Aug 18 21:01:13 i didn't know...thanks for the tip...that's the only thing i disliked about mine Aug 18 21:01:25 whats that Aug 18 21:01:28 libusb must be easy to get into, you can probably just dump all the packets with some debug switch Aug 18 21:01:36 * alankila loves usb hardware for being so transparent in terms of protocol Aug 18 21:01:59 i didn't know someone reveresed the pc side software...i'm guessing it will have the feature i want Aug 18 21:03:46 dj_pi: i upgraded my scope and i think it has that feature built in, will save to usb drive Aug 18 21:03:59 http://www.netcore2k.net/images/napalmsblog/modem_hack1.jpg Aug 18 21:04:11 + I've also used libusb from java and while the components could be a bit better, it's still awesome to write cross-platform userspace usb driver Aug 18 21:04:17 http://www.netcore2k.net/images/napalmsblog/modem_hack3.jpg Aug 18 21:04:28 use the same shit from linux, mac and windows with the same program + one changing native component that deals with the platform Aug 18 21:04:45 yea, my new scope has a logical analyser built in aswell Aug 18 21:05:06 Napalm, i got the mso8282t...the logic bus and analog one... when i screenshot it saves as some weird .bin format... i just wanted simple jpg Aug 18 21:05:38 i'll look into it...haven't had much time lately...a lot of pcb design and c-code lately ;) Aug 18 21:07:32 dj_pi: im going to take a look, i seem to remember the format is a planar vga buffer Aug 18 21:07:43 dj_pi: got a bin file to hand? Aug 18 21:07:57 yeah...one sec... let's PM Aug 18 21:08:02 coolo Aug 18 21:15:13 any idea why the content inside the scrollview is not being displayed? http://www.radpaste.com/502/ Aug 18 21:16:07 "A ScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll" Aug 18 21:18:09 madprops: I think the layout height gets to 0dp Aug 18 21:18:10 because there's not really any inherent content height to it... it can scroll, so it figures out it scrolls at any size. Or so I imagine. Aug 18 21:18:51 Also, that Aug 18 21:18:57 Don't use wrap content Aug 18 21:19:24 i placed it on top of the linear layout and that seemed to fix it Aug 18 21:38:11 what's the best way to keep an audio sample in memory and to trigger it whenever you need? Would that be something like an AsyncPlayer or is that not necessary? Aug 18 21:38:22 I don't want to reload it over and over which makes me think the AsyncPlayer wouldn't be the solution Aug 18 21:38:36 tnzr: well, can't MediaPlayer do it once you prepare() and just pause, rewind, play again? Aug 18 21:39:03 alankila: I figured that was more for bgm's or something Aug 18 21:39:10 alankila: if your interested those OWON raw data is pure 16bit signed samples with a header.. and i just found this https://github.com/levilarsen/owon-utils which has all the libusb goodness Aug 18 21:39:44 alankila: what about an AudioTrack in static mode? Aug 18 21:40:18 tnzr: I don't really know about it, wasn't AudioTrack meant for sound you generate yourself? Aug 18 21:40:34 alankila: I dunno, hmm Aug 18 21:40:34 It has the write() API and all Aug 18 21:40:37 ahh yes Aug 18 21:40:41 makes sense... Aug 18 21:40:56 I just saw this: The static mode should be chosen when dealing with short sounds that fit in memory and that need to be played with the smallest latency possible. Aug 18 21:43:34 when i change an id from the xml layout editor, how do i get it to update to the code? i still get errors saying not found Aug 18 21:43:46 rather, cannot be resolved Aug 18 21:43:51 ultra-: afaik the changes in XML do not propagate to code Aug 18 21:44:07 how can i reference my main layout? Aug 18 21:44:21 you might be able to trigger the "rename" option in eclipse, which probably manipulates the generated R, then change layout and trigger R's regeneration Aug 18 21:44:36 or something. Not sure. Never tried it. Aug 18 21:45:17 ok Aug 18 21:45:24 i might be going about this wrong anyway, i'll google Aug 18 21:45:54 ultra-: project -> clean Aug 18 21:46:19 I usually click "build selected projects" in that same window so that it will automatically rebuild Aug 18 21:49:00 that will regenerate the R.java with your new stuff included Aug 18 21:49:05 looking for that option… under the 'project' menu, any build stuff is grayed out Aug 18 21:49:05 same with clean? Aug 18 21:49:07 try right clicking the top level of your project in the left side package explorer Aug 18 21:49:07 it does let me clean, that didn't fix the issue Aug 18 21:49:27 when you cleaned, did you check the box to build the project too? Aug 18 21:50:14 ah, there's no option for that, but it does tell me that the project will be rebuilt from scratch Aug 18 21:50:37 ok i see there's another problem Aug 18 21:51:14 cool.. yeah every time you add something to an xml layout, you need to clean/rebuild for R.java to pick it up Aug 18 21:51:14 i think the problem is i used "main_layout" as the id, must have to be an integer Aug 18 21:51:19 I don't know of another way other than that Aug 18 21:51:27 ok, thanks Aug 18 21:51:38 np Aug 18 21:57:49 can i somehow have it stop referencing this layout xml file altogether? i want to do it all via code Aug 18 21:58:01 says it's not well formed, but i just don't want it to be needed at all Aug 18 22:57:59 any idea why i'm getting this error (bottom) http://www.radpaste.com/504/ Aug 18 22:59:10 madprops: you're closing your second tag twice: android:background = "#E4E4E4"/> should not have a / Aug 18 23:11:23 doc_savage, ahh woops :d Aug 18 23:12:18 :) Aug 18 23:12:30 i just noticed that google maps navigation shwos the actionbar on the nexus 7 Aug 18 23:14:22 Wow, that's amazing Aug 18 23:17:57 if i have a bytebuffer and want to putShort(index, value) is the index taken as an index into an array of shorts or do i need to do putShort(ix << 1, val) Aug 18 23:37:59 Someone just asked why Android has synchronous network/fs methods rather than async ones that would remove the need for a load of boilerplate. Is there a good reason, or is it an example of one of Android's weird design decisions? Aug 18 23:39:03 Estel: because async i/o is hard and rare? Aug 18 23:39:25 and basically the boilerplate is the async part Aug 18 23:39:33 some of which you'd have to write anyway Aug 18 23:39:55 also, majority of programmers can't do async Aug 18 23:40:04 lol Aug 18 23:40:28 That would seem to be a reason to allow you to just pass a callback. Aug 18 23:40:56 And don't people /have/ to do async now since API11 prevented expensive operations on the main thread? Aug 18 23:41:02 Estel: the callbacks would confuse the hell out of devs, and you'd end up with code that waits for the callback Aug 18 23:41:22 Estel: no, what they have to do is to do all their beloved blocking calls in separate thread Aug 18 23:41:35 which is easier to push Aug 18 23:42:13 especially since multithreaded communication is pretty well pushed into their brains now, even if they use the slow brain damaged way of using big fscking locks Aug 18 23:42:56 async i/o means having to deal with all the concurrency issues *and* adding extra complexity to poor Java programmers who are unprepared for it (and Java is really, really annoying in making callbacks) Aug 18 23:44:40 AFAIK, even on VMS which is the one OS I know which has *only* async i/o, a lot of the code uses the blocking calls (which are actually functions that queue the I/O request, then wait for event flag signaling completion) Aug 18 23:45:21 NT exposes VMS condwait like interface, but afaik it's much less known than "let's spawn ton of threads" Aug 18 23:46:06 Ok, I guess that makes sense Aug 18 23:47:13 Estel: if you look at it from bird's eye view, an android app process looks a lot like async single-threaded task Aug 18 23:47:26 except all those boilerplate things would exist in different form Aug 18 23:48:24 Though with respect to confusing devs, iOS hasn't seemed to have suffered by offering some async methods. But if it's a language issue too, that makes sense. Aug 18 23:48:35 Estel: iOS is sync as fuck Aug 18 23:49:06 it kinda forced them to offer callback-based apis :> Aug 18 23:49:37 also, there are some non-blocking or similar apis in java, in NIO I believe? Aug 18 23:50:09 in iOS you could have always used select() family for i/o (you can do so from NDK in Android) Aug 18 23:50:59 (which is polled interface, but can be easily turned into a loop calling tons of callbacks) Aug 18 23:52:26 (actually, iOS is just OSX with a bit different lib choice. And GUI programming already requires a lot of callbacks there, so...) Aug 18 23:53:07 ... wow, rant Aug 18 23:53:15 tl;dr :p Aug 18 23:57:26 heh Aug 19 00:31:40 ugh Aug 19 00:31:50 I can't seem to interrupt() a thread, it's bugging me. Aug 19 00:32:37 I don't know details of that on Android, but I seem to recall that interrupting a thread tends to be pretty hard to get working... Aug 19 00:32:50 yeah this code works great in plain ol' java Aug 19 00:33:37 not sure what it is about Android that's keeping it from working though..I have a button wired to call stop() inside my Runnable, which basically calls myThread.interrupt() and sets myThread to null (inside the Runnable) Aug 19 00:34:29 but it just keeps truckin' along Aug 19 00:38:32 tnzr: if the io is blocking it won't stop; otherwise you could set a variable in the thread to terminate it Aug 19 00:40:23 dragorn: hmm Aug 19 00:40:46 how do you mean if the io is blocking? Aug 19 00:41:10 if you're doing any sort of io or other operation which is blocking; such as doing a dns resolve, network io, etc, you can't cancel it Aug 19 00:41:21 ok Aug 19 00:42:02 that was it :) Aug 19 00:42:10 i forgot to include running = false in my stop() method :) Aug 19 01:06:53 generally, how do i send data from an android smartphone to a server? Aug 19 01:07:22 anyway you like Aug 19 01:07:27 socket? Aug 19 01:07:41 or over http through a socket Aug 19 01:07:46 HttpClient... Aug 19 01:08:22 and can i setup a direct wireless network connection between a pc and smartphone? Aug 19 01:08:25 Hello I am using ASB with one of the main actions being a search function. My question is for tablets I'm using fragments to show both the search results and more details on item select, but on phones I'm wondering if it is advisable to swap out the "selected detail" fragment with a fragment contaning the listview results, as opposed to starting a new activity for the search function... Aug 19 02:12:03 hey guys, i'm trying to pull a list of items from an API, and i'm doing so currently with AsyncTask Aug 19 02:12:18 I'd like to keep this data in a List<>, which again, I can do Aug 19 02:12:33 however, I'd like to keep the UI work outside of the AsyncTask Aug 19 02:12:55 is there a way to set a callback for AsyncTask to call upon completion, that will take care of my UI stuff? Aug 19 02:13:07 so then I could technically reuse the AsyncTask elsewhere if needed? Aug 19 02:14:58 should be an onComplete method you can override iirc Aug 19 02:15:02 dunno, been a few months Aug 19 02:16:09 http://developer.android.com/reference/android/os/AsyncTask.html#onPostExecute(Result) maybe? Aug 19 02:16:37 HacDan: onPostExecute is what I'm using right now, but it has to be definied within the AsyncTask itself Aug 19 02:16:46 right Aug 19 02:16:51 what are you looking for then? Aug 19 02:16:57 I guess I read it wrong the first time =/ Aug 19 02:16:58 I'd like to decouple the background web/network access from my UI Aug 19 02:17:15 i.e. I don't want my AsyncTask doing both the network stuff, and UI stuff Aug 19 02:17:22 i think this is the right direction: http://www.programmingmobile.com/2011/07/why-androids-async-task-isnt-always.html Aug 19 02:54:03 can someone tell me where i can learn about adding effects to recorded mic input? Aug 19 02:56:25 kingargon: I assume you want to add your own effects? if so, you'll need to do some research into how soundwaves work and you can manipulate them mathematically **** ENDING LOGGING AT Sun Aug 19 03:00:01 2012