**** BEGIN LOGGING AT Sun May 12 02:59:59 2013 May 12 03:09:46 mhm :) May 12 03:09:58 TinkerTailorHC, no point doing it in NDK really May 12 03:16:32 your probably right! May 12 03:16:48 I just love using c/c++ :( May 12 03:52:36 anyone ever see anything like "java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@44e785a0 (pid=14069)" ? May 12 03:53:23 i'm seeing crash reports with that, when trying to register a receiver in my application's onCreate . I kind of suspect it's some buggy custom rom, but it's coming from a handful of different device types May 12 04:42:25 hey all. I have a problem.. (what's new, right?) I can't seem to unregister a sensor listener. The code is here http://pastebin.com/BAe9mM6D . When I hit back to hide the application and kill the activity, i still get the system.out in logcat. The thead quits, as that is no longer looping, evidenced by the lack of system.out there. I'm really confused. May 12 04:45:37 hey g00s, and everyone, I have a problem.. (what's new, right?) I can't seem to unregister a sensor listener. The code is here http://pastebin.com/BAe9mM6D . When I hit back to hide the application and kill the activity, i still get the system.out in logcat. The thead quits, as that is no longer looping, evidenced by the lack of system.out there. I'm really confused and was wondering if you could help? May 12 04:53:38 can you execute commands after a call to finish() ... googles .... May 12 04:55:00 yes May 12 04:55:08 * capella nvm will run a test May 12 04:55:20 o - sees ---^ May 12 04:55:45 JakeWharton, im glad you're active here May 12 04:55:51 otherwise i'd have to answer all the difficult questions May 12 04:56:24 I only answer questions if it can be done in one word May 12 04:56:37 sounds reasonable May 12 04:56:49 i should make that a requirement for my session on friday May 12 04:56:55 ok so hows that work? can your commands after finish() be interrupted unpredictably? May 12 04:57:01 no May 12 04:57:07 hey JakeWharton, i just pulled a JakeWharton :D May 12 04:57:24 TIL May 12 04:57:51 capella: finish() is an indication to the activity manager that whenever it gets control back (i.e., the current callback finishes) it should initiate shutting down the activity May 12 04:57:55 it's asynchronous May 12 04:57:56 but in all seriousness, if i had to guess, i'd say finish() just... yeah May 12 04:58:48 can't you also startactivity(i) and still have commands after? May 12 04:59:00 yes. same principle May 12 04:59:11 yes, but i disagree with JakeWharton :P May 12 04:59:15 you're telling the activity thread what to do when it regains control May 12 04:59:22 startactivity doesnt eventually kill your activity May 12 04:59:28 jakewharton: cool ... so not like an immed return statement May 12 04:59:31 so of course it can still do other stuff May 12 04:59:49 yeah, it remains. that's what finish() is for, no? May 12 05:00:10 yes, but as we just disucssed, it doesnt immediately kill the activity May 12 05:00:16 jake are you sandboxing this year? May 12 05:00:23 ok that's cool May 12 05:00:26 it's kind of like a requestFinish() really May 12 05:00:27 canadiancow: yes May 12 05:01:12 but.. what about this stubborn sensorlistener? i can't get it to unregister, either by calling unregisterlistener or calling finish() May 12 05:01:21 finishWhenItIsConvenientForYou() May 12 05:01:30 startActivityWhenYouGetAChance() May 12 05:02:08 im watching someone parallel park outside my window May 12 05:02:12 hes failing hard May 12 05:03:04 * capella listenses for car alarms May 12 05:03:51 the front of his car makes it fairly obvious he recently rear-ended someone May 12 05:03:56 but no, the third attempt was successful May 12 05:04:22 Tricknology: quickly glancing at your code, i suspect your problem is not that the unregister isn't working but that your thread never dies. threading is confusing, i highly recommend reading Java Concurrency in Practice. I think making "kill" a volatile or atomicboolean will make your KEYCODE_BACK code let the thread stop May 12 05:04:26 horraay May 12 05:05:09 canadiancow: does gmail use Loaders ? May 12 05:05:15 extensively May 12 05:05:18 watch our session May 12 05:05:30 lol atomicboolean, never heard that before. If it is what it sounds like, that's what i tried to do May 12 05:05:49 i used to know how they work, and then forgot - so headed to the docs and i'm confused about exact nature / timing of things May 12 05:06:17 i recently made a loader that triggered a network request May 12 05:06:19 stick a Log.d("FOO"... at the start of every function involved and watch the logcat May 12 05:06:23 and it also caused itself to run again when it finished May 12 05:06:30 needless to say, i got my gmail account locked out May 12 05:06:44 capella: thats how i learned a lot about android :P May 12 05:07:05 guys, that's what i am doing May 12 05:07:18 I weave it into my code as a matter of practice .... switch flag it off May 12 05:07:21 capella: thats how i found out, the first release of the support library was totally broken May 12 05:07:34 and my onsensoreventlistener is not stahpping May 12 05:07:39 fragment onXxx methods were getting called out of order with the activity May 12 05:07:59 yah! logcat shows that May 12 05:08:27 :/ May 12 05:08:53 and easy to strip if it ever becomes production code May 12 05:08:54 canadiancow: quick q: in gmail, lets say you enter some data somewhere that needs to be saved to a database. do you use something like Contacts/EmptyService, Calendat/AsyncQueryService , fuck it write on main thread, etc May 12 05:09:12 ctrl+f "log" May 12 05:13:05 canadiancow: so ... your code was "too" successful? May 12 05:13:20 kevinb, i did what you said, i'm still getting the message "Still broken" which means that onSensorChanged(event) is still triggering. I don't see how this can even be possible May 12 05:13:26 it's been 2 days May 12 05:14:54 wait what ... somethings triggering messages for two days? or you see the messages from two days ago? confused May 12 05:15:17 heh! looks like aosp email just write on a bg thread in AsyncTask w/o guarding May 12 05:15:49 looks like the teams at google working on all these apps don't share best practices or something May 12 05:16:55 i've been having this problem for two days, trying to fix it :( May 12 05:17:38 what that means is that if i left my phone on the charger and the app running, yes i would get messages for two days May 12 05:18:26 i don't give a crap about the messages, really, but they kill the battery because it's listening to the magnetometer and accelerometer about 4 times every 1/100th of a second… so.. May 12 05:18:34 i'd like to stop this madness May 12 05:18:52 email/Controller.java seems to do its resolver updates on the main thread :| May 12 05:19:25 threads seem to be the theme tonight May 12 05:20:18 g00s: randomly ripping apart peoples code ? May 12 05:20:23 XD May 12 05:20:46 back in the day there was AsyncQueryHandler May 12 05:21:02 that was before loaders, but like loaders, just for reading stuff May 12 05:25:28 capella: its a good idea to look at the AOSP apps, but i sometimes wonder if they are more in a maintenance phase (as opposed to crown jewels like gmail, Kepp, Maps, etc - the real services) May 12 05:25:37 *Keep May 12 05:25:43 Now, etc May 12 05:26:09 the aosp are definitely a mixed bag of good / bad practices; have to take them with a grain of salt May 12 05:26:15 the AOSP apps are indeed a bit weird May 12 05:26:22 yah ... things move fast around here May 12 05:27:28 so yeah, in 2 minutes i found a case where the email app deletes attachments from the content resolver on the UI thread May 12 05:27:46 the launcher has some really brilliant code, and some that's questionable or seems poorly tested/reviewed. from git logs i suspect that sometimes changes to the aosp apps are made by framework engineers, to demonstrate a new part of the framework or fix an issue related to a framework change, and these are done quite well. or they move people around and the best people get snatched up for the closed source apps. May 12 05:28:46 look.. 3 people with the same problem. problem unresolved. what's going on? http://stackoverflow.com/questions/6919577/sensoreventlistener-doesnt-get-unregistered-with-unregisterlistener-method May 12 05:29:46 have you looked into the debugger? May 12 05:30:06 i can't there is a map in this activity that REALLY bogs things down May 12 05:30:33 i get an error like 1200 frames have passed… blah blah working too hard May 12 05:30:38 yah - I dont use it either just thought to ask May 12 05:30:48 my debug is the system.out May 12 05:30:51 or log.d May 12 05:31:19 i found that the thread i made stops, but onSensorEvent is still triggering May 12 05:31:29 even when i back all the way out of the app and go to homescreen May 12 05:31:58 so it just sits there running in the background, picking up sensor events, killing the battery and making my phone hot. I don't like it May 12 05:33:15 kill it May 12 05:33:29 kill it. how? like manually? May 12 05:33:43 i have a kill boolean that should unregister the listener May 12 05:33:55 kill = true when back is pressed or found = true May 12 05:34:43 i unregister the gravimeter, accelerometer, and then the whole sensoreventlistener May 12 05:35:00 still triggering sensor events May 12 05:35:03 no i meant turn your phone off c ause it was getting hot May 12 05:35:26 lol. force quit works. If i could do that programmatically.. problem solved May 12 05:35:34 :) Up late ... tireds May 12 05:35:36 it would deb a pain for the user tho May 12 05:35:41 :D c'es la vie May 12 05:35:45 c'est* May 12 05:36:39 i think g00s severely dislikes me btw May 12 05:38:41 did he give you advice and you didnt listen? did you make fun of trains? May 12 05:41:45 well i don't really know wtf I'm doing half the time so cryptic hints don't rely register. that might have something to do with it May 12 05:42:09 * capella hasnt had time to read aosp code lately .... did a javascript project and got lost in w3c html docs May 12 05:42:18 and my code is sloppy to say the least, but i'm learning. a lot better than i was when i started here almost 2 years ago May 12 06:09:24 hi May 12 06:31:08 hi May 12 06:31:56 http://stackoverflow.com/questions/16504474/android-thread-cannot-unregister-sensoreventlistener May 12 07:32:04 problem solved :) May 12 07:33:36 well now you have to tell us May 12 07:34:37 hm, thought ContentProvider.applyBatch did this in a transaction … not May 12 07:35:09 I'll get to ContentProvider after I finish BrowserProvider May 12 07:35:25 :) May 12 07:35:44 jasta is going to save us from all this shit May 12 07:35:56 (I can't do everything) May 12 07:44:43 hehe May 12 07:44:48 indeed. May 12 07:44:53 screw you content provider :) May 12 07:45:16 i'm really crossing my fingers that long term Google may pay attention to this project and offer us something more sane. May 12 07:46:00 jasta: please hurry up, every time i deal with providers i want to graw my arms off May 12 07:46:24 :) May 12 07:46:47 actually May 12 07:46:48 i'm done May 12 07:46:54 \o/ May 12 07:47:03 i'm waiting for approval to release from my employer May 12 07:47:16 i expect to get it, i'm just waiting for the final seal of approval May 12 07:47:25 cool May 12 07:47:38 hey, in other random news May 12 07:47:59 how the hell do i view emma reports? i have not worked with this on android in the past and would like to show my test coverage for this project May 12 07:48:30 all the tutorials and information i found online doesn't work: emma's report generating tool on my machine bitches that i need to supply an option that no tutorial even appears to mention May 12 07:48:42 (that is, the -cp option to specify classpath) May 12 07:51:27 oh, perhaps my issue is that i've corrupted the emma files by using multiple processes May 12 07:51:30 *investigates* May 12 07:52:28 wow, RxJava was worse javadoc than … everything :| May 12 07:55:07 * g00s hopes jasta has good javadocs ;) May 12 07:56:24 "always" May 12 08:09:45 ContentObserver.onChange(… , Uri) API 16 … balls May 12 08:09:57 that should have been API 1 May 12 08:24:01 yay, code coverage report generated. but, uhh, its wrong May 12 08:24:32 it's telling me certain methods aren't being tested that are actually part of the explicit test path being executed. the debug lines that i even see in logcat are showing as not covered? hehe, what? May 12 08:26:15 Hi all May 12 08:29:30 Has anybody had issues with the Lg L5II and adb? May 12 08:29:39 I can't seem to be able to put it in tcpip May 12 08:29:46 it just hangs indefinitely May 12 08:31:41 why tcip May 12 08:34:05 is github down for anybody else? May 12 08:34:10 @Abod Too bad I think there is nothing you can do about this May 12 08:34:22 there are many different app-stores though May 12 08:34:35 even if the official Google one is the biggest May 12 08:34:43 you can publish your app in different ones May 12 08:34:59 or try to deliver it without using an app-store at all May 12 08:44:39 we don't sell our app in any app store May 12 08:45:00 we have a hardware partner who sends a tablet/cell phone with the preinstalled app to our customers May 12 08:49:19 hey I have an error in my AndroidManifest.xml file: Error: No resource found that matches the given name (at 'label' with value '@string/app_name') what am I doing wrong? May 12 08:49:32 you didn't make a string called app_name I'd wager? May 12 09:01:12 thats more like it...51% code coverage ;) May 12 09:01:13 fuck yeah May 12 09:05:50 jasta: i played around with an interesting concurrency library the other day called lmax/disruptor. it uses a ring buffer and lockless design , in conjunction with barriers, to allow communication between threads pretty efficiently. i need to benchmark it on android to see if its worth it. May 12 09:06:48 you can set it up in case you have tasks that have dependencies on others tasks May 12 09:07:24 bbl, zzz May 12 09:07:30 gnight May 12 09:07:59 <[deXter]> g00s, Got a link to it? May 12 09:08:21 [deXter]: http://lmax-exchange.github.io/disruptor/ May 12 09:08:26 <[deXter]> cheers. :) May 12 09:09:33 now i'm playing around with RxJava :) one can't have enough concurrency tools in their toolbelt XD May 12 09:11:20 my idea was to use RxJava with AsyncQueryService - ContentProvider; but i'm curious what jasta has brewing :) May 12 09:12:52 luckily RxJava works with Android; although they lib devs are waiting to include lambdas from Java 8 which will make it a little more natural May 12 09:22:01 interesting, i wonder if this is possible on android http://benjchristensen.com/2011/10/23/junit-tests-as-inner-classes/ May 12 09:22:28 * g00s ponders the android testing stuff May 12 09:24:51 <[deXter]> that is quite handy May 12 09:24:54 <[deXter]> Unit testing is a PITA May 12 09:25:35 JakeWharton : I don't think that's it. I have a working AndroidManifest for another app and it doesn't make an app_name anywhere diffrerently May 12 09:26:13 the message is telling you that's the problem May 12 09:26:37 here's the file... ccould you possibly take a look? https://gist.github.com/rlad/db3cfc2496b671f45466 May 12 09:26:53 android:allowBackup="true"> May 12 09:27:06 No resource found that matches the given name (at 'label' with value '@string/app_name') May 12 09:27:33 I put the error messages as a comment May 12 09:27:48 the error message is clear as day May 12 09:27:51 -.- May 12 09:28:26 Zharf : if you know what you're doing it is, but I copied that from a working AndroidManifest.xml I have which doesn't have any additional statements defining @string/app_name May 12 09:28:37 so I don't think that's the problem? May 12 09:29:09 (the implication is that I don't know what I'm doing, not that you dont!_ May 12 09:29:10 ) May 12 09:29:29 nesoi, app_name is defined elsewhere May 12 09:29:42 where would it be defined? May 12 09:29:43 usually in res/values/strings.xml May 12 09:29:48 ah ok May 12 09:31:37 nesoi, what ide are you using May 12 09:32:07 eclipse May 12 09:32:16 that fixed 2 of the 5 errors! May 12 09:33:06 now it can't find R May 12 09:33:26 The import com.red_folder.phonegap.sample.R cannot be resolved May 12 09:34:15 how would I fix that one? May 12 09:35:40 Zharf : what should I look at? May 12 09:35:41 nesoi: that would fix trying to use "hello world" programs - then switch to 3rd party code May 12 09:35:54 nesoi: the sdk contains a lot of tutorials May 12 09:36:07 try using them - try understand the resources - and then you known what R. means May 12 09:36:45 "import com.red_folder.phonegap.sample.R" might imply that you use some code fromt he internet and your basic namespace might be different May 12 09:36:47 heho May 12 09:36:57 or it can mean you include a library project that has errors May 12 09:38:51 anyone have a hint? May 12 09:39:16 oh sorry didn't see the scroll May 12 09:39:31 monsti : I'm trying to build the sample project supplied with that code May 12 09:39:33 mh, should i somehow not be able to show a 2nd dialog from within an dialog? May 12 09:39:38 so it should be just that code May 12 09:39:43 but they didn't supply a full project May 12 09:39:53 it was missing AndroidManifest, etc. May 12 09:41:30 so it's supposed to work, if I can configure it properly May 12 09:42:39 the code is here https://github.com/Red-Folder/Cordova-Plugin-SMSHandler May 12 09:43:30 I see it generates a gen/com.red_folder/R.java May 12 09:43:39 but I don't see a com.red_folder.phonegap.sample.R May 12 09:44:15 that's because in your manifest your package is com.red_folder May 12 09:44:23 ah May 12 09:45:01 so it should be com.red_folder.phonegap.sample? May 12 09:45:06 mh May 12 09:45:17 or you can just import the right R May 12 09:45:31 nice. that got rid of all 3 of those errors! May 12 09:46:00 now I have one more: setContentView(R.layout.main); layout cannot be resolved or is not a field. May 12 09:46:07 probably because I didn't define a layout.xml? May 12 09:46:10 or what May 12 09:46:23 anyone here with experience using Google Accounts API? May 12 09:48:04 that did it! May 12 09:48:07 thanks Zharf May 12 09:48:09 and everyone May 12 09:52:01 cool, it's working! May 12 09:52:14 apparently :) May 12 10:16:43 How can pass bitmaps from one activity to another ?I use putExtra, getParcelableExtra but it's very slow, and app eventually dies May 12 10:17:20 Could you guys please help me, how to pass multiple bitmaps May 12 10:17:21 between a single app or between multiple apps? May 12 10:17:27 single app May 12 10:17:39 by a static variable May 12 10:18:14 if you take care of the memore e.g. don't create leaks - that is the fastest way May 12 10:18:30 i c May 12 10:18:44 I'll test now May 12 10:18:51 thanks May 12 10:20:07 Hi all, is it 'bad' if I use my 1024x768 images for lower screen resolutions and shrink it down? (ignoring any issues with stretching) May 12 10:20:27 My only concern is that some of the older android devices may not be able to handle images that big? May 12 10:21:45 apple741: that are indeed big images May 12 10:21:56 for what purpose are you using them? May 12 10:22:49 monsti: Its sort of a 'story book' type app, I may need an a mobile and tablet version in that case? May 12 10:23:07 So lots of full screen images May 12 10:24:13 d.android.com fonts still look incredible bad in Chrome for OS X; wonder if its just me May 12 10:24:35 no other website looks so bad. its only d.android.com May 12 10:24:54 some weird shit with compositing, or AA the shitty roboto webfont, dunno May 12 10:27:38 MY APP IS ALMOST DONE!!! :p May 12 10:28:15 Would 960x640 images (slightly scaled up/down) be ok for older android phones? May 12 10:30:24 capella: i found another page where the touchpad scrolling messes with the content in frames http://www.infoq.com/interviews/christensen-hystrix-rxjava May 12 10:31:47 * capella adds it to the bugzilla May 12 10:32:49 thanks :) May 12 10:33:16 sure - maybe someone will notice at some point !! May 12 10:37:43 capella: yeah, of all the websites to misbehave .. the one i spend most time on :| May 12 10:37:54 (d.android.com) May 12 10:40:31 I dunno ... I read the code source but the docs pages are way too dry May 12 10:44:25 Hello, seems that i have a problem with googleplay: I published my app, but when I click on images for preview the app of googleplay crashs! whay this happens? how can i solve this? thanks May 12 10:45:31 uragano2: only the preview images of your app ? May 12 10:47:18 image link crashes google play? no way May 12 10:49:03 uragano2: is your app malware with poisoned images? :) May 12 10:50:07 http://imgur.com/arvim May 12 10:50:45 ok i just tried to open the previews of others app and it doesn't crash, then i opened mine and it crashed -.- May 12 10:51:10 http://imgur.com/gallery/CngYe7j May 12 10:51:51 heh - whats your app? Ill risk a crash May 12 10:52:30 g00s: i loaded 3 preview and i can open just one without crash May 12 10:54:44 uragano2: thats awesome :D May 12 10:55:12 where, pray tell, did these pngs come from ? May 12 10:55:19 (what tools) May 12 10:55:46 if you say ddms (save as..) i'm going to die laughing May 12 10:56:01 snipping tool of window 7 :D May 12 10:56:47 i did them from emulator May 12 10:56:48 uragano2 - WFM .... ?? May 12 10:57:04 uragano2: use ddms as a workaround May 12 10:57:14 it has save screenshot thingy May 12 10:59:26 so I'm doing twitter authing stuff - I've got my app opening up a browser window to do authing, and then coming back to the activity. So Activity A opens activity B which opens a browser window, then returns back to B. The browser window is still in the back stack however - is there any way to get rid of the browser in the back stack? May 12 11:00:30 capella: so does is works for you? can you open all the previews? May 12 11:01:12 if by previews you mean png screenshots yes May 12 11:09:25 g00s: so use ddms is the right way to make screenshots for googleplay? May 12 11:09:42 capella: thanks for your test May 12 11:09:42 from the emu, yeah - its the easiest May 12 11:10:39 ok, i try and i hope that this time it'll not crashs May 12 11:19:30 What do you guys usually check for when doing a check to display either a mobile or tablet resolution image? May 12 11:23:17 I was thinking something like if screen width >= 1024 then use tablet images? May 12 11:24:22 i have some code from the internet to check if it's a tablet or a phone May 12 11:24:51 also you can use the DPI stuff and porivide different resolutions in the drawable forlder in res May 12 11:25:11 i just need that for icons May 12 11:25:38 any other stuff i handle by layouts and android drawables like tiles, shapes, etc. May 12 11:25:56 i don't put fat images into my application May 12 12:19:27 bam bam my app is done bam bam May 12 12:26:08 good work p3nny May 12 12:26:24 now have a beer May 12 12:33:39 I Shall... May 12 12:34:10 its so awsome I present several fragment in viewpagers to the user and in landscape if the device is big enough I show 2 next to each other May 12 12:35:14 I've alywas been annoyed by the fact that when you are in an app ordering stuff you have to switch activity or fragment to view your basket.. in my app you can just can just drag the basket infront of your current window and throw it away again May 12 12:36:58 anybody here? May 12 12:40:01 everybody is asleep May 12 12:41:14 hello May 12 12:41:45 I have a problem with my CustomDialog class. I get a nullpointer when I click on one of the buttons of the dialog. Inside the dialog I have some buttons.. May 12 12:42:11 When I click on them I get a nullpointer.. Something is wrong with my listener I think May 12 12:42:20 Can I show the code? May 12 12:42:25 sure May 12 12:43:27 ok 2 sec May 12 12:43:52 http://pastebin.com/7eTt10NJ May 12 12:43:58 CustomTypeDialog.java May 12 12:44:10 want to see the xml file as well? May 12 12:44:56 you can use findiewById in a dialog like that May 12 12:45:02 you have to call it on the view of the dialog May 12 12:46:03 see if there is like getDialog().findViewById May 12 12:48:07 will try.. to sec.. May 12 12:48:09 two May 12 12:49:04 there is nothing called getDialog(). May 12 12:49:19 I extend the dialog class as you can see so would it matter? May 12 12:50:04 i dont know May 12 12:50:16 it's been a long time since i used dialog, now i use dialog fragments May 12 12:56:55 sorry i am very sleepy had to build some stuff for the engineering desk May 12 12:57:15 goodnight! May 12 12:57:19 good night May 12 12:57:25 try switching to dialog fragment, a thousand times easier! May 12 13:00:42 maybe I should try searching on google. May 12 13:12:54 Ilhami: first you should check which variable is a NullPointer, then you can try to find out why May 12 13:13:28 Its the lines within the onclicklistener May 12 13:13:37 txtType.setText("Run"); May 12 13:13:47 routeType.setBackgroundResource(R.drawable.track_run); May 12 13:13:50 and this e.g. May 12 13:14:21 there are not multiple lines, only a single one. after the nullpointer exception your app crashes May 12 13:16:17 Yes its the line within the OnClickListener May 12 13:16:24 I call this dialog in another class May 12 13:16:52 so it's setOnClickListener or the onClick method inside the listener? May 12 13:17:01 onClick method May 12 13:17:10 the first line inside that method which causes it May 12 13:17:21 so your text view reference is a nullpointer May 12 13:17:37 I wonder why... May 12 13:18:00 Can you see my class? May 12 13:18:06 check if it null directly after calling findViewById May 12 13:18:08 Do you want to see it? May 12 13:18:26 already opened it May 12 13:18:45 link to your layout please May 12 13:19:00 ok 2 sec.. you can also see the other class where I call this dialog May 12 13:20:00 http://pastebin.com/XwzgA9qE here is the xml file May 12 13:20:38 your textview is not defined there -> it can't be found -> nullpointer May 12 13:21:10 my textview is in another xml file... May 12 13:21:28 but you set this one as your layout May 12 13:22:40 I think it would be better if you see the other class... May 12 13:22:45 2 sec May 12 13:23:22 http://pastebin.com/REhCRhW5 here... May 12 13:23:38 look at line 174 May 12 13:24:14 so? doesn't make a difference May 12 13:24:33 you can not access Views that are not included in your active layout May 12 13:24:52 so how do I solve this? May 12 13:25:31 don't reference the TextView in your dialog. what is the point of it? May 12 13:25:38 use a Callback to your Activty May 12 13:26:03 I need to setText in that EditText May 12 13:26:20 yeah do it in a Callback to the Activity May 12 13:26:50 how do you do that in Android? May 12 13:27:50 Im pretty new to Android May 12 13:27:53 http://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents May 12 13:28:09 should work the same on default Dialogs that don't use Fragments May 12 13:29:14 So I have to make an interface? May 12 13:29:25 yes May 12 13:30:35 for once, i have a straightforward question: can i store a jsonobject in a sqlite table? May 12 13:30:44 when i try i get 05-12 06:25:27.851: E/AndroidRuntime(11152): java.lang.OutOfMemoryError: [memory exhausted] May 12 13:31:10 nioncode so I make an interface like the one in the link? May 12 13:32:02 which takes parameters May 12 13:32:08 the methods inside May 12 13:32:31 why does it have to be so complicated? May 12 13:32:34 it does not matter how the Interface looks like. a simple void onOkClicked(Dialog) can be enough May 12 13:32:55 interfaces are fun once you understand them :) May 12 13:33:28 Its not hard to make one.. its just annoying that you have to make so much for so little May 12 13:33:40 yes thats like the boy <-> girl interface - they are fun, too! May 12 13:34:46 what should I call it? DialogInterface? May 12 13:34:47 LOL May 12 13:37:14 so I made a onClick method.. its enough right? May 12 13:37:41 it should have parameters. May 12 13:46:17 is android JRE 1.7 compliant? May 12 13:46:27 like.. can i switch on strings and be ok? May 12 13:51:17 Ilhami: don't ask your questions with a query, post them here May 12 13:51:32 ah ok sorry May 12 13:51:52 I will ask on Stackoverflow May 12 13:56:19 Do you think they can help me? May 12 13:59:14 Tricknology: only 1.6 is supported fully May 12 13:59:43 Tricknology: you might have some luck in compiling code with 1.7 but setting 1.6 compatibility May 12 14:00:13 meh, i might as well just use if statements, no big deal May 12 14:00:22 Ilhami: sure they can, but I doubt they will. there is so much information available online. just check out some samples using Dialogs. also think about moving to DialogFragments May 12 14:00:26 would be nice to be able to switch on a string though May 12 14:00:51 Tricknology: switches on strings might work the way I described May 12 14:01:02 nioncode can you try to find a good example for me? May 12 14:01:08 Why is dialogfragment better? May 12 14:01:13 ok, thanks :) May 12 14:02:07 Ilhami: why should I do the research for you? Android moved to Fragments, so that is the preferred way of doing it May 12 14:02:43 nioncode because that would be a help. I dont know exactly what to search for to solve this issue May 12 14:02:44 thats why May 12 14:02:54 but I have asked on Stackoverflow May 12 14:02:59 they are good at helping May 12 14:03:14 search for "android Dialog Callback" and look a bit around May 12 14:05:54 tried that already May 12 14:06:14 there are not many good examples.. but whatever May 12 14:06:30 Using dialogs are really annoying May 12 14:06:55 it's pretty easy actually May 12 14:07:00 if you know how to do it :) May 12 14:07:14 yes but not when you are a beginner to Android. May 12 14:07:27 and Java as well.. May 12 14:07:43 I'll give you a quick intro May 12 14:08:12 what do you mean? May 12 14:09:01 in your Dialog: define a public Interface that has a method like "onOkClicked(variableYouWantToPass, nextVariable, ...)". implement this Interface in your Activity May 12 14:09:56 Why onOkClicked? Why not just onClick? May 12 14:10:32 good morning guys May 12 14:10:35 then, have a member variable of the Interface type inside your Dialog and create a Constructor which takes this as a parameter and assigns it to the member var. then you can pass your Activity's 'this' when you instantiate your Dialog May 12 14:10:43 http://developer.android.com/training/basics/network-ops/connecting.html#http-client May 12 14:11:00 maybe you want also a method for onCancelClicked etc, so it is better to give it a more descriptive name than onClick May 12 14:11:20 in that second section, there is a private class to do the request on another thread May 12 14:11:21 nioncode I should just bury myself :D May 12 14:11:34 finally, in your Dialog's onClickListener just call your listener.onOkClicked(var1, var2, var3) May 12 14:11:38 and it has an onPostExecute which is the callback, I suppose? May 12 14:11:44 Ilhami: good idea :) May 12 14:11:51 but I have a question about that...does it happen on this thread or that thread? May 12 14:17:47 nioncode May 12 14:17:58 Ilhami May 12 14:18:01 LOL May 12 14:18:07 I need you to walk me through then May 12 14:18:14 I will do it May 12 14:18:38 I already gave you a step by step guide May 12 14:18:50 yes I will start by making the interface, right? May 12 14:18:59 in the Dialog class May 12 14:19:22 you can start where you want as long as you finish everything before compiling :D May 12 14:19:43 ok let me try that May 12 14:21:00 but shouldnt I make three methods for each button in the interface? What does onOkClicked really describe? May 12 14:21:15 yes you can do it for every button May 12 14:21:39 it was just an example for a simple (cancel | ok) dialog May 12 14:22:31 ok I made three methods in the interface now... May 12 14:22:39 they should all have a parameter May 12 14:22:41 right? May 12 14:23:10 if you want to pass something to the class implementing this Interface, then create appropriate Parameters May 12 14:23:45 I think a common thing is to just pass the Dialog itself as a single parameter and have getters in the Dialog class for needed variables May 12 14:24:18 however, the Dialog should not have many variables, so you can also pass them directly as parameter May 12 14:24:44 So I have put one Dialog parameter in each... May 12 14:24:47 Ok until now? May 12 14:25:21 yes May 12 14:25:36 I should implement this in my activity? May 12 14:26:14 there is an example in the AlertBuilder dialog class May 12 14:26:20 how to customize the content May 12 14:26:27 i suggest starting here May 12 14:26:50 I know how to customize and such... I dont know how to callback May 12 14:26:54 yes or create an instance of the interface inside your call to the Dialog's constructor May 12 14:27:15 Ilhami: there is an example in the AlertBiolder dialog documentation - i suggest reading that ;) May 12 14:27:49 findFooByID ... editiFoo.onClickListener( ...) May 12 14:27:55 or what ever you need May 12 14:28:00 monsti: can you provide a link please? May 12 14:28:14 the android sdk May 12 14:28:17 find AlertBuilder May 12 14:28:21 find custom content May 12 14:28:24 you mean the sources? May 12 14:28:32 i mean the documentation May 12 14:29:15 which path in the sdk exactly? May 12 14:29:31 did never search through this really May 12 14:29:32 google for the documentation May 12 14:29:45 or check the topic ;))))) May 12 14:29:54 "Official docs at http://d.android.com/ " May 12 14:30:16 if you don't provide a link, then I don't care May 12 14:30:18 should I give my Dialog constructor another parameter? May 12 14:30:26 yes May 12 14:30:38 your Interface type May 12 14:30:56 I did May 12 14:31:04 I put my DialogInterface inside it now May 12 14:31:27 so far so good May 12 14:31:31 nioncode: yes ;) May 12 14:32:29 so what now nioncode? May 12 14:33:08 Ilhami: don't know what you did so far. have you implemented the interface inside your class that calls the dialog? May 12 14:33:12 nioncode... are you there? May 12 14:33:20 no I am gone May 12 14:33:24 http://stackoverflow.com/questions/16508105/dialog-callback look at the answer May 12 14:33:25 hehehe May 12 14:33:32 isnt it much easier to use his? May 12 14:34:22 it's exactly what you are currently doing^^ May 12 14:34:45 LOOOL May 12 14:34:56 his example looks so easy May 12 14:35:02 why do you make it sound so hard? May 12 14:35:04 I told you it is^^ May 12 14:35:30 You made it sound like rocket science :D May 12 14:35:56 that was surely not my intention :) May 12 14:37:03 hehe it looks so simple :)))) May 12 14:38:59 do I have to make the interface in its own class? May 12 14:40:23 The public type DialogInterface must be defined in its own file May 12 14:45:22 no May 12 14:45:48 did you declare it as an interface? May 12 14:47:31 it has to be in its own file if it is public May 12 14:49:11 It has to be final in the constructor May 12 14:49:57 both not true May 12 14:50:39 you want to see my class now? May 12 14:50:41 2 sec May 12 14:51:29 i can see you class ;) May 12 14:55:03 how? May 12 14:57:24 Maybe I shouldnt call it DialogInterface? May 12 14:57:42 Isnt there a built in class called that? May 12 14:59:29 UUUUUUUH :D no errors now May 12 14:59:37 let me try it May 12 14:59:41 hi, I would like to change the title of my activity from my onPostExecute(), but I can't seem to find a way to do that. the closest I have is that i have to call setTitle in the main activity.. is there anyway where I can get the activity title using findViewById? May 12 15:01:04 nioncode May 12 15:01:38 hi :) i've got a samsung galaxy s3, dual sim and miui. can i simply flash another stockrom without the miui? May 12 15:02:50 i tried View v = findViewById(R.string.title_activity); but i do not see any setters for title May 12 15:04:43 Ilhami May 12 15:05:02 it works now May 12 15:05:04 although May 12 15:06:38 when I click on the run button again after I have been clicking on the others it overwrites the pictures so there are two pictures overlapping each other... May 12 15:06:47 the other pictures however are fine May 12 15:07:51 Its only when I click the first button again... the runButton May 12 15:10:16 Hi, I'm trying to find a quick & easy way to read the phone accelerometer data on a computer, possibly without doin Android dev since I've never done this and intend to stay with python on the computer only. Suggestions ? Thanks ! May 12 15:11:46 so I am getting some info from the server which is done in asynctask, i would like to update the title in onpostexecute, can that be done? May 12 15:18:00 Hello there! I get OutOfMemoryError when istantiating this ItemList class. http://pastebin.com/KjjshQSg May 12 15:18:09 What should i do to fix this? May 12 15:23:28 Anyone? May 12 15:25:33 Anyone here? May 12 15:42:28 I am trying out eclipse with the graphical design layout... I can seem to move a button when placed. Is it me the setup ( under linux ) or what ? May 12 15:42:43 cant* seem to move a button... May 12 16:05:02 Do you like have to restart the Android Emulator each time when debugging ? May 12 16:05:11 or checking progress ? May 12 16:05:27 Is there a way to send android notifications periodically say - every day, month or year ? May 12 16:11:34 Is doing new Dialog(AppConsts.currentActivity.getBaseContext()) wrong? I heard that creating a new dialog using application context is wrong and you should use an activity context, but I dont know if this method returns activity or application context May 12 16:12:01 AppConsts.currentActivity stores a refernece to the current activity via onResume() May 12 16:13:24 ok nvm, im stupid >_> i should just use AppConsts.currentActivity without the method >.< May 12 16:19:57 Hi, I'm doing a bit of NDK dev, I've got some C++ code that needs exceptions but the library won't load because of a missing __cxa_end_cleanup, I read that libgnustl-static should fix that, but it doesn't, short of disabling exceptions, how can I fix this? May 12 16:24:11 Would older android devices support images that are 960x640? May 12 16:29:19 sure why not? May 12 16:29:36 Ximon: May 12 16:29:37 APP_STL := gnustl_static May 12 16:29:38 APP_CPPFLAGS := -frtti -fexceptions May 12 16:29:53 I have those in my stuff... May 12 16:31:23 nioncode: Thanks, I just wasn't sure if this image size would be compatible with older devices. May 12 16:34:08 is there a way to play a sound from the (adb) shell. May 12 16:34:11 For instance, is there some app that can "playsound /system/media/audio/ui/camera_focus.ogg"? or maybe some /dev that I can "cat /system/media/audio/ui/camera_focus.ogg > /dev/sound"? May 12 16:34:56 apple741: where do you get the image from? what do you do with it? May 12 16:36:11 Its for a puzzle game, each level involves a different large full screen background image and other much smaller components. May 12 16:38:19 roadfish, you could probably fire up an ACTION_VIEW intent May 12 16:39:17 ok, good point. I'm thinking too much in Linux way. May 12 16:41:47 Zharf, What does APP_STL actually do? May 12 16:42:09 (at the command line level) May 12 16:42:26 I'm not using the provided build tools May 12 16:42:43 apple741: why don't you prescale the image and place it in the different res folders? you might even scale it programmatically to the needed size on startup, performance will be much better if the system does not need to scale it at runtime May 12 16:43:17 also remember, most older smaller devices have heap size set to only 16MB May 12 16:43:26 which you can easily exaust with large images May 12 16:44:24 Hi May 12 16:47:19 nioncode: Thats a really good idea, which sizes are generally good idea to include? May 12 16:47:53 which sizes do you support? May 12 16:50:40 Mavrik: Currently for anything greater than 1024 wide I use my 1024x768 images and everything else I scale my 960x640. May 12 16:51:03 Ximon, it decides which standard library implementation to use May 12 16:51:34 Zharf, How is it passed into the linker/compiler? May 12 16:54:04 apple741, are you targeting only tablets? May 12 16:54:20 Mavrik: i asked this questions yesterday ;) May 12 16:54:33 monsti, wasn't around yesterday :P May 12 16:55:35 Mavrik: I'm hoping to target as many phones and tablets as possible May 12 16:56:06 apple741, well then May 12 16:56:25 mdpi devices are usually 480x320, hdpi are on average 800x480 and xhdpi are now mostly 1280x720 May 12 16:56:25 apple741:: did you read the docs on multiple sizes? May 12 16:56:41 so using those huge resources will make your app run like an ass May 12 16:56:48 not to mention run out of memory constantly May 12 16:57:11 Which is the better solution. In a fragment, should I locate my views in onActivityCreated through (MyView)getActivity().findViewById(int) or in onCreateView through (MyView)view.findViewById(int), where view is the view I inflate in onCreateview May 12 16:57:38 fullscreen backgrounds are even more an issue because they will either be scaled wrong (dimension wise) or not be fullscreen May 12 16:57:57 lite_: the 2nd is better, because you might want to nest views later May 12 16:58:16 you might consider using easily stretchable images or draw them yourself at runtime May 12 16:58:28 scaled fullscreen images will slow down your app quite a bit May 12 16:58:39 nioncode: that's the best way from my experience May 12 16:58:50 lite_, hmm, last I checked the fragment views weren't even inflated in onCreateActivity, so your calls would be null May 12 16:58:52 no fatty big images May 12 17:00:26 I tried to do a few animations I think 2 years ago and found out that they only were sluggish because of the background being scaled automatically by the framework. I then created the bitmap once at startup and scaled it to correct dimensions for the device. afterwards, the animations were just fine May 12 17:01:01 it might be better on current devices, but you should consider older devices as well May 12 17:06:52 Mavrik, doing it in onActivityCreated works just fine May 12 17:07:43 they both work. Ive always done it in that method but just today I realized I might as well do it in onCreateView May 12 17:08:25 I'm putting an image in a webview, streched by css, with an image map, but after the image is stretched, it doesn't show the click highlight in mapped areas. The click event is fired, but the area is not highlit. May 12 17:09:01 If the image is shown in its natural size, the highlight occurs May 12 17:09:16 it works in desktop browsers May 12 17:13:03 Ximon, it's just "./obj/local/armeabi/libgnustl_static.a" in there May 12 17:13:20 Zharf, Ah, thanks May 12 17:14:28 argh May 12 17:14:41 java.lang.RuntimeException: Binary XML file line #20: You must supply a layout_height attribute. May 12 17:14:45 thanks obama May 12 17:14:59 nioncode: I see your point, I suppose in this case it might be best to use the full screen images as everything is sadly mostly setup. Do you think I will experience any problems doing this apart from performance? May 12 17:15:19 xml errors are the worst. An error in one of the thousand XML files associated with my project May 12 17:16:20 lite_, meh, a proper IDE would tell you about them onthefly :p May 12 17:17:00 Is there a superior alternative to Eclipse ? :o May 12 17:17:23 lite_: I am using IntelliJ. it's way better in my opinion May 12 17:17:33 apple741: maybe scaling issues as I said May 12 17:17:57 lite_, some of us are using IDEA, but I wouldnt call it 'clearly superior'… using an IDE will save you alot of headaches :) May 12 17:20:29 Mavrik, do I need Ultimate? May 12 17:21:15 awh. "Database Tools - SQL Editor, Schema Definition Editor, Diagrams."..do want May 12 17:22:19 lite_, no, you don't. May 12 17:22:28 especially not for "just" testing :) May 12 17:23:03 but that SQL editor does sound tasty May 12 17:26:28 nioncode: Thanks for all the advice , lesson learned for future :) May 12 17:44:04 which google oauth service is best used for identifying users, google+? (name+email) May 12 17:50:58 this is so weird. working on this app https://dl.dropboxusercontent.com/u/11917448/Screenshot_2013-05-12-19-44-56.png - An actionbar, an activity with a viewpager, and in that viewpager; 3 fragments. whenever I choose an item in the dropdown list in the top the fragment to the right of the one currently being shown changes. May 12 17:52:27 all 3 fragments extend a class Ive called DetailedFragment(Which in turn extends Fragment). Whenever onNavigationSelected is called in a fragment I call setTimespan - a method inherited from DetailedFragment May 12 17:52:52 setTimeSpan is passed the view inflated in onCreateview May 12 17:53:04 any problems so far ? May 12 18:08:07 hi. im trying to do some problem solving for a project im doing. Im looking through the android source, but i've traced my problem back to a JNI native call. does anyone know if/where the code for these calls would be? May 12 18:08:07 and if they are public at all May 12 18:17:31 samskiter: they're public May 12 18:18:00 what class is the JNI method in? May 12 18:18:22 hey. I'm trying to make this app where two devices can communicate with eachother via sockets. so my question is if a device is not connected to wifi but has 3G or 4G connection....surely that device has an IP address right??? is that IP address static? so if the phone loses 4G connection and then regains it is the IP still the same? May 12 18:19:01 KillmeSoftly: can be, does not have to be May 12 18:19:42 KillmeSoftly: typically the phone will be behind a NAT. i.e. it won't have a public IP address May 12 18:20:08 basically, it won't be able to accept incoming connections May 12 18:20:35 if you want 2 devices to communicate that are both on mobile data connection, you'll have to route the traffic through some intermediate third party May 12 18:20:45 so is there anyway i can communicate with it thru sockets? May 12 18:21:09 hmm ok May 12 18:21:10 you would have to have both devices connect to a server, and have the server relay the communications May 12 18:21:19 yes i understand what you meant thank you May 12 18:21:53 * JesusFreke killed him softly May 12 18:24:27 @JesusFreke Ndef May 12 18:24:40 @JesusFreke im looking at ndefWrite May 12 18:25:01 @JesusFreke im getting some strange behaviour in what's being written May 12 18:26:11 @JesusFreke i cant get any lower than this: http://androidxref.com/4.2.2_r1/xref/packages/apps/Nfc/nci/src/com/android/nfc/dhimpl/NativeNfcTag.java#331 May 12 18:28:08 http://androidxref.com/4.2.2_r1/xref/packages/apps/Nfc/nci/jni/NativeNfcTag.cpp May 12 18:30:19 ah cool. thanks.... May 12 18:34:17 naaah i cant follow this any lower. i think the problem is higher. this is so weird May 12 18:34:43 the first 2 bytes of the write should be the length, but they are coming out as 0x00, 0x00 May 12 18:58:24 Zharf, It isn't working ;_; May 12 19:10:36 Ximon, :( May 12 19:30:58 Zharf, Okay, I fixed it now, looks like it was still trying to link with the default libstdc++ before my specied one May 12 19:31:20 aha May 12 19:35:15 re May 12 19:54:11 hmm May 12 19:54:46 I sense much hmmmmm in you May 12 20:14:43 how does mViewPager.getChildAt(mViewPager.getCurrentItem()) return null? (It only does so on item 2 May 12 20:14:45 ) May 12 20:22:57 * Rizur[A] is now away - Reason : Auto-Away (Away from Keyboard for 60 minutes) May 12 20:27:15 Hi :) May 12 20:27:49 With adapter allow me to keep Id of the item and item itself(name) ? May 12 20:31:43 http://stackoverflow.com/questions/16511725/how-is-viewpager-getchildatviewpager-getcurrentitem-returning-null - Short and sweet. I honestly have no idea whats causing this problem May 12 20:32:03 it seems weird to me that the current item is not a valid child position of a ViewPager. May 12 20:35:51 oh fuck May 12 20:36:29 Child count of view pager changes depending on "where you are" in the view May 12 20:39:08 android keyboard response is very slow. how do I fix that problem? May 12 20:39:52 lite_, yep, it recycles views and creates them on demand May 12 20:40:00 I believe that's the point of that view ;) May 12 20:40:14 The lag of keyboard exists after a listview filled May 12 20:44:55 Mavrik. Well then, How do I get the View of a ViewPager at a given item position? May 12 20:45:07 the child view that is May 12 20:46:19 lite_, like you do in any other view which uses recyclable views: call getItem on the adapter May 12 20:48:53 yay May 12 20:48:59 mMyFragmentPagerAdapter.getItem(mViewPager.getCurrentItem().getView() May 12 20:49:06 high five Mavrik! May 12 20:49:24 I love you just a little bit this very moment. May 12 20:50:44 ;) May 12 20:53:32 based on this article : http://www.vogella.com/articles/AndroidListView/article.html#listview_overview i add Hi, i have an arraylist ArrayList>>> May 12 20:56:18 how can i get information from the arraylist inside the arraylist May 12 20:56:27 without iterating through May 12 21:05:07 dammit. Date and Time is such a pain May 12 21:09:00 any ideas? May 12 21:15:52 Smubeht, what the fuck kind of datastructure does that represent May 12 21:16:11 An Arraylist of Hashmaps of Strings and ArrayLists of Hashmaps of Strings and Strings? May 12 21:17:22 if(!datetimeFormatter.parseDateTime(data.get(0).getTimestamp().substring(0, 18)).isBefore(DateTime.now().minusDays(7))) May 12 21:17:27 might have to do some refactoring here... May 12 21:18:20 sonOfRa: I think its probably my lack of understanding how datastructures work that I ended up with that concoction May 12 21:18:52 What I did was this May 12 21:19:07 I have map = new HashMap(); May 12 21:19:11 and in there i have pieces May 12 21:19:31 map.put("item",item) May 12 21:19:51 yes, sounds reasonable May 12 21:19:56 then i have another thing which is ArrayList> May 12 21:20:05 Why do you have a List of these Maps? May 12 21:20:12 What do these maps actually represent? May 12 21:20:15 and in there i do list.add(maps) May 12 21:20:25 its something i use in my listadapter May 12 21:20:27 its for comments May 12 21:20:37 so it has time, user, comment May 12 21:21:36 and this is based on what is searched, so what i have is if the back button is pressed i wanted it to go to the previous search, so i wanted to store all the commentlists in a public arraylist May 12 21:21:43 and thats when i ended up with that last one May 12 21:22:28 and its fine in terms of adding to it, but its when i try to call the item from it i get an issue May 12 21:23:20 Well you can do something like, outerlist.get(0).get("Key for inner list").get(0).get("key from innermost hashmap") May 12 21:23:30 however, I think there's room for improvement, this is very nested May 12 21:23:52 I don't quite understand how comments need something this complex May 12 21:24:48 lets say we are at the point of the ArrayList> list; May 12 21:25:07 What is store in the hashmap? May 12 21:25:13 *stored May 12 21:25:26 the comments themselves May 12 21:25:27 What are the keys, and what are the values? May 12 21:25:34 like user, time, comment May 12 21:25:43 In Strings? May 12 21:25:45 yea May 12 21:25:49 Why? May 12 21:25:57 u better wrap the comment in a class May 12 21:25:57 how would u propose doing? May 12 21:26:06 simply the use May 12 21:26:10 simplify May 12 21:26:18 Why not create a Comment class, that has the following attributes: User (either of class user, or just a name), Date, Text May 12 21:26:29 map = new HashMap(); May 12 21:26:29 map.put(TAG_QUERY, inputSearch.getText().toString()); May 12 21:26:29 map.put(TAG_USER, t.getUser().getName()); May 12 21:26:29 map.put(TAG_TIME, t.getCreatedAt().toString()); May 12 21:26:29 map.put(TAG_COMMENT, t.getText()); May 12 21:26:29 commentsList.add(map); May 12 21:26:38 I have that May 12 21:26:58 u using Parse? May 12 21:27:20 no May 12 21:29:20 whats the simplest way of having a method return two integers? May 12 21:30:02 and int array i guess May 12 21:31:25 what are you trying to do, lite_ ? May 12 21:31:39 anyone who has made a live wallpaper before - is it absolutely necessary to use separate Engines for the preview and for the real thing? and if not, why would I want to do that? May 12 21:31:58 to me it seems like it would be preferable to maintain the rendering state between the preview and the wallpaper itself May 12 21:32:19 sonOfRa nvm. im an idiot May 12 21:32:57 j have such simple POJO hashMap class, http://pastebin.com/9zMxRd0U, the point is that robospice store there just one item (pair), how could i get all ? May 12 21:33:08 *I May 12 21:33:25 and in fact i keep the same state and renderer objects during the switch over, so i feel like in onCreateEngine i might as well return the existing engine if it is not null... but is that dumb for some reason? everything i've seen on the interwebs doesn't even touch on that as a possibility May 12 21:39:36 scaled from 1-10. How bad of a design idea is it to have a class thats basically static in having values, stringkeys and things like that ? May 12 21:55:38 so in adt: Looking at some reference to a res, R.x.y - Is tehre some way to hotkey myself to the opening the xml file by hitting like an F-key or smth (as in opening declarations with F3). i know there is ctrl-shift-R for resources but that still means typing more... May 12 22:06:47 tortal eclipse i assume? in intellij you can just jump to declaration and go to the xml file May 12 22:20:01 wtf is this shit :P May 12 22:21:03 this is so fucked I have a checkBox.. and if I remove it.. my app won't start May 12 22:21:05 it makes.. no sense May 12 22:23:14 Android.widget.linearLayout cannot be cast to android.widget.checkbox May 12 22:23:15 wtf May 12 22:24:56 clean your project May 12 22:26:29 just did this is so crazy... I have 2 linearlayouts with buttons and stuff in them.. I just literally copied the entire checkbox from one linearlayout to another.. and it won't start then giving me that error May 12 22:26:38 the checkbox is just 4 lines May 12 22:26:46 id, wrap conten x2 .. and text May 12 22:26:55 and it crashes if I try and move it May 12 22:30:56 oh man I don't get this at all May 12 22:31:15 I can't remove this checkbox without crashing the program.. I can't move it either May 12 22:34:01 make sure they dont have the same id May 12 22:35:06 like what doesnt have the same ID? May 12 22:35:16 if I just 'clip' it.. and replace it in another layout May 12 22:35:18 it crashes May 12 22:35:32 does the button have an id field? May 12 22:35:50 android:id="@+id/checkBoxDelivery" May 12 22:36:00 its the only checkbox May 12 22:36:02 in the program May 12 22:36:07 what is the name of the xml file? May 12 22:36:25 fragment_savedLists.xml May 12 22:36:32 small l May 12 22:36:34 in middle May 12 22:36:34 not big May 12 22:36:36 like I wrote May 12 22:37:06 P3nnyw1se Android.widget.linearLayout cannot be cast to android.widget.checkbox May 12 22:37:12 yes May 12 22:37:16 what part of the code does it pertain to? May 12 22:37:17 thats what it tells me when I try and move it May 12 22:38:01 hmmm May 12 22:38:04 the onClickListener May 12 22:38:13 but that makes no sense, cause I don't remove it.. I just replace it May 12 22:38:15 within the same xml file May 12 22:39:00 mm May 12 22:39:00 another question May 12 22:39:05 I don't really have to move it arounda nywa May 12 22:39:09 just annoyed me a lot May 12 22:39:10 maybe that R library isnt updated May 12 22:39:16 lol May 12 22:39:35 I can delete R right May 12 22:39:39 and it just rebuilds May 12 22:40:01 project clean should do it anyways May 12 22:40:08 hrmf May 12 22:40:47 can I dynamically change the text of a checkbox depending on if its chosen or not May 12 22:40:56 I can right? just setText something May 12 22:41:20 yes May 12 22:42:06 nice well its stupid anyway.. lol just figured the user has 2 possbilities like yes/no with a checkbox and wanted to show his choice May 12 22:42:13 but that would mean .. hehe he would think that he would have to click again May 12 22:42:19 to remove it.. sorry if that makes no sense May 12 22:42:48 there are many ways to allow a yes/no choice May 12 22:42:58 checkbox is just one May 12 22:43:40 the thing is.. I want to show the user the other possibility.. its not really yes/no May 12 22:43:48 its morelike.. 'delivery/pickup May 12 22:44:06 if I just have 'delivery' and a checkbox I don't feel like the user gets to see the 'pickup' choice May 12 22:44:20 there are all sorts of view switchers and variations May 12 22:44:44 ok May 12 22:44:53 hmmm togglebutton seems more fitting May 12 22:44:54 then a checkbox is good May 12 22:45:07 because it only allows one select if i remember correctly May 12 22:45:18 or, better use a radiobutton May 12 22:45:25 inside a radiogroup May 12 22:45:59 radiobutton allows only one selection * May 12 22:46:34 hmm yeah should use it last thing .. this might sound weird but the 2 months I've been learning android May 12 22:46:41 never really used Dialog popups May 12 22:46:51 any... like silly.. trick to it that would save me time ? :P May 12 22:47:13 I have a listview and I want the user to be able to click on an item in it.. then a dialogue popsup where he gets to input a number.. and its added to the object in the listview May 12 22:47:39 Pennywise: http://www.mokasocial.com/2011/07/sexily-styled-toggle-buttons-for-android/ May 12 22:47:42 hi, i have a weird problem. May 12 22:47:47 I have 3 phones May 12 22:48:00 1 phone i upload app from sdk and ti runs fine May 12 22:48:06 don't use dialog, use dialog fragment if you can May 12 22:48:14 the other phones have no cable so I install app via email May 12 22:48:31 the apps works fine until I start a thread anad then it crashes May 12 22:48:37 can i use ArrayAdapter instead ? http://shenhengbin.wordpress.com/2012/03/17/listview-simpleadapter/ May 12 22:48:44 i can't debug because i don't have cable yet May 12 22:48:54 any idea what is happening? May 12 22:48:57 why don't you just plug that phone in... May 12 22:49:22 jug6ernaut: i don't have cable for it yet May 12 22:49:26 * P3nnyw1se slaps lasserix around a bit with a large trout May 12 22:49:29 convivial without some kind of debug info no1 is going to be able to help you May 12 22:49:33 difference ? May 12 22:49:34 convivial different type of cable i guess? May 12 22:49:42 jug6ernaut: i guess May 12 22:49:44 hetii: sure you can use an array adapter May 12 22:49:53 you guess lol? May 12 22:50:02 the cyanogen works with the cable though but it does not appear in ddms May 12 22:50:10 hetii: sure you can use an array adapter, but then you are limited with customing the row appearance May 12 22:50:41 and the cyanogemmod phone has no developer option in settings menu May 12 22:51:05 convivial do they have the same plug? May 12 22:51:15 * lasserix dumps a barrel of lemons on P3nnyw1se May 12 22:51:22 lasserix: but if i want to have the same items like in this simple adapter? What is the difference between them ? May 12 22:51:22 lemons! May 12 22:51:43 yes they have same oplug May 12 22:51:56 hetii: arrayadapter is just taking whatever array data you have and using a standard template to plug it into to predefined xml layout for the rows May 12 22:51:59 then they will use the same cable May 12 22:52:01 fix adb on them May 12 22:52:20 it does not show up to use adb May 12 22:52:34 lasserix how easy is it to implement a dialogue fragment on a listviewAdapter ? just seems a bit complex I need to create new classes for it May 12 22:52:35 probably don't have the right driver installed or smt May 12 22:52:36 hetii: usually you can have like a Title subTitle but that's it, if you want to customize the look ie add an image, move stuff around within each row, you have to use some sort of custom adapter May 12 22:52:44 it shows up on computer but but in android ddms May 12 22:53:11 does it show up in adb May 12 22:53:22 "on computer" could mean a million things May 12 22:53:46 p3nnywise: depending on how custom you want it to be, but it's fairly straight forward if you look on the android dev site, idea is just to make it in the activity then use it's show/hide-done method on the onitemclick of your listview, each time you click it you can use setArgs to reference which item was clicked May 12 22:53:57 hetii: tho that tutorials seems overly complicated with the hashmap May 12 22:54:26 hetii: here use this one: http://www.ezzylearning.com/tutorial.aspx?tid=1763429 May 12 22:54:57 lasserix its in a fragment :P not an activity May 12 22:55:03 it does not show up in adb May 12 22:55:19 p3nnywise: same difference May 12 22:55:28 the phone is missing developer option from settings menu too May 12 22:55:43 convivial you have to press something like 6 times in the settings May 12 22:55:44 it is an Cyanogenmod May 12 22:56:17 the other phone does not show up on computer or ddmd, adb May 12 22:56:28 samsung tech said i need a special cable May 12 22:56:32 Settings > About > tap build number over and over May 12 22:56:40 then it will tell you developer settings are enabled May 12 22:56:41 http://developer.android.com/reference/android/app/DialogFragment.html May 12 22:56:42 it's a 4.2 thing May 12 22:56:49 whats up with all those cases in the switch statement lasserix ? May 12 22:57:18 ok that worked May 12 22:58:20 p3nnywise: ignore that, that's just if you want to dynamically set the style of the dialog fragment to something other than what you've set in manifest May 12 23:00:51 okay sorry I don't know a lot about this is there a reason why I don't just use the popup window that I see on google May 12 23:01:18 dab says the device is offline May 12 23:01:34 adb says the device is offline May 12 23:01:51 popup windows are lame May 12 23:02:03 hehe okay ? May 12 23:02:06 do what you will though! May 12 23:02:18 lasserix: i`m stock :( looks like SimpleAdapter have no methods like setNotifyOnChange, addAll, clear May 12 23:02:22 imho setting up a dialog fragment is a thousand times less of a headache than popup windows May 12 23:02:51 The point is that i will get some json data that will go to some POJO class and then based on this data i want to update listview May 12 23:03:33 hetii: once you have you're data the implementation of the listview is independent May 12 23:03:49 did that tutorial not work? arrayadapter extends baseadapter which has notifydatasetchanged, etc May 12 23:06:42 with arrayadapter i was able to display my list with the items, but now i try to have for eg picture in the left side. May 12 23:07:41 Also important for me is to be able to get item attributes, so if i pass there value like username and someone select some user then i need to get user id for next step May 12 23:08:41 you probably just want to extend baseadapter May 12 23:13:57 I will try use your link http://www.ezzylearning.com/tutorial.aspx?tid=1763429 and use Weather.java as POJO class that will be filled with data from json by robospice May 12 23:14:30 ok, it seems to crash when I create thread it is displaying StrictMode.$androidblockguardpolicy.OnNetwork May 12 23:14:39 by this way i should be able grab those list from my server and display it as a list May 12 23:18:43 can I make a linearLayout 'see through' ? May 12 23:19:11 yes ofc I can.. dont be silly.. I just don't set a background ? :P May 12 23:19:50 hetii: should work! May 12 23:21:24 lol May 12 23:21:30 fucking rude program May 12 23:21:31 hahah May 12 23:21:57 it gave me a warning on a string .. then when I clicked it .. it told me that 'Ok' should be capitalized 'OK' May 12 23:22:03 what is this spell check now ? May 12 23:23:48 !paste May 12 23:24:53 Anyone know why the menu button on my app doesn't show up on devices with softkeys? I've seen some apps show it next to the app switch button as 3 dots May 12 23:25:07 My menu is created on onCreateOptionsMenu May 12 23:26:10 The menu works fine on devices with hardware menu buttons (obviously), but on a Nexus 4 there is no soft menu button, so I can't bring up the menu May 12 23:26:18 alexramallo is this in an activity? May 12 23:26:28 Yes May 12 23:26:55 because you set the target api high enough for it to disappear. May 12 23:27:15 menu button /wasis being phased out in favor of action bar May 12 23:27:31 So the 3 dots are just there as a compatibility thing? May 12 23:27:59 aye believe so May 12 23:28:27 hello May 12 23:28:58 does android access to /dev/videoX for controlling the camera? May 12 23:29:10 question.. can I make a visible border on a linearlayout ? May 12 23:29:29 wise: use a shape drawable May 12 23:29:35 or a ninepatch png May 12 23:29:58 though i guess technically if you wanted to you could put a ll behind it of the border color, then make it so it only shows the edges May 12 23:30:01 but that is hackish May 12 23:30:28 yeah sounds bad May 12 23:30:39 penny: http://zaman91.wordpress.com/2010/12/30/android-how-to-create-rounded-border-or-background/ May 12 23:31:04 can anyone answer my question here or is it the wrong channel? May 12 23:31:14 l_r you might try android-root May 12 23:31:19 ok thx May 12 23:32:36 ahh that looks easy May 12 23:34:54 arhh man its getting late and got this messed up May 12 23:44:53 lasserix: hmm i got nullPointerException when i try mAdapter.clear(); or just mAdapter.add(result); May 12 23:50:43 bad NPE bad May 12 23:52:09 hetii, clearly your mAdapter is null May 12 23:53:01 i try even by : mAdapter.add(new Weather(R.drawable.email, "Cloudy")); but the same issue May 12 23:53:13 NPEs are really easy to debug, why don't people learn to use their debuggers or read the stacktrace -.- May 12 23:54:00 here is my error http://pastebin.com/9RLLv0Vh May 12 23:54:05 there's soo many questions about NPEs on stackoverflow every day May 12 23:54:06 it's just sad May 12 23:54:09 it occurs on only some p;hones May 12 23:54:14 i am lost May 12 23:54:37 convivial, after API 14 you're not allowed to do networking on ui thread May 12 23:55:02 it is inside a runnable May 12 23:55:06 it is not UI thread May 12 23:55:23 convivial, runnable is just that, a runnable... it can be run on ui thread just as easily May 12 23:55:46 Zharf: so what you see in this traceback what i miss ? http://pastebin.com/UaEy4MQt May 12 23:56:14 zharf: handler = new Handler(); handler.postDelayed(runnable, 5000); May 12 23:56:16 hetii, you see more because you have the code May 12 23:56:25 the handler creates a thread correct May 12 23:56:36 convivial, still UI thread, handler runs the code IN the thread it was CREATED in May 12 23:57:01 oil thanks May 12 23:57:18 ok thanks May 12 23:57:24 convivial, however you can't create handlers for traditional threads, unfortunately May 12 23:57:40 oh :( May 12 23:58:22 convivial, I like to use http://developer.android.com/reference/java/util/concurrent/ExecutorService.html May 12 23:58:37 convivial, some people would recommend AsyncTask, but I never liked to use it May 12 23:58:50 I've got a game written in C++ that manages its own Video Buffer (i.e RGB bitmap in memory), what's the best/fastet way of getting that buffer onto the screen? May 12 23:58:51 ok May 12 23:59:06 Zharf, any reason? May 12 23:59:30 90% of the threaded stuff is perfect for AsyncTask on android :) May 12 23:59:35 Mavrik, it's clunky, has problems when context is destroyed May 12 23:59:42 Ximon: there is a surfaceview and you can dump the buffer into a canvas May 13 00:00:02 Ximon, either surface view or (as I heard, faster option) OpenGL texture May 13 00:00:06 Mavrik, also 90% of the threading I do is in a library that's not android specific ;) May 13 00:00:17 lasserix, And that's good to do at 30-60 FPS? May 13 00:01:19 Zharf: why does that code redefined Handler class? May 13 00:01:31 convivial, ? May 13 00:02:02 ximon: short of using opengl, surfaceview is what is used i believe May 13 00:02:04 convivial, that's pure java code, it's not android, the handler you used it android handler May 13 00:02:22 ximon: surfaceview has a dedicated thread for drawing May 13 00:02:25 convivial, it's just an example name, nothing special May 13 00:02:31 ok May 13 00:02:43 lasserix, Thanks May 13 00:02:49 ok any clue what wrong wit my adapter? Why when i try add item i got NPEs ? May 13 00:03:05 hetii code? May 13 00:04:59 lasserix: sure http://pastebin.com/nyVZJ8pS May 13 00:06:11 are those line numbers correct May 13 00:07:21 hetii whats npe? May 13 00:07:37 nullpointerexception... May 13 00:08:38 hetii, like I said, mAdapter is null May 13 00:08:39 and here is Adapter http://pastebin.com/D3ybckWr May 13 00:08:55 you don't actually assign to it anywhere May 13 00:09:19 aaaa i see now May 13 00:17:32 guys I just realised I have a FragmentActivity as my Main Activity May 13 00:17:46 and in a datahandler I have set 'set and get' Activity on that class May 13 00:17:50 not set and get FragmentActivity May 13 00:17:59 it hasn't caused me any troubles.. but is that a problem ? May 13 00:18:00 howdy May 13 00:18:11 anyone familiar with ice cream sandwich? May 13 00:18:23 Still NPE: http://pastebin.com/vXydhSBS May 13 00:18:54 shawn187, lots of fats, don't eat alot. May 13 00:20:25 huh May 13 00:20:40 that has nothing to do with android May 13 00:21:30 well your question wasn't really assisting at getting a helpful answer now, was it? May 13 00:21:46 P3nnyw1se, FragmentActivity inherits from Activity May 13 00:22:04 i was getting to the question May 13 00:22:29 I was merely looking for achnowledgement, if this were the right channel to ask about android 4.0 May 13 00:22:42 shawn187, only if you're developing for it. May 13 00:23:23 I don't know a thing about developement o.o May 13 00:25:01 you're in the wrong place then. May 13 00:25:33 is there a utility that adds a menu button to the action bar for android ICS? May 13 00:26:56 * P3nnyw1se slaps Mavrik around a bit with a large trout May 13 00:27:00 Mavrik the thing is May 13 00:27:25 I have a FragmentActivity and in another class it sets that FragmentActivity as an Activity May 13 00:27:31 maybe I'm just tired.. probably thats it May 13 00:27:35 but isn't that.. like the other way around May 13 00:27:39 that shouldn't be possible ? May 13 00:27:56 no, you should read up on Java's type system May 13 00:28:26 that's polymorphism, a fundamental structure in Java's type system May 13 00:28:30 P3nnyw1se, it's perfectly fine :) May 13 00:28:49 http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming May 13 00:28:57 P3nnyw1se, because FragmentActivity is a child of Activity it also (should) has all proper methods and behaviours :) May 13 00:29:25 yes but Activity shouldn't have everything that FragmentActivity has right ? May 13 00:30:16 I know about Polymorphism Jake.. but obviously I missed this part May 13 00:30:25 P3nnyw1se, yep… but you said it youself: "sets FragmentActivity AS an Activity" May 13 00:30:33 so it expects "just" an activity :) May 13 00:30:42 hmmmm May 13 00:30:46 strategy pattern May 13 00:31:26 alright so I guess the meltdown I had in my head.. was cause.. if a FragmentActivity can do stuff that an Activity not nessesarily can.. May 13 00:31:37 it didn't make sense to me I could set a FragmentActivity as an activity May 13 00:31:57 well aware I could do it the other way around May 13 00:32:06 always set an activity as a fragmentActivity May 13 00:32:36 that's not correct May 13 00:32:56 class FooActivity extends Activity { void foo() {} } May 13 00:33:06 FragmentActivity foo = new FooActivity(); May 13 00:33:11 fails at compile time May 13 00:33:24 and if you set it first to Activity and then cast to FragmentActivity it'll fail at runtime May 13 00:33:40 okay obviously I have something missed up in my head then May 13 00:33:45 isn't FragmentActivity the child ? May 13 00:33:49 missed = messed May 13 00:34:09 fragment activity is a truck. activity is a vehicle May 13 00:34:15 all trucks are vehicles. all vehicles are not trucks May 13 00:34:44 fragment activity is a more specific version of activity May 13 00:35:18 yes but then it May 13 00:35:21 ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhh May 13 00:35:51 had them flipped in my head May 13 00:37:11 now that I have some of you online.. sorry not a lot of experience with dialogFragment.. I've made one though which popsup nicely its based on an xml with just a linearLayout and a text May 13 00:37:24 is there anyway to make the background invisible or transparet.. cause its just grey now.. and honestly dont like it May 13 00:38:14 it has no background in the xml file May 13 00:38:18 I would like it to stay that way May 13 00:38:38 set window background to null? May 13 00:39:11 android:background="@android:color/transparent" May 13 00:39:22 I don't get it, why would AudioTrack start spamming about it being "disabled, restarting" when I pause() it -.- May 13 00:40:25 rawrtwo ? May 13 00:40:40 that just.. asks me to place a variable in color May 13 00:40:43 called transparent May 13 00:41:25 P3nnyw1se it should make the background completely transparent (of the view you put that property in) May 13 00:41:43 @color/transparent should make it transparent ? May 13 00:42:01 sounds weird.. thought @color/xxx was just a reference to an input 'I' made May 13 00:42:07 P3nnyw1se, extend the dialog theme, set android:windowBackground="@nullĆ in it, set that theme to the dialog. May 13 00:42:14 yeah when setting a bg to a color, you also specify the alpha level May 13 00:42:53 ^ mavrik's solution sounds even better May 13 00:43:00 oh I think I got it, maybe May 13 00:43:22 yeah, since the dialog backgrounds come from windowBackground property, not background property :) May 13 00:58:11 penny if you are using popup menu there is a bug with background transparency, you have to use an empty bitmap drawable i believe May 13 00:58:34 I'm not I'm using DialogFragment now cause you punked me for it May 13 00:58:49 but how do I impose the customStyle I just made.. on the xml ? .. sorry I really have never tried these things May 13 00:58:51 style="@style/myDialogStyle" May 13 00:58:55 gives no errors.. but doesn't work May 13 00:59:01 well at least has no effect May 13 00:59:29 I hate UI decisions... I need to put a volume slider in my app but I don't want to -.-' May 13 00:59:40 also no clue where... May 13 00:59:54 setStyle(style, theme); May 13 01:00:03 http://developer.android.com/reference/android/app/DialogFragment.html that's the switch thing from earlier May 13 01:00:32 okay and I can't just force the style on the xml programatically ? May 13 01:00:52 dunno cant remember May 13 01:01:26 considering that I want this permanently May 13 01:01:33 would just seem 'nicer' May 13 01:04:53 lasserix May 13 01:05:04 setStyle(R.id.myCustomStyle, "theme"); May 13 01:05:05 the theme ? May 13 01:05:19 parent theme May 13 01:05:20 I guess May 13 01:05:22 whatever theme you're probably using in manifest May 13 01:05:22 yeah May 13 01:07:00 holy Shiit :P May 13 01:07:11 now my dialog goes fullscreen hehe May 13 01:08:13 and the @null background mavrik suggested May 13 01:08:17 makes the background white May 13 01:08:21 not transparent May 13 01:08:33 neat, which android? :) May 13 01:09:19 4.2.1 May 13 01:10:32 this is all I did May 13 01:10:33