**** BEGIN LOGGING AT Sat Feb 01 02:59:59 2014 Feb 01 03:25:54 The JW stuff might be cioyrighted Feb 01 03:26:38 Noone dares to challenge SD Feb 01 03:41:58 Is it possible to post messages on mywhatsapp from other app? I want to automate the process. For instance, I want to a post a url everyday on a certain time. Feb 01 03:42:18 In a certain user group in whatsapp. Feb 01 05:03:15 not sure if this is the place for this but Feb 01 05:03:20 further data reads: database lock has not been available for 30 sec. Current Owner of the lock is 42. Continuing to wait in thread:45 (SQLiteDatabase) Feb 01 05:03:51 this causes an app i want to use to freeze how can i remove the database lock? Feb 01 05:33:43 Chunky_Ks: the database is in an android phone Feb 01 05:44:01 how is everybody doing? Feb 01 05:44:33 djapo Chunky is in #sqlite :) Feb 01 05:47:29 g00s: accidently posted here Feb 01 05:48:00 there's a sqlite chan? D: Feb 01 05:48:03 * jackyalcine flies into it Feb 01 05:53:13 ok now i know that the database lock affects more than just my media player, it effects all my apps that use the database which happens to be the one where the media scanner writes to, this includes picture apps music apps even facebook, how can i unfreeze this database or fix it?! Feb 01 05:54:13 reboot! Feb 01 05:54:44 capella: allready tried that multiple times same error, ahhh Feb 01 06:03:53 mmmm ... rooted? lsof? Feb 01 06:04:35 (drive-by kibbitzing) Feb 01 06:08:11 i know know that the database is the one that the MediaScannerConnection class uses and it is used by media content provider Feb 01 06:08:49 if anyone knows where this db is, ping me Feb 01 07:18:19 how is android dev outside of eclipse? Feb 01 07:19:12 wondering if it's reasonable to use shell and vi, the documentation shows how to do things in the shell, is this efficient in practice compared to using eclipse? Feb 01 07:20:00 tmallen there are a few devs that use vim and emacs + shell Feb 01 07:20:20 g00s: like me! :) Feb 01 07:20:28 do they do good work? ;) Feb 01 07:20:31 jackyalcine :) Feb 01 07:20:42 jackyalcine: are you using makefiles or what? Feb 01 07:20:58 tmallen you would use gradle Feb 01 07:21:19 nowadays Feb 01 07:21:23 I used to use ant Feb 01 07:21:55 you just have to have your emulator open all the time Feb 01 07:22:04 and really be comfortable with XML Feb 01 07:22:06 lol Feb 01 07:22:14 like *realllly* Feb 01 07:22:19 oh hell, it says it combines ant and maven Feb 01 07:22:31 i better hvae gradle, hehe Feb 01 07:22:47 tmallen no, its inspired by and + maven Feb 01 07:22:57 you dont need those installed though Feb 01 07:23:19 so yeah, if you're comfy with java + xml in vi, go for it Feb 01 07:24:50 also, android projects tend to have a lot of files, so your file navigation skills will have to be good :) Feb 01 07:24:57 g00s: they can't be serious https://github.com/bmuschko/gradle-cargo-plugin/blob/master/build.gradle Feb 01 07:25:23 oh man, i used cargo back in 2007 timeframe Feb 01 07:25:28 g00s: this looks like the most unreadable makefile ever :) Feb 01 07:25:31 that was the worst plugin ever Feb 01 07:25:47 i was looking for examples of its use. Feb 01 07:26:48 go here http://tools.android.com/tech-docs/new-build-system/user-guide Feb 01 07:26:52 examples at the bottom Feb 01 07:27:18 oops. examples at the bottom of http://tools.android.com/tech-docs/new-build-system Feb 01 07:27:19 so this is 'official'? Feb 01 07:27:33 its officially going to be official Feb 01 07:28:22 i guess i better learn it then if i want to open source my stuffs Feb 01 07:28:40 thanks g00s Feb 01 07:28:54 it's not horribly slow is it? Feb 01 07:28:59 most java build tools are so slow :p Feb 01 07:29:18 i was hoping it would be written in go :) Feb 01 07:29:28 its … slow for me. from the commandline its OK; from the IDE its not so OK Feb 01 07:29:37 how OK? Feb 01 07:29:47 build ~ 5 sec ? Feb 01 07:29:49 how much user time i mean? Feb 01 07:30:13 you have to have it on daemon mode for fast command line builds Feb 01 07:30:17 that's not bad, but still slow enough to be annoying Feb 01 07:30:24 like closure compiler Feb 01 07:30:50 now from android studio, it automatically goes to 30 seconds + for me Feb 01 07:30:57 i dunno what the hell is wrong with it Feb 01 07:31:05 ick Feb 01 07:31:19 you should use vim Feb 01 07:31:28 i do when AS pisses me off Feb 01 07:31:50 for most purposes vim + cscope is pretty nifty Feb 01 07:32:10 comparable to an ide Feb 01 07:32:20 except you can't backgrond :p Feb 01 07:32:25 vim isn't so good with xml :| Feb 01 07:32:31 how so? Feb 01 07:33:14 i still have issues in vim where it color syntax highlights part of xml files wrong Feb 01 07:33:35 i think AS only has an unstructured XML editor Feb 01 07:33:44 eclipse had both structured & unstructured editors Feb 01 07:33:49 try vim 74 Feb 01 07:33:57 it has huge syntax highlight speed improvment Feb 01 07:34:10 i compile it on all my workstations Feb 01 07:34:15 i am on 7.4.52 ;) Feb 01 07:34:18 oh ok :) Feb 01 07:35:09 so it sounds like you will be comfortable; its totally doable using vim + gradle, should work out fine Feb 01 07:35:15 now for debugging … Feb 01 07:35:17 hehe cool http://www.vim.org/scripts/script.php?script_id=4330 Feb 01 07:35:24 hope you are friends with your rubber duck :) Feb 01 07:35:38 looks like a toy of a plugin Feb 01 07:35:45 you may try eclim Feb 01 07:35:52 i dont know anyone using it though Feb 01 07:36:06 hm Feb 01 07:36:17 it would have been much cooler if eclipse had some headless mode that was lightweight Feb 01 07:36:19 i really don't use debuggers Feb 01 07:36:20 ever Feb 01 07:36:25 cool Feb 01 07:36:26 once in a blue moon for a crazy bug Feb 01 07:36:45 i use it when the docs say X but the code is doing Y ;) Feb 01 07:36:57 live system inspectoin/debugging excepted (in erlang systems etc) Feb 01 07:36:57 but i use logging more Feb 01 07:37:35 ah when the docs say X but the code does Y i assume i'm wrong, after that i assume the docs are wrong and read the soruce Feb 01 07:37:38 yea i log and print Feb 01 07:37:46 i haven't seen jasta here in a long time … but i think he was going to write some JMX kind of thing Feb 01 07:38:05 the real java world has tons of awesome shit Feb 01 07:38:11 dvm is meh Feb 01 07:38:35 i see Feb 01 07:39:12 i've only programmed java by necessity in the past Feb 01 07:39:31 but it seems to have some pretty spectactular engineering in and around it Feb 01 07:39:38 if you can afford to run it :) Feb 01 07:40:44 do you have to pay oracle to use it on a server ? Feb 01 07:41:03 not yet Feb 01 07:41:11 openjdk is safe for now :) Feb 01 07:41:24 for now Feb 01 07:41:24 *jre Feb 01 07:42:08 Gosling gave Oracle a B+ for their stewardship of the language Feb 01 07:42:13 eh it's all going to be js in 10 years so who cares Feb 01 07:42:21 oh god no Feb 01 07:42:25 you know it's true Feb 01 07:42:30 your filesystem will be injs Feb 01 07:43:04 well not yours but many will be Feb 01 07:43:39 pretty bleak, eh? Feb 01 07:45:54 tmallen: NOOO Feb 01 07:45:56 lmfao injs Feb 01 07:46:05 you know, that's an interesting project Feb 01 07:46:09 writing a fs in js Feb 01 07:46:14 * jackyalcine goes to play with node Feb 01 07:46:17 haha yea Feb 01 07:46:30 someone did make that recently didnt they Feb 01 07:46:49 i was like ... crap ... it's happening too fast Feb 01 07:47:21 we will all be paid in Dogecoin to write JS Feb 01 07:47:41 or jscoin Feb 01 07:47:43 D: Feb 01 07:47:47 nah ;( too many better alternatives when not in the browser sandbox ;) Feb 01 07:48:11 i think js is going to get very very fast Feb 01 07:48:24 especially asmjs sorta stuff Feb 01 07:48:50 it's already pretty fast Feb 01 07:49:15 but nothing's faster than C Feb 01 07:49:16 NOTHING Feb 01 07:49:21 right? Feb 01 07:49:27 hehe Feb 01 07:49:45 unless you can move files using ASM Feb 01 07:51:07 and js machines will be revenge of the lisp machines :p Feb 01 07:51:13 haha Feb 01 07:51:16 the ultimate movies Feb 01 07:51:22 speaking of which Feb 01 07:51:27 netflix + ouya + spiderman! Feb 01 07:51:29 * jackyalcine disappears Feb 01 07:51:36 sleep! Feb 01 07:51:39 * tmallen ... Feb 01 07:52:14 he actually quits? Feb 01 07:52:17 BNC all dai Feb 01 08:01:59 hi i have a high level optimization question Feb 01 08:02:27 i have a sync process that GETs json, parses it, and stores it in sqlite db Feb 01 08:02:57 time wise it's ~10 secs of network, 0.6 seconds parsing, 0.8 seconds storing Feb 01 08:03:36 what are some strategies to make the process faster Feb 01 08:04:01 the GETs are for 45 records at a time from the app server Feb 01 08:04:25 should i GET more records at a time? Feb 01 08:06:02 yeah seems like doubling the number of records didn't affect the GET speed Feb 01 08:06:18 that entirely depends on how frequently you want to show the data or how frequently your user needs it. Feb 01 08:06:39 but seriously, 10 seconds for 45 records? is your network slow or does the app server suck? Feb 01 08:07:05 could be both Feb 01 08:07:14 app server is an unoptimized rails app Feb 01 08:07:25 network is 12 down over wifi (g? i think) Feb 01 08:07:50 yeah never mind, 135 records is too much (out of memory) Feb 01 08:08:36 you should also try to optimize the data model and retrieve whatever's mandatory. Feb 01 08:09:03 45 records may sound ok, but how big each record is something to be looked at. Feb 01 08:09:09 it's not particularly high priority, it's just that to download all ~ 20,000 records takes roughly half an hour Feb 01 08:10:03 maybe i could do some kind of socket/streaming solution Feb 01 08:10:05 10 seconds for 45 results is insanely slow, you need to fix the server Feb 01 08:10:19 what's the size of the data ? could you calculate the bit per second? Feb 01 08:11:29 how would you count the bits in a String? Feb 01 08:11:35 is it length * some constant Feb 01 08:11:47 kilo bits downloaded per second Feb 01 08:11:55 or however you measure the download speed Feb 01 08:13:27 obviously, it could be any or all of these. 1. network sucks; 2. appserver sucks; 3. your data model sucks. Feb 01 08:13:36 start narrowing it down one by one. Feb 01 08:15:29 start with the app server Feb 01 08:16:10 i think that since the request time doesn't increase so much the number of records, and the android app has memory problems with too many requests i'll try some streaming solution Feb 01 08:17:26 use something like grinder to characterize the app server Feb 01 08:17:31 jmeter, etc Feb 01 08:17:47 data, data, data ;) Feb 01 08:17:52 no guessing :) Feb 01 08:39:33 i just realized i'm sending a ton of useless fields in the JSON, let me remove those from the json response Feb 01 08:46:06 hephaestus_rg: get ready to do the happy joy dance Feb 01 08:46:27 that might shave about half the time Feb 01 08:47:34 hi Feb 01 08:47:40 i know you dislike html5 apps Feb 01 08:47:41 but Feb 01 08:47:45 https://play.google.com/store/apps/details?id=com.game.platforms.planetsdemo Feb 01 08:47:51 that is 100% html5 Feb 01 08:49:35 O.o Feb 01 08:55:13 if its pure html5 then the playstore should embed it so you can play before you install Feb 01 09:00:27 that would be a cool feature shmooz Feb 01 09:03:21 I was gonna try but...insufficient space :( Feb 01 09:03:31 Curse you nexus s and 1gb data partition Feb 01 09:18:09 hey how do you send a message to an already running intentservice? Feb 01 09:20:04 i suppose i could just kill the service with stopService(intent) Feb 01 09:22:39 looks like i can't use an intentservice then, i'll need to convert to a normal service to stop it Feb 01 09:37:02 hi im from germany got a Noob problem so dfar the sayout settings and the ActionBarActivity implements ActionBar.TabListener works fine Feb 01 09:37:19 now there are buttons on etch page 4 in total Feb 01 09:37:33 where do i implement the Bottom action Feb 01 09:37:57 insiode the mainActivity witch is ActionBarActivity implements ActionBar.TabListener Feb 01 09:38:19 or do i need a sepperated class and bundle the resolt to post out what to do Feb 01 09:39:05 what is "the Bottom action" Feb 01 09:39:40 it shoudt set another picture in FragmentA the botten is in fragmentC Feb 01 09:40:04 sorry, im not too good w/ fragments, maybe someone else here can help Feb 01 09:40:09 its a botton group Feb 01 10:33:51 ok, i've got a FaceDetectionListener. Is there a way I can take a picture if the x and y coordinates meet certain parameters? Feb 01 10:34:21 I obviously need access to the camera object, but is this possible from within the listener? Feb 01 10:34:33 (here's the listener's code: http://pastebin.com/8F7Bbyhd" Feb 01 10:34:44 ** http://pastebin.com/8F7Bbyhd Feb 01 11:33:30 ok, i've got a FaceDetectionListener. Is there a way I can take a picture if the x and y coordinates meet certain parameters? Feb 01 11:33:33 I obviously need access to the camera object, but is this possible from within the listener? Feb 01 11:33:35 (here's the listener's code: http://pastebin.com/8F7Bbyhd" Feb 01 11:33:38 ** http://pastebin.com/8F7Bbyhd Feb 01 11:33:48 I need rank bars something like these -- http://www.wowroster.net/dlfiles/screens/10613_rank-bars.png in my app. Is this something I would do in 9patch? Feb 01 11:35:33 PDilyard: seems like it would be Feb 01 11:35:45 does anybody know what this problem is: MediaPlayer(2283): error (1, -4)? i had when i'm trying to play a sound Feb 01 11:39:02 PDilyard: Have you tried something like this? if(faces[0].rect.centerX() == 10 && faces[0].rect.centerY() == 10){ camera.takePicture(args); Feb 01 11:49:25 welp, gnight Feb 01 13:08:15 hey, anyone here work with pareable Feb 01 13:09:36 I wanted to know how to add username and password to my app so that people have accounts. I understand it has something to do with MySQL but would someone explain? Feb 01 13:10:45 you can pass it as a post? Feb 01 13:11:03 what part of it you trying to understand Feb 01 13:11:05 how to create one Feb 01 13:11:10 or how to get one from the db Feb 01 13:11:52 create and look up in the database if the user exists and if not to sign up Feb 01 13:13:11 well you would have a sign up and a login screen Feb 01 13:13:36 and basically call a get in the db when they try to login if it is incorrect or the server responds with a fail then you Feb 01 13:13:47 handle it accordingly whether to send them to a register screen etc Feb 01 13:13:57 you specify it in your ajax call Feb 01 13:18:31 (╯°□°)╯︵ ┻━┻ EPIC MAY MAYS┬─┬ ノ( ゜-゜ノ) Feb 01 13:19:45 If i want to set a time from my preferences screen for an alarm manager instance to run, how would I do that ? Feb 01 13:20:06 I'm trying to work out how to start alarm manager after the preference for the start time is changed Feb 01 13:20:33 is onPreferenceChangeListener the best way ? Feb 01 13:20:34 SirLagz: I bet you mean you want to register an alarm to fire at a particular time, right? Feb 01 13:20:53 ah yes. Sure, onprefchangelistener is just the thing Feb 01 13:21:00 ok cool. Feb 01 13:21:04 I wasn't sure if that was the right way of doing it Feb 01 13:21:11 though I've had difficulties canceling the prior alarms Feb 01 13:21:25 I'm not quite sure what the rules for considering the alarm an equal to a priorly set alarm is Feb 01 13:21:35 hmm Feb 01 13:21:56 there's a cancel method but no "iterate pending alarms" method, so I've been mildly struggling with that Feb 01 13:22:14 my alarms check if they should actually run when they fire and if not according to current config, they just return Feb 01 13:22:15 and I should be putting that onPreferenceChangeListener in the SettingsFragment ? Feb 01 13:22:32 well yes, the pref can only change if the fragment is visible, right? Feb 01 13:22:37 true. lol Feb 01 13:22:39 derp Feb 01 13:22:41 so that seems like a good place for it Feb 01 13:23:53 hokay. Feb 01 13:23:57 any parceable users Feb 01 13:24:08 guess it's time to muck about :D Feb 01 13:25:57 LoneSoldier728: would you count classes that implement parcelable? I hate the interface but you can always pass a Bundle if you don't mind loss of efficiency Feb 01 13:26:39 how can i update the ui thread from a FaceDetectionListener? Feb 01 13:27:31 i want to use it Feb 01 13:27:45 I just want to pass an objectid in it that is available on the screen Feb 01 13:28:03 I have the class that implements parceable Feb 01 13:28:14 PDiyard, Activity.runonuithread() Feb 01 13:28:29 I was just wondering what I need to do but I think I just figured it out Feb 01 13:30:52 LoneSoldier728: Bundle b = new Bundle(); b.putInt("id", id); return b. Feb 01 13:37:08 can I pass something into parceable? Feb 01 13:44:40 alankila: Preference pref_EnableAutoRefresh = findPreference(getString(R.string.pref_EnableAutoRefresh)); <-- that should work right ? Feb 01 13:45:47 you save the preference id in strings.xml? Feb 01 13:45:53 why? Feb 01 13:47:08 I would just use the string directly as well Feb 01 13:47:17 er... Feb 01 13:47:23 I may be a bit tired. lol Feb 01 13:47:39 especially as strings.xml gets translated... that would fuck it all up :) Feb 01 13:48:41 refresh my memory. The ID that I need... Feb 01 13:48:43 where should that be ? Feb 01 13:48:53 your preference.xml file most likely Feb 01 13:48:58 hm Feb 01 13:49:11 that would be the key right ? Feb 01 13:49:24 yezz Feb 01 13:49:25 yes, I believe it's called key of the pref Feb 01 13:49:43 the preferences thing is kind of awkward though I prefer this form over the generated R.id stuff actually Feb 01 13:50:02 ok cool. I don't think I need that R.string then. Right ? So if the preference key is pref_EnableAutoRefresh, then I should just use that ? Feb 01 13:50:13 yes Feb 01 13:50:23 strings.xml is for text you display in the app Feb 01 13:50:32 Right. Feb 01 13:50:36 Buttons/TextView etc. Feb 01 13:50:36 sorry, getting confused. Feb 01 13:50:39 yep Feb 01 13:50:46 I don't know why I thought I needed the text string =/ Feb 01 13:51:08 well the preference key is a string :) Feb 01 13:51:17 haha...maybe that's it Feb 01 13:52:36 next question. is it better to call onPreferenceChange like this - pref_EnableAutoRefresh.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {... Feb 01 13:52:53 no having a foo is totally cool, it goes with the time-honored practice of not having magical constants in code, like public final int TWO_THOUSAND_AND_ONE = 2001; Feb 01 13:53:05 2001 is bad, but TWO_THOUSAND_AND_ONE is cool Feb 01 13:53:27 or have a separate onPreferenceChange object and call it via pref_EnableAutoRefresh.setOnPreferenceChangeListener(changeListener) ? Feb 01 13:53:30 alankila: lol Feb 01 13:53:37 alankila, getting your preference keys out of a strings.xml file is not cool Feb 01 13:54:06 SirLagz, What ever you find easier to read in code, both is fine Feb 01 13:54:13 darken: ok cool Feb 01 13:54:22 darken, alankila : thanks Feb 01 13:55:40 sarcasm detectors. Check them. Feb 01 13:56:05 needs more smileys.. Feb 01 13:59:53 is there a normal way of comparing preferences ? or is .toString().equals() the way to do it ? Feb 01 14:00:11 what do you want to compare? Feb 01 14:00:42 actually derp. never mind me =/ Feb 01 14:01:08 actually I still need the answer...lol Feb 01 14:01:12 in one of my other thingos Feb 01 14:01:25 i'm using pref.toString().equals to see which preference is being clicked Feb 01 14:01:37 in order to fire off a test notification Feb 01 14:01:49 you compare the keys Feb 01 14:01:54 so i'm comparing the value of pref.toString() Feb 01 14:02:38 darken: ah...I think I must have stuffed up the same way last time i tried doing this lol. Feb 01 14:03:22 if(preference.getKey().equals("your.key") ... else if ... Feb 01 14:03:24 never mind me...again Feb 01 14:03:28 coool Feb 01 14:03:29 thanks Feb 01 14:04:07 but if its the same key, you set the OnChangeListener on, you don't need that Feb 01 14:04:18 darken: yep, that was my first derp haha Feb 01 14:04:29 darken: this is for somethign else that I wrote at 2AM. Feb 01 14:05:06 i should stop writing code at 2am really. that would be the sensible solution. Feb 01 14:05:27 thats when the best code gets written Feb 01 14:05:27 Hell I go to bed between 10 and 11 Feb 01 14:05:44 then wake up at 6 or 6:30 and code before work Feb 01 14:05:51 jonc, am ? oh pm Feb 01 14:05:53 darken: haha. the best code for looking back at it and thinking 'wtf ?!?' Feb 01 14:06:12 jonc: I'm not a morning person. haha Feb 01 14:06:21 wake up- code, go to work- code, come home - code Feb 01 14:07:38 mine is wake up, work, come home, wrangle kids into bed, clean up the house, code. Feb 01 14:07:46 by the time i'm coding, it's already like 10pm lol Feb 01 14:07:52 haha Feb 01 14:07:56 25 with no kids Feb 01 14:08:03 i'm a year older with 3 kids haha Feb 01 14:08:11 26 no kids :< Feb 01 14:08:26 don't plan on it any time soon :P Feb 01 14:08:36 been with the girlfriend for ~5 years Feb 01 14:08:38 haha... Feb 01 14:08:45 I never did plan on having 3 kids. lol Feb 01 14:08:51 haha Feb 01 14:08:55 no regrets though :D Feb 01 14:11:30 25 no kids here :) Feb 01 14:14:11 http://stackoverflow.com/questions/21499084/how-to-pass-an-id-into-parceable Feb 01 14:14:24 anyone have a clue what I pass into the extra after calling me parceable class here Feb 01 14:15:33 LoneSoldier728, why a parcelable and not a bundle ? Feb 01 14:16:41 from my understanding parceables are the most efficient? Feb 01 14:18:19 LoneSoldier728, yea, but doesn't really matter for passing 1 string Feb 01 14:19:36 well im going to past a list of strings Feb 01 14:19:50 how many ? Feb 01 14:19:56 5 Feb 01 14:20:00 still fine Feb 01 14:20:24 i really wont notice the difference? When do you notice the difference Feb 01 14:20:32 500? 5000? Feb 01 14:20:49 when you notice the difference Feb 01 14:21:14 not sure even then, parcelable is good for custom objects, but if its primitive types such as Strings, bundle saves you a lot of headaches Feb 01 14:21:16 preoptimization is the root of all evil Feb 01 14:21:21 ^ Feb 01 14:22:03 kk Feb 01 14:22:55 can you send images ultimately through parceable Feb 01 14:23:00 is it good for that or images are too big Feb 01 14:24:10 i think you can, but i don't think it's a good idea Feb 01 14:26:01 um Feb 01 14:26:06 putting images in parcelable is a terrible idea Feb 01 14:26:12 Bundles are parcelables as well Feb 01 14:26:27 so if you can just stuff your strings into bundles don't waste time making your class a parcelable Feb 01 14:27:05 I just thought it was more efficient regardless to use parcelable Feb 01 14:27:18 like ux wise Feb 01 14:29:11 and in bundle I can add objects? Feb 01 14:29:50 Bundle extras = new Bundle(); extras.putExtras(ObjVar); Feb 01 14:30:06 depends on what ObjVar is Feb 01 14:30:30 Good Day Feb 01 14:30:31 ok I am going to see what it looks like now, I am setting a tag so not sure what the result is Feb 01 14:30:47 O.o Feb 01 14:30:54 are you just making stuff up as you go along? Feb 01 14:31:00 hi Hirsch Feb 01 14:31:37 oh ok it is tag: idNumberHere Feb 01 14:34:18 I am new to android programmin and i am facing a problem that i can't get fixed: I have two activities (Main and Settings) - in the onCreate of the Main i initialise the intent for the settings activity. when i now start the settings activity by pressing the menu button and then pause(?) it via the back hardware button i see the main UI, but it does not respond to the menu button anymore :O Feb 01 14:34:39 code us Feb 01 14:34:44 pastebin Feb 01 14:36:06 Hirsch, initializing the Intent in onCreate is a generally terrible idea Feb 01 14:36:21 pressing the backbutton calls finish() on your settings and closes it, you would pause it by pressing the home button Feb 01 14:37:17 Mavrik, why is that Feb 01 14:38:22 it's just a potential to get a context leak for no good reason Feb 01 14:38:59 why that ? Feb 01 14:39:05 where would you init it Feb 01 14:39:15 when you need it Feb 01 14:39:20 when you want to send the intent Feb 01 14:39:35 Intent instance creation isn't expensive Feb 01 14:39:37 http://cxg.de/_63a7d6.htm would be part of the code Feb 01 14:40:11 but how can the content leak from that ? It's tied to your activity if you init a global intent variable Feb 01 14:40:13 oh and theres also a second public boolean onCreateOptionsMenu(Menu menu) { Feb 01 14:40:24 context Feb 01 14:40:48 Hirsch, don't use getApplicationsContext(), use "this" Feb 01 14:41:01 MainActivity.this? Feb 01 14:41:12 just this, should work Feb 01 14:41:15 no. Feb 01 14:41:20 that's not the issue Feb 01 14:41:24 i know Feb 01 14:41:36 but it doesn't hurt either Feb 01 14:41:43 Hirsch, the issue is... why are you opening another activity when the OS is trying to populate a context menu? Feb 01 14:42:04 Hirsch, this will cause all kinds of hell :) Feb 01 14:42:09 :O Feb 01 14:42:15 Hirsch, what is it you're trying to accomplish? :) Feb 01 14:42:29 I think onCreateOptionsMenu just gets called once, to initiliase the menu, but Mavrik is right, Feb 01 14:42:49 i want to open a second UI when the menu button is pressed Feb 01 14:43:00 Hirsch, ah. Feb 01 14:43:00 darken: if thats true then it would explain the error Feb 01 14:43:18 onCreateOptionsMenu is called when the options menu is refreshed Feb 01 14:43:33 but yes, darken is right, unless you call refresh explicitly, it's called only once Feb 01 14:43:38 Mavrik, care to explain how the context would leak from creating the intent in onCreate ? Feb 01 14:43:58 trying to get a realtime Naive Bayes on a large amount of data sucks! Feb 01 14:44:12 Hirsch, but that's not how it's supposed to be used... onCreateOptionsMenu is meant for you to populate the actionbar/options menu, not to do actual logic :) Feb 01 14:44:46 Hirsch, so that's the place where you create buttons in action bar and you invoke startActivity from the menuitems onClick or whatever listener :) Feb 01 14:45:29 darken, by having a potential (see the word used in my sentence) of passing it somewhere else Feb 01 14:45:52 ok Feb 01 14:46:30 i just removed onCreateOptionsMenu and replace it with onKeyDown? Feb 01 14:46:40 KeyEvent.KEYCODE_MENU Feb 01 14:46:53 i think that only counts for the hardware menukey Feb 01 14:46:55 Hirsch, see http://developer.android.com/guide/topics/ui/menus.html#RespondingOptionsMenu Feb 01 14:47:07 Hirsch, uh, what you just did makes no sense Feb 01 14:47:26 but it works :o Feb 01 14:48:18 darken are you here? Feb 01 14:48:21 or whoever is here Feb 01 14:48:54 is there an easy way to tell whether getActivity() returns null or not ? Feb 01 14:49:00 Hirsch, If you really want to grab, the press on the overflow menu, i think onMenuOpened gets called everytime Feb 01 14:49:11 SirLagz, "if getActivity() == null" ? Feb 01 14:49:17 SirLagz, yeah check if the return value is null :P Feb 01 14:49:23 is a bundle used if you have multiple objects Feb 01 14:49:34 jonc: just checking. That didn't seem to work last time I tired. Feb 01 14:49:34 where putExtra is just used straight if you have one Feb 01 14:49:37 Mavrik, ok i get your idea, but calling it "terrible" when you call putting an image into a bundle terrible, kinda sets the wrong picture for level of "terrible" ;) Feb 01 14:49:38 tried*. Feb 01 14:49:49 darken, you have a point there :P Feb 01 14:49:58 I should have used maybe "code smell"? :) Feb 01 14:50:01 darken: even if have not implemented it? then it should do nothing Feb 01 14:50:06 Mavrik, ;) ya Feb 01 14:50:30 LoneSoldier728, you can stuff all sorts of stuff into a bundle, i.e. key/value pairs Feb 01 14:51:34 LoneSoldier728, your question is wierd... "putExtra" is something you call on a bundle Feb 01 14:51:44 so there's no one vs. other :) Feb 01 14:52:29 ok last question: if i want a button to close the activity i just type in the xml android:onClick="finish"? Feb 01 14:53:07 Hirsch, yep, or you set a click listener that calls "finish()" in code Feb 01 14:53:15 i don't actually know if that exists in xml , oh ok it does :) Feb 01 14:53:34 mhm... even though having events in XML always caused just pain to me Feb 01 14:53:35 but usually you don't have to explicitly create an "Exit" button Feb 01 14:53:50 The user expects to work the with "back" button Feb 01 14:54:12 using back out of your app should finish it Feb 01 14:54:25 (and does if you didn't overwrite it) Feb 01 14:54:43 ok Feb 01 14:55:18 thank you :) Feb 01 14:58:05 Mavrik, do you have experience with the mediaplayer class ? Feb 01 14:58:14 sadly yes Feb 01 14:58:22 madness awaits there. Feb 01 14:58:33 do you have an alternative :D? Feb 01 15:00:16 nope Feb 01 15:00:24 depends on your use-case Feb 01 15:00:33 all purpose music player Feb 01 15:00:38 I suggest buying alot of coffee and alcohol when programming any media support in Android :P Feb 01 15:00:47 ah Feb 01 15:01:48 what do you think about having one mediaplayer object that gets it's data source changed, vs multiple objects each representing one "track" Feb 01 15:02:00 darken, usually going the way of ffmpeg for decoding with stagefrigt => opengl render is the most useful for this usecase Feb 01 15:02:22 after finish() ing an activity, do i have to start it again or can i also resume it? Feb 01 15:02:34 darken, MediaPlayers are made to be chained Feb 01 15:02:35 Hirsch, after finishing, its finished, not paused Feb 01 15:02:50 Mavrik, so the later one, each track a mediaplayer? Feb 01 15:02:56 darken, see "setNextMediaPlayer" Feb 01 15:03:07 just remember, MediaPlayers are backed by HW decoders, so you're limited with format support Feb 01 15:03:23 also because of HW limitations you're limited by how many of them you can have initialized Feb 01 15:03:24 darken: ok thanks :) Feb 01 15:03:41 do you have some docs on alternative implementations with ffmpeg etc. ? Feb 01 15:03:54 where do i get that limit from :D? Feb 01 15:03:55 not really :/ Feb 01 15:04:04 you don't, your initialization just dies :D Feb 01 15:04:12 :'-( Feb 01 15:04:16 since there's no good way of querying HW capabilites Feb 01 15:04:25 for ffmpeg... try googling about creating a ffmpeg player Feb 01 15:04:42 but you'll need to know ffmpeg APIs (which means C :) ) and how JNI works Feb 01 15:04:54 setNextMediaPlayer is API16 :o Feb 01 15:05:41 well for music playback the internet mediaplayer should suffice... Feb 01 15:05:53 *internal Feb 01 15:05:55 for music playback it's ok Feb 01 15:05:58 fuck my writing today Feb 01 15:06:17 I thought you were talking about video :) Feb 01 15:06:28 nah I'm not touching that hell hole :D Feb 01 15:06:55 probably switching two mediaplayers is a good way to do audio playback Feb 01 15:08:07 but reinitialise/release each player, not only setDataSource and call prepare? Feb 01 15:09:00 is there a way to guarentee that a widget's contents will be refreshed ? Feb 01 15:09:22 my widget doesn't seem to refresh sometimes Feb 01 15:10:12 i do call the updateAppWidget method when it's meant to refresh Feb 01 15:10:14 am i missing something ? Feb 01 15:10:29 invalidate() Feb 01 15:10:56 Hirsch: thanks. I think i may already be calling that too ? but I'll double check Feb 01 15:12:18 Hirsch: guess not. Thanks for that ! Feb 01 15:12:49 if you call it from a non ui thread you use postInvalidate Feb 01 15:12:54 http://developer.android.com/reference/android/view/View.html#postInvalidate%28%29 Feb 01 15:13:01 ah Feb 01 15:13:04 http://developer.android.com/reference/android/view/View.html#invalidate%28%29 Feb 01 15:13:06 maybe that's what I'm missing. Thakns Feb 01 15:17:37 :/ Feb 01 15:17:54 in my second activity it seems that onClicks are not recognized Feb 01 15:22:09 uh missing clickable="true" ... Feb 01 15:39:28 hey Feb 01 15:39:30 i have go-mtpfs, and i enabled mtp support in android Feb 01 15:39:36 but stil go-mtpfs fails to detect it Feb 01 15:39:39 (lg optimus 4xhd) Feb 01 15:40:07 (archlinux) Feb 01 15:40:25 jackneill: sudo pacman -S gvfs-mtp Feb 01 15:44:19 Pacman like the game? Feb 01 15:47:45 Hi, Feb 01 15:49:17 If I embed a browser object in UI, of the app that already have some other controls like buttons, input fields etc. Then I load a webpage in the browser object. Can I get to know when an ajax call was made by javascript in that webpage and what data was sent/recieved, and then I can make my mobile app act accordingly? Feb 01 15:49:42 razor-: Pacman is arch linux's package manager Feb 01 15:53:02 hmm...setting an alarm to fire off every 15 seconds without checkign to make sure the alarm can be cancelled is a bad idea =/ Feb 01 15:58:10 using the same pendingIntent should mean it should cancel the old alarm out right ? Feb 01 15:58:32 Thonneve: and you you have any ide ahow to use it? Feb 01 15:58:34 ➜ sudo gvfs-ls /run/user/1000/gvfs [18:01:52] Feb 01 15:58:37 Error: Permission denied Feb 01 15:58:51 jackneill: Unplug and replug, it should automount Feb 01 15:59:29 Thonneve: why would? Feb 01 15:59:38 its not in systemd or anything Feb 01 15:59:59 It just works, I'm not sure how but it that's how I got auto mounting for my HTC one under arch Feb 01 16:00:48 Thonneve: and how you see it that it got mounted? Feb 01 16:00:55 nautilus? Feb 01 16:00:58 Check a file manager Feb 01 16:01:02 Nautilus should show it yeah Feb 01 16:01:10 i dont like thos Feb 01 16:01:12 those Feb 01 16:01:15 :D Feb 01 16:01:27 You don't like nautilus? Feb 01 16:02:24 i dont like thins that require mouse Feb 01 16:02:28 also i installed thunar Feb 01 16:02:35 it shows it, but it is empty Feb 01 16:02:44 Unlock the device Feb 01 16:02:46 aand its not empty Feb 01 16:02:52 If I embed a browser object in UI, of the app that already have some other controls like buttons, input fields etc. Then I load a webpage in the browser object. Can I get to know when an ajax call was made by javascript in that webpage and what data was sent/recieved, and then I can make my mobile app act accordingly? Feb 01 16:02:54 i enabled mTP on the device Feb 01 16:02:56 can I call addView on a linear layout 10 times in a row to keep adding another textview to it? because I am getting an error not sure why Feb 01 16:03:13 jackneill: You need to unlock the device so mtp can read it Feb 01 16:03:36 heh lol Feb 01 16:04:58 Thonneve: thanks for the help. Feb 01 16:05:05 No problem Feb 01 16:23:19 hmm Feb 01 16:23:28 I seem to have filled up my emulator with alarms that I can't cancel =/ Feb 01 16:25:33 im trying to add zxing to my app via intent. it launches fine, but my onActivityResult is never fired. what would cause this? Feb 01 16:26:46 how do i add multiple text views to a linear layout Feb 01 16:27:04 create them, add them Feb 01 16:27:49 darken, it might help to know what means they are using to add them, other than a simple text editor. Feb 01 16:28:16 nvm Feb 01 16:28:20 what? Feb 01 16:28:24 dumb was pointing to wrong id Feb 01 16:28:47 i was doing it right thought for a second it was a problem with adding multiple text views thanks tho Feb 01 16:29:08 pardon me. Feb 01 16:29:35 is there any way at all to clear out alarmManager alarms apart from the cancel(pendingIntent) ? Feb 01 16:29:52 abrkn, i think there was something with the result_code you set Feb 01 16:30:12 SirLagz, reboot Feb 01 16:30:32 ah...Didn't think of that lol Feb 01 16:31:04 i think killing the app via ddms also works Feb 01 16:31:07 not sure Feb 01 16:31:23 killing the app will work until you do something to the app and then it starts again haha Feb 01 16:31:40 getting flooded with alarms because the cancel(pendingIntent) that I used didn't work =/ Feb 01 16:32:37 SirLagz, force stop works Feb 01 16:32:49 Mavrik: but then when I do anything on the app, it floods everything again =/ Feb 01 16:33:12 it doesn't actually clear it out...it just pauses them until the app decides to do something again lol Feb 01 16:35:45 SirLagz, are you playing corewars? Feb 01 16:38:59 is there a way to dynamically load new libraries at runtime? Feb 01 16:39:37 JFalcon: corewars ? Feb 01 16:40:01 more specifically, if the libraries change to add new functionality and can be detected. Feb 01 16:40:38 SirLagz, look up Redcode and corewars. It was a fun game! :) Feb 01 16:41:08 JFalcon: oooooo that Feb 01 16:41:15 JFalcon: I heard of that, never got around to playing though Feb 01 16:41:29 most people don't, not a need for it. Feb 01 16:41:45 most of the assembly coders made processors better. Feb 01 16:42:03 most of the processor manufacturers, well, you know. Feb 01 16:44:58 I came from a different development environment, so I'm starting over. Feb 01 16:46:18 I'm trying to figure out how I could translate my XAML layout from Silverlight development to the XML layout that Android provides. Feb 01 16:47:39 ...and at the same time, acknowledge the different platform versions, it sucks that grid layout took so late. Feb 01 16:50:43 Got a problem Fragment_A f1 = (Fragment_A) manager.findFragmentById(R.id.fragmentanalyser); Feb 01 16:50:45 darken: reboot didn't do it Feb 01 16:50:48 why is this red Feb 01 16:51:11 SirLagz, I'm pretty sure it does it, then you are setting the alarm up again somewhere Feb 01 16:51:39 IchGuckLive, the error message will probably tell you why Feb 01 16:51:42 IchGuckLive, make sure "fragmentanalyser" is actually there and now misspelled. Feb 01 16:52:06 try catch around it and examine the exception. Feb 01 16:52:26 JFalcon, if its red, its a compile error Feb 01 16:52:40 darken, which dev environment? Feb 01 16:53:00 any, if its red its something you don't fix via exception handling Feb 01 16:53:08 its a missing variable and or LINT error Feb 01 16:53:41 darken: hrm something is constantly triggering my widget's onDtaSetChanged method =/ Feb 01 16:53:43 darken, I've installed the "Android Development Studio", I suppose others are using Eclipse. Feb 01 16:53:53 or wrong cast or any number of issues you don't fix by building (which you can't because its an error) Feb 01 16:54:58 I'm not a big fan of 'casting' things. Feb 01 16:55:21 that's why I prefer 'generics'. Feb 01 16:55:31 darken: lol. I just figured out what I did. Never mind me =/ Feb 01 16:55:58 what did you do wrong SirLagz, if you don't mind sharing? Feb 01 16:56:24 in the onDataSetChanged method, told it to update the widget. which in turn triggered onDataSetChanged lol Feb 01 16:56:32 wasn't meant to put that there =/ Feb 01 16:56:53 anyone could make that mistake, thank you for sharing. Feb 01 16:57:12 haha no problems. No more tinkering with the widget for me for tonight. Feb 01 16:57:17 back to teh alarm. Feb 01 16:59:26 https://www.youtube.com/watch?v=mcSujceZDmg Feb 01 17:00:31 charming smile. Feb 01 17:02:06 hrm... how many watched "Real Genious?" Feb 01 17:04:31 now, how many watched "Real Genius"? Feb 01 17:05:06 re klaw. Feb 01 17:05:23 better to make 4 requests to the db or one request and loop thru it Feb 01 17:05:44 and the size should be less than 30 rows Feb 01 17:06:47 four requests to the db Feb 01 17:07:06 really...? Feb 01 17:07:11 yes. Feb 01 17:10:20 the less requests to the server the better. Feb 01 17:10:50 so how does your answer make sense Feb 01 17:11:07 if I make one request then on android i loop through the db requests? Feb 01 17:11:11 the db request? Feb 01 17:11:18 and look for the 4 ids Feb 01 17:11:22 ok, compare each request to a phone call. Feb 01 17:11:51 Do I call you 4 times for each request or call you once with 4 requests? Feb 01 17:11:53 hi Feb 01 17:12:03 I do but Im annoying Feb 01 17:12:19 and suffer from short term memory loss Feb 01 17:12:22 so why did you say 4 requests above Feb 01 17:12:26 JFalcon, your answer didn't make sense, if you want to reduce server load, you would get all the data in one request, but LoneSoldier728 didn't say he was communicating with a server Feb 01 17:12:42 ya it is android to local sqlite Feb 01 17:12:47 I have a question about hdmi state receiver, anybody know how to read hdmi state ? google isn't helping me .) Feb 01 17:13:28 my implementation of twitter4j gets an error "authentication credentials missing" http://pastebin.com/7C3ng3k2 Feb 01 17:13:30 doesn't matter if it's over the wire or local, chunking data requests saves time if you plan it out right. Feb 01 17:14:13 Problem Required: android.support.v4.app.FragmentManager Found:android.app.FragmentManager BUT I Imported android.support.v4.app.FragmentManager So what is the HINT Feb 01 17:14:54 JFalcon, chunking data saves the client time depending on what it does with the data, as the client can process already received data, but it is almost always wrong to send 4 server requests instead of bundeling the requests in terms of reducing server load Feb 01 17:15:08 There is No android.app.FragmentManager Feb 01 17:16:07 the only reason i would make the 4 requests is if there were 1000s of rows Feb 01 17:16:11 I put this in my manifest: http://pastebin.com/dyJr1FB6 Feb 01 17:16:15 darken, did you not read what I said, the data was all related and could send one server request. Feb 01 17:16:54 but I didn't receive anything from minix neo x7 device Feb 01 17:16:57 LoneSoldier728, and if you were trying to 'page' the data. Feb 01 17:17:55 the most efficient way but I dont think it is possible or is it? to actually query 4 ids together Feb 01 17:18:00 can you do that in sql Feb 01 17:18:02 my implementation of twitter4j gets an error "authentication credentials missing" http://pastebin.com/7C3ng3k2 Feb 01 17:18:31 yes, you create keys or indexes. Feb 01 17:19:29 LoneSoldier728, in your case, creating indexes on your database would speed things up but take up more hard drive space. Feb 01 17:20:04 SELECT id, name FROM tbl WHERE id IN (1, 2, 3, 4) Feb 01 17:21:04 anybody can help me ? Feb 01 17:22:43 with? Feb 01 17:22:46 @bais Feb 01 17:24:22 LoneSoldier728, List tbl { 1, 2, 3, 4 }; var result = (from id in tbl where id != 0); Feb 01 17:24:53 err, missing '=' Feb 01 17:25:07 LoneSoldier728, List = tbl { 1, 2, 3, 4 }; var result = (from id in tbl where id != 0); Feb 01 17:26:20 err, goof again. Feb 01 17:26:42 Lone: I need to read HDMI state for my app Feb 01 17:26:59 I'm trying some googled solution but no-ones works on my device Feb 01 17:27:24 LoneSoldier728, List tbl = { 1, 2, 3, 4 }; var result = (from id in tbl where id != 0); Feb 01 17:27:26 I did not receive hdmi status change, there isn't a cec client ? Feb 01 17:28:28 bais, what was the problem? Feb 01 17:29:02 I didn't receive HDMI changing state on device Feb 01 17:29:21 I need only to see if hdmi tv is turned off/on Feb 01 17:29:26 what if the device didn't provide the notification for state change? Feb 01 17:29:37 minix neo x7 Feb 01 17:29:52 it could have a bug in and of itself you know. Feb 01 17:29:58 can i search where the input android.app.FragmentManager is Feb 01 17:30:07 android studio Feb 01 17:30:09 I tried this: http://developer.sonymobile.com/2012/05/29/how-to-use-the-hidden-hdmi-api-tutorial/ Feb 01 17:30:36 it said there is an hidden android intent Feb 01 17:30:53 android.intent.action.HDMI_PLUGGED Feb 01 17:30:54 <|0xD34D|> when you use hidden APIs you risk things not working on some devices or future versions of android Feb 01 17:31:04 and there's an unexpected 'sneeze'. Feb 01 17:31:34 there is native package I can try to add to my app, like xbmc did? Feb 01 17:31:43 to have a cec client on android Feb 01 17:31:50 I found libcec Feb 01 17:33:05 <|0xD34D|> bais: did you notice the fine print "This Sony specific API ..."? Feb 01 17:33:15 if you delve into new libraries and adventures, you cannot expect the stock android team to answer all those questions. Feb 01 17:34:22 ox: I notice... I notice and I said, I tried that solution, I need to study xbmc source code to understand how they did it Feb 01 17:34:49 <|0xD34D|> why would you even try that solution if it is specific to Sony devices? Feb 01 17:35:19 <|0xD34D|> it's a hidden API Sony added for their own use and not something that has been merged upstream to AOSP Feb 01 17:35:22 beacuse they said there is another hidden intent Feb 01 17:35:52 I tried a raw way too. I tried to read kernel state Feb 01 17:36:07 but it's never changed Feb 01 17:38:39 let me show you Feb 01 17:38:52 <|0xD34D|> bais: have you looked at http://developer.android.com/reference/android/hardware/display/DisplayManager.html ? Feb 01 17:39:13 <|0xD34D|> it's available as of android 4.2 and that device you have says it is running android 4.2.2 Feb 01 17:39:28 sure was first place Feb 01 17:39:45 because I notice some events on logcat Feb 01 17:42:01 I follow that package implementation on some projects to understand how to receive hdmi status changing but I found a multyscreen example doesn't works Feb 01 17:42:02 look Feb 01 17:42:24 this is an example I'm studing: http://forum.xda-developers.com/showthread.php?t=1963785 Feb 01 17:43:16 ? Feb 01 17:43:56 someone can help me please on the import issue Feb 01 17:44:10 what's the error? Feb 01 17:45:27 it asys Incompatible types.Required:android.support.v4.app.FragmentManager Feb 01 17:45:29 Found:android.app.FragmentManager Feb 01 17:46:11 but the inpiut in the main activety says import android.support.v4.app.FragmentManager; Feb 01 17:46:30 if i query sql wih the ids in order would it return them back to me in order Feb 01 17:47:14 i.e where in (item1, 2, 3, 4) would you get the results back in order Feb 01 17:47:26 I don't know your code from start to finish, no more I can proffer, sorry. Feb 01 17:47:36 <|0xD34D|> IchGuckLive: how are you getting the FragmentManager in your activity? Are you calling getFragmentManager() or getSupportFragmentManager()? Feb 01 17:47:48 in general tho does sqlite return the results in order of that query? Feb 01 17:48:19 |0xD34D|, me thinks the latter would be async. Feb 01 17:48:22 I need to study source of displaymanager? https://android.googlesource.com/platform/frameworks/base/+/af57418/core/java/android/hardware/display/DisplayManager.java Feb 01 17:48:50 |0xD34D|: that does it Feb 01 17:48:57 <|0xD34D|> ? Feb 01 17:49:04 <|0xD34D|> what does it, I asked two questions :P Feb 01 17:49:15 <|0xD34D|> or did you figure out the answer based on my questions? Feb 01 17:49:16 DisplayListener have onDiplayChanged... Feb 01 17:51:26 could be this a "walkaround" ? http://blog.stylingandroid.com/archives/1440 Feb 01 18:01:07 did you resolve your issue bais? Feb 01 18:01:41 hello Feb 01 18:01:50 Hi Balues. Feb 01 18:01:55 err, Baluse. Feb 01 18:01:57 I loaded an old commit Feb 01 18:02:05 but android studio complains Feb 01 18:02:26 8:02:12 μμ Error running SimpleGoApplication: Gradle project sync failed. Please fix your project and try agai Feb 01 18:04:03 I had an issue similar to that, I actually had to open the build.gradle file and make a change. Feb 01 18:05:40 How many people are here using Eclipse and how many using Android Studio? Feb 01 18:07:44 its strange Feb 01 18:08:35 Baluse, I think "The Doors" had a song with the same name. Feb 01 18:10:45 Hey everybody. :) Feb 01 18:11:00 ll Feb 01 18:11:10 Greets all. Feb 01 18:11:40 I'm having some slight issues.. :/ Feb 01 18:12:24 I'm working on my own app, and I'm trying to find a way to make a kind of level system, and my thread isn't updating things properly... Feb 01 18:12:50 http://pastebin.com/5Ah09sqV Code if needed Feb 01 18:13:11 http://pastebin.com/RdbQBzih how do I ask the query to return results in the same order of the IN Feb 01 18:13:36 ORDER BY (id1, 2, 3, 4) added after the parenthesis of IN ?? Feb 01 18:14:35 that won't work LoneSoldier728, you can order by columns, not constants. Feb 01 18:15:12 sounds like you want a "GROUP BY" for your query. Feb 01 18:16:35 well they are in the same column just not sure if they are in order in terms of id1 rows comes before id2 Feb 01 18:18:57 well, in a linq query, I would use, var result = (from table select new { id = id, col1 = col1, col2 = col2 }).ToList(); Feb 01 18:20:12 linq query? Feb 01 18:20:50 what would you use to save two small strings? An SQLite db? Is there any easier solution? Feb 01 18:20:52 I come from a C# background, trying to learn something new. Feb 01 18:21:31 Hirsch, two static strings if you asked me. Feb 01 18:22:13 JFalcon: i want to save them to persistent memory Feb 01 18:22:46 Hirsch: SharedPreferences ? Feb 01 18:23:05 ok thanks JFalcon Feb 01 18:23:05 <|0xD34D|> ^^ +1 Feb 01 18:23:48 SirLagz: i will take a look at it Feb 01 18:24:12 sounds like you'd probably want "Internal Storage" if you want to save it in the device's memory. Feb 01 18:24:24 SirLagz: that seems to be the solution i searched - thank you :) Feb 01 18:24:46 JFalcon: but this requires additional permissions Feb 01 18:25:05 this sounds good http://developer.android.com/reference/android/content/SharedPreferences.html Feb 01 18:25:09 :) Feb 01 18:25:38 Yes, that's on the page I read. :) Feb 01 18:26:25 shit i cant debug Feb 01 18:26:56 ok it was because debugable false Feb 01 18:30:16 look everything we create is perfect, right? Feb 01 18:31:24 I'm being facetious of course. Feb 01 18:32:08 Define "perfect" Feb 01 18:32:48 well, in a way it would be presented to you 'razor-', without defect. Feb 01 18:37:44 mh Feb 01 18:38:14 i imported android.content.SharedPreferences, but it says getSharedPreferences is undefined Feb 01 18:39:40 did you actually include the library in your build? Feb 01 18:40:36 i did Feb 01 18:40:42 i want to extend LinearLayout, is there a method that will be invoked when an item is added or removed ? Feb 01 18:40:48 i see in the interwebz that i need to pass a context Feb 01 18:41:07 any help for http://stackoverflow.com/questions/21500252/geting-html-data-from-embedded-browser-in-android-and-ios ? Feb 01 18:43:07 what context is that? Feb 01 18:43:29 android ofcourse Feb 01 18:43:32 JFalcon, If I embed a browser object in UI of the app that already have some other controls like buttons, input fields etc. Feb 01 18:43:32 Then I load a webpage in the browser object (remote page like http://google.com). Feb 01 18:43:32 Can I get to know when an ajax call was made by JavaScript in that webpage and what data was sent/received, and then I can make my mobile app act accordingly? e.g show alerts on mobile screen. Feb 01 18:44:01 Voyage, understood. Feb 01 18:44:07 hm. Feb 01 18:44:43 JFalcon, if thats possible what I say, there will be only one UI. html based, for all IOS / android phones Feb 01 18:44:53 well, considering that today HTML5/CSS 3 are companies targets.... Feb 01 18:45:28 I personally don't like using HTML applications. Feb 01 18:45:37 the user will never know Feb 01 18:45:50 yes, they will. Feb 01 18:46:19 either way, is it possible? Feb 01 18:47:11 web applications, from my experience, are very slow, have to rely on hacks and are a pain to debug and support. Feb 01 18:47:25 JFalcon, agreed. Feb 01 18:47:29 JFalcon, is it possible? Feb 01 18:47:49 Anything is possible with enough time and money. Feb 01 18:48:30 JFalcon, Are you familier with the precise way? Feb 01 18:48:41 JFalcon, for my current senario/ question Feb 01 18:49:01 I'm afraid I'm not, but can you educate me about it? Feb 01 18:49:36 the question text was not elaborative? Feb 01 18:51:06 it was. Feb 01 18:52:22 Voyage, I am. Feb 01 18:52:26 JFalcon, let us both wait for someone who knows an answer Feb 01 18:52:41 JFalcon, you are? for? Feb 01 18:52:53 You're not? Feb 01 18:53:42 no Feb 01 18:54:49 I am for simplicity. Feb 01 18:55:12 I am for open source. Feb 01 18:55:50 hi Feb 01 18:56:24 hi there! Feb 01 18:56:29 to save my data, i use database? Feb 01 18:57:17 you can use memory, local file system, a database or cloud storage. Feb 01 19:02:04 what mean memory and local file system? JFalcon Feb 01 19:03:43 memory is what your application uses, but has access to the local file system (including storage on SD cards), but if it's just stored in memory itself, it can be lost, if not turning it off, but removing the battery from the device keeping it alive. Feb 01 19:04:03 this code turns the flash on successfully, but does not turn it back off without closing the app: Feb 01 19:04:04 http://pastebin.com/HQGASQGf Feb 01 19:04:33 i want the led flash to be on when y < 100, and turn back off when y > 100 Feb 01 19:05:29 are you sure theres not anything else you need to ovverride to clean up? Feb 01 19:09:06 does anybody know of a good way to limit the amount of data/time a MediaPlayer object pre-loads? Feb 01 19:09:47 if I for example play a track that is 60 minutes long, I don't want MediaPlayer to preload the entire thing right away. I might not even listen through the whole thing Feb 01 19:10:02 So I basically want the MediaPlayer only to buffer 1 minute in advance Feb 01 19:10:14 If I embed a browser object in UI of the app that already have some other controls like buttons, input fields etc. Feb 01 19:10:14 Then I load a webpage in the browser object (remote page like http://google.com). Feb 01 19:10:15 Can I get to know when an ajax call was made by JavaScript in that webpage and what data was sent/received, and then I can make my mobile app act accordingly? e.g show alerts on mobile screen. Feb 01 19:10:30 take care all... Feb 01 19:11:42 Voyage: use a JavaScript interface and make some callback from your JavaScript method back to your Java code whenever you want to Feb 01 19:17:32 bah, if i extend a LinearLayout any way to get notifications when a view is added/removed ? Feb 01 19:17:44 MrMaffen, hm.. 1, the browser object that is embeded in the app would be what? 2, If a normal web page , say hotmail.com is loaded in it, how would I know / inspect that hotmail.com/index.html page just made an ajax call and what data was transfered? Feb 01 19:22:11 Voyage: oh I misread your question. I thought you were loading your own webpage. Feb 01 19:23:16 MrMaffen, well, now I am interested in both cases Feb 01 19:25:10 Hello Feb 01 19:25:15 does it worth to use new relic ? Feb 01 19:33:06 Voyage: well you would load your webpage (which includes your javascript scripts) with a simple WebViewClient and add a JavaScriptInterface to it, which contains all the methods you want to expose to your JavaScript code Feb 01 19:33:28 then you can simlpy call those methods from your scripts and communicate with your java code Feb 01 19:33:46 calling your javascript methods from java is ofc also possible Feb 01 19:38:26 MrMaffen, you mean "add a JavaScriptInterface" to the webViewClient? and call the JS methods in that interface or in the webpage? Feb 01 19:40:31 Voyage: 1. yes 2. you can call the JS methods either directly on the webpage (obviously) or from your java code. Feb 01 19:41:28 you would simply call "webViewClient.loadUrl("javascript: executeMyJSMethod()"); Feb 01 19:42:11 MrMaffen, the executeMyJSMethod() is actually in the webpage in the html