**** BEGIN LOGGING AT Sun Aug 16 02:59:57 2009 Aug 16 03:03:36 yo Aug 16 03:04:14 will a file based storage be much simpler than content providers? Aug 16 03:14:55 muthu: a content provider is an abstract api independent of the backing store. Aug 16 03:15:18 in other words, your question makes no sense. a content provider could use file based storage. Aug 16 03:25:39 jasta: right, but i was wondering about the whole content provider design Aug 16 03:27:27 was thinking whether an array adapter backed up by a file would be good enough Aug 16 03:27:43 instead of going through the hoops of contentproviders Aug 16 03:30:18 hello Aug 16 03:30:51 how to do incremental build? Aug 16 03:35:28 hello Aug 16 03:35:51 how to do incremental build? Aug 16 03:38:30 hi asan, you new to android dev? Aug 16 04:14:51 yes Aug 16 04:20:08 test Aug 16 04:20:25 helloworld Aug 16 04:42:38 kroot: (super belated) yeah, the stuff i fixed was already rewritten in donut (and based on what i saw of the code, definitely needed to be) Aug 16 05:15:42 itp: heh Aug 16 05:20:08 what are the "optimal" parameters and read times to use an AudioRecord object (besides the minBufSize calculations of course :)) Aug 16 08:42:44 hiya, so i'm working in eclipse and i've created 2 classes, 1 preference class that i intent as a subactivity, now when i install the app on the emulator, i see 2 apps with the same name and the 2nd starts my preference Aug 16 08:42:48 how is that? Aug 16 10:46:05 is there a good working with json tutorial Aug 16 10:46:36 i think i saw one on google Aug 16 11:04:13 can anyone point me to link where i can find how to create AVD and run android on emulator ? Aug 16 11:10:27 Ramosa funny, i searched but maby on the wrong term Aug 16 11:17:25 can someone help me with this: {"val":"foo","id":1} how to get .val and .id Aug 16 11:17:30 from a json string Aug 16 11:24:36 hi all i am working on: http://www.anddev.org/web_services_-_an_xml-rpc_client_for_android-t646.html as the project i am working on need a web service. maybe its just to hard for me since i dont know what they mean "3. Add those packages to your project." what is meany by that ? i have downloaded the files, and assume i need to add them to the project but cant figure out where/how Aug 16 11:38:49 cage: You can use the android json framework Aug 16 12:47:14 hi Aug 16 12:47:23 I'm new as a developer Aug 16 12:47:44 in the dev-console, I don't understand what are some numbers next to the app Aug 16 12:48:35 http://www.youtube.com/watch?v=741xC_ZWudo Aug 16 12:48:40 fear the particles :p Aug 16 12:48:44 (number1) *stars* (number2) "total" (number3) active installs (number%4) Aug 16 12:48:57 number1 is number of votes I guess Aug 16 12:49:11 number 3 is real installations Aug 16 12:49:21 but, what's number 2? Aug 16 12:49:24 "total"? Aug 16 12:49:52 and what's number4? (the %) Aug 16 12:51:50 SinnerG: cool :) Aug 16 12:52:02 err no idea where you get this info from - maybe a screenie? :p Aug 16 12:53:54 hi Bruno Aug 16 12:54:00 argh Aug 16 12:54:04 its Tim Aug 16 12:54:05 :P Aug 16 12:54:05 :) Aug 16 12:54:28 dis is brüno => http://assets.gearlive.com/filmcrunch/blogimages/bruno.jpg Aug 16 12:54:29 :p Aug 16 12:54:35 is that in the emulator ? Aug 16 12:54:45 yes Aug 16 12:54:46 the youtube vid Aug 16 12:54:47 cant you see? :p Aug 16 12:54:53 neat... Aug 16 12:54:55 yeap Aug 16 12:55:17 i thought opengles was something in the hardware Aug 16 12:55:19 on the phones Aug 16 12:55:24 that would make it a little faster... Aug 16 12:55:30 and not software... Aug 16 12:56:00 err? :p Aug 16 12:56:09 nm :) Aug 16 12:56:29 still cant emulate the stroids particles though ;p Aug 16 12:56:30 stickyman? Aug 16 12:56:33 haha Aug 16 12:56:41 you mad that? Aug 16 12:56:44 made Aug 16 12:57:00 made what? Aug 16 12:57:15 stickman - super mario Aug 16 12:57:55 not me :p Aug 16 12:58:20 someone with alot of time to waste ;) Aug 16 12:59:51 http://www.youtube.com/watch?v=BpWM0FNPZSs Aug 16 12:59:53 check this out Aug 16 13:00:06 seen that already :p Aug 16 13:00:30 its pretty neat Aug 16 13:04:22 how about this one - http://www.youtube.com/watch?v=cwvVh0_ZelI Aug 16 13:04:25 ? Aug 16 13:05:11 seen it Aug 16 13:05:11 ;p Aug 16 14:19:51 Dumb question, on mac can we acces java6 ? Aug 16 14:40:02 hi, I've tried to use Japanese in some label, but boxes appeared in the editor, is it wrong fonts or lack of support for kanji? Aug 16 14:57:37 hi all Aug 16 16:28:58 Is it possible to see what in my code (if anything) is causing GC? Aug 16 16:29:20 ddms Aug 16 16:29:29 hmm, I'll look it up :) Aug 16 16:29:31 thanks Aug 16 16:29:35 np Aug 16 16:29:53 oh there's a nifty little tab there in eclipse.. I wondered what that was Aug 16 16:30:15 dont use that one Aug 16 16:30:20 its in your sdk' tools folder Aug 16 16:30:32 Oh.. ok Aug 16 16:30:43 you might have to shut down eclipse or pull out-in the usb cable plenty of times befoer your apps shows ni the list :p Aug 16 16:30:47 it has 'issues' :p Aug 16 16:31:47 So, would I be looking at the "allocations" area, I guess? Aug 16 16:32:12 yup Aug 16 16:32:19 allocation tracker Aug 16 16:32:22 start tracking Aug 16 16:32:32 wait a while, and then get allocations Aug 16 16:32:35 it'll show what kind / where Aug 16 16:34:03 where can i find source code for the dialog : "No Network Connection" "The page will continue loading after connection has been restored" "OK" Button Aug 16 16:34:24 aunn: its in browser Aug 16 16:34:38 jasta , thx Aug 16 16:34:41 grep for the string in res/values/strings.xml, then grep for the identifier in the source Aug 16 16:34:56 ah .... yeh Aug 16 16:41:53 what is the best way to preventing opening your application multiple times, if i push the back button and then reopen my app i want it to be restored from where i was. Aug 16 16:42:15 cage: normally android does this for you Aug 16 16:42:22 you must be doing something wrong if thats not happening Aug 16 16:43:33 cage: what in particular did you want to be restored? Aug 16 16:45:35 well i use viewflipper Aug 16 16:46:01 and lets say im'in view 3 and then push the back button, it goes to the android home screen Aug 16 16:46:12 if i reopen the app, it should put me back to view 3 no? Aug 16 16:51:31 cage: well, no. Aug 16 16:51:35 not if you press "back" Aug 16 16:51:54 why not then Aug 16 16:51:55 "back" is how you reverse state Aug 16 16:52:03 pressing home, and then returning that way, would keep your state Aug 16 16:52:11 ah let me try Aug 16 16:52:11 that said, you can force your app to save state arbitrarily if you want Aug 16 16:52:28 "back" triggers onDestroy, btw, so the whole thing is going down Aug 16 16:52:44 ah great, so i just catch the back buton? Aug 16 16:52:46 button Aug 16 16:52:51 you could save some state about your UI during onStop if you are so inclined and restore it no matter what in onCreate Aug 16 16:52:58 no, do NOT catch the back button Aug 16 16:53:14 but it has a musicplayer that plays, how do i stop it else? Aug 16 16:53:35 cage: you need to use a service if you want the music to continue playing while the activities are not displayed Aug 16 16:53:44 such as for example how the Music app does it :) Aug 16 16:53:58 ah i'vé read about that, so i just move all my controls to a service? Aug 16 16:54:08 no, its not that simple Aug 16 16:54:31 you have to be careful to do things correctly when implementing a service Aug 16 16:54:40 look at the Music app source code as a reference Aug 16 16:55:09 is it possible to intercept another app's disk io? Aug 16 16:55:16 is that in the sdk? Aug 16 16:55:50 ewon: what? Aug 16 16:55:54 cage: android.git.kernel.org Aug 16 16:56:59 jasta: actuakky, I just figured it out, thanks anyway Aug 16 16:57:29 cage: btw, i doubt very much that you want a viewswitcher for your ui rather than multiple activities Aug 16 16:57:44 androids backstack wont help you like it should if you use a viewswitcher to implement your whole ui Aug 16 16:57:56 kind of a silly way to break android :) Aug 16 16:58:15 well its my first app, so i was guessing so much i was doing everything wrong Aug 16 16:58:16 :p Aug 16 16:58:52 anyone know how to turn of predictive text input on a htc hero, its driving me insane Aug 16 16:59:08 or change it so that it doesnt pick something automatically when i type Aug 16 17:02:33 jasta, the music player code is not friendly for beginners :) Aug 16 17:02:41 read it until you understand :) Aug 16 17:04:06 git should have syntax highlighting Aug 16 17:05:21 no, it really should not Aug 16 17:05:39 shht Aug 16 17:06:09 damnit i really like android Aug 16 17:26:03 cage: why is that damnit? Aug 16 17:27:40 because i really like making this app, but damnit because documentation lacks for noobs Aug 16 17:33:59 cage: its not that the documentation is lacking, its that youre not willing to appreciate that mobile development is much more complicated than you initially thought Aug 16 17:34:07 just turn your brain on, go slow, and you'll figur eit all out Aug 16 17:34:20 well also, documentation is a bit lacking :) Aug 16 17:37:40 Anyone can help me with Bluetooth? Aug 16 17:37:47 L2CAPSockets? Aug 16 17:38:29 don't ask to ask just ask Aug 16 17:38:53 I asked :-) Aug 16 17:39:01 i answered Aug 16 17:39:25 Have you used RfCommsockets? Aug 16 17:39:53 even if I had, i'm not into the 20 questions game today Aug 16 17:40:03 Instead, Has anyone used BluetoothSocket? Do we need a rooted device for that? Aug 16 17:40:21 jasta: heheh Aug 16 17:40:25 Wow, what is the game all about? Aug 16 17:40:40 20 questions, is that your limit per day? :P Aug 16 17:41:54 cage: there is this general assumption that somehow because the device is small and the apps are typically simple that mobile development is much easier than desktop or server development Aug 16 17:42:26 but this is just not true. the requirements are much more strict, and the probability of error is much higher Aug 16 17:43:26 slower processor, less memory, more likely catastrophic failures, etc Aug 16 17:43:36 and, one of the worst limitations, the battery :) Aug 16 17:44:12 so like i said, just take it slow and learn to do things the right way Aug 16 17:44:21 reading google's sources are a great way to do just that Aug 16 17:46:08 yes i know, its going slow but gradualy. the api examples are also a great help Aug 16 17:47:37 so jasta, did you make any nice apps? Aug 16 17:47:48 hehe, a few. Aug 16 17:47:56 i work for t-mobile btw, on android. Aug 16 17:49:07 hey as long as the My Account app doesn't break again because tmo thinks my rom isn't tmo, i'm fine :P Aug 16 17:49:24 i didnt work on that app ;) Aug 16 17:49:37 cage: i also wrote http://five.googlecode.com, and am still working on it Aug 16 18:02:17 jasta: can you tell me whether the bluetoothsocket can be used without a rooted device? Aug 16 18:02:45 i have no idea Aug 16 18:02:53 why not just look into the source and figure it out? Aug 16 18:03:14 How?? I looked into source. But cant figure out whether it works on rooted device only :-) Aug 16 18:04:03 how can you not figure it out? Aug 16 18:22:03 jasta, is there a windows client? Aug 16 18:22:10 sorry i mean windows server Aug 16 18:22:10 to what? Aug 16 18:22:15 to five Aug 16 18:22:18 no, im working on a java rewrite fo the server as we speak Aug 16 18:31:22 hi, is there any chance to manipulate the voice stream during a phone call, either by patching/rewriting the ril oder by the java api? Aug 16 18:35:57 argh, what the hell. gerrit wont let me push for some reason Aug 16 18:36:06 just keep getting permission denied (publickey) from ssh Aug 16 18:39:13 there we go Aug 16 18:39:25 had the username wrong :) Aug 16 18:39:37 SUBMITTING_PATCHES in repo should be updated to make mention of that i think Aug 16 18:52:38 jasta, I am really not able to see whether I will need a rooted device for using BluetoothSocket. Aug 16 18:52:52 Since I dont have a device right now, So thats a another problem. Aug 16 18:53:08 Is there anyone working on Bluetooth support for android emulator? Aug 16 18:56:44 hi Aug 16 18:56:53 anyone alive... Aug 16 18:57:00 nope Aug 16 18:57:03 I am dead :P Aug 16 18:57:05 need help badlyy Aug 16 18:57:33 i have 1 activty and fromn there i create another ativity and want to call function of the seconds activity from the first activity Aug 16 18:57:46 but i dont know how to get refernece to the second activty Aug 16 18:58:13 xbxice, can't do that Aug 16 18:58:32 oh Aug 16 18:58:53 so how can i modft data of 1 activity from another Aug 16 18:58:58 modify Aug 16 18:59:23 send extras in intent if you need to trigger something on create Aug 16 19:00:00 i have a thread and i want to update my activity when stuff happen in the thread Aug 16 19:00:22 so i need the thread to call functons in the activity Aug 16 19:01:35 ex the activty have int _nContacts; Aug 16 19:01:55 and in some point the thread get the info from the web and i need to update the activity class Aug 16 19:02:28 how can my thread access the activity ? Aug 16 19:04:47 :/ should be a way Aug 16 19:04:49 post messaged to the activity Aug 16 19:04:54 how ? Aug 16 19:05:43 Intent intent =new Intent(iLogin.this,ContactScreen.class) Aug 16 19:05:49 startActivityForResult(intent, ACTIVITY_CREATE); Aug 16 19:05:56 use a handler in the activity, pass to the thread... postmessage on handler Aug 16 19:05:57 this is how i create my second activty Aug 16 19:06:45 nexo can u should me simple example it will be great help Aug 16 19:07:11 if i wll really able to have such handler and to post messages it will fix all Aug 16 19:07:24 but how i pass such handler to the thread Aug 16 19:07:53 I am on my phone right now, so can't really give example Aug 16 19:08:05 thx Aug 16 19:08:23 http://developer.android.com/reference/android/os/Handler.html Aug 16 19:09:47 great i wll take a look ! Aug 16 19:13:22 but even if i create Handler messageHandler = new Handler() in my second activity Aug 16 19:13:52 how can my thread that running fronm the first activity can call it Aug 16 19:15:53 you really shouldn't be using two activities if the depend on each other like this Aug 16 19:17:04 your first activity should pause when the second activity starts, that's how android works Aug 16 19:19:21 ok i see your point but what if i do ths Aug 16 19:19:34 ConnectThread _connectThread; declare in my first activity Aug 16 19:19:50 and when someone click a button i do Aug 16 19:19:51 _connectThread= new ConnectThread(); Aug 16 19:19:59 _connectThread.start(); Aug 16 19:20:25 how can my thread access the handler that is declare in the activity Aug 16 19:21:40 I use a helper class that takes a handler in the constructor and the creates the thread and reports back to the handler Aug 16 19:22:06 i see Aug 16 19:22:39 I need to find a good free irc client for vista... Aug 16 19:26:38 ah, yay... no longer on my phone Aug 16 19:28:31 this is horrible there is no way to pass my messageHandler member to the thread class by refernce Aug 16 19:28:46 so i will be able to post messages Aug 16 19:31:54 OK, what you probably should do is this... Create a simple class... that takes a Handler as a final parameter on the constructor, create an instance of that class and pass in the Handler from the activity. then start the thread. In the run method, you can then access the handler that you passed in to the helper class and post messages to your hearts delight Aug 16 19:33:06 this might not be the best way but it works for me Aug 16 19:34:00 I should figure out this pastebin thing and give a code example... Aug 16 19:34:47 but this will be pass the member by value and not by refernce Aug 16 19:35:04 trust me, it works Aug 16 19:35:46 so all i need to do is to add 1 member functon to my public class ConnectThread extends Thread that get 1 param handler from the activity Aug 16 19:36:18 and i will be able to post messages to my activity Aug 16 19:36:48 Yes Aug 16 19:38:12 thats solve 1 issue when i create thread from the first actvity and i can share data between them BUT when i create the second activity how can i tell my thread about handler there Aug 16 19:38:48 cause my _ConnectThread _connectThread; declate only in the first activty Aug 16 19:39:11 and i can do something like _connectThread.setHandler( from my second actvity Aug 16 19:39:33 *cant Aug 16 19:40:08 no, activities cannot access each other's members... are you certain that you need two activities for this? Aug 16 19:41:18 xbxice, why do you want to share data? Cant you have the thread post messages to the handler in the activity telling it what to do? Aug 16 19:41:18 no need for my 2 activities to access each others members BUT i want my thread to be able to access my active activty members Aug 16 19:41:37 with its own members... Aug 16 19:41:43 the thread belongs to the activity that created it Aug 16 19:42:32 ok this is what happen first i have 1 activity login screen and when someone push button its create thread class and do the network stuff Aug 16 19:42:55 in sone pont of the TCP/P session login was OK so i need to switch screen to the contact screen Aug 16 19:43:07 Change content, yes Aug 16 19:43:15 and to be able to modiy the data of the new activity from the thread Aug 16 19:43:39 Why do you want to do that? Cant you pass on recieved data from the thread via the handler? Aug 16 19:43:45 and have the activity to the thinking? Aug 16 19:43:54 recieved tcp data, that is Aug 16 19:44:07 to=do Aug 16 19:44:19 just an idea Aug 16 19:44:27 i am going to walk the dog now, bbiab Aug 16 19:44:39 noooo wait little more :) Aug 16 19:44:45 i will be back in 15 mins Aug 16 19:44:47 patience Aug 16 19:44:49 brb Aug 16 19:44:49 kk Aug 16 19:46:37 I really think that you should look into having your login and contact screen be part of the same activity Aug 16 19:51:15 how its possible Aug 16 19:51:22 i wish could do that Aug 16 19:51:26 it will be the BEST Aug 16 19:51:38 how can i modify the screen content Aug 16 19:52:58 dont tell me just doing setContentView will works ? Aug 16 19:53:41 now that i think about it if it will work i can just have 1 Activity 1 thread and write entire IM app like this ... Aug 16 19:53:48 I don't think setContentView will work after onCreate... though I have never tried it, to be honest. Aug 16 19:54:19 so how will i be able to chanage the content screen from login to contacts list Aug 16 19:56:15 you could include them both in the same layout, and show the appropriate one at the appropriate time Aug 16 19:57:03 too much mess Aug 16 19:57:03 hmm, I just tried setContentView from a button clicklistener and it changed my contentview just fine Aug 16 19:57:10 Hey everyone, does anyone know where I can find info on defining a bitmap in xml? Aug 16 19:59:18 Defining a bitmap in xml? Aug 16 19:59:22 You can have two different layout files Aug 16 19:59:26 if you like, xbxice Aug 16 19:59:45 and just calling setContentView ? Aug 16 19:59:55 to switch view Aug 16 20:00:07 that works for me Aug 16 20:00:23 yeap Aug 16 20:00:25 just make sure you don't hold references to the old views Aug 16 20:00:25 thats the idea Aug 16 20:00:49 how can i make sure that i dont hold ref ? Aug 16 20:01:17 oh i see what you mean Aug 16 20:02:06 so should i write the IM app with just 1 activity and to use swtch content Aug 16 20:02:21 or for every screen content new actvity Aug 16 20:02:27 what will be the best way Aug 16 20:03:03 well, depends Aug 16 20:03:17 personally I'd use separate activities for certain things. Aug 16 20:03:53 viewing a persons profile for example might be a separate activity Aug 16 20:03:58 yes it will make the code clean Aug 16 20:04:19 but there is soo much issue when it come to share data Aug 16 20:04:26 between activity Aug 16 20:04:43 what types of things are you wanting to share? Aug 16 20:05:05 you can use static global variables if need be... Aug 16 20:05:08 data struct that declare in my ContactScreen extends ExpandableListActivity Aug 16 20:05:16 that reprent the contact Aug 16 20:05:25 represnt Aug 16 20:06:29 so i create that ContactScreen from the first activty but no way to be able to modify the content of it from the thread that was created by the first activity Aug 16 20:06:53 ContactScreen is... the contacts "profile"? Aug 16 20:07:17 contactscreen is the main contact list Aug 16 20:07:35 contacts Aug 16 20:07:37 what is the first activity? The login screen? Aug 16 20:07:42 yes Aug 16 20:08:16 and the login activity create the thread that do TCP/ip job Aug 16 20:09:06 and when login is success i display the second actvity but i dont have way to call its function to populate the contact list names that came from the thread Aug 16 20:09:39 you don't want to use a database to store this sort of thing? Aug 16 20:09:55 no Aug 16 20:10:00 why? Aug 16 20:10:12 out of curiosity... Aug 16 20:10:14 what u mean by database ? Aug 16 20:10:32 sqlite? Aug 16 20:10:52 if someone status chanage to away i want to update the contact list screen Aug 16 20:11:01 no need database for such operation Aug 16 20:11:32 all i want it so call functon in the second actvty from the thread Aug 16 20:11:44 can't do that Aug 16 20:12:51 have you looked at the android IM app for guidance? Aug 16 20:13:33 http://android.git.kernel.org/?p=platform/packages/apps/IM.git;a=summary Aug 16 20:15:30 if i cant do that what the hell i can do Aug 16 20:15:41 wow writing for the iPhone was sooo easy Aug 16 20:16:03 you wrote this same app for iphone? Aug 16 20:16:31 yes in less then a month all fine Aug 16 20:16:47 I can't comment on the ease of iphone vs android because I've never desired to develop iphone apps Aug 16 20:17:01 trust me way easier Aug 16 20:17:01 and how long have you been working on it for android? Aug 16 20:17:12 few days Aug 16 20:17:49 ok, so you've still got nearly a month till you hit your iphone dev time, lol Aug 16 20:20:01 I'd look at the Android IM app I linked before, and go from there... Get a feel for how this sort of thing has been done in Android, and maybe take some snippets or ideas from there Aug 16 20:20:19 yep Aug 16 20:20:55 and look into AIDL - which appears to be used a lot in the standard android IM Aug 16 20:22:29 I'm probably not able to offer anything more really Aug 16 20:22:41 thx for all Aug 16 20:24:27 Has anyone else faced the "Could not find the drawable resource matching value" error event though the app runs fine on the emulator? Aug 16 20:26:18 You know what ignore I just found the solution Aug 16 20:28:02 But the solution brings me to the question, what is the difference between say @drawable/ and @+drawable Aug 16 20:28:21 don't use @+drawable Aug 16 20:28:27 haha Aug 16 20:28:37 that's kinda meanlingless Aug 16 20:28:41 I'm actually surprised it works Aug 16 20:29:04 nice to see you here romainguy :) Aug 16 20:29:37 hey romain guy, I just been reading you post on Google Groups :-P Aug 16 20:29:54 <_avatar> xbxice: if you're doing something that maintains a persistent connection it should probably be in a Service. your different Activities can bind to the same service instance and communicate via aidl remote interfaces Aug 16 20:30:05 The thing is it works with the + when compiled, but eclipse kicks up saying it can't find the resource Aug 16 20:30:28 yes because it generates a new drawable id Aug 16 20:31:46 add in the plus and its fine, but what I was wondering is, I'm defining a tilable bitmap in xml, and the src of that bitmap is the problem, only thing I was wondering is if a new drawable needs to be defined and your not defining as being in the android:drawable= way as you would in your layout xml file Aug 16 20:33:19 no Aug 16 20:33:27 drawables are defined because they exist in the drawable directory Aug 16 20:33:28 that's all Aug 16 20:33:48 I dunno if that even makes sense but I'm just trying to think why it makes a difference Aug 16 20:34:09 nexo may have idea Aug 16 20:34:14 I just told you Aug 16 20:34:16 it generates a new id Aug 16 20:34:23 which may point to an existing drawable or not Aug 16 20:34:36 in my second activity i will call Aug 16 20:35:05 getIntent().putExtra("handle", _handler); Aug 16 20:35:18 and from the first activity that create the threa i will call Aug 16 20:35:32 I doubt a handler can be passed as an intent extra Aug 16 20:35:39 So is there any harm in generating a new ID? Aug 16 20:35:42 i see Aug 16 20:36:12 you can try it... though I wouldn't expect it would work Aug 16 20:36:21 handler is type Object Aug 16 20:36:29 gauntface: yes because you might be pointing to a non existent resource Aug 16 20:36:37 just don't use + when referring a drawable Aug 16 20:36:39 so lets see if getExtra can return Object Aug 16 20:37:23 <_avatar> you can't pass arbitrary objects between contexts using intents. they have to be basic types, or implement Parcelable Aug 16 20:37:38 Okies that makes sense, I'll just do this is code, it seems like this may be a little hiccup in the eclipse plugin Aug 16 20:37:46 <_avatar> xbxice: you really need to use a service to accomplish what you're after. Aug 16 20:38:06 I agree, services are your friend Aug 16 20:38:59 ok i will read about services Aug 16 20:39:15 Thanks for chatting with me romainguy Aug 16 20:39:19 np Aug 16 20:39:25 :-) Aug 16 20:40:11 hey romainguy, while you are here... do you know about the ellipsize function? Aug 16 20:40:17 yes Aug 16 20:40:21 the thing is that servces made for inter process communication Aug 16 20:40:38 and just want to do communication in my OWN process Aug 16 20:40:40 do you know why it ellipsizes paragraphs at 2 lines? Aug 16 20:40:50 no clue Aug 16 20:40:55 not between processess Aug 16 20:41:04 <_avatar> xbxice: i don't think it's "made for interprocess communication." that just happens to be one of its features Aug 16 20:41:13 i see Aug 16 20:41:59 it's very strange, it will ellipsize each paragraph at two lines even if you set max lines to 4, or 3, etc... Aug 16 20:42:35 I hacked out my own ellipsize function but it's not very clean unfortunately Aug 16 20:42:45 max lines does not affect this Aug 16 20:42:58 it's probably just a limitation/bug of the current implementation Aug 16 20:43:38 hey romain Aug 16 20:43:47 hoy Aug 16 20:43:53 ah, ok, I tried to figure out where the problem might be but I just gave up and reimplemented lol Aug 16 20:45:21 romainguy: ive spent half my day fighting with t-mobile's stupid vpn setup so i can actually be productive at home :\ Aug 16 20:45:30 not time well spent i feel Aug 16 20:49:59 I hate VPNs :) Aug 16 20:51:08 ours is especially stupid Aug 16 20:51:18 they only let you connect through windows, so we have virtual machines just to connect to the vpn Aug 16 20:51:26 <_avatar> haha Aug 16 20:51:31 right now i'm trying to make it possible to connect the vpn in the vm and route through it from the host Aug 16 20:51:52 the nice thing about having it as a vm though is that i copied it to my desktop machine so i dont have to work on my laptop at home hehe Aug 16 20:52:05 i have a quazi-solution now but it double-backs all the traffic so itsr eally slow/inefficient Aug 16 20:52:19 trying to fight with our stupid vpn configuration to fix it Aug 16 20:52:39 apparently the cisco vpn client, regardless of client configuration, forces all traffic through the vpn interface Aug 16 20:52:49 that is, nothing can route through your lan subnet Aug 16 20:53:55 jasta I can tell now you are clearly the right man to ask about networking lol Aug 16 21:03:21 how can service call function in activity Aug 16 21:03:34 huh? Aug 16 21:04:19 <_avatar> it can't. a service can "raise events" through an aidl interface Aug 16 21:04:31 <_avatar> activities can bind to the service and receive the events Aug 16 21:04:52 ok so the idea is that those event will update my activity Aug 16 21:05:15 <_avatar> yeah, basically Aug 16 21:05:35 when using a ACTION_VIEW "geo:lat,long" uri to open google maps, does anyone know if there's a way to drop a label pin at that location? Aug 16 21:05:35 xbxice: you can either do it with broadcasts or by binding to it with aidl. Aug 16 21:05:45 <_avatar> yeah, broadcasts are another option Aug 16 21:05:53 i can do a query at that location, but i don't see a way to just drop a pin at that location Aug 16 21:06:28 just saw example that service trigger a call to setLastEventnInfo for some activity Aug 16 21:06:44 BUT i looking on the activity code i dont see where its recv the event Aug 16 21:07:03 xbxice: activity code wont help you see that ;) Aug 16 21:07:29 <_avatar> i'm pretty sure there's at least one API sample that shows how to accomplish this Aug 16 21:07:30 xbxice: so there are two ways to do this: through broadcast intents, or by binding to the service and implementing an RPC-like language for your activity and service to communicate Aug 16 21:08:19 the choice of which to use should be made first. broadcast intents are IMHO clumsier, less precise, and i believe less efficient Aug 16 21:08:25 but much easier to work with Aug 16 21:08:35 <_avatar> yup, totally agree with jasta Aug 16 21:08:54 the latter approach of using aidl to define a language is more elegant, but also much more nuanced and difficult to understand/implement. Aug 16 21:09:03 to define an interface, i meant Aug 16 21:09:05 not a language :) Aug 16 21:09:52 however, there are some functional advantages to broadcast intents Aug 16 21:09:55 jasta what is the easy way to do it Aug 16 21:10:07 for instance, a broadcast intent can "wake up" a component that isnt currently running or listening to the service Aug 16 21:10:22 so if functionality like this is necessary you'll probably need a service Aug 16 21:10:28 err need to use broadcast intents Aug 16 21:10:38 <_avatar> the easy way is to use broadcast intents. your service sends the broadcast, your activity receives it via a BroadcastReceiver Aug 16 21:10:50 xbxice: the easy way is to send broadcast intents from your service, and register/unregister to receive them in your activity Aug 16 21:11:00 i see Aug 16 21:11:16 there are many examples of this. for instance, the Music app's player service communicates in this way Aug 16 21:11:28 and why i need service for to do it cant i just do it from my thread ? Aug 16 21:12:04 and my thread will send the broadcast, Aug 16 21:12:04 xbxice: the only reason you'd use a broadcast intent is to communicate from one android component to another. if you just want to share events in a single component then dont use this mechanism Aug 16 21:12:28 use whatever you want for that. for instance you could use a Handler to send messages to your main thread from another thread. Aug 16 21:12:31 <_avatar> jasta, he has two activities. Activity1 starts a connection thread, then he wants to use the connection thread to poke at Activity2 Aug 16 21:12:38 i just want to share data between thread and differnt actvity Aug 16 21:12:46 sounds like you want a singleton Aug 16 21:13:06 a static references to a thread allocated once and persistently available to all activities in your application Aug 16 21:13:20 yeah I did exactly what you did xbxice and did it using a singleton Aug 16 21:13:20 but do note that your thread should be cleaned up sensibly when the activities leave. Aug 16 21:13:47 also, your process can be reaped once the user is no longer looking at any of the activity, so your thread could suddenly die. Aug 16 21:13:48 how you create static refernce to thread Aug 16 21:13:53 if you cant allow this, then you need a service Aug 16 21:13:57 that can be access by all actvity Aug 16 21:14:03 xbxice: this is just java, friend. make a singleton object. Aug 16 21:14:13 if you dont know how, ask google Aug 16 21:14:27 so now i confouse do i need service or not Aug 16 21:14:54 hear what im saying: using a service tells android that your process needs to live after the user has left your screens Aug 16 21:15:04 to continue doing work in the background Aug 16 21:15:24 if you do not use a service, and just dangle a thread after the user has left your screens, android will eventually just kill the process and not restart that thread Aug 16 21:15:27 so i do need it for IM app Aug 16 21:15:46 xbxice: depends on your design. do you want users to "stay connected" after leaving the screens? Aug 16 21:15:51 yes Aug 16 21:15:56 then yes, you need a service. Aug 16 21:15:58 <_avatar> :) Aug 16 21:16:21 also, implementing an IM app tells me you do not want to go the "easy route" and use broadcast intents to deliver mesages to the activity Aug 16 21:16:32 you should use aidl to define an interface and use that. Aug 16 21:16:35 <_avatar> yup Aug 16 21:16:48 my application, Five, is open source and a good example of how to do this elegantly if you want to look Aug 16 21:16:51 five.googlecode.com Aug 16 21:17:11 so this is what i understand 1 activity will create service the service will do the TCP/ip job each actvity will bind to the servive to get notfy about event Aug 16 21:17:18 is that make sense ? Aug 16 21:17:30 yes, but actually they'll all be responsible for binding which will create the service Aug 16 21:17:51 the app i just pointed you to has a nice abstraction for doing exactly this called ServiceActivity Aug 16 21:17:58 only 1 activity can create the service Aug 16 21:17:59 creates an activity which critically depends on a service Aug 16 21:18:02 all other bind to it Aug 16 21:18:09 xbxice: except that's not true, so quit saying it Aug 16 21:18:18 :) Aug 16 21:18:52 each activity will be calling startservice and bindservice. if you do not, your implementation is broken. Aug 16 21:19:19 and they will all refernce the same service ? Aug 16 21:19:23 yes Aug 16 21:19:32 got it Aug 16 21:19:40 i strongly suggset you look at the source code i pointed you to Aug 16 21:19:47 thx man atleast now i know what i suppose to do Aug 16 21:19:49 it is the source equivalent to what i've just told you :) Aug 16 21:19:59 jasta - so is it kind of the other way round, a service starts with the device, then the activity will connect to that service? (Im just bout to try and install Five on my emulator) Aug 16 21:20:01 i dont see the source link ? Aug 16 21:20:26 can u please post t again Aug 16 21:20:35 xbxice: five.googlecode.com Aug 16 21:20:51 gauntface: no, each activity which needs the service around would both start and bind to it. Aug 16 21:20:51 thx for your great help ! Aug 16 21:20:57 the first activity to need the service will be the one that creates it Aug 16 21:21:09 now food bye all Aug 16 21:21:09 oo ok got ya Aug 16 21:21:15 normally, bindservice will create the service but as soon as the bound activity leaves, the service will die. Aug 16 21:21:21 because it has no one bound to it Aug 16 21:21:39 so this is why you also startservice. this will ensure that the service lives after the activity disconnects Aug 16 21:21:46 then, the service has to call stopSelf() when its done and it will be shutdown Aug 16 21:21:58 multiple calls to startservice do not start the service multiple times. Aug 16 21:22:31 kool, I like the look of Five Aug 16 21:23:17 gauntface: im currently rewriting the server component btw. so beware of some instability in the older version that youre looking at ;) Aug 16 21:23:31 it does work, however. the server is just clumsier than it should be, and the sync protocol slower than it should be Aug 16 21:24:12 lol no worries, I spent last friday setting up my own server and got my computer and android emulator to tell knock knock jokes lol, so Im sure anything you come up with will be great Aug 16 21:24:25 is the server component java? Aug 16 21:24:54 not the current one Aug 16 21:24:58 i am rewriting it in java, though Aug 16 21:26:07 I'm fighting the urge to ask questions until I actually download and play with it :-P Aug 16 21:29:20 can I just ask why you went down the route of seperating the sync and player? Aug 16 21:29:34 because they are separate :) Aug 16 21:30:00 theyre no longer separate apks though, but they are still two separate tasks (in the andorid sense) Aug 16 21:30:13 just like how gmail and the subscribed feeds thing are different Aug 16 21:31:44 yeah I can see why they are 2 seperate tasks it was just the 2 seperate apk's I couldn't quite work out Aug 16 21:31:55 they arent separate apks anymore Aug 16 21:32:00 not sure where youre seeing that still Aug 16 21:32:56 its in the README Aug 16 21:33:13 first thing I check when downloading something like this :-P Aug 16 21:34:16 ahh, well thats old then :) Aug 16 21:34:24 very old, im sure Aug 16 21:35:03 no worries, I'll have a play 2moro, need to hit the hay for work 2moro Aug 16 21:35:52 just out of interest if I ever fix any little problems is it cool just to forward them on to you? Aug 16 21:36:18 lets see, who is this david turner fella Aug 16 21:36:26 because he apparently broke the build on linux Aug 16 21:36:41 not me :-) Aug 16 21:37:52 night peeps Aug 16 21:55:15 hey guys - can i make a mapview with an image as the source Aug 16 21:55:18 instead of a google map Aug 16 22:02:26 can you overlay onto a webview? Aug 16 22:02:38 of course Aug 16 22:02:44 you can do it by just using a framelayout even Aug 16 22:02:57 really! Aug 16 22:03:00 just like you can overlay onto any view Aug 16 22:03:08 brilliant Aug 16 22:03:10 what i can't figure out though is how to show a spinner while a webview is loading. there don't seem to be any hooks to find out when the url is done loading Aug 16 22:03:25 so i could just use an example of an overlay on a mapview - and shove it on my webview Aug 16 22:03:30 and just see what it looks like - to experiment Aug 16 22:04:56 uhm, no Aug 16 22:04:59 actually, forget it Aug 16 22:05:02 i remember you now Aug 16 22:06:20 dont be nasty jasta - im just interested here, and nieve Aug 16 22:06:34 so you say no - and i presume thats becuase a map overlay will be associated with a mapview Aug 16 22:06:38 not just any random view i choose Aug 16 22:09:14 god I hate youtube lol Aug 16 22:09:20 it automaticly translates stuff Aug 16 22:09:28 " [VERTAALD] eminem paarse pillen " Aug 16 22:09:35 (purple pills) Aug 16 22:10:53 good tune too Aug 16 22:12:56 im trying to find a tutorial on overlays Aug 16 22:13:02 and i cannot find anythign in the docs about them Aug 16 22:13:23 as i said, just use a framelayout Aug 16 22:14:08 either with the foreground attribute, or with Aug 16 22:17:51 ooook, so say i had a linearlayout - inside of that i make a frame layout - which has the forgeound attribute set - and it will just work!? Aug 16 22:18:23 you are hopeless Aug 16 22:18:25 seriously Aug 16 22:18:44 obviously the frame layout has to contain whatever i want in the overlay Aug 16 22:21:23 an example would be nice Aug 16 22:27:26 AndyArmstrong: i gave you an example, you ignored it. seems like a thing you do Aug 16 22:28:59 im confused by it - its not precise enough for me, so if i did Aug 16 22:29:08 Aug 16 22:29:15 Aug 16 22:29:27 Aug 16 22:29:31 Aug 16 22:29:45 meh Aug 16 22:29:54 made a dirty tileset 'wireframe' generator ;p Aug 16 22:29:57 @ c# ofc Aug 16 22:30:59 (if anyone knows a tileset generator, that uses transparant pngs => tell me ! :P) Aug 16 22:47:41 how do i set foreground Aug 16 22:47:42 android:foreground="1" Aug 16 22:47:44 doesnt work Aug 16 22:47:47 ="true" doesnt work Aug 16 22:47:51 cannot work out wht it should be Aug 16 22:48:28 hehe, wow. Aug 16 22:51:21 : X Aug 16 22:56:41 Has anyone gotten breakpoint conditions to work in eclipse w/ android plugin? They don't seem to work for me... Aug 16 22:57:05 yes. Aug 16 22:57:10 oh wait, no :) Aug 16 22:57:16 breakpoint conditions do not seem to work right with dalvik Aug 16 22:57:26 Oh. boo. Aug 16 22:57:38 Is it possible to cause a breakpoint from within the source? Aug 16 22:57:53 no, but you can easily conditionalize with code changes Aug 16 22:58:15 if (foo) { dummy(); } -- set the breakpoint at dummy() Aug 16 22:58:23 ah, true :) Aug 16 22:58:24 foo is your breakpoint condition Aug 16 22:58:34 my life be like Aug 16 22:58:38 well actually you can cause a sort of breakpoint in code too Aug 16 22:58:44 Debug.waitForDebugger() Aug 16 22:58:49 but thats not quite the same :) Aug 16 23:19:43 * step21 at first thought android keyboard was cool, but now kinda hates it already after only 2 days ... also why didn't andtroid (1.5) send sms anymore, but the same sim in an iphone was no problem???? This better be a fluke or I'm returning it and getting a 3GS with contract ... Aug 16 23:21:26 jasta from now on - ignore my comments and just keep your witty amusements to yourself Aug 16 23:21:45 how do i set foreground Aug 16 23:21:45 android:foreground="1" doesnt take an int - so what do i pass it Aug 16 23:23:28 AndyArmstrong: or, instead, you could stop wasting everyone's time here and shut up. Aug 16 23:24:06 step21: i think youre in the wrong channel, btw. maybe try #android. Aug 16 23:24:47 jasta: sry, was just a post out of frustration ... I know this is a dev channel Aug 16 23:25:12 step21: yeah, but we probably won't have a useful discussion with you about it so... :) Aug 16 23:25:51 jasta: yeah, I figured as much. but felt good anyway. so as long as you don't kick me for it or anything, we're cool Aug 16 23:26:06 jasta has no power... Aug 16 23:26:07 anyway Aug 16 23:26:13 step21: we won' Aug 16 23:26:14 yeah - you can fuck off - and ignore my comments ok! Aug 16 23:26:26 't kick you for expressing your opinion. knock yourself out :) Aug 16 23:26:41 AndyArmstrong: didn't check. just saying _if_ Aug 16 23:26:48 but as i said, you probably won't get a useful discussion about it hehe Aug 16 23:27:06 not that you're likely to get a _useful_ discussion out of #android either :) Aug 16 23:27:30 well there can't be a "useful" discussion. a useful discussion would fix my phone :) Aug 16 23:27:54 its possible that your account was deactivated or modified in some way. Aug 16 23:28:00 like perhaps it has the wrong phone plan Aug 16 23:28:14 the way SIM cards are programmed within GSM networks is apparently voodoo magic Aug 16 23:28:23 needlessly complicated Aug 16 23:29:18 a lot of operators had this idea to finely control access to just about every service, even when they don't have pricing packages with those combinations. Aug 16 23:29:40 so they break specific services for specific devices all the time on accident because of this complexity Aug 16 23:30:02 just a thought though. re your soft keyboard complaints, i tend to agree with you Aug 16 23:30:22 no ... i put the sim back into my old (2G) iphone and it worked again. (and on neither phone you can't even set settings seperately for sms). then on the samsung/android device even the touch keyboard started acting funny. Aug 16 23:30:24 but i have found that the HTC keyboard as leaked on the Hero and Rogers ROMs works much better Aug 16 23:31:01 mmmh ... I specifically didn't get a hero cause they said it had so much lag Aug 16 23:31:03 step21: well its also possible that the radio on your android phone is broken, which would be covered by the manufacturer warranty Aug 16 23:31:34 but what i was saying is that the programming of sim cards within the gsm network is much more fine grained than you'd expect. for instance, they could make it not let you send sms messages from a g1 but that it could work from an iphone. Aug 16 23:32:07 likewise, your APN settings could be wrong (which is further evidence of what i'm saying *grin*) Aug 16 23:32:11 dunno, at least data/phone seemed to work. yes, i know the can in theory, but it is an unlocked phone, on an unlocked plan... Aug 16 23:32:13 the APN thing is totally stupid to me Aug 16 23:32:39 also, apn settings are right :) (data works) and also don't affect sms iirc Aug 16 23:33:07 yeah thats probably true, i dont know very much about what the APN really does. Aug 16 23:34:18 either way, i'd be much more likely to blame the operator and/or manufacturer bfeore you blame the software vendor (Google) Aug 16 23:34:43 they're the typical fuck-ups in that love triangle :) Aug 16 23:34:43 I think it is like with dialup ... for most ppl it matters most cause on some plans if you have the wrong apn data is billed differently Aug 16 23:35:54 jasta: well, but google wrote the software ... I'd like to think it's some combination of both though ... for example why did they make keys thinner ... i mean the screen isn't smaller, so what gives? Aug 16 23:36:36 regarding sending sms messages, there's no way google's to blame on that one :) Aug 16 23:36:47 either your device is broken, or the carrier has fucked something up. Aug 16 23:36:56 or you flashed some insanely modified crap to your phone :) Aug 16 23:37:07 re the keys, i have no idea what youre talking about Aug 16 23:37:15 Hi all Aug 16 23:37:28 hello Aug 16 23:37:32 Does someone know where to submit app for ADC2? Aug 16 23:37:49 i dont, sorry Aug 16 23:37:57 hav eyou tried googling? Aug 16 23:38:03 yes Aug 16 23:38:28 some said the app have to be submit to market Aug 16 23:38:38 but not 100% sure Aug 16 23:39:10 others said Google is late for submit portal Aug 16 23:39:20 Submition end in 14 days ... Aug 16 23:39:40 no idea. Aug 16 23:40:09 This channel is new. I knew #android but not #android-dev Aug 16 23:41:04 this channel is actually not new ;) Aug 16 23:41:27 jasta: yes, i didn't say google is resp. for sms, just is still weird. about keys: compared to other soft. keyboards they made the keys thinner. or maybe it is that way cause at least my screen (samsung galaxy) has the same pixels but seems/is a bit smaller Aug 16 23:42:08 step21: actually they just made them "appear" thinner, the touch targets are slightly larger than the physical button you see Aug 16 23:42:20 mmh ... Aug 16 23:42:23 though there visually is a gap between buttons, it is impossible for you to push "between" a key Aug 16 23:42:43 so this is just in your head that it's any smaller hehe Aug 16 23:43:08 what the iphone does much better, however, is better interpretation of what letter you probably meant to push based on heuristics Aug 16 23:43:16 jasta: yeah, i tested it in a store before I got it, then and when I first had it I was pleasently surprised, but today, dunno, just a total fuckup ... Aug 16 23:43:32 as i said, the HTC keyboard is quite a bit better Aug 16 23:43:37 and you can download it to your phone no problem Aug 16 23:43:49 i personally like the soft keyboards with blackberry-style 2-type. Aug 16 23:43:52 I like the htc keyboard Aug 16 23:43:55 where each button is actually two keys Aug 16 23:43:57 thats nice Aug 16 23:44:01 wish it had swipe support though Aug 16 23:44:03 err two letters Aug 16 23:44:19 do you have to flash a whole rom to get the htc keyboard? Aug 16 23:44:22 I really like the concept that TouchPal has of swipe up/down - just their keyboard sucks Aug 16 23:44:25 also, both keyboards work much better when you rotate the phone landscape to type Aug 16 23:44:32 step21: not at all.. just push the relative files Aug 16 23:44:44 http://haykuro.theiphoneproject.org/?p=213 Aug 16 23:44:49 go there.. read, implement Aug 16 23:44:57 step21: no, you just have to adb install it Aug 16 23:45:10 step21: the input framework in android is sick :) the keyboards are actually just apks Aug 16 23:45:47 it does require that you enable it in the text & locale settings though, prompting you about the huge security risks involved :) Aug 16 23:46:19 jasta: true ... but sometimes I just have it in portrait or want to use one hand only, so i'd like to use portrait Aug 16 23:46:50 ok :) Aug 16 23:48:04 well it might just be that I'm quite fast on the iphone now, but this doesn't translate 1:1 to android, which kinda sucks ... so it is hard to judge, but now I maybe could still return it, but not forever Aug 16 23:48:41 im really not trying to convince you to drop the iphone and move to android Aug 16 23:49:28 just explaining :) Aug 16 23:49:47 i actually rather like the iphone, and i would probably own one if i felt that it was a well engineered platform :) Aug 16 23:50:18 i was really disappointed when they finally released their SDK and their numerous fuck-ups were brought to light Aug 16 23:50:29 but tahts just the developer in me talking. as a user, it's a bad ass phone Aug 16 23:51:05 jasta: well I'd think I like developing/playing with android more ... but then I think of all the apps that have only "kind of" an equivalent or not at all and get all conflicted ... Aug 16 23:52:05 i'm an engineer, through and through. i care not what exists now, i care only about what's psosible :) Aug 16 23:53:03 jasta: tbh, at least the gui developer in me <3s apple for interface designer ... android xml files just make me wanna puke. (and that's while knowing java much better then obj-c) Aug 16 23:53:27 i feel the opposite, but im unpopular in that regard Aug 16 23:53:48 i greatly prefer the XML layout approach. Aug 16 23:53:53 (and no, I don't have apps in the app store, I just programed some things for the emulator for fun) Aug 16 23:54:09 i cant fucking stand that "visual" programming legacy that Microsoft left us. Aug 16 23:55:07 that siad, i believe a layout tool is being developed at google Aug 16 23:55:11 to wrap around the xml layouts Aug 16 23:55:19 but im sure it will be terrible and just make it easy to build interfaces wrong Aug 16 23:55:25 well, sure manual tweaking or using it for special things, youd'd code it by hand anyway, but just for standard gui elements I'd say it shouldn't be necessary Aug 16 23:55:41 jasta: its in the sdk already, right? Aug 16 23:55:42 android has a much more complex problem to solve than the iphone does: android supports any device and screen configuration that could be conceived. Aug 16 23:55:45 including netbooks Aug 16 23:55:51 jsharkey: yeah but that doesn't count becaues it's unusable. Aug 16 23:55:54 jasta: what's wrong ? :) Aug 16 23:56:26 step21: ? Aug 16 23:56:28 jasta: which is stupid imho. because it will leave everyone feeling not appreciated enough Aug 16 23:56:52 * jsharkey feels not appreciated enough Aug 16 23:56:54 j/k :P Aug 16 23:57:07 define what makes an interface "wrong" i mean Aug 16 23:57:11 im not following this conversation apparently Aug 16 23:57:33 step21: because the designer is telling you that the screen you're looking at is the only screen that's possible. Aug 16 23:57:34 the 2nd was about adroid wanting to run on everything Aug 16 23:57:35 step21: it doesnt fit the paradigms users have come to expect from the default platform apps Aug 16 23:57:37 and with android, that's entirely false. Aug 16 23:58:09 the visual designer would be so complex you wouldn't want to use it if it was implemented correctly. Aug 16 23:58:19 XML, therefore, is a better format to visualize the layouts :) Aug 16 23:58:37 logically constructing your GUI well abstracted from the specifics of the screen you're looking at. Aug 16 23:59:32 well, but xml can't really represent optics, even if you're an engineer. tbh, if I designed anything, obviously the only device I code for is my own ... if it breaks on your device cause you have a netbook, tough luck Aug 17 00:00:12 but thats the hard problem that android cares about. Aug 17 00:00:12 step21: xhtml+css isn't much different Aug 17 00:00:29 do you have any idea how fucking miserable it is to develop on Windows Mobile because of its "visual" designer, but with a platform that supports lots of different display configurations? Aug 17 00:00:57 i'd rather kill myself than use the visual layout designer to make a different screen for each of 20 different display configurations Aug 17 00:01:27 whereas with android you only need to come up with general layouts that can be adapted by the platform to fit lots of different types of devices Aug 17 00:01:36 and tweak only for special cases when absolutely necessary Aug 17 00:02:39 jsharkey: ltns btw ;) Aug 17 00:02:52 they keep him chained up Aug 17 00:03:10 jasta: i never coded for winmobile ... this is prob. one of the reasons. also xhtml + css isn't really a good comparison, cause everyone today will get his layout once, and then just write content (more or less) and even then, I have even less guarantee then with android that it will work on all "devices" even with testing Aug 17 00:03:41 less of a guarantee? pssh Aug 17 00:03:45 actually his xhtml/css analogy was very good Aug 17 00:03:49 your understanding is the problem ;) Aug 17 00:04:18 with either xhtml/css or android, there is the possibility to misunderstand the elegance of the platform and make gross hardcoding mistakes Aug 17 00:04:38 jasta: yea its crazy, i havent had a life since may Aug 17 00:04:41 but both are capable of the same elegance if you understand them properly -- supporting a wide range of display configurations without effort Aug 17 00:05:16 jasta: yeah, but I just think if that's how it's always going to be, then android will be at the most the new winmo, used in quite a lot of device and kind of running on everthing, but not really nice to use on any of them. Aug 17 00:06:12 no, youre not listening to me Aug 17 00:06:20 android solved the problem that windows mobile ignored. Aug 17 00:06:47 and they solved it by thinking first about elegant, logical layout, and second about visual designers. Aug 17 00:06:54 palm was even worse Aug 17 00:07:02 the iphone made the same mistake as windows mobile, and is forever doomed to use a single device configuration Aug 17 00:07:36 well, you said it solved it, but I'm not convince it did. Aug 17 00:07:54 you dont understand the problem, step21. that much is clear :) Aug 17 00:08:11 wait a year or two when there are lots of different devices running android and take another look Aug 17 00:08:15 you'll see what i'm talking about :) Aug 17 00:11:21 well, thanks for the downtalking, I can just tell you I know what you mean, but you seem to be too much engineer or whatever to say anything more then "it solved it with xml". none of what I have seen so far in the sdk/code sample suggests that whatever one now writes (and developers need some device to test, so obv. this is going to be the G1 or similiar, not many can afford to buy so and so many devices to tes Aug 17 00:12:10 actually, do you realize that the sdk existed a year before the first device? Aug 17 00:12:23 many people wrote entire applications without ever testing with a device, including myself Aug 17 00:12:45 but thats neither here nor there Aug 17 00:13:15 yes i do. but then it had the emulator already, right? so your point is? Aug 17 00:13:41 you can totally force all sorts of odd emulator configurations, like screen size, keyboard-ness, etc Aug 17 00:13:53 yes, easily. Aug 17 00:14:18 step21: i wasnt really making a point about the layout, i was just stating something unrelated Aug 17 00:14:48 jasta: still means extra work and lots more testing. you made it sound like android would magically fix everything for ever possible device Aug 17 00:14:57 i still think youre interpreting what im saying much too narrowly. they didn't "solve it with xml", they solved it by being the first platform to come up with a general solution that has long term viability. Aug 17 00:15:06 that isnt a common pattern with mobile development. Aug 17 00:15:11 step21: it solves them much more elegantly than other previous solutions Aug 17 00:15:21 yeah, you don't have to use xml at all and it's still solved Aug 17 00:15:38 android thought throught the problem, rather than ignoring it as previous platforms have done. Aug 17 00:15:42 through* Aug 17 00:15:46 zinx: well, not entirely. the xml resource system is incredibly powerful on android Aug 17 00:15:57 hi all. Do anyone know how to get the device type through the api? For example: htc dream, htc magic, motorola, etc.. Aug 17 00:15:57 they're all guilty of this, except perhaps the palm pre which has that crazy webOS thing Aug 17 00:16:24 localtone: depends on what exactly you're trying to learn about the device. build properties are your best bet, but there are a lot of them to choose from Aug 17 00:16:28 so make sure you choose wisely :) Aug 17 00:16:40 ro.product.model would be my guess as to what you want, but please do some resaerch Aug 17 00:17:03 localtone: what do you mean "type"? what are you trying to do with it? Aug 17 00:17:10 I see device id, but nothing for hardware type/manufacturer. Aug 17 00:17:15 jasta: well I still think you kinda don't wanna get my point ... but w/e, that's normal for engineers in this case I guess. Aug 17 00:17:24 I want log the type of device hitting my service. Aug 17 00:18:10 step21: what was your point, actually? i'm a little fuzzy on that. Aug 17 00:18:19 localtone: android.os.Build seems like a rich place to start Aug 17 00:18:59 localtone: those are just mappings for various build properties. you can investigate their various values easily by using adb shell getprop Aug 17 00:19:05 with a real device connected Aug 17 00:19:12 im still thinking model is the one you probably want. Aug 17 00:19:25 jsharkey: Thanks! I was looking in the telephonymanager since that is where the device id is. Aug 17 00:19:40 :) well what I meant now was there is just no way an app that say now works/looks nice on a G1 or magic would be nice to use on a kindle sized or other device. Aug 17 00:19:50 localtone: yea, .MODEL is "T-Mobile myTouch 3G" for example Aug 17 00:20:03 step21: of course not, there is always some amount of testing that should be done to validate an app on differnt devices. Aug 17 00:20:24 step21: what my point was that android is the first platform to provide _real_ tools for developers to decrease the amount of work necessary to support other devices. Aug 17 00:20:37 android increases the developer's *confidence* that it will work properly on any device. Aug 17 00:20:45 it greatly increases it, actually Aug 17 00:21:00 actually, im really impressed with the compatibility mode that we've put together in donut/eclair Aug 17 00:21:06 jsharkey: jasta: Thanks! Model is exactly what I'm looking for. Aug 17 00:21:28 yeah, okay that sound like a reasonable argument :) Aug 17 00:21:44 that was my argument all along :) Aug 17 00:29:59 jasta: about the htc keyboard ... adb sees my device but says on "adb remount" operation not permitted ... an idea why? Aug 17 00:34:23 doesnt adb remount only work on eng builds? Aug 17 00:35:08 jsharkey: I dunno, it's just what it said on the blog where the hero keyboard files are hosted to do... Aug 17 00:35:21 http://haykuro.theiphoneproject.org/?p=213 Aug 17 00:36:07 step21: you dont want to use adb remount Aug 17 00:36:21 just extract the apks and adb install them Aug 17 00:36:42 kk ... doesn't work anyway. o.k. Aug 17 00:42:02 jasta: I think it said to remount cause it says to copy the inclued libt9.so, which doesn' seem to work otherwise (I get "failed to copy ... ... : Read-only filesystem") Aug 17 00:42:52 I got a bitmap (lets say size 30x30) Aug 17 00:43:01 and I wish to 'paste' it on a 32x32 size bitmap Aug 17 00:43:03 any idea how? Aug 17 00:43:15 I find only methods to resize it Aug 17 00:50:08 _Auron_ care to explain how you do your tile rendering? Aug 17 00:59:56 <_Auron_> SinnerG: still haven't finished working on that. only about halfway done right now Aug 17 01:02:49 well I have it 'working' Aug 17 01:02:54 buut the phone runs out of memory ;p Aug 17 01:02:57 How to get app to ignore config change (portrait to landscape, for example)? Using onConfigurationChanged didn't seem to do it Aug 17 01:03:00 and I have no idea why Aug 17 01:03:10 <_Auron_> you're apparently allocating memory during runtime Aug 17 01:03:23 <_Auron_> the way I handle things, all memory is allocated at init Aug 17 01:03:31 <_Auron_> and completely reused during runtime Aug 17 01:04:01 well you tell me how to do it then for the 'render to texture' ^^ Aug 17 01:04:19 <_Auron_> I haven't finished that yet. Aug 17 01:04:35 <_Auron_> I'm not entirely sure how I'm actually doing it yet, because it's rather complicated Aug 17 01:04:37 it reaaally doesnt like my trick ;p Aug 17 01:04:40 all apps got shut down lawl Aug 17 01:04:47 <_Auron_> ? Aug 17 01:04:55 well I know how to turn it into a bitmap (whats on screen) Aug 17 01:04:59 if that can help you? Aug 17 01:05:29 http://nopaste.me/5191 Aug 17 01:06:10 <_Auron_> erm no Aug 17 01:06:17 <_Auron_> if you're doing openGL you need to copy data to a texture not a bitmap Aug 17 01:06:32 yeah well I didnt figure that one out yet ;p Aug 17 01:06:35 well I did Aug 17 01:06:35 <_Auron_> which is done with glCopySubImageTex2D() or w/e it's called Aug 17 01:06:42 hmm Aug 17 01:08:08 glCopyTexSubImage2D Aug 17 01:09:48 Trying again... anyone know how to deal with onConfigurationChanged? Aug 17 01:11:21 guess I'll have a task for tomorrow auron :) Aug 17 01:57:40 does anyone know of a good resource which describes the view workflow? layout, measure, invalidate, etc? perhaps android source is the best resource? Aug 17 02:25:56 mikem`_: android docs, sample apps, and the android source - are the best resources for now Aug 17 02:43:31 muthu: right, thanks :) looks like I need to spend more time trawling through the sample code to figure things out, then **** ENDING LOGGING AT Mon Aug 17 02:59:56 2009