**** BEGIN LOGGING AT Sun Mar 25 02:59:58 2012 Mar 25 03:00:05 it happened after i updated the sdk, an upgraded eclipse to the newest version in the arch repos (a very recent build of indigo) Mar 25 03:00:22 none of the hacks i used to use to fix it seem to work Mar 25 03:26:05 what's the appropriate class to use for long-running computations that are not singletons? e.g., each time an SMS is received, a task needs to run for 30 seconds to monitor the mean of the accelerometer's magnitude Mar 25 03:26:19 and this must be done separately for each incoming sms, so it could stack Mar 25 03:34:35 mgmuscari: why do you need more than one thread to do that? Mar 25 03:34:56 I think monitor the accelerometer on one thread and keep a list of values and times Mar 25 03:35:16 then when you get an SMS, that thread can retreive them from that list Mar 25 03:35:20 then calculate magnitude Mar 25 03:35:23 then send it Mar 25 03:36:02 imagine what would happen if I just spammed the phone with 100 sms Mar 25 03:36:06 you'd have 100 threads. that wouldn't be nice Mar 25 03:36:15 this is a big, stupid can of worms Mar 25 03:36:26 i regret deciding to go with this project Mar 25 03:36:36 nah I don't think it's as hard as it sounds Mar 25 03:36:48 tell me more about the response for each sms Mar 25 03:36:55 what needs to be sent back Mar 25 03:37:04 ok so here's what i'm doing Mar 25 03:37:10 keep a list of sensor data, a list of SMS entries Mar 25 03:37:17 set a timer at 30 seconds from the first Mar 25 03:37:23 when complete, look at the next in the list and set a timer Mar 25 03:37:23 each time an SMS comes in, i need to launch an activity that is going to monitor a variety of sensors for say, 10-30 seconds Mar 25 03:37:33 when nothing in the list, stop looking at sensors Mar 25 03:37:49 no good Mar 25 03:38:04 launch an activity on SMS receive? that's crazy Mar 25 03:38:11 the data collection window has to begin when the sms is received Mar 25 03:38:19 no Mar 25 03:38:21 there's no activity Mar 25 03:38:24 you can collect data constantly and then define the window as two points in time Mar 25 03:38:27 sorry, wrong word Mar 25 03:38:34 i'm being distracted by someone in my house Mar 25 03:38:40 i need to launch an asynctask Mar 25 03:39:08 initiate data collection when the list isn't empty. I'm also not sure data collection is a sync operation. Most of the time it isn't. Mar 25 03:39:14 this is turning into something with an enormous infrastructure that i'm going to need to manage, and it's just for collecting some data for a machine learning project Mar 25 03:39:34 JakeWharton: method onCreateOptionsMenu(Menu menu, MenuInflater inflater) is not available in ABS, right? Mar 25 03:39:38 launching an activity when you get an SMS is not a good decision Mar 25 03:39:40 WRONG Mar 25 03:39:48 just fix your imports Mar 25 03:39:58 like i said, i misused the word, no activity is being launched Mar 25 03:40:01 asynctask Mar 25 03:40:09 what do you mean? Mar 25 03:40:12 didn't mean to yell, i'm used to the caps lock being rebound Mar 25 03:40:18 why do you need AsyncTask? There is no UI for this Mar 25 03:40:25 the best i can think of is having an IntentService Mar 25 03:40:38 then the onHandleIntent method will spawn an AsyncTask Mar 25 03:40:43 i import everything from com.actionbarsherlock.view.* Mar 25 03:40:52 even MenuInflater? Mar 25 03:40:56 yes Mar 25 03:41:07 are you extending the right base activity? Mar 25 03:41:09 can you think of a better class to launch from a service than AsyncTask? Mar 25 03:41:14 Thread? Mar 25 03:41:19 SherlockListActivity Mar 25 03:41:29 i was hoping to avoid using thread primitives Mar 25 03:41:30 extend Runnable to define a task, launch it with a Thread. Mar 25 03:41:48 are contentproviders thread safe? Mar 25 03:42:25 onCreateOptionsMenu(Menu menu) works, but i want to inflate Mar 25 03:42:35 if you try to use SQLite from two different threads, it will fail if the database is locked in a write by the other thread. I think it's safe to do simultaneous reads, though. Mar 25 03:42:43 getSupportMenuInf... Mar 25 03:42:45 ContentProvider being just an interface I can't say Mar 25 03:43:47 that actually goes for processes as well. A SQLite database is not a very concurrent thing. Mar 25 03:43:57 e.g. SQLiteOpenHelper Mar 25 03:44:16 sigh Mar 25 03:44:19 I *think* you'll be fine using it from two threads, as long as you don't attempt to interleave write operations. Mar 25 03:44:23 so i have to implement a locking mechanism, too... Mar 25 03:44:27 yes Mar 25 03:44:34 *rolleyes* Mar 25 03:44:37 or queue your writes up Mar 25 03:44:43 and then flush the queue Mar 25 03:45:09 just spend a lot of time thinking before you start coding, sounds like it could get messy Mar 25 03:45:29 well if i use an IntentService, and spawn AsyncTasks from onHandleIntent, then i can have the IntentService handle the writes by having the AsyncTasks publish their results back to the IntentService Mar 25 03:45:34 JakeWharton: yeah, it worked, thanks Mar 25 03:45:56 yeah, that makes sense Mar 25 03:46:10 there will be an implicit queue using onPostExecute Mar 25 03:46:12 ok so i can have two types of intents Mar 25 03:46:27 oh that's a good point, since onpostexecute runs on the main thread Mar 25 03:46:51 writes would implicitly be sequential as long as i ensure that the transaction is complete when onpostexecute returns Mar 25 03:47:18 and i'll be timestamping these records with the sms receipt time, so i don't care about insertion order in the database Mar 25 03:48:03 my guess is that they will be inserted in the appropriate order anyway Mar 25 03:49:05 so the call order looks like this: Android System Broadcast(intent) -> broadcastreceiver.onreceive(intent) -> intentservice.startService(intent) -> onHandleIntent(intent) -> AsyncTask.execute(intent) -> AsyncTask.onPostExecute(result) Mar 25 03:49:32 and the broadcast is an SMS, right Mar 25 03:49:36 t0mless, because that property is 4.0+ Mar 25 03:49:45 yeah, i also plan to do this for incoming phone calls Mar 25 03:49:54 going to record whether it gets answered or not Mar 25 03:50:06 the only thing I think that still needs to be ironed out is what you're doing in doInBackground of the AsyncTask Mar 25 03:50:16 but the call order will essentially look the same, just different intents coming from the system Mar 25 03:50:22 I don't think starting all the sensors, sampling, and stopping them in doInBackground is a good idea. Mar 25 03:50:39 I think you should have a thread that constantly reads sensor data, and keeps a cache of the last few minutes Mar 25 03:50:48 then doInBackground should read from that Mar 25 03:50:58 and perform calculations, then post Mar 25 03:51:03 that would only be as long as there is pending work to do, though Mar 25 03:51:15 obviously i don't want the device to always be awake reading sensors Mar 25 03:51:30 that's a problem as well Mar 25 03:51:45 but what are you going to do if you receive 20 SMS at once? Mar 25 03:51:57 is it a special kind of SMS that triggers this, or all SMS Mar 25 03:52:02 my understanding of sensor events is that it doesn't matter if i have 1 or 100 listeners for those events Mar 25 03:52:15 the device will be awake as long as there are listeners, and all listeners will see the events Mar 25 03:52:48 well I guess there is no sense in premature optimization Mar 25 03:52:51 try it and see Mar 25 03:52:54 hmm Mar 25 03:53:00 i just thought of a potential problem Mar 25 03:53:07 AsyncTasks run on background threads Mar 25 03:53:24 broadcastreceivers and sensorlisteners execute on the main thread, don't they? Mar 25 03:54:04 i.e. if i register my asynctask as a listener, onSensorChanged will execute on the main thread Mar 25 03:54:11 even while doInBackground is doing something Mar 25 03:54:36 just make one thread read the sensor data and cache it Mar 25 03:54:40 doInBackground reads the cache Mar 25 03:54:51 i was thinking of having doInBackground register the AsyncTask as a listener on appropriate senors, then have it sleep for 15000ms or something, then wake up and complete its task Mar 25 03:55:22 in the meantime e.g. the accelerometer sensor listener will be updating an apache commons math Mean object with new data on each event Mar 25 03:55:44 Sensor has its own thread Mar 25 03:55:46 SensorThread Mar 25 03:55:50 I'm looking at the debugger, right now Mar 25 03:56:28 onSensorChanged is overwhelmingly likely to be called from that, but I haven't checked Mar 25 03:56:30 then i'll need a separate service that starts and runs as long as these AsyncTasks need it Mar 25 03:56:39 yeah, that is the "sensor service" Mar 25 03:56:45 you can have it time out Mar 25 03:56:48 and the AsyncTasks will need to be able to read data from that service Mar 25 03:56:49 if an SMS isn't received in say, x minutes Mar 25 03:56:53 terminate your sensor listeners Mar 25 03:57:02 if they aren't started when an SMS is received, restart it Mar 25 03:57:09 i would prefer to terminate sensor listeners as soon as there are no more to be read Mar 25 03:57:21 the big issue here is that this will be running on my primary phone Mar 25 03:57:34 i can't handle any unnecessary battery usage, lol Mar 25 03:57:47 one reason i decided to use cached coarse network location instead of gps Mar 25 03:58:15 i will continue to think on this, but your advice has been very helpful Mar 25 03:58:23 i think it's time to go draw up some block diagrams Mar 25 03:58:27 np, i think you are doing the right thing by not rushing it Mar 25 03:59:11 yeah, unfortunately i need to start collecting data ASAP or i won't have enough for performing learning on Mar 25 03:59:18 thanks for the help... later Mar 25 04:45:42 I have a custom layout for an alert dialog and it has a button in it. I tried setting the onClickListener like you would in the onCreate, but the app freeezes when the dialog is opened. Is there a way to get the listener set up in the alert dialog? Mar 25 04:47:35 cr5315: code or it didn't happen Mar 25 04:48:17 http://pastebin.com/Fk16FQNL Mar 25 04:49:26 cr5315: try setting the listener before create().show() Mar 25 04:49:33 I was about to try that Mar 25 04:49:57 is create necessary? Mar 25 04:50:22 create is what builds the AlertDialog from the builder, so I think it is. Mar 25 04:50:38 It got farther that time Mar 25 04:50:58 fuck alert dialog builder, just extend Dialog and setContentView in your onCreate Mar 25 04:50:58 Now it's highlighting the @Override before public void onClick(View v) { Mar 25 04:51:17 rgravener: nevermind, you were right, .show() creates it too. my bad Mar 25 04:51:52 JakeTheCoder: np, I wasn't going to fight for my answer anyway. Mar 25 04:52:42 rgravener, this is in the menu/action bar, does that affect where I do the dialog stuff? Mar 25 04:53:07 its prob all the view layer Mar 25 04:54:31 So I would put the button listener to the case DIALOG_WHATEVER: part of the dialog code? Mar 25 04:59:04 hmm Mar 25 04:59:23 I set it up with a regular dialog and the same thing is happening Mar 25 04:59:26 if a service launches an AsyncTask, then completes, can the service be killed by the android system? Mar 25 05:00:39 service shouldn't be launching asynctask Mar 25 05:00:46 You can't align buttons to the parent? Mar 25 05:00:53 android:layout_alignParentBottom="true" Mar 25 05:01:15 For a button? Is there a way to align to parent on a button? Mar 25 05:01:16 sigh... back to that again... Mar 25 05:01:25 T-Dub|DlolPics: that works. Mar 25 05:01:30 T-Dub|DlolPics: is it inside a RelativeLayout? Mar 25 05:01:33 Because it has to be. Mar 25 05:01:40 Linear Mar 25 05:01:46 nah, that syntax is only for Relative Mar 25 05:01:50 Dang Mar 25 05:02:00 Anything close to that in Linear? Mar 25 05:02:10 layout_gravity="bottom" Mar 25 05:02:17 Oh legit Mar 25 05:02:17 rgravener: aside from the java Thread primitive and the Runnable interface, what methods exist in the Android SDK to launch a long-running task from say, an IntentService Mar 25 05:02:20 Thanks Mar 25 05:02:22 T-Dub|DlolPics: but there are some catches.. Mar 25 05:02:26 you'll see as you experiment. Mar 25 05:02:27 gasp Mar 25 05:02:32 Will do Mar 25 05:02:44 mgmuscari: you at rutgers? Mar 25 05:02:47 i am Mar 25 05:02:58 haha, you were my TA Mar 25 05:03:04 lmao Mar 25 05:03:11 for which class Mar 25 05:03:16 network science Mar 25 05:03:22 many moons ago Mar 25 05:03:27 oh Mar 25 05:03:28 well Mar 25 05:03:29 Ok readme, I doubt you ment this, but I can't have gravity both center and bottom can I? Mar 25 05:03:31 last semester Mar 25 05:03:46 you basically want to extend Service Mar 25 05:03:58 sorry thought you were talking about the other network class Mar 25 05:04:03 declare it in AndroidManifest, and then set up a service connection to it. Mar 25 05:04:05 T-Dub|DlolPics: yea you can "center|bottom| Mar 25 05:04:05 nah i want to use an intentservice Mar 25 05:04:12 replace last | with " Mar 25 05:04:23 Oh cool didn't know that is what that ment Mar 25 05:04:30 I assume the docs do that just to show the options Mar 25 05:04:53 maybe i should explain what i'm doing Mar 25 05:05:47 mgmuscari: take a look at https://github.com/snooplsm/schedule/blob/master/android/src/com/happytap/schedule/activity/LoadScheduleActivity.java Mar 25 05:06:01 each time an SMS or call comes in, a BroadcastReceiver is going to invoke an IntentService. onHandleIntent will launch a long-running task to monitor the values of some sensors. when the task completes, it will insert a record into an sqlite database Mar 25 05:06:48 i don't want to maintain a permanently running service, it should only be running while there are pending tasks to complete, so that's why i like the IntentService model Mar 25 05:06:57 Hmm. Nothing is happeneing to my buttons. It's like I didn't even set the gravity. Relative layout here I come Mar 25 05:06:59 ok Mar 25 05:07:13 T-Dub|DlolPics: yeah, it's possible to do but I think requires nesting Mar 25 05:07:21 meanwhile my layout editor will not load so I can't test it Mar 25 05:07:42 Well my center is working, I just took it out to check and they aren't center any more Mar 25 05:07:46 the reason i want to use AsyncTask is so that it'll run the task on a worker thread, then process the results on the main thread. that way, i can be guaranteed that there will be no threading issues with my sqlite content provider, which is a nice, elegant way to handle that issue Mar 25 05:07:46 But bottom did nothing. Mar 25 05:07:51 As if I didn't even apply it. Mar 25 05:07:54 T-Dub|DlolPics: it requires another step Mar 25 05:08:01 Oh. Mar 25 05:08:06 Well I can just use relative layout. Mar 25 05:08:14 yes, do that Mar 25 05:08:21 but what i'm wondering is, if i start the asynctask and it is still running, will android aggressively kill the process Mar 25 05:08:45 i.e. will android kill processes that have asynctasks that haven't completed running in them Mar 25 05:11:33 mgmuscari: guessing you read this: http://developer.android.com/guide/topics/fundamentals/services.html Mar 25 05:11:57 Oh shit. Mar 25 05:12:00 I feel like a badass. Mar 25 05:12:09 yeah i know all about services in general, but i haven't used them in conjunction with asynctasks before Mar 25 05:12:20 it's not clear to me whether a process with a still-running asynctask will be killed Mar 25 05:12:26 you don't really want to use an asynctask Mar 25 05:12:45 T-Dub|DlolPics: http://pastie.org/3664222 that's how you'd do it with LinearLayout. Mar 25 05:12:52 if you have an alternative idea, please suggest it, as long as it's not Runnable Mar 25 05:12:55 but I think using RelativeLayout is a lot better of an idea for what you are doing. Mar 25 05:13:07 what have you got against extending Runnable mgmuscari Mar 25 05:13:13 an asynctask is just runnable anyway. Mar 25 05:13:18 Oh I was doing the gravity within the button Mar 25 05:13:35 I just nested a linearlayout within a relativelayout, and set the lineralayout to parent bottom Mar 25 05:13:38 Thanks though. Mar 25 05:13:41 readme: it will make writing this program much more complex than i want it to be, and this is just meant to be a data collection script Mar 25 05:13:44 I'll probably stick to relative Mar 25 05:13:56 rgravener: sure, but it handles a lot of things for you Mar 25 05:14:13 you are only processing 1 item at a time? Mar 25 05:14:29 rgravener: i am processing N>=1 items at a time Mar 25 05:14:31 I thought it was bad to use relative and absolutelayout. The guide I watched said to ALWAYS use linear Mar 25 05:14:33 and they can't be queued up Mar 25 05:14:47 processing needs to begin as soon as the intent is received, and will last for say, 15 seconds Mar 25 05:14:53 So I just stayed away from anything else. It's showing that relative is awesome though Mar 25 05:14:58 ok, then I wouldn't use intentservice Mar 25 05:15:06 just extend Service Mar 25 05:15:17 how does that help me Mar 25 05:15:39 cause you can spawn off new threads in it. Mar 25 05:15:57 i don't care to manage my own threads for this application Mar 25 05:16:19 that severely complicates dealing with storing records in either a flat file or an sqlite databse Mar 25 05:16:48 AsyncTask automatically handles the spawning of worker threads and assignment of tasks to free threads in the pool Mar 25 05:17:03 it also automatically handles increasing and decreasing the size of the worker pool Mar 25 05:18:05 there's no real reason that AsyncTasks shouldn't be used from within a service as far as i can tell Mar 25 05:18:35 all it does is give you a convenient interface for spawning a task in a worker thread from the main thread, then having the results be processed on the main thread when the task completes Mar 25 05:18:48 in my case i don't even have any activities running Mar 25 05:19:09 I think you are right to use AsyncTask after considering your reasons Mar 25 05:19:24 yeah it seems like the easiest way Mar 25 05:19:32 can always be changed later if it actually needs something more sophisticated. Mar 25 05:20:01 and even if it's not the best solution, it will suffice for a month or two of data collection on a small number of devices... if i ever extend this into an app that will be put on the market it will likely be redesigned with a variety of other services and activities anyway Mar 25 05:20:10 yeah Mar 25 05:20:24 so then my question remains - when does an AsyncTask get killed? Mar 25 05:20:49 i know that when finishing an activity, it is up to you to cancel any running asynctasks that you don't want to complete Mar 25 05:21:31 but if i never started any activities, and my only service is an intentservice that finishes its onHandleIntent method quickly, will android scavenge the process immediately after onHandleIntent is called? Mar 25 05:21:48 my problem with asynctask is that if you are using it in a service, onPostExecute works on the unthread. How do you know what activity you will be on? Mar 25 05:21:50 i guess my real question is: if i use an IntentService, what does the process lifecycle end up looking like? Mar 25 05:22:12 rgravener: onPostExecute does run on the main thread, which is the behavior i want Mar 25 05:22:25 mgmuscari: yeah, are you only going to have one activity? Mar 25 05:22:30 for starters this application has no activities, it's just a service for recording data Mar 25 05:22:54 ok, you should be fine Mar 25 05:22:58 onPostExecute will interact with a contentprovider Mar 25 05:22:58 A started service can use the startForeground(int, Notification) API to put the service in a foreground state, where the system considers it to be something the user is actively aware of and thus not a candidate for killing when low on memory. (It is still theoretically possible for the service to be killed under extreme memory pressure from the current foreground application, but in practice this should not be a concern.) Mar 25 05:23:14 it's going to insert records into an sqlite database, and insertion order is unimportant Mar 25 05:23:41 yeah, i've used startForeground for regular services before, but this is my first time using IntentService Mar 25 05:23:47 i guess i need to read a little deeper into it... Mar 25 05:23:59 intentservice has startForeground too Mar 25 05:24:21 ah, IntentService stops itself once it's run out of work Mar 25 05:25:24 if your using eclipse, i would dl the sources for 11,12,13,14 and attach them in eclipse Mar 25 05:25:33 cause android docs can suck at times. Mar 25 05:25:55 sources can be downloaded with $ANDROID_HOME/tools/android Mar 25 05:26:08 rgravener: eclipse has been driving me nuts since i last updated it, i disabled all the hovers and the javadoc Mar 25 05:26:18 thats fine Mar 25 05:26:26 but command+shift+T is nice still Mar 25 05:26:56 something is wrong with my eclipse installation that when I start a new project no layouts will show unless I manually run android update project on the project :| Mar 25 05:26:59 stupid hover lag bug came back, it pegs my cpu at 100% and freezes my JVM for 10+ seconds every time content assist loads Mar 25 05:27:16 readme: u only use ant? Mar 25 05:27:27 yeah, i used to have that bug. Mar 25 05:27:30 rgravener: nah, I usually just let eclipse do the build Mar 25 05:27:31 it seems that i can keep an IntentService from being destroyed by binding to it Mar 25 05:27:31 try upgrading or downgrading eclipse Mar 25 05:27:45 i never used android update project until Friday at work Mar 25 05:28:00 at this point in time i'm unwilling to install any version of eclipse that isn't the one in the arch linux repos Mar 25 05:28:05 sometimes when eclipse is not "working"... running android update project will fix it.. Mar 25 05:28:09 its magic Mar 25 05:28:13 too annoying to keep multiple version around Mar 25 05:28:26 haha, it generates local.properties Mar 25 05:29:40 Is there a way to change the background color of the action bar in action bar sherlock? Mar 25 05:29:59 here is an app that does some recording/encoding of audio in android https://github.com/n8han/shouty Mar 25 05:30:08 it is written in scala though Mar 25 05:30:28 kill it with fire Mar 25 05:30:29 lol Mar 25 05:30:33 scala, no thanks Mar 25 05:30:55 i tried it once Mar 25 05:31:05 had a terrible time getting it to work Mar 25 05:31:37 I tell anyone who is young to learn it. Mar 25 05:31:55 Gives you an advantage over most peeps entering software dev Mar 25 05:32:14 scala? it's basically just java with FP Mar 25 05:32:22 no die though, headaches start there. just gotta go emacs + sbt Mar 25 05:32:35 mgmuscari: FP? Mar 25 05:32:41 functional programming Mar 25 05:32:48 superset of java Mar 25 05:32:59 which is nice, like running the repl Mar 25 05:33:16 however, sbt is known to kill hard drives. Mar 25 05:33:29 i would be interested in scala if a knew a bit java Mar 25 05:40:29 ok, i see how IntentService works now. kind of weird Mar 25 05:40:59 it seems to assume that onHandleIntent will take some time Mar 25 05:41:33 each time you invoke startService(intent) it stacks up and calls onHandleIntent Mar 25 05:41:52 yeah there is a slight delay in startService Mar 25 05:42:00 it'll dequeue intents and process them when a call to onHandleIntent finishes Mar 25 05:42:26 once there are no more pending intents in the queue and the last call to onHandleIntent finishes, the service stops itself Mar 25 05:42:40 it does it in a silly way - each time onHandleIntent finishes, stopSelf() is called Mar 25 05:43:21 but if another client has called startService since that onHandleIntent started, the ID of the request to stopSelf() is older than the most recent ID from the newer startService(), so it keeps running... Mar 25 05:43:42 so the service will start and stay alive as long as work is coming into its queue and is being processed, then immediately stop Mar 25 05:44:10 but you can still bind to it, in which case, it won't be destroyed immediately... Mar 25 05:45:27 ultimately i guess i don't care whether the service is running as long as the process stays alive and the asynctasks can finish Mar 25 05:49:18 my understanding of the service lifecycle is that threads won't be cleaned up automatically during onDestroy() Mar 25 05:54:05 i think i need to sleep on this Mar 25 05:54:09 thanks for the conversation guys, goodnight Mar 25 06:25:19 hello all Mar 25 06:31:18 hi Quacktop|BNC Mar 25 06:31:20 hi QubeZ Mar 25 06:31:28 hey rgravener Mar 25 06:45:21 hi Mar 25 06:49:02 I've push an important update to market for my application but only 50% off the pople have update. I'm thinking to add a litle message to my application when an update is disponible. I's there a way to autocheck the market if an updaet is disonible ? Mar 25 06:50:08 *the;*people;*little;*update;*disponible Mar 25 06:50:23 disponible? Mar 25 06:50:39 thats not a word Mar 25 06:51:25 it is. in french Mar 25 06:51:28 :P Mar 25 06:51:35 haha Mar 25 06:51:58 ok so "available" Mar 25 06:52:26 I think a push notification is the only viable solution here. Mar 25 06:52:39 i dont know of any way to force the market to check for updates... I've usually gointo the Google Play (now) and Menu -> My Apps (or Apps) Mar 25 06:52:51 then it will show the updates, but not a way to manually refresh the check I dont think Mar 25 06:52:54 just make your own push service and push a notification whenever you update Mar 25 06:53:06 ya, use c2dm Mar 25 06:53:07 then you can nag them extra Mar 25 06:53:09 inside your app Mar 25 06:53:14 The idea is to show a little message from my application. Mar 25 06:53:20 but don't be surprised if they uninstall Mar 25 06:53:22 :P Mar 25 06:53:27 much easier to do it when the app is run... Mar 25 06:53:47 S0lign0c: most people will get your update... if its that critical then you should put why its so important in the "Whats New" section. Mar 25 06:56:24 QubeZ: Ok, maybe that is normal, people will update when a notification will be show. Mar 25 06:57:49 readme: Yes with a service, good idea Mar 25 06:58:34 Maybe too much to use a service just for that :s Mar 25 07:18:32 Hi all Mar 25 07:20:09 i'm targeting android for my next game developments, could you recommand me some references of Android phones and tablets as good testing targets please ? Mar 25 07:21:52 droid x Mar 25 07:21:53 kindle fire Mar 25 07:21:58 htc evo Mar 25 07:22:01 those are older phones tho Mar 25 07:22:03 but popular Mar 25 07:28:41 rgravener, thank you Mar 25 07:41:46 My View.OnKeyListener is not receiving events. I registered it with view.setOnKeyListener() and set a breakpoint in it. When I press the first key, I get a message in logcat "KeyCharacterMap--Can't open keycharmap file, KeyCharacterMap--Error loading keycharmap file '/data/usr/keychars/omap-keypad.kcm.bin" Mar 25 07:42:02 anyone know what is going on? My keyboard works in other apps so I wonder what is wrong. Mar 25 07:48:41 hello Mar 25 07:49:05 Can I get help fixing a haipad 701 MID, or is this the wrong place for that? It's calibration is off to the point of being unusable since I reset it and I can't seem to mount it as a USB drive to reflash it or anything. Mar 25 07:51:16 I have just downloaded an IDE and everything for developing, and i have the emulator running for andriod, but my app does not appear on the android. Mar 25 07:51:38 Oh, I see how this goes. Found the main android page, duh. xD Bye guys, hope to be on here soon when this thing is working. Mar 25 07:53:22 ah ha! I had to call view.setFocusable(true) in order to receive key events in my View.OnKeyListener in addition to registering it! Mar 25 07:54:01 is there something i am suppost to be doing to run my app on the android emulator? Mar 25 07:54:21 Jeevis: clicking run in eclipse should push the app to the emulator and run it Mar 25 07:54:24 what does the console tab say Mar 25 07:54:33 loading data fails when I open eclispe now Mar 25 07:54:47 loading what data? Mar 25 07:54:48 funny, because it happened after I updated the plugins Mar 25 07:54:51 all. lol Mar 25 07:54:52 Oh Mar 25 07:54:52 i used "run configurations" Mar 25 07:54:56 Parsing Data for android-8 failed Mar 25 07:54:56 java.lang.NullPointerException Mar 25 07:55:11 does eclipse know the proper location of the sdk? Mar 25 07:55:15 Zooklubba: ^ Mar 25 07:55:22 Jeevis: just click run Mar 25 07:55:25 run->run Mar 25 07:55:40 run->forest->run Mar 25 07:55:43 Yes. I havent changed anything readme. The config has worked for a year now. I just went through update software in eclipse yesterday Mar 25 07:55:47 :) Mar 25 07:56:02 it made a main.out.xml in my layout folder, with an X Mar 25 07:56:08 Zooklubba: I suppose we should arrange a proper funeral service for your eclipse install Mar 25 07:56:16 lol Mar 25 07:56:19 saying "default" is not a best match for any device locale combination. Mar 25 07:56:22 Was thinking about killing it Mar 25 07:56:55 But dont want to Mar 25 07:57:25 I feel the same way about my eclipse install, the layout editor doesn't work unless I run android update project in every project I create from the cmdline. Mar 25 07:57:40 but I am too lazy to put it down Mar 25 07:59:19 Well, time for execution. Mar 25 08:00:23 ooh, a bump up from 3.6.2 to 3.7.2 Mar 25 08:05:25 Is being able to put more than one points of expansion on a single side of a nine-patch something new? Mar 25 08:05:32 Or has that been supported since day 1 Mar 25 08:06:21 Should View.OnKeyListener work on a SurfaceView? Mar 25 08:06:27 my test with a regular view works fine Mar 25 08:06:34 probably not Mar 25 08:06:43 why is it that you are inclined to believe it doesn't Mar 25 08:06:59 something I need to know about SurfaceView? Mar 25 08:08:04 never used it Mar 25 08:08:08 i just assumed it was special Mar 25 08:08:25 hm, I can try requestFocus Mar 25 08:08:44 I need to call requestFocus() on my brain Mar 25 08:12:04 JakeWharton: haha Mar 25 08:12:13 here's the magic code if you ever need to get key presses Mar 25 08:12:15 http://pastie.org/3664724 Mar 25 08:12:26 miss any one of those things and you will bash your head against the wall wondering why Mar 25 08:12:32 why it works sometimes, but not others Mar 25 08:41:32 what could cause an activitynotfoundexception if I have it listed in my manifest and the class/activity really exists? Mar 25 08:41:48 I checked and double checked. It used to work, a simlar activity works fine Mar 25 08:42:20 it's not defined correctely Mar 25 08:42:24 or the class isn't public Mar 25 08:42:32 or you have a non-default constructor Mar 25 08:44:04 don't have a specific constructor, it is public Mar 25 08:44:15 afaik it's defined correctly (but I assume it somehow isn't) Mar 25 08:47:25 iivvoo: check your packages are the same in the code and manifest, and do a clean build Mar 25 08:48:10 I checked (it's in the same package as another activity), did a clean already Mar 25 08:48:22 using relative classnames in the manifest Mar 25 08:49:50 check your imports where you try and start the activity Mar 25 08:50:03 does it import a different activity with the same name from elsewhere? Mar 25 08:50:24 iivvoo: how are you starting the activity, post the line of code Mar 25 08:52:09 http://0xc0deba5e.appspot.com/agoweGMwZGViYTVlcgwLEgRDb2RlGKG-Aww <- code paste Mar 25 08:52:26 MemoryActivity fails, PuzzleActivity works fine Mar 25 08:54:12 this wont fix your problem but it would optimize your code Mar 25 08:54:20 you should use v.getContext() rather than Main.this Mar 25 08:54:42 Main.this generates a couple of new methods that provide some weird static glue Mar 25 08:54:57 v.getContext() is local scope and will be faster Mar 25 08:55:16 i got "run" to work Mar 25 08:55:21 but my app still isnt there Mar 25 08:55:23 argh Mar 25 08:55:37 there was a typo in androidmanifest but I was totally blind to it Mar 25 08:55:42 yea it happens Mar 25 08:55:47 MemoryActiity Mar 25 08:56:01 ah well Mar 25 08:56:08 sorry for this, thanks for thinking along though :) Mar 25 08:56:19 iivvoo: hope the tip above helps Mar 25 08:57:04 bbl Mar 25 08:57:21 Napalm good tip, thanks. I'll use it and try to get it into my system Mar 25 08:59:25 can i have some help please? -.- Mar 25 09:00:12 like, all i did was open a new project Mar 25 09:00:18 it says "hello world" on it already Mar 25 09:00:21 and im trying to run that Mar 25 09:07:43 jeevis so what's your problem? Mar 25 09:12:53 i cant get my app to show up in the emulator Mar 25 09:12:56 or i dont know how to find it Mar 25 09:15:10 it should be started by default Mar 25 09:15:21 you'll need to "unlock" the screen first, of course Mar 25 09:15:58 if you want to start it by hand, it's in the applications section (it's not on your home screen by default) Mar 25 09:18:15 readme, one silent minute to show some respect of my late eclipse setup please :P Mar 25 09:19:15 i did unlock Mar 25 09:19:20 and it just brings me to the home screen Mar 25 09:19:56 and it doesnt show in the app drawer Mar 25 09:21:30 then it didn't install Mar 25 09:21:34 check your console / error log Mar 25 09:21:51 or perhaps you're running a second avd, or have a device attached on which you install Mar 25 09:22:16 Wow, clean install with eclipse. Folder down from 1,5GB to 300MB Mar 25 09:22:34 damn Mar 25 09:22:37 it went back to an error Mar 25 09:22:40 -.- Mar 25 09:22:48 why does it keep creating main.out.xml? Mar 25 09:30:26 no idea, I've never seen .out.xml Mar 25 09:36:16 Jeevis: Look here: http://www.stackoverflow.com/2393103 Mar 25 09:36:17 Jeevis, because you're just clicking the play (run) button when you have main.xml open Mar 25 09:36:32 Either create a proper run configuration or click play when you have .java or the project name selected Mar 25 09:36:35 Jeevis: If this is related to your problems Mar 25 09:37:01 Jeevis: And what JakeWharton said Mar 25 09:37:32 that link didnt work Mar 25 09:37:46 Jeevis: Look here: http://www.stackoverflow.com/questions/2393103 Mar 25 09:37:49 Sorry Mar 25 09:37:56 Lost a part of the url when typing it Mar 25 09:39:01 ok, so that worked for hitting just "run" Mar 25 09:39:12 but it still goes to the home screen after i unlock the phone Mar 25 09:40:09 Anyone know how i can fix if my widget onclick works on Kindle Fire but not G2? Mar 25 09:41:33 NightmareApps: I totally know exactly what you're talking about Mar 25 09:42:22 sarcasm or seriously? Mar 25 09:42:29 NightmareApps: no need to describe the differences because I am a genius and I am capable of reading between the lines and researching information Mar 25 09:43:08 Alright, if I understood the problem correctly, when Jeevis first chose to Run the project, the XML-file was selected/open, which created a Run configuration based on the XML file contents. Mar 25 09:43:11 NightmareApps: I will have an answer for you when I do indeed go off and research how the KindleFire and G2 are different, which is never. Mar 25 09:43:22 NightmareApps: please wait patiently. Mar 25 09:43:39 what information do you want me to tell you Mar 25 09:43:49 If it instead had been a .java-file from the first get go, the project would've been built and run as it "normally" does. Mar 25 09:43:50 no, this time Mar 25 09:43:54 i had the .java file selected Mar 25 09:44:32 Jeevis: Yeah, but from the very first time you tried to Run it, was it the XML-file that was selcted (I'm going to try this myself to verify)? Mar 25 09:44:41 yes Mar 25 09:44:43 and just using run Mar 25 09:44:57 Alright, I'm going to try this. Mar 25 09:47:04 Created a project, opened main.xml, chose run, the emulator is booting... Mar 25 09:48:13 maybe my emulator is set up wrong :S Mar 25 09:48:14 Well, nothing is appearing in the emulator. No launcher icon or application. Mar 25 09:48:40 It however reported "Installing [name].apk" Mar 25 09:49:08 do you have an intent filter specified for your default activity? Mar 25 09:49:39 Well, now it worked without a hitch. Took three tries, then the Emulator finally got it. Mar 25 09:50:12 oncreate(bundle) i think Mar 25 09:50:57 Jeevis: The launching intent is located in AndroidManifest.xml Mar 25 09:51:28 Jeevis: Mar 25 09:52:04 Mar 25 09:52:57 Mar 25 09:56:09 Hmm, I can't even understand how you got in this state to begin with... I'm trying to create new projects and force it into not being able to launch but it beats me all the time and "just works" Mar 25 09:56:30 http://rainulf.ca/Android-Development-Part-1-Activity-211.html Mar 25 09:56:36 this is the guide that i am following Mar 25 09:56:40 if that makes it easier Mar 25 09:56:48 could be a problem with my setup maybe? Mar 25 09:57:28 Jeevis: If you click the arrow next to the Run-button and select Run Configurations... Does it say Launch Default Activity in the window that pops up? Mar 25 09:58:22 yes Mar 25 09:58:49 Try and select "Launch" and see if you can select your package in the list. Mar 25 09:59:16 yes Mar 25 09:59:18 and ive tried that too Mar 25 10:00:36 Guess I'm going to have to look a bit deeper into the tutorial to see if something is iffy in there. Shouldn't be a problem, but who knows... Mar 25 10:01:09 android splash comes up Mar 25 10:01:35 "Android splash", as in the boot logo when the Emulator starts? Mar 25 10:01:45 yes Mar 25 10:01:50 then lock screen Mar 25 10:01:54 now the screen went black Mar 25 10:01:56 now the lock screen Mar 25 10:02:03 i unlock it Mar 25 10:02:07 and it goes to the home screen Mar 25 10:02:10 Yup Mar 25 10:02:43 and the app isn't in the drawer, as you mentioned before? Mar 25 10:03:01 i click the circle thing in the middle at the bottom Mar 25 10:03:15 and it gives me the 4x5 app screen Mar 25 10:03:18 i cant scroll down Mar 25 10:03:22 and the app name isnt there Mar 25 10:03:33 i can scroll to the right, which gives me my widgets Mar 25 10:03:59 The drawer is only left/right scrollable. They changed the scrolling in Android 3, I think. Mar 25 10:04:23 ok Mar 25 10:04:27 (I'm switching between windows here so I might be slow on replies) Mar 25 10:04:28 well its not thre Mar 25 10:04:34 there is only 1 screen of apps Mar 25 10:04:39 and the rest are widgets Mar 25 10:04:58 pastebin your manifest Mar 25 10:05:37 http://pastebin.com/dpiNx2qy Mar 25 10:06:28 looks fine Mar 25 10:06:35 i hope it should Mar 25 10:06:39 its a new project Mar 25 10:06:44 except you may want to change minSdkVersion to like 8 and then targetSdkVersion to 15 Mar 25 10:07:13 but that won't affect what you're currently seeing Mar 25 10:07:34 JakeWharton: do you know offhand if that view pager context menu thing was fixed with the newest support lib ? Mar 25 10:07:49 i can look Mar 25 10:07:55 oh, thanks Mar 25 10:07:58 i submitted a patch to Gerrit like two months ago Mar 25 10:08:07 yeah! Mar 25 10:09:06 no Mar 25 10:09:09 it's not fixed Mar 25 10:09:14 k, thx for looking Mar 25 10:09:30 doesn't look like any of my fixes made it in Mar 25 10:09:31 WTF Mar 25 10:09:46 one was so damn obvious Mar 25 10:10:20 Jeevis: Alright, my emulator is booting with a new project, following the guide Mar 25 10:10:42 g00s, https://android-review.googlesource.com/31260 Mar 25 10:10:46 no activity... Mar 25 10:11:14 jbq verified it Mar 25 10:11:20 but it was never merged Mar 25 10:11:54 JakeWharton: was there an accompanying entry in the defect tracker ? Mar 25 10:12:00 no idea Mar 25 10:12:44 http://b.android.com/20065 Mar 25 10:13:53 JakeWharton: hope all is well at your new gig Mar 25 10:14:09 it is Mar 25 10:14:10 i love it Mar 25 10:14:14 awesome! Mar 25 10:14:30 we just had our hack week and some people made things in 5 days that would take some companies months Mar 25 10:15:01 JakeWharton: Doesn't that happen pretty often? Mar 25 10:15:34 because companies involve: normal working hours, bureaucracy, distractions, politics, and all other sorts of time waste Mar 25 10:16:02 meetings... Mar 25 10:16:10 I was _just_ about to mention that. :) Mar 25 10:16:42 i bought ice cream from a store Mar 25 10:16:51 and the scooper guy worked at two different locations Mar 25 10:17:02 g00s, i may have to start annoying Googlers about these changes Mar 25 10:17:03 But a fair share, I believe, comes from "let's do something _fun_ for once" Mar 25 10:17:06 and he was talking about how the other location was better, because they used square to charge customers there Mar 25 10:17:18 JakeWharton: ok, i would too if i had any pull Mar 25 10:17:30 Jeevis: I'm launching emulators right and left here, I haven't forgotten you. It's just painstakingly slow... Mar 25 10:17:55 Adam Powell was really receptive about changing the scope of the supportInvalidateOptionsMenu method and managed to sneak it into the r7 release only a few days before it was due out Mar 25 10:18:08 :O Mar 25 10:18:16 is it normally slow? or just with this guide Mar 25 10:18:38 use r17 and the x86 VT stuff Mar 25 10:18:42 it'll be nice and quick Mar 25 10:18:43 drlaban: click snapshot, too Mar 25 10:19:01 Jeevis: Android 4 is especially slow on my box, to boot. Mar 25 10:19:31 its kinda slow for me too Mar 25 10:19:32 readme: Yeah, if snapshot wasn't in there, I'd never ever want to shut my emulators down until absolutely necessary. Mar 25 10:19:56 Jeevis: The app, however, installed on the emulator. Mar 25 10:20:32 O.o Mar 25 10:20:33 -.- Mar 25 10:21:39 JakeWharton: They just need to release an API15 x86 image Mar 25 10:21:58 JakeWharton: I noticed next to no difference with VT enabled on my box. Mar 25 10:22:14 Probably my old box's fault, but still... Mar 25 10:22:17 you need a new box Mar 25 10:22:18 :) Mar 25 10:22:35 SimonVT, I haven't messed with it on my machine yet. What APIs are supported? Mar 25 10:22:43 JakeWharton: 10 ~_~ Mar 25 10:22:46 that's it?!? Mar 25 10:22:49 Jupp Mar 25 10:22:50 Yep Mar 25 10:23:14 The x86 emulators are seperate images, apparantly provided by intel Mar 25 10:23:18 And so far, only api10 Mar 25 10:24:46 So for r18 we might get API12. Or better yet, the 10 revoked because of "Performance issues on old hardware running VT". Mar 25 10:25:21 They also added that GPU acceleration on arm emulators, but shit doesn't work on my computers :| http://developer.android.com/guide/developing/devices/emulator.html#accel-graphics Mar 25 10:27:15 I'm stuck on r16 until we upgrade everything at once Mar 25 10:27:35 we're moving to r17 and IntelliJ 11.1 in April-ish Mar 25 10:28:00 I should maintain two installs Mar 25 10:28:31 Jeevis: Try and create a project at API level 10 and see if that works. If nothing else, for the sake of testing older versions of Android in your environment. Mar 25 10:30:01 would this mean anything? Mar 25 10:30:01 Automatic Target Mode: Preferred AVD 'Android' is not available. Launching new emulator. Mar 25 10:31:08 and i am not sure what you mean by api level 10 Mar 25 10:32:14 oh Mar 25 10:33:18 Hah, best lint check ever. "SuspiciousImport" Mar 25 10:33:30 Warning if importing android.R Mar 25 10:33:55 I like the one that checks if setColor calls are using R.color.XXX Mar 25 10:34:00 because I do that crap all the damn time Mar 25 10:34:09 Haha, yeah Mar 25 10:34:17 That got me a few times as well Mar 25 10:34:23 "WHY IS EVERYTHING GRAY?!?!" Mar 25 10:34:28 Yeah haha Mar 25 10:34:47 I'm just disappointed by the lint integration in intellij Mar 25 10:37:29 why can i see anything? Mar 25 10:37:38 because you have eyes Mar 25 10:37:53 of curse Mar 25 10:38:05 i just want to confirm Mar 25 10:38:28 i'm a noob Mar 25 10:38:41 confirmed, you are a noob. Mar 25 10:39:02 on the way to master Mar 25 10:41:07 it is not about the destination, but the journey Mar 25 10:42:32 Oh how I love intellij 11.1's import management. 2 classes with same name? Nevermind, it just imports based on which field/method you select Mar 25 10:43:20 * g00s is still using eclipse Mar 25 10:43:30 will dell streak pro upgrade to ICS? Mar 25 10:43:41 SimonVT, I love that too Mar 25 10:43:56 anybody work on that? Mar 25 10:43:57 I like how it auto-completes constants Mar 25 10:44:07 Jeevis: http://pastebin.com/tKH7v1mp Mar 25 10:44:21 so the third field of a Toast.makeToast it'll suggest Toast.LENGTH_SHORT and Toast.LENGTH_LONG Mar 25 10:44:21 nxbtch: well, dell seems to be dropping android like a hot potato Mar 25 10:45:00 Hah yeah, it really is smart about all that Mar 25 10:45:11 it was also micheal dell who said apple would never succeed Mar 25 10:45:14 screw dell Mar 25 10:45:34 hp is jumping into the tablet fray with just windows 8, no android Mar 25 10:45:47 they are targeting enterprise though Mar 25 10:46:01 http://www.appleinsider.com/articles/06/01/16/apples_jobs_says_michael_dell_should_eat_his_own_words.html Mar 25 10:46:11 hp seems to come to an end Mar 25 10:46:23 i doubt windows will gain any traction in mobile again Mar 25 10:46:25 i dont have 2.3.3 Mar 25 10:46:31 Game over Mar 25 10:46:39 i think they will succeed Mar 25 10:46:40 pepsi and coke, and windows is like, RC Mar 25 10:46:41 Jeevis: Download it through the SDK Manager Mar 25 10:47:05 kk Mar 25 10:47:09 Jeevis: The button to the left of the AVD Manager in Eclipse Mar 25 10:47:26 readme: are you still on the east coast ? Mar 25 10:47:33 yeah Mar 25 10:47:40 are you getting up or going to bed :D Mar 25 10:47:50 neither Mar 25 10:47:57 sleep is for the mortal Mar 25 10:48:16 back Mar 25 10:48:27 front Mar 25 10:48:29 talent never Mar 25 10:48:32 game needs debugging Mar 25 10:48:37 hey JakeWharton Mar 25 10:48:58 JakeWharton: have you added popup menu's to ABS? Mar 25 10:49:09 for the Android v4 compat? Mar 25 10:49:19 what do you mean popup menus? Mar 25 10:50:09 actually, it doesn't matter Mar 25 10:50:09 yes Mar 25 10:50:10 i have Mar 25 10:50:13 you know when you press an action item thats like a spinner on v4 (has the arrow in the corner) or press the "..." more items button you get a PopupMenu which is a PopupWindow with ListView Mar 25 10:50:22 list navigation, overflow, and sub-menus use ListPopupWindows Mar 25 10:50:33 nice Mar 25 10:51:07 bleh Mar 25 10:51:10 i hate my slow internet Mar 25 10:51:13 its gonna take a while Mar 25 10:51:17 ill be on later on today Mar 25 10:51:18 -.- Mar 25 10:51:21 i might take a nap before work Mar 25 10:51:23 JakeWharton: https://github.com/JakeWharton/ActionBarSherlock/blob/master/library/src/com/actionbarsherlock/internal/widget/IcsListPopupWindow.java Mar 25 10:51:25 that one? Mar 25 10:51:37 yes Mar 25 10:52:06 JakeWharton: also have you read this yet? http://tools.android.com/recent/dealingwithdependenciesinandroidprojects Mar 25 10:52:12 i have Mar 25 10:52:15 not sure if it effects your project in anyway Mar 25 10:52:26 nope, it effects the people who use it though Mar 25 10:52:45 even the new xmlns tag for libraries? Mar 25 10:52:58 attribute rather Mar 25 10:53:10 I don't expose anything that you would use in XML Mar 25 10:53:15 so it does not apply Mar 25 10:53:45 I like the new res-auto namespace Mar 25 10:53:51 thats it Mar 25 10:53:57 i was just trying to find the references to it Mar 25 10:54:39 SimonVT: have you used it yet? Mar 25 10:54:50 Yep :) Mar 25 10:55:04 do you know if it works in applications aswell? Mar 25 10:55:09 it does indeed Mar 25 10:55:21 nicee Mar 25 10:55:43 to be fair it should have been like that from the beginning Mar 25 10:55:57 but at least its in now Mar 25 10:56:02 Android 1.0 should have been 4.0 from the beginning Mar 25 10:56:06 Sure, but you learn as you go along Mar 25 10:56:12 agreed Mar 25 10:56:23 on both points Mar 25 10:57:00 some of the things they have released in ADTr17 i would have thought would have been straight forward from the beginning Mar 25 10:57:22 to be fair, ant helps a lot in overcoming some of these things Mar 25 10:57:37 so does Maven :) Mar 25 10:58:16 i know what i want for eclipse Mar 25 10:58:18 Always with the maven :p Mar 25 10:58:33 thats a plugin that shows your current projects relationships between classes Mar 25 10:58:43 almost like a UML diagram Mar 25 10:58:54 The maven dependency graph does that Mar 25 10:58:56 * JakeWharton runs Mar 25 10:59:00 got a pic? Mar 25 10:59:10 I don't use Maven in Eclipse anymore Mar 25 10:59:15 but you open a pom.xml and there's a tab Mar 25 11:00:15 Hey guys, which folders does default music player on GB scan? I have a bunch of personal recordings which popup every now and then in car and its embarrasing Mar 25 11:00:15 https://docs.sonatype.org/download/attachments/199AC9021/pom-dependency-graph.png?version=1&modificationDate=1212678465631 Mar 25 11:00:19 Napalm, ^^^^ Mar 25 11:00:27 that looks like it's a few years old Mar 25 11:00:48 dpac: add a file called ".nomedia" to the folder and media scanner should ignore it Mar 25 11:01:11 JakeWharton: link doesnt work 404 Mar 25 11:01:26 Napalm: Yeah, but I don't know where those files are, which is why I ask. Is there a way to check the path of file in the music player? Mar 25 11:01:40 ah one moment Mar 25 11:01:51 Napalm, http://i.imgur.com/0MKKJ.png Mar 25 11:02:53 dpac: scroll to near bottom of this page: http://developer.android.com/guide/topics/data/data-storage.html Mar 25 11:03:05 it will scan the entire sd-card to be fair Mar 25 11:03:14 but it will categories them based on that folder structure Mar 25 11:03:30 dpac: what device is this? Mar 25 11:03:39 Napalm: Nexus S running CM 7.1 Mar 25 11:04:06 CM7.1 is open source you could always check out the MediaScanner source and see where its searching Mar 25 11:04:22 Napalm: Right, I'll do that. Mar 25 11:04:25 Thanks Mar 25 11:04:42 JakeWharton: nice, but its one of those features that should just be part of Eclipse IDE for Java Devs Mar 25 11:05:00 i might have to look into making it Mar 25 11:05:30 i'm thinking i should sleep Mar 25 11:05:32 i'm not tired though Mar 25 11:05:50 JakeWharton: its because your mind is still active Mar 25 11:05:57 that's 24/7 Mar 25 11:06:18 i keep IntelliJ open and rest my hands on my keyboard so i can program while i sleep Mar 25 11:06:21 no but what i mean is you need something to distract you from "computer" releated stuff Mar 25 11:06:25 like a book or something Mar 25 11:06:31 I have a Kindle Mar 25 11:06:31 then you'll get tired Mar 25 11:06:35 i already read 5 chapters tonight Mar 25 11:06:53 if the book is computer related it doesnt count Mar 25 11:06:54 :D Mar 25 11:07:23 I'm debating on whether to start something for an hour or go to bed and wake up "early" and do it Mar 25 11:08:44 its always better to go to bed and wake up early, but its the self control to do that ;) Mar 25 11:08:53 well early would be like noon Mar 25 11:09:20 still its better to give your mind a rest Mar 25 11:09:32 wake up fresh Mar 25 11:10:20 g00s, that context dispatching thing has been around since r4 Mar 25 11:11:22 JakeWharton: something i noticed with that PopupMenu is that if a PopupWindow has no background it will completely mess up touch input, this effects PopupMenu and your code in IcsListPopupWindow Mar 25 11:11:55 use the dev branch Mar 25 11:12:00 i just fixed that tonight Mar 25 11:12:08 you shouldn't be using that class directly anyways Mar 25 11:12:18 or know that it's API is not stable and can change at any point Mar 25 11:12:23 no i know, ive seen it in other code, just wanted to make sure you fixed it in yours Mar 25 11:12:39 previously the style was always specified Mar 25 11:12:42 explicitly Mar 25 11:13:03 I backported ShareActionProvider tonight which implicitly set the styling so I changed it Mar 25 11:13:09 hi is there anyone that can help me port the finger unlock from gingerbread to ice cream sandwich for the moto atrix? Mar 25 11:13:18 JakeWharton: nice Mar 25 11:14:48 bed Mar 25 11:14:48 night Mar 25 11:28:14 Hi all. I am trying to get my hands on the tokenizer that Runtime.exec() uses to further pass the command down to ProcessBuilder(); some implementations seem to have Runtime.splitCommandLine(), how do I find what Android uses? Is there any place I can read the source code online? Mar 25 11:30:37 soulseekah: https://github.com/android Mar 25 11:32:37 I can't see to find the Java libraries there, Runtime is in java.lang.Runtime Mar 25 11:35:05 Hows the intellij's support for android? Is it as seamless as eclipse? Mar 25 11:37:01 dpac: i dont believe it is Mar 25 11:38:13 Napalm: Have been hearing a lot about it lately Mar 25 11:40:29 dpac: yes Mar 25 11:41:19 I have some common code, should i put it in a class and the inherit from that class, or should the code in My Application object? What is best practice? Mar 25 11:41:55 depends on what type of common code it is Mar 25 11:42:18 what does the common code that your talking about "do" in general? Mar 25 11:43:02 If my sd card is mounted to the computer and I just quickly unplug the USB, my phone still thinks it is mounted. Any way to fix this without rebooting or repluggin the USB? Mar 25 11:43:09 for example code that make sure the screen orientation dosn't change Mar 25 11:43:46 i mean if you click this button then the orientation is locked Mar 25 11:44:29 Kake_Fisk: perhaps check your settings on your computer to allow "quick removal" of the device? Mar 25 11:44:42 Kake_Fisk: what device is it? Mar 25 11:45:08 It's an Android 2.3 HTC HD2 Mar 25 11:45:45 ive never seen that problem with HTC HD before not sure about HD2 Mar 25 11:46:06 But I don't have the phone connected to the computer anymore, so I want a way to remount the SD card to the phone. Mar 25 11:46:24 Maybe through terminal, if there isn't a setting? Mar 25 11:46:32 i see what you mean Mar 25 11:46:38 well you could just do Mar 25 11:46:42 mount /sdcard Mar 25 11:46:44 and see what happens Mar 25 11:47:02 if it has a record of the previous mount point it should just remount it Mar 25 11:47:11 otherwise Mar 25 11:47:20 plug it back in Mar 25 11:47:22 and type mount Mar 25 11:47:31 see what and how the mount is used Mar 25 11:47:48 like mount -o blah,blah /sdcard /dev/blk0 Mar 25 11:47:52 and repeat Mar 25 11:48:01 this of course needs to be done as root Mar 25 11:48:14 bif_1964: yo Mar 25 11:48:25 Wait, if I just type "mount" it will let me know where the card is stored? Mar 25 11:48:29 yo yo Mar 25 11:48:32 bif_1964: so your code locks the orientation? Mar 25 11:48:46 you know you should be setting that in your manifest Mar 25 11:48:55 but since its activity releated Mar 25 11:49:11 you would be best to put that in a base class for your activities Mar 25 11:49:16 i want the user to be able to decide if its lock or not Mar 25 11:49:29 ah Mar 25 11:49:38 so you handle the configChange? Mar 25 11:49:56 hi is there anyone that can help me port the finger unlock from gingerbread to ice cream sandwich for the moto atrix? Mar 25 11:50:03 for example if he is lying down its annoying that the screen changes Mar 25 11:50:22 spanner3003: #android-root Mar 25 11:50:32 spanner3003: you mean the 9 dot security thing? Mar 25 11:50:54 Kake_Fisk: What does Settings -> Storage say about the mount? I might be way off about your issue, but shouldn't you be able to use that to remount the card? Mar 25 11:50:55 yes Mar 25 11:51:33 sounds to be like you want the #android-root channel rather than this one, as MDijkstra suggested Mar 25 11:51:49 ive seen it already ported though, so perhaps you can find it elsewhere already Mar 25 11:51:57 drlaban: I just rebooted my phone, but I wanted to know this for next time. But I think I remember it just displaying how much space I had left and such. Mar 25 11:52:16 nothing special, in other words Mar 25 11:52:48 Kake_Fisk: Hmm, haven't really thought about what happens to the controls in there when the card is USB mounted. Going to go check. Mar 25 11:53:36 Well, I have to go play some football now. Mar 25 11:53:41 Cya Mar 25 12:29:59 hi everybody! I have a question Mar 25 12:30:16 for my uni project i must create quiz app. Mar 25 12:30:46 This quiz app have 2 types of questions. Mar 25 12:31:22 First type is simple quiz(would be realized by radiobuttons) and in the second one answer would be provided by user(for example by TextView) Mar 25 12:31:48 How can i make such "dynamic" View? Mar 25 12:32:01 Is it possible to redraw the hole layout with each question? Thanks in advance! Mar 25 12:32:45 make a listview with an item for each question Mar 25 12:33:38 is it possible to include radioButtons and EditView to the listView? Mar 25 12:33:42 yes Mar 25 12:34:06 each 'cell' in the listview can have its own layout Mar 25 12:35:13 You mean with every new question to repopulate this ListView with custom layout? Mar 25 12:35:18 no Mar 25 12:35:42 or well, you could Mar 25 12:36:00 I was assuming you wanted to show a big list of all the questions Mar 25 12:36:34 rootty: you would create a layout for each item type in the list so, "question_radio" "question_input" Mar 25 12:37:15 No. I want to show only one question with answers OR some question(for example with some func) and EditText to enter the answer Mar 25 12:37:30 then you didn't have a problem in the first place Mar 25 12:37:48 you simply create two layouts, one for multiple choice, one for open answer Mar 25 12:37:57 in the activity handling the questions, set one or the other Mar 25 12:37:58 done Mar 25 12:38:22 either that or create two activities Mar 25 12:38:29 Or.. fragments! Mar 25 12:38:49 yup and populate the lot using a loader and db Mar 25 12:38:58 and change this layouts by setContentView() ? Mar 25 12:39:04 nope Mar 25 12:39:32 I had battery voltage issue earlier and think it was due to the pin in the USB host port was slightly bent and connected to the side of the port Mar 25 12:39:43 so I repaired it with a kitchen knife Mar 25 12:40:10 rootty: no, are you trying to build your entire app in one activity? Mar 25 12:40:28 luyang: thats possible because the usb port surround is normally grounded Mar 25 12:41:08 MDijkstra: ive seen disasters of apps do that, i can name names, but man, what the hell are these developers thinking? entire app in one activity Mar 25 12:41:26 this app was even doing its own style of "activity stack" internally Mar 25 12:41:29 rediculess Mar 25 12:41:42 people should really read at least all of http://developer.android.com/guide/topics/fundamentals.html before even starting work on an app Mar 25 12:41:48 I assume that my first activity would be with some instructions and start_button. Second one will be activity with Questions. And the third one with summary. But i reaally interested have to make activity with questions. I need the proper approach to this Mar 25 12:42:05 rootty: why not make one activity instance for each question? Mar 25 12:42:28 you could reload it, sure Mar 25 12:42:30 r you serious? Mar 25 12:42:37 yes, I r serious Mar 25 12:42:51 you mean each TYPE of question? Mar 25 12:42:56 no, each question Mar 25 12:43:05 you don't seem to grasp the concept of activities Mar 25 12:43:15 you can have multiple instances of an activity at the same time Mar 25 12:43:50 how is it possible? Mar 25 12:43:53 ie, you don't have to make a QuestionOneActivity, a QuestionTwoActivity Mar 25 12:45:16 in this case, depending on the design of your app Mar 25 12:45:26 swapping out the layout might make more sense Mar 25 12:45:40 (ie, with setContentView, like you suggested Mar 25 12:45:47 Make a Fragment which has all the logic. Instantiate it with the question and answers, and populate the view based on that. Then just replace fragments as you go along Mar 25 12:46:50 you could do that as well, depending on if you want/have to mess with the support library to get it to work on older devices Mar 25 12:47:09 SimonVT, http://developer.android.com/guide/topics/fundamentals/fragments.html Fragments appears in Android 3.0, but my teacher wants it would be running from 2.1 Mar 25 12:47:26 rootty: Android Support Library. Use it. Mar 25 12:47:36 rootty: i suggest you stick to the basics and use just activities as this is not that complex Mar 25 12:47:36 might be a bit much for a uni project Mar 25 12:48:01 rootty: As Mavrik said, there's a support library which backports Fragments to 2.1 Mar 25 12:48:09 1.6* Mar 25 12:48:41 that's ineteresting, but it;s simple uni project. Is it worse to play with this stuff? Mar 25 12:48:51 *it's Mar 25 12:51:15 Nevertheless, thanks a lot for you guys! Mar 25 12:51:19 Tbh, Fragments might actually be simpler. The "hard" part about Fragments is the transactions (add, replace, etc), but yours is simply a replace every time making it very simple Mar 25 12:55:10 anybody know about when will dell tablet upgrade to ICS? Mar 25 12:55:20 anybody work on it Mar 25 12:55:52 Napalm: Yes I found related forum threads on XDA developers etc where they sent in the phone for repair. Just fiddling with the USB pin to the center is a good thing to try first. Mar 25 12:56:21 nxbtch: try #android-root Mar 25 13:17:17 I am working with my first ListView and simplecursoradapter. I figured out that I need a listview called "list", but I cannot figure out how to load a layout and then populate the listview on that layout. It seems my only option is to display JUST the listview. What am I missing? Does it have something to do with using the SimpleCursorAdapter? Thanks! Mar 25 13:18:06 in general, if you don't use ListActivity (or ListFragment) Mar 25 13:18:22 you can simply put a listView in your layout (as root view or not) Mar 25 13:18:37 and populate it like this: Mar 25 13:18:57 ListView myList=this.getViewById(R.id.some_list_id); Mar 25 13:19:14 myList.setAdapter(new SomeAdapter(...)); Mar 25 13:19:51 it's only when you use listactivity that you have to use this predefined id for the list Mar 25 13:20:15 So, if I change my main ListActivity to just a plain Activity I can use the approach you mention? Mar 25 13:20:15 imo, the added value of List{Activity,Fragment} is minimal Mar 25 13:20:56 And all of this is valid for 2.3? Mar 25 13:20:58 eniacpx: yeah Mar 25 13:21:18 you could put 5 listviews in there if you wanted Mar 25 13:21:24 Sweet Mar 25 13:21:26 using that approach Mar 25 13:21:27 Thanks Mar 25 13:21:30 np Mar 25 13:21:53 I have to say my biggest frustration when writing my first app is making sure the tutorial I am reading is for the proper API level. Mar 25 13:23:22 I love the Vogella tutorials, but he keeps them up to date with the latest API level and seems to scrap the old ones. I like that I can find stuff on ICS, but so few phones run it right now, that it seems silly to get rid of pre 4.0 tutorials. Mar 25 13:38:09 nodsofk Mar 25 13:39:52 hi Mar 25 13:40:10 how to compile projects Mar 25 13:40:21 how to fix this when run reo sync Mar 25 13:40:23 repo 1.8.1 Mar 25 13:40:23 gpg: Signature made Fri Mar 23 05:55:21 2012 CST using DSA key ID 920F5C65 Mar 25 13:40:23 gpg: Can't check signature: public key not found Mar 25 13:40:23 error: could not verify the tag 'v1.8.1' Mar 25 13:40:23 warning: Skipped upgrade to unverified version Mar 25 13:52:13 Good afternoon devs. I'm trying to get the current volume/amplitude of a MediaPlayer in realtime to write a visualizer - can anyone offer some advice/point me in the right direction? Mar 25 13:53:20 sammysands: http://developer.android.com/reference/android/media/audiofx/Visualizer.OnDataCaptureListener.html Mar 25 13:54:01 sammysands: thats what you want right? Mar 25 13:54:43 Whoa! Napalm, my hero! Mar 25 13:54:54 I believe this is what I'm looking for, thank you Mar 25 13:55:52 sounds to me like you want to be extending http://developer.android.com/reference/android/media/audiofx/Visualizer.html Mar 25 13:56:15 well at least using one Mar 25 13:57:29 yes, this looks exactly like what i want to do, thank you Mar 25 13:57:44 how to fix this when run repo sync error: could not verify the tag 'v1.8.1 Mar 25 14:05:46 Napalm, it looks like Visualizer (http://developer.android.com/reference/android/media/audiofx/Visualizer.html) is only available since API level 9 - was there any way to do this before that? Mar 25 14:06:10 sammysands: the only way i know to do this before that time involves native code Mar 25 14:06:26 gotcha Mar 25 14:06:29 thanks Mar 25 14:06:31 sammysands: is this for any audio playback, or specific type.. such as mp4 Mar 25 14:06:34 i mean mp3 Mar 25 14:06:54 specific type doesn't matter, it's for audio that i'm recording and then playing back Mar 25 14:07:05 basically writing my own Talking Tom with my friend's face on it Mar 25 14:07:06 ( ; Mar 25 14:07:15 ah Mar 25 14:07:22 then its easier Mar 25 14:07:27 yeah? Mar 25 14:07:30 you just playback with AudioTrack Mar 25 14:07:33 rather than MediaPlayer Mar 25 14:07:37 http://developer.android.com/reference/android/media/AudioTrack.html Mar 25 14:08:08 sammysands: what are you recording with and what format? Mar 25 14:08:18 are you using AudioRecord? Mar 25 14:09:05 as of now I'm using MediaRecorder() Mar 25 14:09:06 i have an app running/debugging in Eclipse using API 8...now i want to change it to API 11 ...what do i change ? Mar 25 14:09:10 but I'm easy Mar 25 14:09:46 ancanta: right click on your project > properties > choose new api and press apply Mar 25 14:10:37 ancanta: then edit your AndroidManifest and project.properties with the new api version number Mar 25 14:10:47 sammysands: ok, let me explain the problem Mar 25 14:10:59 thnx Napalm :) Mar 25 14:11:22 ancanta: then do a project>clean Mar 25 14:11:27 so it rebuilds everything Mar 25 14:11:34 right! Mar 25 14:13:18 Napalm, listening (if you still can explain the problem) Mar 25 14:13:24 sammysands: are you recording and saving this data? then tweaking the audio and playing it back? Mar 25 14:13:52 at this point, no, just trying to record the data and play it back while showing my friend's face and mouth moving Mar 25 14:14:17 tweaking could be interesting, but MVP first Mar 25 14:15:04 ok but recording and saving it, and then playing it back at a later date Mar 25 14:15:22 the recording and playing does not happen at the "same time" Mar 25 14:15:23 ? Mar 25 14:15:37 not as of now Mar 25 14:15:59 just trying to record some audio and play it back Mar 25 14:16:10 sammysands: let me explain the problem now then Mar 25 14:16:23 you need to record it, and save it Mar 25 14:16:48 now if you record with MediaRecorder then you encode it using the AAC codec Mar 25 14:16:57 now you have data stored as a AAC file Mar 25 14:17:08 what is the best way to handle that bug? http://code.google.com/p/android/issues/detail?id=15537 Mar 25 14:17:11 but now you need to play that file back but look at the RAW uncompressed data Mar 25 14:17:22 aha Mar 25 14:17:42 but since the uncompression happens in the DSP chip, the OS level doesnt have a feed back for the audio frames Mar 25 14:17:42 So does AudioRecord just save the raw uncompressed bytes? Mar 25 14:18:42 hi Mar 25 14:19:05 thats what the Visualizer now helps with Mar 25 14:19:14 mmhmm Mar 25 14:19:15 it lets you get the raw uncompressed frames back out of the hardware Mar 25 14:19:17 so Mar 25 14:19:26 so, your solution Mar 25 14:19:35 you have two optionbs Mar 25 14:19:39 *options Mar 25 14:20:34 A. You use AudioRecord to record the RAW uncompressed PCM frames, and store it on sdcard, then retrieve this data at a later date and play it back using AudioTrack Mar 25 14:20:51 this is the simplest option, but it also has the largest problem Mar 25 14:21:01 the file size of raw audio data can be quite large Mar 25 14:21:06 yeah? Mar 25 14:21:12 how large, for say a 5 second clip? Mar 25 14:21:17 roughly Mar 25 14:21:25 5 * 22kHz * 16bit = Mar 25 14:21:53 882,000 bytes so 882KiB Mar 25 14:21:59 not too shabby Mar 25 14:22:14 just make sure you put a limit on the recording length Mar 25 14:22:14 :P Mar 25 14:22:22 so at least you have a upper limit Mar 25 14:22:31 you should also use Channels Mar 25 14:23:01 channels? Mar 25 14:23:44 damn doesnt look like AudioRecord or AudioTrack support channels Mar 25 14:24:17 they are essentially the use of memory mapped buffers for copying of data over process boundries Mar 25 14:24:28 5 seconds* 22khz * 2 bytes * 1channel = 220kb Mar 25 14:24:40 bad ass! Mar 25 14:24:55 oopsy i did iy on bits Mar 25 14:25:03 i hold the audio in memory then do something when i'm finished with it Mar 25 14:25:31 sammysands: channels are explained here http://en.wikipedia.org/wiki/New_I/O Mar 25 14:25:58 napalm, excellent Mar 25 14:26:43 i think Android's AudioTrack and AudioRecord need updating to support java.nio.channels.Channel Mar 25 14:26:45 don't think there's much point in using channels when the audio record api uses blocking io Mar 25 14:26:59 touche Mar 25 14:27:01 storkme: indeed Mar 25 14:27:08 so essentially for supporting earlier android models, AudioRecord and AudioTrack are the way to go Mar 25 14:27:50 might be worth checking if the device supports 22khz recording before you start; 44.1 is the only standard 'accepted' format Mar 25 14:28:17 sammysands: if your recording was longer, you would want to encode/compress the audio, and then only way around it would be to implement it on older devices would have been to port a native audio decoder lib to your app Mar 25 14:28:32 right on Mar 25 14:28:47 storkme: normally 22Khz is the default for mic recording? Mar 25 14:29:06 from my experience that is Mar 25 14:31:29 no; 44.1 is the default on android Mar 25 14:31:47 and the only one with official support Mar 25 14:31:55 Napalm: You said good night like 4 hours back, lol Mar 25 14:32:07 from my experience 8 and 22 seemed to work fine onthe small sample of devices i was able to test on Mar 25 14:33:59 dpac: i said BBL (be back later) Mar 25 14:34:27 Napalm: Ahh, which timezone are you in? Mar 25 14:34:35 GMT Mar 25 14:34:55 well from today BST = GMT+1 Mar 25 14:35:14 Napalm: Ohh ok... Mar 25 14:35:38 whoa, forgot we had daylight savings last night Mar 25 14:35:38 heh Mar 25 14:35:56 all my digital devices audio update it Mar 25 14:36:26 i was thinking i might build an addition to my digital wall clock Mar 25 14:36:45 make it so it updates from the NPL Mar 25 14:36:52 and their atomic clock reference Mar 25 14:37:10 http://en.wikipedia.org/wiki/Time_from_NPL Mar 25 14:37:21 might be a fun little project Mar 25 14:37:44 nice one Mar 25 14:37:52 damn it, my friend has got me addicted to a android game, it wouldnt be too bad if the app was actually written well Mar 25 14:38:01 what's the game Mar 25 14:38:04 even though its crap its still addictive Mar 25 14:38:24 https://play.google.com/store/apps/details?id=com.omgpop.dstfree Mar 25 14:38:55 its really got lots of bugs Mar 25 14:39:09 oh look, drawsomething Mar 25 14:39:13 i might have to rewrite it and improve it Mar 25 14:39:16 Mavrik: ? Mar 25 14:39:17 don't install that if you don't want to lose hours :\ Mar 25 14:39:25 haha Mar 25 14:39:39 we lost like full business day in the office because of that game Mar 25 14:40:00 Mavrik: did you notice how buggy it is? Mar 25 14:40:06 like they dont even hold the WakeLock Mar 25 14:40:06 yeah Mar 25 14:40:12 bloody stupid Mar 25 14:40:12 Napalm: erm... that app is turning over hundreds of thousands of $ per day, and the company which made it just got bought for $180million Mar 25 14:40:14 back button drops dialog Mar 25 14:40:20 there are no notifications Mar 25 14:40:25 Leeds: it makes no difference Mar 25 14:40:28 it's all and all a pretty terrible experience on Android Mar 25 14:40:36 Mavrik: yea, notfications was another thing Mar 25 14:40:38 want to know another Mar 25 14:40:45 Napalm: a makes a difference as to whether you're going to be able to throw something better out Mar 25 14:41:07 while your on a loading screen you can press your menu button and the dialog will pop up under the overlay Mar 25 14:41:13 all random crashes Mar 25 14:41:16 *also Mar 25 14:41:25 and random black screens full of nothing Mar 25 14:41:28 is really pony Mar 25 14:41:41 Leeds: i can make it better Mar 25 14:41:48 but thats not the point Mar 25 14:42:03 well, yes, it is the point, but I'm not going to waste time arguing it Mar 25 14:42:04 i tried to submit my list of bugs to them on the email address on their website Mar 25 14:42:09 and it fails with mailbox doesnt exist Mar 25 14:42:19 i mean, come on? what the hell Mar 25 14:42:22 try emailing zynga, since they own it now Mar 25 14:42:29 hahaha Mar 25 14:42:55 bah, zynga need better devs then Mar 25 14:43:00 Napalm: It just restarted my phone in the middle of a game. Talk about bugs :/ Mar 25 14:43:11 yea, major issues Mar 25 14:43:15 dpac: if an app ever kills your phone, that's an Android bug Mar 25 14:43:38 Leeds: Yeah, I know. Must be because I've OCed it to 1.2ghz Mar 25 14:43:39 Leeds: true, but the fact the app is doing things soo screwy to find that bug Mar 25 14:43:49 dpac: that too Mar 25 14:43:51 dpac: then you're doubly dumb Mar 25 14:43:56 Leeds: It hardly reboots though. Pretty stable otherwise Mar 25 14:44:02 exactly, dont OC Mar 25 14:44:05 <`z> Napalm, apparently canadiancow does shit for zynga Mar 25 14:44:09 Napalm: Why not? Mar 25 14:44:10 <`z> employee? Mar 25 14:44:13 canadiancow: where are you??? Mar 25 14:44:17 <`z> probably not volunteer coder Mar 25 14:44:52 not get me wrong, its a cool idea and the app visuals are nice, but thats about it Mar 25 14:44:58 the implementation sucks ass Mar 25 14:45:10 canadiancow: if you read this and you wrote it, shame on you Mar 25 14:45:11 :D Mar 25 14:45:57 <`z> Napalm, Words with Friends Mar 25 14:46:09 <`z> he wrote that one i think Mar 25 14:46:29 also, guys... not really cool to have a go at people because of their employer... Mar 25 14:46:45 im not Mar 25 14:46:51 unless it's Nokia, Microsoft, Oracle or Google, in which case, flame on! Mar 25 14:46:59 or... not Google, Apple :) Mar 25 14:46:59 infact zynga didnt even write it Mar 25 14:47:22 im just making a humorous remark Mar 25 14:47:24 :P: Mar 25 14:47:42 <`z> :3 Mar 25 14:47:52 <`z> Microsoft? Mar 25 14:47:54 <`z> BURRRRRRRRRRRRRRRRRRRRRN Mar 25 14:48:09 `z: worked on anything interesting on market? Mar 25 14:49:08 <`z> nope Mar 25 14:49:19 <`z> haven't done any shit Mar 25 14:49:20 <`z> lol Mar 25 14:59:07 hi gyuys Mar 25 14:59:18 how to get event onClick for all the screen? Mar 25 14:59:39 like... view.onclicklistener Mar 25 15:00:43 something like set clickable false for all widgets and set clickhandler for top of the tree Mar 25 15:01:57 enoch: are any of the items on your screen "clickable" Mar 25 15:02:04 yep Mar 25 15:02:25 napalm: i have a gallery, the selected photo on gallery goes in an imageview Mar 25 15:02:45 i want to make the gallery fade out and fade in when you click something Mar 25 15:03:19 if i make it fadein when you click the imageview it gose out when im choosing another photo Mar 25 15:03:23 so i need the listener on the whole screen Mar 25 15:03:31 simple... Mar 25 15:03:32 :P Mar 25 15:03:39 enoch: i dont see why you would need to do it that way Mar 25 15:03:53 enoch: have you got seperate clicklisteners for each imageview? Mar 25 15:03:56 Napalm, :D point me in another way Mar 25 15:04:07 i have only one imageview Mar 25 15:04:19 now im confused Mar 25 15:04:44 wait Mar 25 15:05:06 http://pastebin.com/9sQu55rn Mar 25 15:05:12 Hi, I'm trying to load a google search in a webview. The issue is that www.google.com/search?q=search_string doesn't return what's expected, instead, it displays a redirect request from the google server Mar 25 15:05:17 her is the code, now the listener is on the imagevie "i" Mar 25 15:05:53 don't read "parent" the right code is i.setOnclick.... Mar 25 15:06:52 this whole thing is just "yuck" Mar 25 15:06:56 no offense Mar 25 15:06:59 :| Mar 25 15:07:08 i still dont see your issue Mar 25 15:07:18 LOL Mar 25 15:07:24 why not just do what you want on when they press the gallery item Mar 25 15:07:34 im new with android/java (this is my first app) Mar 25 15:07:58 couse the gallery have to disappear and then you can't click it anymore Mar 25 15:08:20 yes but when you click a gallery item what are you trying to doing? Mar 25 15:08:25 trying *to do Mar 25 15:08:36 you want the image to appear full screen? Mar 25 15:08:54 the image goes in the imageview Mar 25 15:09:01 when you scroll the gallery Mar 25 15:09:16 i want the gallery "graphic" appear only when u have a finger on the screen Mar 25 15:09:54 so just process the touch in the activity Mar 25 15:10:03 how? Mar 25 15:10:10 onTouchEvent Mar 25 15:11:49 what do you guys think of this library I made? http://github.com/snooplsm/jumper Mar 25 15:12:15 its for when you have a lot of data and you want to drill down Mar 25 15:18:25 rgravener what is it for? Mar 25 15:18:33 Hi, I'm trying to load a google search in a webview. The issue is that www.google.com/search?q=search_string doesn't return what's expected, instead, it displays a redirect request from the google server Mar 25 15:19:30 Jug6ernaut: if you have a list view with many elements its a way to scroll to the elements that begin with letter x. Mar 25 15:19:42 ahhh Mar 25 15:19:43 nice Mar 25 15:19:46 shamufish: why not use Intent.ACTION_WEB_SEARCH? Mar 25 15:20:59 @napalm intent.action_web_search triggers a browsing session, I'm trying to embed a webview half the size of the screen in the middle of my app. Mar 25 15:21:30 can you screen shot your redirection page? Mar 25 15:24:12 someone said my android app had a nice windows 7 look to it Mar 25 15:24:13 wtf Mar 25 15:24:23 lol Mar 25 15:24:29 @napalm working on it :) Mar 25 15:24:53 Shammah: lets keep the @ tags for twitter. Mar 25 15:25:13 haha Mar 25 15:25:21 it was getting to me too Mar 25 15:25:45 sure sure Mar 25 15:25:47 :) Mar 25 15:27:12 Then you're doing it wrong, rgravener Mar 25 15:27:38 my app came out before windows 7 Mar 25 15:28:03 let me rephrase. I never used windows 7 Mar 25 15:30:01 hi, just copied a project from one to another eclipse installation, now it can not resolve the import android, any suggestions? Mar 25 15:30:49 DarsVaeda: make sure you have the ADT plugin installed and update your workspace android settings Mar 25 15:31:06 Napalm, i can't screenshot it fast enough. It says 'please click here if you're not redirected' Mar 25 15:31:13 it's from google server for sure Mar 25 15:31:29 what country are you in? Mar 25 15:31:32 UK Mar 25 15:31:35 ah Mar 25 15:31:37 use NCR Mar 25 15:31:56 mmmm ncr? Mar 25 15:32:05 http://support.google.com/websearch/bin/answer.py?hl=en&answer=873 Mar 25 15:32:26 making about 150 a month off of my apps. that good or bad? Mar 25 15:32:28 but your results will not be UK specific then Mar 25 15:32:58 or should i say guaranteed to be UK specific Mar 25 15:34:27 shamufish: ? Mar 25 15:35:01 would it then be www.google.com/ncr/search?q=searchstring Mar 25 15:35:04 because that doesn't work Mar 25 15:35:12 neither is ncr?q=something Mar 25 15:35:13 www.google.com/ncr?q= Mar 25 15:35:17 mmm Mar 25 15:35:18 guess not then Mar 25 15:35:36 shamufish: then use www.google.co.uk Mar 25 15:35:41 and see if you get the redirect Mar 25 15:37:04 neither work, both redirect to google.com/ and display an empty search box Mar 25 15:37:40 shamufish: try https Mar 25 15:38:10 ah it could be because its redirecting you to the mobile version of the site? Mar 25 15:41:22 napalm: yes I think so Mar 25 15:41:48 what is the url it redirects you to? Mar 25 15:43:53 ahhh Mar 25 15:43:57 looks like .com/m? Mar 25 15:45:01 yup Mar 25 15:45:04 that might be the ticket Mar 25 15:45:20 i need to figure out how to trace network activity in that webview to see if it's still redirects Mar 25 15:45:26 but it's looking better Mar 25 15:45:35 you can do that Mar 25 15:45:43 you get a callback for each url visited Mar 25 15:47:14 http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading%28android.webkit.WebView,%20java.lang.String%29 Mar 25 15:47:47 or Mar 25 15:47:48 http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageStarted%28android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap%29 Mar 25 15:47:51 Does anyone know how to have a PERMANENT root access in AVD? SDK r10 or above. Mar 25 16:00:28 napalm: the callback seem to ever return only one url, the one that was originally requested. It doesn't seem to pick up redirects, i guess it's to do with how the redirect is implemented (meta or via the server) Mar 25 16:00:33 not a big deal Mar 25 16:00:38 Compiling gone wrong: Caused by: java.lang.NoClassDefFoundError: net.simonvt.X.R$attr Mar 25 16:51:40 any graphics cards experts? Mar 25 16:52:34 trying to work outwhich card to put in my pc radeon 9500 or nvidia 790gs, i think its the nvidia Mar 25 16:56:38 There are web sites for these things Mar 25 16:56:43 go find one Mar 25 16:56:48 They rank all cards Mar 25 16:59:03 --- Mar 25 16:59:07 real question Mar 25 16:59:34 can eclipse manage / update make files for you? or do I have to do that all by hand? Mar 25 16:59:59 Can eclipse debug NDK code? with the c/c++ project add ons? Mar 25 17:00:36 * TheBunny runs out to buy a fire Mar 25 17:02:26 TheBunny: you can debug your android app, but native won't be debuggable Mar 25 17:02:34 it will prob just skip over it Mar 25 17:02:42 why buy a fire? Mar 25 17:02:44 how do people debug NDK code then? Mar 25 17:02:57 Well a Fire is cheap? and decent? and I can get it today? Mar 25 17:03:01 rrg Mar 25 17:03:08 have some better device ideas? Mar 25 17:03:20 depends, do you have an android device? Mar 25 17:03:26 no Mar 25 17:03:31 none Mar 25 17:03:44 need 1 for starters for GL based game port from ios Mar 25 17:03:52 Fire seems like a good target. Mar 25 17:04:03 yeah Mar 25 17:04:09 no gps Mar 25 17:04:10 no 3g Mar 25 17:04:13 Google I was told gives out free phones. Mar 25 17:04:17 no google api Mar 25 17:04:22 rgravener: 7th Guest for android Mar 25 17:04:30 OLD OLD PC game Mar 25 17:04:34 k Mar 25 17:04:51 so no modern anything needed Mar 25 17:05:05 needs, sounds, music, GL, movie play back… Mar 25 17:05:42 http://www.google.com/search?q=7th+guest&hl=en&safe=off&client=safari&rls=en&prmd=imvnsa&tbm=isch&tbo=u&source=univ&sa=X&ei=VFBvT6mWDK_C0AGVoY3XBg&ved=0CEAQsAQ&biw=1158&bih=610 Mar 25 17:06:00 ur remaking it TheBunny? Mar 25 17:06:10 just porting Mar 25 17:06:26 thats awesome Mar 25 17:06:29 it has been port to IOS and then Mac now and with that opengl Mar 25 17:06:30 "officially"? Mar 25 17:06:38 it sells well and this is all official Mar 25 17:07:08 11th hour next? Mar 25 17:07:15 probably? Mar 25 17:07:19 nice Mar 25 17:07:22 i had them on cdi Mar 25 17:07:36 and then hopefully you will see new projects form the team. Mar 25 17:07:38 id love to do that Mar 25 17:07:43 ive done some porting like that Mar 25 17:07:47 Im only doing this port. Mar 25 17:07:50 did chuckie egg for android Mar 25 17:07:55 if they need anyone else let me know Mar 25 17:08:03 But the copany was reformed with a small team and 1 of the founders etc. Mar 25 17:08:18 i really like porting shit over Mar 25 17:08:31 did thepaperboy2 ports for j2me also Mar 25 17:08:44 its all NDK / OpenGL level work tho Mar 25 17:08:48 ahaa Mar 25 17:09:11 so ur porting a c/c++ version? from pc? cdi? Mar 25 17:09:42 PC was ported to ios then mac Mar 25 17:09:45 im doing an unnofficial frisky tom port too Mar 25 17:09:53 now Im going from IOS to Android Mar 25 17:09:54 native is debuggable with gdb Mar 25 17:09:59 nice The_Coolest Mar 25 17:10:15 romainguy: does eclipse wrap up gdb for me? Mar 25 17:10:21 I want an IDE not a command line Mar 25 17:10:26 this is 2012... Mar 25 17:10:51 TheBunny: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/ Mar 25 17:10:55 on ICS devices, if there is no menu button, the 3 dots show up right? I have ICS running on my Incredible for testing but since it has a Menu button, I can't tell how it looks on real ICS devices (w/o Menu button) Mar 25 17:11:02 The IOS port is cleaned up and has the most incommon with the android port / code basicaly… all drawing moved to GLES etc Mar 25 17:11:20 Thank you romainguy Mar 25 17:11:23 QubeZ: make sure your targetsdk is 14 Mar 25 17:11:27 Ok running to store now... Mar 25 17:11:28 and those 3 dots won't show up Mar 25 17:11:33 you can prob test w/ the emulator Mar 25 17:11:54 rgravener: i am targetting 14 but I want the menu buttons to show up because I haven't build my app for ICS yet Mar 25 17:12:01 need to move everything to the actionbar Mar 25 17:12:08 oh Mar 25 17:12:15 i think they show up there in the 3 dots Mar 25 17:12:37 ok cool, as long as people can use it while I work on Tablet and ICS optimization. Mar 25 17:12:41 I wish i never made this: ryangravener.com/android/menu/icons Mar 25 17:12:44 http://ryangravener.com/android/menu/icons Mar 25 17:13:33 hehe Mar 25 17:13:52 I still need to dig into ABS and implement the actionbar Mar 25 17:16:55 using the gallery app in the galaxy nexus (ics) is not fun Mar 25 17:21:15 gosh, my app looks weird in Persian Mar 25 17:34:57 is it worth publish to Amazon App Store? It's a free app. Mar 25 17:35:59 Well, first year is free.. you can always try Mar 25 17:36:12 oh it costs to put apps on there? Mar 25 17:36:25 $99/y Mar 25 17:36:32 But remember, no google stuff on it Mar 25 17:36:44 ok, ill just /ignore amazon app store Mar 25 17:36:45 So no c2dm Mar 25 17:36:55 99/y Mar 25 17:36:57 forget that Mar 25 17:39:07 Napalm, you still around by any change? Mar 25 17:39:11 chance* Mar 25 17:40:09 yes Mar 25 17:43:07 Napalm, sweet - i implemented the AudioRecord / AudioTrack dealie and am successfully recording and playing back audio Mar 25 17:43:39 but now I'm trying to figure out how to detect the amplitude as I'm playing back the audio Mar 25 17:44:04 I'm iterating over the buffer of bytes and writing them to the AudioTrack player Mar 25 17:45:02 hmm my app gets my contacts fine on nexus one, but on htc flyer they seem ot be empty, i have no "contacts" app on htc flyer but theres one called "people".. should be same thing i guess? Mar 25 17:45:03 and I'm kinda stuck - not sure what to do with the bytes that I'm writing - how to analyze them Mar 25 17:45:31 any ideas? Mar 25 17:48:24 sammysands: are you doing 16bit or 8bit Mar 25 17:48:30 16 Mar 25 17:49:58 Okay I switched from windows to linux today. I set up eclipse, the sdk and the plugin. But when I create a new project now, there is R.java file generated. Please help! Mar 25 17:50:12 there is *NO* R.java file generated Mar 25 17:50:19 Napalm, a lil' somethin like this: http://dpaste.com/721196/ Mar 25 17:50:44 where offset is the maximum offset of mBuffer that I wrote to Mar 25 17:52:29 one moment Mar 25 17:53:04 much obliged ( : Mar 25 17:53:30 ContraMundum: thats normal. i have that on windows. :P Mar 25 17:53:35 oh Mar 25 17:53:41 thats because its not been built? Mar 25 17:53:59 Napalm: I have the build automatically checked Mar 25 17:54:10 Napalm: no error is /res either Mar 25 17:54:55 blargh Mar 25 17:55:07 hey TachyonDev Mar 25 17:55:10 yo Mar 25 17:56:57 sammysands: short[] samples = ByteBuffer.wrap(mBuffer).asShortBuffer().array(); Mar 25 17:57:01 buuggggg fixxxessss Mar 25 17:57:05 nasty but it works Mar 25 17:57:13 Napalm: woo that looks like audio stuff Mar 25 17:57:20 yea read up Mar 25 17:57:24 hmmm, lemme check it out Mar 25 17:57:49 oh cool Mar 25 17:57:56 sammysands: trying to detect waveforms? Mar 25 17:58:01 yeah Mar 25 17:58:08 well, trying to measure amplitude Mar 25 17:58:19 writing a Talking Tom with a buddy of mine's face on it Mar 25 17:58:19 ( : Mar 25 17:58:26 well thats easy enough Mar 25 17:58:36 I thought so, been at it for a few hours tho Mar 25 17:58:37 you have interleaved stereo samples im assuming Mar 25 17:58:52 keeping it simple at first Mar 25 17:58:55 so mono? Mar 25 17:58:59 sure Mar 25 17:59:09 reading bytes with an AudioRecord then playing them back with an AudioTrack Mar 25 17:59:20 got that working, just trying to figure out how to analyze the bytes now Mar 25 17:59:22 ah okay .. i do everything in C .. but its easy enough Mar 25 17:59:32 Napalm, what can I do with this short[] array? Mar 25 17:59:53 well the bytes just need to be converted to a signed integer Mar 25 18:00:16 which is probably -32778 to 32768 Mar 25 18:01:28 TachyonDev - so I can cast each byte of the byte[] array to an int somehow? Mar 25 18:01:58 yes using what napalm gave you Mar 25 18:02:20 you can wrap your byte array in a byte buffer Mar 25 18:02:31 and get shorts from it Mar 25 18:02:32 ok Mar 25 18:02:35 sweet Mar 25 18:02:41 thanks guys Mar 25 18:02:44 let me give this a shot... Mar 25 18:03:05 i do some nasty shit in C to get this all working in native Mar 25 18:03:18 sammysands: as far as peak detector .. lots of ways to do it Mar 25 18:03:28 sammysands: I used C macros for speed Mar 25 18:03:40 sammysands: with a simple max/min Mar 25 18:03:47 hmm Mar 25 18:04:15 Assume I want to put the source to gingerbread (api level 10) under a "sources" folder in the corresponding sdk platform folder, so that I can attach said source to my project in eclipse and fix the horrible content assist bug that freezes my system for 10 seconds every time it activates. How do I use repo to get exactly that bit of source, and put it into the correct format to stick in that sources folder? Mar 25 18:04:20 sammysands: https://play.google.com/store/apps/details?id=com.djtachyon.android.VirtualTurntableFree Mar 25 18:04:22 if you are interested Mar 25 18:05:29 sweet Mar 25 18:05:33 nice one TachyonDev Mar 25 18:05:38 :) Mar 25 18:06:02 my previous approach would just to be to download that source archive directly, but the download links now just link to the repo tool. i don't have time to read all about this tool and the entire AOSP source tree to figure out how to extract this bit that i need just to make my IDE behave Mar 25 18:07:23 you can use android tool to download sources Mar 25 18:07:32 no need to pull down all 6gb Mar 25 18:08:11 Hey guys. I was wondering, what's the deal with scripting language on Android? Mar 25 18:08:19 How are some good ways to integrate them with your app? Mar 25 18:08:37 rgravener: hello again Mar 25 18:09:00 Matteh: I guess Process api Mar 25 18:09:04 MattRB: Mar 25 18:09:18 Napalm, TachyonDev, it doesn't seem to like the array() call from the ShortBuffer Mar 25 18:09:21 i'm getting really annoyed with how quickly stuff changes with android; i wouldn't mind if i were a full time mobile app developer, but i only ever want to use it for research purposes and so developing apps is really just a side effect of my real work for me. it gets really frustrating >:[ Mar 25 18:09:21 MattRB: what kind of scription language? Mar 25 18:09:36 Like Lua, Python, anything lightweight and easy to use Mar 25 18:09:36 sammysands: you have have to iterate through the bytebuffer with getShort Mar 25 18:09:43 MattRB: IIRC there are some projects out there that aim to integrate various scripting language interpreters with android Mar 25 18:09:44 sammysands: its been awhile Mar 25 18:09:46 nothing changes too much Mar 25 18:09:47 TachyonDev: nope Mar 25 18:10:03 http://stackoverflow.com/questions/4492711/java-convert-byte-to-integer Mar 25 18:10:05 I'm getting java.lang.UnsupportedOperationException Mar 25 18:10:16 sammysands: yes because its a virtual short array Mar 25 18:10:18 not an actual one Mar 25 18:10:21 yeah Mar 25 18:10:27 just record 8bit Mar 25 18:10:29 lol Mar 25 18:10:32 its the same memory space Mar 25 18:10:47 I can record 8 bit Mar 25 18:10:49 you can do barrel shifts :P Mar 25 18:10:51 these other ways around the issue, but its a very annoying one Mar 25 18:10:52 what changes then? Mar 25 18:10:53 Basically I'm looking to write some stuff on Android in Java, and then expose that to Lua or Python, hell basically ANY scripting langage Mar 25 18:10:59 if i see "Sources for Android SDK" under 4.0.3, does that include the sources for earlier versions, e.g. 2.3.3? Mar 25 18:11:04 sammysands: then you just use the byte[] array Mar 25 18:11:10 in the SDK manager Mar 25 18:11:26 sammysands: the array contains the sampled amplitudes Mar 25 18:11:30 aha, really? Mar 25 18:11:33 yes Mar 25 18:11:35 its just in bytes Mar 25 18:11:36 touche Mar 25 18:12:17 sammysands: what are you trying to do with the samples again? Mar 25 18:12:48 just find the amplitude so I can show my buddy's face with the mouth the appropriate amount open Mar 25 18:12:59 heh Mar 25 18:13:01 so peak detection Mar 25 18:13:02 Ergh. Googling Python or Lua in Android just gets me SL4A Mar 25 18:13:02 ( : Mar 25 18:13:05 yea, so your going to need a fall off Mar 25 18:13:06 sure Mar 25 18:13:22 well you can just make an array of 256 integers Mar 25 18:13:26 Napalm: he can probably chop up the data into x # of samples looking for min/max Mar 25 18:13:33 wait wait Mar 25 18:13:47 he is just looking for loudness Mar 25 18:14:20 any suggestions for converting the bytes to ints? Mar 25 18:14:25 wait Mar 25 18:14:48 waitin Mar 25 18:14:54 sammysands: this is the way i see it, would like TachyonDev's opinion, one moment Mar 25 18:15:00 MattRB: SL4A is the project i was thinking of Mar 25 18:15:36 That seems more concentrated on standalone interpretation than integration Mar 25 18:16:02 I really don't want to have my app look like this: Java -> NDK Code <- Lua with me passing things back and forth. Mar 25 18:16:40 Napalm: sammysands: as far as the shortbuffer thing Mar 25 18:16:49 .getAsShortBuffer() Mar 25 18:16:50 idk man, developing an app that way severely breaks the sandbox model Mar 25 18:16:56 then you .get() from it until you are through Mar 25 18:17:01 what's the goal of your app? Mar 25 18:17:05 since im assuming this isnt a real-time algorithm Mar 25 18:17:25 sammysands: http://developer.android.com/reference/java/nio/ShortBuffer.html Mar 25 18:17:33 http://developer.android.com/reference/java/nio/ShortBuffer.html#get() Mar 25 18:18:19 Ehh I guess I'm going the all java method Mar 25 18:18:36 hey guys :) Mar 25 18:19:08 are there any linux tools (command line, not eclipse) that help with, building, installing, running, and showing the log of an android app? I knwo I can do it all separately, but it's not exactly optimal Mar 25 18:19:11 MattRB: if you want to put it in the market, i don't think there's a good way to include scripting languages Mar 25 18:19:32 sammysands: http://dpaste.com/721204/ Mar 25 18:19:32 Bonkers: ant and the adb command? Mar 25 18:19:42 mgmuscari, I wouldn't be against putting the script in the source or something of the sort. Mar 25 18:20:00 mgmuscari, and also adb shell am start... I just figured enough people have done this, something must exist Mar 25 18:20:12 MattRB: i think the biggest issue is that apps are generally designed to run in separate sandboxes. is there some way you can do it with a contentprovider? Mar 25 18:20:20 aha Mar 25 18:20:34 Bonkers: i'm not clear on what you're looking for Mar 25 18:20:34 i have no idea why i spelt that with an N Mar 25 18:20:38 mgmuscari, Why wouldn't scripting languages be able to run in the app itself? Mar 25 18:21:06 Bonkers: your description just describes a bunch of tools that already exist... you want something that automatically builds an app then pushes it to the device and launches it? Mar 25 18:21:35 MattRB: the app runs in a java vm, you'd need a separate interpreter for the scripting language. if it runs inside the jvm, then it's probably going to be very slow Mar 25 18:21:37 mgmuscari, ya, just something that smooths the rough edges a bit, I imagine it will just run those tools under the covers, like eclipse does, but not some giant hulking behemoth of a Java IDE Mar 25 18:22:03 MattRB: so your best option for speed and efficiency is a native interpreter but that breaks a whole bunch of android's built in security features Mar 25 18:22:26 Bonkers: why don't you just write a shell script to execute the 5-7 necessary commands in sequence? Mar 25 18:22:55 MattRB: btw, when i say JVM, what i really mean is Dalvik VM Mar 25 18:23:34 bbl Mar 25 18:23:35 Yeah I get it. My question is what's the difference between writing a game in C in the NDK and writing a game in Lua using an interpreter written in the NDK or something similar? Mar 25 18:23:52 Wouldn't they equally 'break a whole bunch of android's built in security features' Mar 25 18:24:08 mgmuscari, that was possible step 2, step 1 was seeing if someone more clever than I had already done this Mar 25 18:24:46 mgmuscari, one unanswered question I have so far is how can I get logcat to jsut show me logs from my app and not the entire world? Mar 25 18:24:51 thanks for the help Napalm, looking into it Mar 25 18:25:08 MattRB: ostensibly, no, if the NDK is working correctly. it provides a variety of headers and libraries to interact with the device through the same channels that your app would in the Dalvik VM, essentially Mar 25 18:25:33 in other words the Android system still manages all the system devices and your NDK app has to interact with those devices through NDK provided libraries Mar 25 18:25:50 Bonkers: use grep Mar 25 18:26:10 Eh I dropped the idea of using a scripting language, Java isn't terrible for writing game logic in. Mar 25 18:26:15 adb -s whatevs logcat | grep my.app.package Mar 25 18:26:41 mgmuscari, the only constant I see in the log lines is the PID Mar 25 18:27:09 MattRB: a Lua interpreter could be written using the NDK to work within the confines of the android ecosystem :) Mar 25 18:27:27 Bonkers: you should be tagging your debugging output Mar 25 18:27:43 log.d("my.app.package", "mydebugmessage") Mar 25 18:28:27 mgmuscari, I haven't gotten past hello world yet, but I see stuff like W/System.err for uncaught exceptions, doesn't seem like I could tag that stuff Mar 25 18:28:41 Bonkers: useful tip for debugging logs: you're required to remove all debug logging before publishing to the app store. write a wrapper class for the Log class that allows you to set a global debug level so that your log.d calls can be disabled when you publish Mar 25 18:29:17 Bonkers: Just use ddms for viewing logs.. It can filter by your package name Mar 25 18:29:23 ant can build and install Mar 25 18:29:27 adb can run Mar 25 18:29:27 Bonkers: if your app is crashing with some exception, you can catch it Mar 25 18:29:32 Eh, I kind of like the way I've got it set up now, actually. I dunno what caused such a sudden change of heart, I'm just writing simple games. So what I've done is start an Activity, and a GLSurfaceView, and whatnot. And then in the Draw call have that call a MainGame class I've created that sort of neatly holds all the game logic Mar 25 18:29:45 what SimonVT said, probably better if you're just starting out Mar 25 18:30:50 Bonkers: if you're having trouble keeping up with the logcat output, you can also pipe it through a tool like less to paginate it Mar 25 18:31:14 i frequently find that seeing the entire logcat can help me a lot, especially if i'm trying to deal with system broadcasts Mar 25 18:31:17 not having trouble with anything yet, just every environment I've ever dealt with lets you easily see only your output, I figured there would be a similar way here Mar 25 18:31:43 I'm not sure yet how dalvik GC stats are going to help me Mar 25 18:32:10 can anyone help me with this error? http://pastebin.com/kB0FQYD4 Mar 25 18:32:13 hey, do you know any templates for ICS mookups? Mar 25 18:32:16 the android sdk isn't a development environment, it's just a set of tools... why don't you want to use eclipse with the adt? Mar 25 18:32:34 Bonkers: a lot more gets printed in the logcat than dalvik gc stats Mar 25 18:32:57 mgmuscari, well right, that was an example of something in ALL that I would like to filter out by default Mar 25 18:33:22 ddms is probably your best bet Mar 25 18:33:25 I tried eclipse and I can't deal with it Mar 25 18:33:28 I'll check out ddms thanks Mar 25 18:33:46 I'm starting out android, but not programming Mar 25 18:33:51 you can launch ddms outside of the eclipse environment Mar 25 18:33:59 it's hard to use something like eclipse after 15+ years of gvim/emacs Mar 25 18:34:03 just curious, what don't you like about eclipse? Mar 25 18:34:08 hey guys, how to properly update listview? I have an adapter class extending BaseAdapter, it has a list with my data, I recreate my list and notify my adapter, but then all the data in my list just fucks up, list items just copy themselves multiple times Mar 25 18:34:22 my gripe with it is the seemingly incessant problems with content assist freezing the JVM for 10+ seconds at a time Mar 25 18:34:29 yep, pretty much Mar 25 18:34:37 i'm trying to fix that on my system right now Mar 25 18:34:38 every button click was like a 3-5 second pause on a 3.3GHz Mar 25 18:34:48 what eclipse version are you using Mar 25 18:34:53 Eh, wasn't that bug fixed like 2 years ago Mar 25 18:34:56 all for features taht I wouldn't care if they weren't there Mar 25 18:35:05 using 3.7 Mar 25 18:35:30 me too. i had it working great on 3.6, but when i upgraded to 3.7 all hell broke loose Mar 25 18:35:44 working on something right now that *might* fix it Mar 25 18:35:46 heh, well there's not actually anything I want to use in eclipse Mar 25 18:35:50 i'll let you know if i get it working... Mar 25 18:35:55 Hello Mar 25 18:36:11 i prefer to have one IDE window over a huge mishmash of crap on my desktop, that's why i use it Mar 25 18:36:21 it was like 7 clicks to create one file and save it, file->new->text, type something, file->save, click 3 directories, save Mar 25 18:36:38 vs: ":e file/path/foo.html" Mar 25 18:37:05 anyway, not really the debate for now :) I'm just not an IDE guy, not even a huge fan of debuggers Mar 25 18:37:08 the android SDK is so large that having a *working* content assist becomes helpful Mar 25 18:37:15 Does Android 4.0 Ice Cream Sandwidch on the Galaxy S2 will support the ExFat standard for SDXC card? Mar 25 18:37:30 when you can rapidly fill in the skeleton of a service that implements like 6 different listener interfaces for example Mar 25 18:37:38 I'm a little scared how much I just sounded like linus torvalds Mar 25 18:38:15 mgmuscari, ya, I get that, there's actually the eclim project that glues that part of eclipse into gvim, I may check that out Mar 25 18:38:39 unfortunately the only part of eclipse that is maddeningly slow IS the content assist... Mar 25 18:38:40 I just don't really see that as the dominant part of my coding workflow Mar 25 18:38:44 Hey guys, can someone tell me why calling notifyDataSetChanged() messes up my ListView? I am 100% sure that my ArrayList is updating properly Mar 25 18:40:50 It's not updating, it just grabs 7 list items and repeats them till the end of the list Mar 25 18:41:05 Bonkers: I'm not a senior developer of any kind, but I did try my hands at Eclim. It has its positives (being vim and all) but the content assist is pretty horrible. Mar 25 18:41:11 IF that's of any importance. Mar 25 18:42:24 for example I had 50 items, 1,2,3,...,50 after I call notifyDataSetChanged(), even if my data hasn't changed, my list items go like 4,5,6,7,8,9,4,5,6,7,8,9...4,5,6,7,8,9 Mar 25 18:42:42 drlaban, heh, kind of waht I figured Mar 25 18:42:48 I don't know why is this happening, have anyone faced something like this? Mar 25 18:43:00 not quite as smart, but I find code snippets are a great middle ground Mar 25 18:43:07 stiggpwnz: I wouldn't be so sure about that adapter Mar 25 18:43:12 snipmate being the plugin Mar 25 18:43:31 frameworks/base/policy/src/com/android/internal/policy/impl/FingerUnlockScreen.java:61: com.android.internal.policy.impl.FingerUnlockScreen is not abstract and does not override abstract method onRefreshCalendarInfo() in com.android.internal.policy.impl.KeyguardUpdateMonitor.InfoCallback Mar 25 18:43:31 class FingerUnlockScreen extends LinearLayoutWithDefaultTouchRecepient Mar 25 18:43:48 can anyone help with this error Mar 25 18:44:20 SimonVT, http://pastebin.com/uT6EW0Mc this is my adapter code Mar 25 18:44:37 See, your getView is wrong Mar 25 18:44:56 You still have to populate the view with data even if convertView != null Mar 25 18:45:09 It's only a view of the same type, not the same data Mar 25 18:46:14 SimonVT, thanks, mate! gonna try that Mar 25 18:47:19 SimonVT, yay, it worked Mar 25 18:47:31 SimonVT, thanks Mar 25 18:47:33 yay :) Mar 25 18:53:07 spanner3003, can you show us your code? show us what's on the 61st line Mar 25 18:58:22 stiggpwnz: try setting the adapter Mar 25 18:58:26 again Mar 25 18:58:31 don't need to call new on it, just setAdpter() Mar 25 18:58:51 stiggpwnz, this is the code i am using http://pastebin.com/CwXbS2WH Mar 25 18:59:10 rgravener, i've solved it, just got a mistake in getView() Mar 25 18:59:33 if(null){inflate} Mar 25 18:59:43 convertView==null/inflate Mar 25 19:02:02 hello - is anyone aware of a blacklist service for android apps - not to blacklist e.g. incoming calls but to know if apps are "evil" or steal information ... Mar 25 19:03:54 spanner3003, I think it basically says that you have to override onRefreshCalendarInfo(), but eclipse should've warned you about that Mar 25 19:04:10 spanner3003, if you're using eclipse Mar 25 19:04:44 spanner3003, maybe you should override it and keep empty, if you don't really need it Mar 25 19:04:56 no this is a custom ROM i'm building Mar 25 19:05:44 stiggpwnz, how do i do this? i'm new to all this Mar 25 19:06:09 spanner3003, that's why we love eclipse Mar 25 19:06:54 spanner3003, try overriding onRefreshCalendarInfo() in your fingerunlockscreen class Mar 25 19:11:56 like this stiggpwnz ? Mar 25 19:11:58 http://pastebin.com/ThKQ0EpY Mar 25 19:13:02 spanner3003, I guess so Mar 25 19:13:59 hi, how can I make my custom AdapterView<> implementation update its layout when notifyDataSetChanged has been called on its Adapter? Mar 25 19:17:27 BaseAdapter.registerDataSetObserver Mar 25 19:18:31 SimonVT: yeah, but DataSetObserver is not a subclass of AdapterView if I'm correct, so I can't register my view as an observer Mar 25 19:19:10 is the source code of ListView available? Mar 25 19:19:18 Uhh.. YourClass extends AdapterView implements DataSetObserver Mar 25 19:19:36 DataSetObserver is an abstract class, not an interface Mar 25 19:19:49 Or private DataSetObserver mObserver = new DataSetObserveR()... ; adapter.registerDataSetObserver(mObserver) Mar 25 19:20:52 ah yes, that might be an option Mar 25 19:21:00 thank you SimonVT Mar 25 19:24:45 hi, looking for a way to have a thread run so long as the application is active (it must survive moving from one activity to another) but must close when the application is left Mar 25 19:26:52 kevwilde, I suppose it's impossible Mar 25 19:27:50 stiggpwnz: so what is the closest i can get to it? Mar 25 19:28:33 kevwilde, you can run a service in a different process that will live while your app is up Mar 25 19:30:03 kevwilde, but you won't have an access to your Application classes data from the service that run in a different process Mar 25 19:30:03 sup bitches Mar 25 19:30:41 stiggpwnz: so i guess i could open and close a new thread in each activity where it's relevant Mar 25 19:30:42 kevwilde, I think that's the only disadvantage of that way, but it's a major one Mar 25 19:31:20 kevwilde, yes, if you have only onCreate method Mar 25 19:31:23 can someone explain to me the basic principles of file streams or point me to a tutorial? I'm new to developing and need to save and combine PCM audio which would easily get to big for RAM und arrays Mar 25 19:31:42 stiggpwnz: how do you mean? Mar 25 19:31:55 i just feel a little lost in the code examples because i don't know how these streams work Mar 25 19:33:18 kevwilde, if you want to run some of your activity's methods on a single separate thread, It's impossible, too. you have to spawn working thread for each of your methods Mar 25 19:34:16 ok Mar 25 19:34:18 thx Mar 25 19:38:36 Can anyone here confirm that there is NO way to tell Eclipse with ADT plugin that there is NO javadoc attachment for android.jar??? Mar 25 19:38:52 Every time I remove the attachment, it defaults to the web version Mar 25 19:39:18 The attached Javadoc does not work correctly with Eclipse 3.7 and causes lockups whenever a Javadoc hover is displayed Mar 25 19:41:08 * TheBunny back Mar 25 19:41:19 how do I get an app on to a device wifi? Mar 25 19:41:29 fire has no cable… which is interesting Mar 25 19:42:02 kindle fire doesn't have a usb port? Mar 25 19:42:22 maybe? Mar 25 19:42:31 yes it does Mar 25 19:42:32 it has 1 port.. very thin and small Mar 25 19:42:34 microusb Mar 25 19:42:57 so I need to track down another cable Mar 25 19:42:57 same as most other android devices made in the last 3 years Mar 25 19:42:59 * TheBunny sigh Mar 25 19:43:10 TheBunny: microusb cables are very common Mar 25 19:43:26 TheBunny, you could use some ADB over wifi app and than install it with some tool. which os do you use? Mar 25 19:43:36 OSX Mar 25 19:44:11 cougarten: i dunno if that's the best solution here Mar 25 19:44:19 app might be BIG also.. Mar 25 19:44:21 theres that Mar 25 19:44:28 if it move it all over each build Mar 25 19:44:40 adb over wifi requires root Mar 25 19:44:42 <_SKiTZO> how can i tell from my live wallpaper service that the preference screen is open? I want to avoid my animation update from stopping when the transparent preference screen is open Mar 25 19:44:45 anyhow I can go back out to the store but its like a hour.. Mar 25 19:45:12 mgmuscari, depends on his skill. I usually use ADB wifi, a little bat-file to connect the adb and a drag+drop apk installer Mar 25 19:45:33 TheBunny: microusb cables are commonly used by most phones manufactured in the last 3-4 years, as well as devices like digital cameras Mar 25 19:45:41 whats that called? and no I don't want to root or mess around if I don't need to. Mar 25 19:45:57 I have a camera that might have one… going to go look Mar 25 19:46:09 the adb over wifi widgets available on the market require the device to be rooted Mar 25 19:46:16 ah ok... Mar 25 19:46:22 which makes sense... wouldn't be able to mess with sockets like that without root permissions Mar 25 19:46:47 than any wifi file transfare app will do the trick, there are quite a few Mar 25 19:47:21 ok th e camera also has a THIN usb about x2 the width Mar 25 19:47:26 whats that one called? Mar 25 19:47:29 thats miniUSB Mar 25 19:47:36 thanks Mar 25 19:47:37 you need MicroUSB :) Mar 25 19:47:50 ok well back to store… best buy have these? Mar 25 19:47:57 or target even? Mar 25 19:47:58 ideas? Mar 25 19:48:00 bought an adapter for 1-2 eur Mar 25 19:48:02 they all have Mar 25 19:48:11 cables at least Mar 25 19:48:14 ok but I need one today :) vs ordering Mar 25 19:48:27 :) go to any electronics store Mar 25 19:48:28 Im sure I will be screwed on price :) Mar 25 19:48:33 thanks guys Mar 25 19:48:34 BBL Mar 25 19:48:43 why do you need it so fast? Mar 25 19:49:08 if its for a singe app, just upload it somewhere and download it again on your phone Mar 25 19:49:19 omfg, why can't i just disable the javadoc for the android sdk in eclipse??? Mar 25 19:49:42 I'm a noob, no idea :) Mar 25 19:50:02 and eclipse is a little scary to me Mar 25 19:50:48 either eclipse 3.7 or latest adt plugin has regressed on its stupid slow content assist bug. i can't get anything done, my JVM just hangs while it derp-spins trying to figure out what the javadoc for method X is Mar 25 19:51:06 i don't care about the javadoc, i just want the proposals and the suggested fixes for syntax errors & imports Mar 25 19:52:02 i have dealt with this bug several times since eclipse 3.6 first came out and it's really turning me off to android development... i don't feel like going commando and using vim and bash to do everything here, i want an IDE Mar 25 19:53:31 So switch ide Mar 25 19:53:39 can anyone help me with a basic string array issue im having Mar 25 19:54:03 SimonVT: suggest another with comparable android integration Mar 25 19:54:09 intellij Mar 25 19:54:55 installing from arch repos now... Mar 25 20:01:16 Do you know where I find my sd card in /dev/? Mar 25 20:01:49 #android-root Mar 25 20:01:56 Kake_Fisk: check `mount` Mar 25 20:02:15 mount alone? Mar 25 20:02:27 man mount Mar 25 20:02:35 wait ... >_> Mar 25 20:02:45 on-device? ;) Mar 25 20:03:09 Kake_Fisk: adb shell mount Mar 25 20:03:09 Yeah Mar 25 20:03:16 It's on my device ;) Mar 25 20:07:00 oi, that's a lot of parameters for mounting the sd card :S Mar 25 20:14:16 hello. I'm doing ads with adwhirl. Is there a way to hide the adWhirlLayout from screen and stop it from fetching new ads? Mar 25 20:16:16 Is there a facility in Android such that I can launch the Contact Application and select multiple contacts to be returned to my caller Mar 25 20:17:28 anyone fit in PCM / AudioRecorder stuff? Mar 25 20:17:58 drpenguin: I don't think the ACTION_PICK mechanism supports multiple contacts, but you could call it multiple times, of course Mar 25 20:18:01 wonder how to record to a sequence of files without gaps when changing the file Mar 25 20:18:42 evancharlton: Oh yeah that is definitely possible, It would be fantastical if there was like an ACTION_PICK_MULTIPLE or something along those lines where you could grab multiple items and return them Mar 25 20:19:20 Hello Mar 25 20:19:45 Ghiottone: You can put the Adwhirllayout within a linear layout and hide that. Or there may be a way to do it to adwhirllayout itself. Mar 25 20:20:28 Q: I've created a layout where elements are a bit bigger vertically than screen. Yet I cannot drag-scroll them vertically at all. Is there a setting that allows it? Mar 25 20:20:32 SimonVT: can you use IntelliJ with android integration with java 7? Mar 25 20:20:48 Ghiottone: To stop ad refreshing, go to your Adwhirl web panel and disable refreshes Mar 25 20:21:05 Silur: Are you using a ScrollView? Mar 25 20:21:33 drpenguin, no. just all inside of LinearLayour(vertical) Mar 25 20:21:55 Silur: unless LinearLayout had some Scrolling option, what you wanna do is stick the Linear Layout inside A scrollview Mar 25 20:22:21 drpenguin, thanks. will try .... Mar 25 20:22:48 mgmuscari: Dunno, I suppose. I use java6 Mar 25 20:23:35 SimonVT: looks like it won't be supported until the new version is out... Mar 25 20:24:04 i guess this is what i get for using a rolling release linux distribution Mar 25 20:24:41 i don't have the time to bother maintaining packages, and i'm not going to revert my entire system because sdks are stuck in the past. eurgh. Mar 25 20:24:56 drpenguin, thanks. PErfect! Do you know by any chance how to make overly "tall" layouts to be visible on design screen? Right now i have to use "Outline" for design "blindly" when there are too many elements Mar 25 20:25:57 Silur: Uhhh.. nooooooooooooooooooooooooooooooot too sure about that.. maybe zoom out? ive never had an issue where I couldnt see the whole thing Mar 25 20:26:47 anyone able to help me out with a small problem i am having with my app/java Mar 25 20:29:24 http://pastebin.com/xUhHddyD -- Can anyone tell me how to fix this part of my code? Mar 25 20:29:51 drpenguin: the problem I see is one of API design; I believe ACTION_PICK returns you the contact URI, and intents don't have support for having multiple URIs Mar 25 20:30:14 Ologn, I already have the adwhirl banner in a layout panel that I can hide. But I found out that it still make requests for new ads. And I need to stop it programmatically from inside the app Mar 25 20:30:31 the string array myStringArray is not passed beyond the if statement Mar 25 20:30:55 Pyrator: you should rewrite it in lisp. Mar 25 20:31:08 evancharlton: exactly, so you would just need to finagle it to return multiple URIs, doesnt seem too difficult to do Mar 25 20:31:49 i dont think lisp is supported in AIDE Mar 25 20:33:21 evancharlton: I may just make a custom contact picking app that ganks all the contacts and displays em with checkboxes next to eachother.. seems to be the next best thing to do Mar 25 20:33:29 s/app/activity/ Mar 25 20:34:47 drpenguin: yep, sounds about right Mar 25 20:35:29 evancharlton: the idear here is im redoing an app I wrote about a year ago and I wanted to add some new stuff like an embedded list fragment for viewing and adding contacts Mar 25 20:36:22 hi, the camera seems to briefly stop lighting up when i request an autofocus from the camera, is that normal? Mar 25 20:51:54 hey guys! Mar 25 20:52:07 I have a galaxy ace... what OS do you recommend that i install? Mar 25 20:52:12 cm9 isn't ready yet :/ Mar 25 20:58:34 agu10^: #android or #android-root Mar 25 20:58:54 oh ok Mar 25 21:10:40 well turns out amazon sells a nice little charger / micro USB cable all ready to go Mar 25 21:11:44 i wished the cables were a lil bit longer.... Mar 25 21:11:51 lol Mar 25 21:11:57 6 ft Mar 25 21:11:59 pretty good Mar 25 21:12:03 oh Mar 25 21:12:03 honestly Mar 25 21:12:07 I expected worse Mar 25 21:12:17 i should get one then Mar 25 21:12:29 mine is only like 1 m max Mar 25 21:13:33 Im sure you can get a mini adaptor really Cheap online Mar 25 21:13:38 vs this… at 20$ Mar 25 21:13:44 I just needed it now Mar 25 21:14:25 no i have an adaptor i only need longer cables... Mar 25 21:15:18 hmm, is it easy to convert a simple java program to android runnable code? Mar 25 21:15:46 almost Mar 25 21:16:04 ^^ k Mar 25 21:16:19 you need the sdk, ant setup the path to sdk and ant and then create a project, put your sources, edit some xml files to reflect your sources..... Mar 25 21:16:36 and compile with the right toolchain.... Mar 25 21:16:42 test with the emulator.... Mar 25 21:17:03 alright, well, got it all installed and checked it out tonight so it shouldn't be to much to get into.. Mar 25 21:17:05 and then put it on your device ...for further testing.... Mar 25 21:17:25 yeah it's just a small small app for my own conviniece so it will just have to run Mar 25 21:17:25 =) Mar 25 21:17:26 no it isn't too much...but like everything else requires adaptation.... Mar 25 21:17:32 take your time.... Mar 25 21:17:48 yep! gonna spend tomorrow night with that, will be fun! Mar 25 21:17:56 perhaps start working straight in android instead next time heh Mar 25 21:18:47 homie: I ment online you can get cables of any length for a few dollars Mar 25 21:18:56 when you have multilib gcc you won't have much problems.... Mar 25 21:19:33 when you like me are on x86-64 pure and don't have a multlib gcc, getting the toolchain work the right way will be messy.... Mar 25 21:20:23 TheBunny: ok, i'll get some .... cause i would need a second cable anyway.... Mar 25 21:20:29 yeah doesn't sound that fun :S Mar 25 21:21:07 Ok now that have device and cable? whats the next step to getting code on it? Mar 25 21:21:37 you have adb ? Mar 25 21:21:52 adb push is the command Mar 25 21:22:20 but you'll be only able to push to /data/local or so.... Mar 25 21:22:23 without root.... Mar 25 21:22:34 else you have to root your device or so..... Mar 25 21:23:16 Im not actually sure if I have adb Mar 25 21:23:19 i don't know maybe there's a way with adb shell run-as or so too..... Mar 25 21:23:25 it's in the sdk Mar 25 21:23:28 I have eclispe , sdk , ndk etc all working Mar 25 21:23:34 and plug ins Mar 25 21:23:43 TheBunny: if you have the sdk, you have eclipse. Mar 25 21:23:52 I mean, you have adb* Mar 25 21:24:01 command line tool? Mar 25 21:24:03 yes Mar 25 21:24:09 no IDE interface? Mar 25 21:24:30 $SDKPATH/android-sdk-linux/platform-tools/adb Mar 25 21:24:40 * TheBunny feels like im programming a wii... Mar 25 21:24:40 TheBunny: the "interface" to adb is broken into several components of eclipse Mar 25 21:25:02 the eclipse adt tools try to hide adb and command line tools from your UX. Mar 25 21:25:22 ok good Mar 25 21:25:28 but you'll still want to use adb, specifically: adb shell, adb logcat, and adb uninstall are useful Mar 25 21:25:35 ok Mar 25 21:26:04 so is there some kind of device interface in eclipse? that I can see my connected device for example? Mar 25 21:26:18 click run and it will bring it up automatically Mar 25 21:26:34 unless you've previously selected "automatic" in that dialog, which will run on the device without asking you Mar 25 21:26:41 otherwise go to run configurations, and change it there Mar 25 21:26:47 adb devices will list them Mar 25 21:27:02 change target to manual and it'll bring up a list of devices connected when you run Mar 25 21:27:06 and you can have adb -d to direct commands to the right one Mar 25 21:27:11 tbh TheBunny yes, use adb devices. Mar 25 21:27:16 it's just easier Mar 25 21:27:30 i.e. if you have more than one device..... Mar 25 21:27:36 one sec… a adb devices is an option in eclipse? Mar 25 21:27:43 as I have not found it yet Mar 25 21:27:46 adb devices is a command Mar 25 21:27:54 adb is in your sdk platform-tools dir Mar 25 21:27:55 which shows you devices available Mar 25 21:27:59 ok Mar 25 21:28:03 you need to add adb to your path if you are going to be a serious developer Mar 25 21:30:34 long in path? or java path? Mar 25 21:30:47 I should be able to add the whole directory to a path correct? Mar 25 21:31:39 log-in path if you intedn to use command-line else set the path in your ui's settings.... Mar 25 21:32:21 TheBunny: command line shy or not.. you're going to be very disadvantaged to other devs if you don't use it at all Mar 25 21:32:35 might as well man up and get used to it Mar 25 21:32:41 not shy just hate Mar 25 21:32:44 its 2012 Mar 25 21:33:34 what if ui crashes ? Mar 25 21:33:36 lol Mar 25 21:33:38 :) Mar 25 21:33:49 Ok thanks all Mar 25 21:33:50 what if you are tasked with developing for a new system that has no UI yet? Mar 25 21:33:55 Im a whole 5 hours in Mar 25 21:34:10 did not know the IDE had a path also Mar 25 21:34:21 TheBunny: command line will always be used Mar 25 21:34:25 readme: why wold I want to do that? Mar 25 21:34:26 * FDFlock wonders why some people think that CLIs are "outdated" in 2012 - they will never be Mar 25 21:34:36 its not out dated Mar 25 21:34:41 its just a pain in the ass Mar 25 21:34:43 TheBunny: you must learn to see the zen of the command line Mar 25 21:34:51 if you ever want to be an master Mar 25 21:34:51 and is for people that prefer thinking in words Mar 25 21:35:20 readme: nice words :D Mar 25 21:35:21 well you use words to write code right.. Mar 25 21:35:35 we're not painters Mar 25 21:35:37 Napalm: :) Mar 25 21:35:48 doogan: I am :) Mar 25 21:36:06 doogan: http://www.dangermouse.net/esoteric/piet.html Mar 25 21:36:29 TheBunny: you might like piet as well Mar 25 21:36:45 * FDFlock is kidding of course Mar 25 21:37:02 lol I remember that one now Mar 25 21:38:44 Anyone know of a problem with LED Torch and Autofocus? My flashlight doesn't stay on after an autofocus request Mar 25 21:39:39 kevwilde: it stays on fo rme Mar 25 21:39:44 kevwilde: I actually have some code I wrote that does this Mar 25 21:40:40 readme: i have found many threads on google groups with no answers pertaining to this problem. Do you mean you have a solution or that "it just works" for you ? Mar 25 21:40:47 yeah Mar 25 21:41:05 I have the code to do it that I previously pushed to the android market and others repeated the success Mar 25 21:41:07 but some did not Mar 25 21:41:09 so I took it down Mar 25 21:41:28 * TheBunny plays with adb Mar 25 21:41:39 However I just pulled my git repo and it looks like I forgot to commit src. Mar 25 21:41:40 rofl Mar 25 21:41:45 once you build your apk's test them with android command Mar 25 21:41:54 readme: could you link me the code or explain me your solution? Mar 25 21:41:57 http://pastie.org/3668273 Mar 25 21:41:58 push them onto the emu i mean.... Mar 25 21:42:09 kevwilde: um, I'm trying to find out if I actually still have it Mar 25 21:42:11 gimme a sec Mar 25 21:42:13 and don't forget to use ant clean when you make changes to sources.... Mar 25 21:42:22 before rebuilding... Mar 25 21:42:27 readme: ok Mar 25 21:42:37 last time i forgot ... Mar 25 21:43:37 readme: some context: i have a QR scanning app that does constant autofocus requests, when i enable TORCH mode for my flash, it seems to go off and on in sync with the autofocus requests Mar 25 21:45:53 kevwilde: I've written an app that used the camera to focus in and out with the torch constantly on as a means of having a magnifying glass with the light constantly on Mar 25 21:45:57 do you actually have all the code or are you calling zxing as a black box and guessing auto-focus is the culprit Mar 25 21:46:55 readme: i have written all the code and integrated the zxing core.jar library just to parse the byte[] from the camera. So i'm not suspecting zxing as a culprit Mar 25 21:47:39 but doesn't the light shut off when you call zxing? Mar 25 21:47:40 readme: the autofocus+torch related posts online seem to corroborate my suspicion Mar 25 21:47:59 my experience is not that autofocus causes the torch to shut off, that's all. Mar 25 21:48:04 readme: no, it does not, the core.jar library is not aware of my Camera Mar 25 21:48:10 I think maybe something else in the zxing code is shutting off the torch. Mar 25 21:48:19 Oh, you're passing a buffer to it? Mar 25 21:48:25 readme: yes :) Mar 25 21:48:31 Interesting Mar 25 21:49:20 my code is based on the Barcode Scanner app, it just uses zxing's core functionality for evaluating a BinaryBitmap Mar 25 21:49:38 everything camera related happens in my own code Mar 25 21:50:08 readme: if you wanna be sure, i can easily comment out my zxing's decode call and validate it is not zxing related Mar 25 21:50:09 well kevwilde i'm not able to find my code, so you'll have to assume that you're right. but I'm fairly certain if you are, that it's not true on all devices. Mar 25 21:51:12 i had hoped that my Galaxy Nexus would not contain this bug, since it is a reference implementation Mar 25 21:52:12 kevwilde: if you're not keeping the code a secret, I would be happy to try it myself later Mar 25 21:53:06 readme: can i pm you a link to it ? Mar 25 21:53:15 kevwilde: sure Mar 25 21:57:03 Hi, I'd like to get a cursor to the maximum and minimum values in a dataset, how would I put that together? http://pastebin.com/8cBmkcUn will return the max, but how can I combine in the minimum? Mar 25 21:57:31 Or do the values have to be returned to sepearate cursors? Mar 25 21:58:37 select min(…) as min, max(…) as max from ... Mar 25 22:00:06 or more like select min(foo) as min_foo, max(foo) as max_foo from foos Mar 25 22:00:46 g00s: so would that go into one long query? Mar 25 22:01:15 or one query for min and one query for max? Mar 25 22:02:47 one query Mar 25 22:04:45 g00s: like this: http://pastebin.com/ySPsCpPY Mar 25 22:05:52 use 'as' to alias the columns Mar 25 22:11:53 http://news.ycombinator.com/item?id=3753330 Mar 25 22:13:48 g00s: so what do I need to change with this to make it work: http://pastebin.com/ETuKNp4e Mar 25 22:20:55 g00s: wait, I got it. I only need to say select once Mar 25 22:21:00 g00s: thanks for your help Mar 25 22:36:51 * TheBunny has jetboy running on FIRe Mar 25 22:37:16 with an annoyingly large amount of help from Martin Mar 25 22:44:46 IDE bug...? Mar 25 22:45:01 if I try and tell the IDE to make a new projject from existing source Mar 25 22:45:01 it makes it but always complains things are missing files Mar 25 22:45:18 like AndroidManifest.xml file missing! Mar 25 22:45:25 these files are there... Mar 25 22:45:47 if I copy the NDK samples imto the SDK sample folder Mar 25 22:46:01 and say make from existing sample they seem to work fine Mar 25 22:46:05 any ideas Mar 25 22:46:06 ? Mar 25 22:47:44 Is Android Market ever going to support gift codes of some sort? Mar 25 22:48:47 n20: no, but the Google Play Market might Mar 25 22:48:54 * n20 palms the face. Mar 25 22:48:54 :D Mar 25 22:49:25 I bet it will pretty soon, at least state-side. Mar 25 22:49:40 Quite surprising it doesn't exist already Mar 25 22:49:52 I for one think they'd sell even more apps. Mar 25 22:50:16 n20: well google have that wonderful way of making retailers hate their guts.. Mar 25 22:50:34 n20: I agree entirely Mar 25 22:50:54 Anyone know why totalTime.format("%H:%M:%S") is showing hours even when there shouldn't be any? Mar 25 22:51:19 Ankhwatcher: The In-app billing API is horrible, they'd make even more money off that if it wasn't such a pain in the almond to implement. Mar 25 22:51:45 Ankhwatcher: Errm, %H != hours? Mar 25 22:51:48 n20: I haven't looked yet Mar 25 22:51:59 n20: yes Mar 25 22:52:30 Ankhwatcher: It's not just "hey, send a few variables here and there and you're all set - it's more of the > create 300 classes and hope it works <-approach Mar 25 22:52:43 * TheBunny NDK sample running on fire now Mar 25 22:56:33 You know this sort of business pisses me off: http://developer.android.com/reference/android/text/format/Time.html#format(java.lang.String) Mar 25 22:57:08 wouldn't that seem like a natural place to link to an explaination of how the date/time format strings are formed? Mar 25 22:57:44 Ankhwatcher: Nah, you'll have to google it ;) Mar 25 22:57:54 Ankhwatcher: :( Mar 25 22:58:43 Ankhwatcher: What would you like it to format to? 23:59:59-ish? Mar 25 22:59:42 yes Mar 25 22:59:52 what I get looks right Mar 25 23:00:19 it comes out as 01:04:23 for example Mar 25 23:05:01 Ankhwatcher: So what's the issue? :) Mar 25 23:05:04 * n20 is lost. Mar 25 23:05:05 :D Mar 25 23:05:25 well that is a 4 minute and 23 second time Mar 25 23:05:31 it's adding an hour Mar 25 23:05:35 and I don't know why Mar 25 23:06:19 Ankhwatcher: Could it be timezone-related? Mar 25 23:06:25 Ankhwatcher: DST just kicked in Mar 25 23:06:56 Ankhwatcher: Or yeah, we set the time one hour forward yesterday or somehting. Mar 25 23:07:50 Wasn't that a few weeks ago? Mar 25 23:07:52 n20: nah, this value came from differencing two values placed in a database days ago Mar 25 23:08:15 freecandy: America is now changing two weeks before everyone else for some reason. Mar 25 23:08:23 * n20 shrugs. Mar 25 23:08:24 :D Mar 25 23:10:22 has anyone ever played with light sensors? Mar 25 23:11:01 no but you just game me an amazing idea Mar 25 23:11:11 funny how minds work Mar 25 23:11:27 it's the last sensor i need to monitor for this data logging thing :p Mar 25 23:11:36 after that i can implement my contentprovider and call it a day Mar 25 23:11:51 getting back NPE when i try to read the value from the sensorevent Mar 25 23:12:59 ..anyone have some knowledge of the notification-history api? Mar 25 23:13:55 mgmuscari: stack trace? Mar 25 23:15:24 dunno how useful it'd be Mar 25 23:15:41 onSensorChanged(SensorEvent event) .... event.values[0] Mar 25 23:15:43 throws NPE Mar 25 23:16:03 event definitely isn't null Mar 25 23:16:07 soooo i'm guessing values is null Mar 25 23:16:50 documentation says: Sensor.TYPE_LIGHT:values[0]: Ambient light level in SI lux units Mar 25 23:17:23 hi :D Mar 25 23:17:36 how to make a "whole layout" scrollable? Mar 25 23:18:45 durrrrrrr i forgot to instantiate my Mean object that i'm incrementing Mar 25 23:18:46 :D Mar 25 23:19:14 enoch: you could wrap it in a scrollable linearlayout i think Mar 25 23:19:37 errr Mar 25 23:19:39 use scrollview Mar 25 23:21:24 woot Mar 25 23:21:34 all of my sensor monitoring is working beautifully Mar 25 23:21:44 launching the asynctask from the intentservice works exactly how i want it to Mar 25 23:21:53 final step, contentprovider Mar 25 23:32:59 hm Mar 25 23:33:00 how do you zero pad a number Mar 25 23:33:07 how do i know whether a call is incoming or outgoing Mar 25 23:33:10 like if you want 5 to show as 05? Mar 25 23:33:19 Ankhwatcher: you want to format a string Mar 25 23:33:44 http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html Mar 25 23:38:07 Ankhwatcher: return "0" + otherNumber; Mar 25 23:38:08 :) Mar 25 23:38:35 lol i don't think that's what he's looking for... Mar 25 23:38:40 what if the number is 42 Mar 25 23:38:53 then it would return "042" Mar 25 23:38:54 :) Mar 25 23:38:57 :p Mar 25 23:39:06 that's the enterprisey solution Mar 25 23:39:15 lol Mar 25 23:40:15 actually that would be return new StringBuilder().append("0") .append(42).toString(); Mar 25 23:45:01 String.format("%02d", totalTime.toMillis(true)/(1000*60*60)) Mar 25 23:45:41 that works Mar 25 23:45:48 or at least appears to Mar 25 23:48:07 ah yes Mar 25 23:48:09 forgot about that Mar 25 23:48:13 same as Formatter basically Mar 25 23:51:08 Well I'm happy Mar 25 23:51:18 so happy in fact, that I'm going to bed Mar 25 23:51:25 goodnight all Mar 25 23:51:31 thanks for your help Mar 25 23:56:24 np Mar 26 00:05:43 how to choose my app's namespace? Mar 26 00:05:49 com.???.myapp? Mar 26 00:05:58 omg.wtf.bbq Mar 26 00:09:50 ^ Mar 26 00:23:53 i even used com.???.android.myapp just because we might develop apps outside of the Android platform. Mar 26 00:24:11 so com.controlledsenility.android.todomapr for example Mar 26 00:29:54 QubeZ: try diordna.ytilinesdellortnoc.moc Mar 26 00:30:29 nice Mar 26 00:31:04 * onr apologizes QubeZ Mar 26 00:31:13 why? Mar 26 00:31:47 bad joke Mar 26 00:31:58 i didn't take it personally Mar 26 00:32:04 okay then Mar 26 01:05:13 37 hours... Mar 26 01:07:16 wooooo, done with this app Mar 26 01:07:18 \o/ Mar 26 01:07:51 thanks for the brainstorming assistance rgravener and readme, who is no longer here Mar 26 01:10:10 evancharlton, it's a weekend, why are you online! Mar 26 01:13:47 I can't stand Eclipse. I think it's even worse than Xcode. And I think if I have to maintain this project in Eclipse, I'm going to cut my wrists with an antenna from an HTC phone. Mar 26 01:14:36 Kwame4Mayor: someone suggested IntelliJ to me earlier, and i'm loving it Mar 26 01:14:47 Eclipse: Your null pointer exceptions, workspace corruptions, and constant need for restarting are ruining my career, my life, and I have nothing but contempt for you. Mar 26 01:14:58 mgmuscari: Wow, you like it?:D Mar 26 01:15:09 Kwame4Mayor: you seem to be having a lot more trouble than I am. Mar 26 01:16:14 QubeZ: I also have the BlackBerry eclipse "SDK plugin" which is conflicting with Android. :-/ Mar 26 01:16:18 Kwame4Mayor: it's a lot better than eclipse's content assist problems Mar 26 01:16:36 anyway, my app is done, so i'm going to have a beer and hit the sack. good luck! Mar 26 01:17:03 mgmuscari: It would be great if it can do iOS app dev as well. Then I could get rid of Xcode. Mar 26 01:17:18 canadiancow: I actually spent some time doing android dev this weekend! :D Mar 26 01:20:37 when people reference 1MM installs, is that 2000 installs? Mar 26 01:21:22 QubeZ: no, it's 2,000,000 Mar 26 01:21:30 more specifically, is the MM referencing roman numerals? Mar 26 01:21:54 M = mil = 1000, hence MM == thousand-thousand Mar 26 01:22:06 got it, thanks Mar 26 01:22:13 so 1 MM is 1,000,000 Mar 26 01:22:16 Kwame4Mayor: you a detroit'r? Mar 26 01:22:24 oh I guess it's short for Mega Mar 26 01:22:28 my bad; point still stands Mar 26 01:22:31 QubeZ: yes Mar 26 01:23:05 cool, was looking at socialize sdk and their limit is 1MM for free use -- was curious what that was. 1 million is plenty for awhile. Mar 26 01:23:52 evancharlton: thank you. Mar 26 01:24:19 QubeZ: no problem Mar 26 01:39:48 [21:17:18] canadiancow: I actually spent some time doing android dev this weekend! :D Mar 26 01:39:51 i...havent...really Mar 26 01:39:53 oh wait Mar 26 01:39:55 saturday morning? Mar 26 01:40:08 or maybe it was friday night Mar 26 02:04:21 Is there any reason why android:layout_marginLeft and marginTop wouldn't work for a button inside a relativeLayout? Because it totally isn't :s Mar 26 02:06:44 T-Dub|DlolPics, it should work Mar 26 02:06:51 can you paste the layout? Mar 26 02:06:53 So isn't :| Mar 26 02:07:45 http://pastebin.com/wBbm0b5W first button, line 19 Mar 26 02:07:54 The two layout margin's aren't doing anything Mar 26 02:08:11 first of all, you shouldnt have an orientation in a RelativeLayout Mar 26 02:08:21 Oh. Why not? Mar 26 02:08:27 because...it's not valid? Mar 26 02:08:31 there is no "orientation" in a RL Mar 26 02:08:38 next, you havent defined where the button is getting laid out Mar 26 02:09:05 you shouldnt be absolutely aligning things with margins like that Mar 26 02:09:15 the whole point of a relativelayout is that you can say "put X below Y and to the right of Z" Mar 26 02:09:35 Ok didn't know that. And what do you mean about the defineing it Mar 26 02:09:43 Oh, I thought that was the point of the margin Mar 26 02:10:04 layout_below="@id/tvDisplayCategoryText" Mar 26 02:10:10 that owuld put it below that textview Mar 26 02:10:24 and once you have a relative position defined, the margins should work Mar 26 02:11:39 Well I actually want it above it Mar 26 02:11:51 But I was changing the margin's dramatically because it wasn't working Mar 26 02:12:20 How do you specify the x and y cords of were you want it to go? Mar 26 02:12:20 OK SO Mar 26 02:12:30 i got my thing to work Mar 26 02:12:42 Because if I can just say place (x,y) then I don't need margins Mar 26 02:12:43 but Mar 26 02:12:52 it only works with google APIs, not andriod 4.0.3 Mar 26 02:12:54 :S Mar 26 02:13:06 T-Dub|DlolPics, you DONT Mar 26 02:13:24 the whole point of android layouts is that you DONT lay things out absolutely Mar 26 02:13:42 because not all screens are the same size, density, aspect ratio, etc Mar 26 02:13:56 I thought that is why you use dp instead of px though Mar 26 02:14:05 that takes care of the density difference Mar 26 02:14:09 but not size or aspect ratio Mar 26 02:14:12 Oh Mar 26 02:14:43 So you say above and below stuff? And to get it "perfect" you then use margin padding? Mar 26 02:18:04 are ext3 ext4 formatted usbs not visible to android ? Mar 26 02:18:10 usb-sticks sorry Mar 26 02:18:28 or why do only vfat formatted ones get recognized ? Mar 26 02:20:41 T-Dub|DlolPics, margins are just for minor things Mar 26 02:20:50 like if you want everything inset 5dp from the side Mar 26 02:20:55 or a 5dp space between views Mar 26 02:20:59 hello created a rock, paper scissors game and want to be able to play with 2 users on 2 different phones , how do i do this? Mar 26 02:21:00 you dont use it to define where things are laid out Mar 26 02:21:05 Well I don't see how to align things were you want them if they have to match up with something else Mar 26 02:21:10 what if you want them between two things Mar 26 02:21:14 Like what I currently want Mar 26 02:21:35 It's either to far left or to far right because of the matching up Mar 26 02:21:43 if you draw a picture of what you want, i might be able to help Mar 26 02:21:57 but i can guarantee that using margins to aboslutely position stuff is going to look like shit on some screens Mar 26 02:24:38 http://puu.sh/mpQB I want the button with the text "+" to be inbetween the left margin and where the green line is. And a little down. Not much just like 5 or so pixels from the corner. (5 pixels down, 5 pixels right). Maybe more but I'd need to see what 5 looks like before I could tell you Mar 26 02:24:48 I just don't want it directly on the edge Mar 26 02:25:15 * Jug6ernaut wishes he was an iphone dev when it comes to androids 10 million different screen res' Mar 26 02:25:52 ok so for THAT Mar 26 02:25:55 alignParentTop="true" Mar 26 02:25:58 alignParentLeft="true" Mar 26 02:25:59 Did that Mar 26 02:26:01 Did that Mar 26 02:26:01 layout_marginTop="5dp" Mar 26 02:26:04 layout_marginLeft="5dp" Mar 26 02:26:05 did that Mar 26 02:26:07 and that Mar 26 02:26:10 the magin didn't work Mar 26 02:26:13 lies Mar 26 02:26:14 margin Mar 26 02:26:15 :( Mar 26 02:26:19 I already told you it didn't work Mar 26 02:26:23 which was my first post Mar 26 02:26:35 Is there any reason why android:layout_marginLeft and marginTop wouldn't work for a button inside a relativeLayout? Because it totally isn't :s Mar 26 02:26:39 I did exactly what you said Mar 26 02:26:41 But it did no change Mar 26 02:26:50 so I changed it to 100+ dp to make sure it just wasn't me Mar 26 02:26:52 Still no change Mar 26 02:26:56 that's when I asked for help Mar 26 02:27:00 why is it all the way that far right in that picture? Mar 26 02:27:08 I did align like you said Mar 26 02:27:16 android:layout_above="@id/tvDisplayCategoryText" Mar 26 02:27:16 android:layout_alignLeft="@id/linearLayout1" Mar 26 02:27:21 well dont randomly align shit Mar 26 02:27:24 remove the above and legt Mar 26 02:27:26 left Mar 26 02:27:33 just use the four i mentioned beofre Mar 26 02:27:38 what commands do i need to use to create a game that plays between two android phones? Mar 26 02:27:38 now it's in the corner Mar 26 02:27:44 as if it was 0,0 cords Mar 26 02:27:49 noob00123, what does that even mean Mar 26 02:27:56 I already did use those four you said Mar 26 02:27:59 It was the first thing I did Mar 26 02:28:08 The maginLeft and maginTop didn't do anything Mar 26 02:28:12 To "move" it Mar 26 02:28:21 i created a game, need to make it playable between two players each on seperate phones Mar 26 02:28:46 T-Dub|DlolPics: you did something wrong :( Mar 26 02:29:01 noob00123, what do you mean? Mar 26 02:29:11 I know I did, that's why I asked for help lol :| Mar 26 02:29:16 like over the net? Mar 26 02:29:19 or bluetooth? Mar 26 02:29:20 or... Mar 26 02:29:40 locally either through bluetooth or wifi Mar 26 02:29:57 ok so you need some kind of protocol Mar 26 02:30:12 probably bluetooth would be easiest, not sure how to pass data between phones Mar 26 02:30:16 im sure if you google it you'll get better results than what i have Mar 26 02:30:20 s/have/know/ Mar 26 02:30:51 Does it matter the order you declare things within the view? Like id HAS to be first, then text, then text color, etc. Maybe I'm declaring it in the wrong order? Mar 26 02:32:25 no Mar 26 02:33:00 dang wtf Mar 26 02:33:32 http://pastebin.com/UgydppsP see any errors Mar 26 02:33:44 specifically in line 20? Mar 26 02:34:49 I can delete lines 29 and 30 and no change is shown Mar 26 02:34:57 I can also change the numbers to like 5000dp and no change Mar 26 02:35:03 Let me try 40px? Mar 26 02:35:23 Still doesn't move it at all Mar 26 02:36:01 no :( Mar 26 02:36:07 no errors* :( Mar 26 02:36:30 Dang what the heck Mar 26 02:36:31 Oh well Mar 26 02:36:35 I'll live Mar 26 02:36:38 Thanks any ways **** ENDING LOGGING AT Mon Mar 26 02:59:58 2012