**** BEGIN LOGGING AT Tue Apr 08 02:59:58 2014 Apr 08 03:03:14 Calling gc() is pointless Apr 08 03:16:53 probably ;) Apr 08 03:17:12 even if you call gc() it's not said that gc will be called, it will be scheduled Apr 08 03:27:39 it won't prevent memory leaks Apr 08 03:27:52 so ultimately, it is pointless Apr 08 04:12:44 uh oh, linux fans http://arstechnica.com/security/2014/03/critical-crypto-bug-leaves-linux-hundreds-of-apps-open-to-eavesdropping/ Apr 08 04:13:15 and this openssl bug from today also http://heartbleed.com/ Apr 08 04:14:04 hm, i wonder which openssl my n7 has Apr 08 04:14:19 I am safe :-D Apr 08 04:14:27 I use HTC Wildfire Apr 08 04:14:57 is that 0.9.8 :) Apr 08 04:17:31 no idea Apr 08 04:17:40 but its been a while Apr 08 04:17:59 I am using un-official enthusiasts created ROM Apr 08 04:18:15 so, I am safe because I am using archaic version Apr 08 04:25:35 "The bug is the result of commands in a section of the GnuTLS code that verify the authenticity of TLS certificates," Apr 08 04:25:55 https://crypto.stanford.edu/~dabo/pubs/abstracts/ssl-client-bugs.html Apr 08 04:26:19 mwaaa, since 2005 ! Apr 08 04:27:01 where are all of those eyes that make bugs shallow ? Apr 08 04:27:10 maybe nobody is looking at GnuTLS Apr 08 04:27:50 heh, ""It looks pretty terrible."" Apr 08 04:29:08 this new intel minnowboard runs linux http://techcrunch.com/2014/04/03/intel-releases-99-minnowboard-max-an-open-source-single-board-computer Apr 08 04:30:18 and android Apr 08 04:35:55 Hello, I'm trying to create my first app and the program on the emulator keeps crashing when I start it. Apr 08 04:36:27 not really sure how to ask what's wrong with it on here though. Should I post the code in a pastebin? Apr 08 04:37:51 Kevin-_-: what does your log say? Apr 08 04:39:32 why I am getting this error http://pastie.org/9002502 ? Apr 08 04:40:36 http://codepad.org/NdcDm3W3 Apr 08 04:40:49 kamol using AS / gradle ? Apr 08 04:41:02 :g00s correct Apr 08 04:41:12 Leeds: sorry if that's all of it (minus the 11 more) but not sure if that's what you're looking for Apr 08 04:41:26 Kevin-_-: and what does that tell you? Apr 08 04:41:26 Kevin-_-: i helped out another guy earlier today with a nullpointerexception Apr 08 04:41:30 :) Apr 08 04:41:37 kamol see http://tools.android.com/tech-docs/new-build-system/user-guide Apr 08 04:41:42 care to help again Mango_Man :) Apr 08 04:41:48 the last part "Using sourceCompatibility 1.7" Apr 08 04:41:57 Kevin-_-: read your stack trace carefully Apr 08 04:42:36 it's saying that this line is the issue: select.setOnClickListener(new View.OnClickListener() { Apr 08 04:42:42 :g00s ic, let me try Apr 08 04:42:57 Kevin-_-: and what is "select"? Apr 08 04:42:59 Kevin-_-: so what do you think is null in that line? Apr 08 04:43:49 Leeds select is just the Button name Apr 08 04:44:04 on an unrelated note, anyone check out https://www.coursera.org/course/posa ? seems mostly like stuff you could learn in practice Apr 08 04:44:11 you mean it's a Button object? Apr 08 04:44:19 yes Apr 08 04:44:33 and how is it defined? Apr 08 04:44:52 meh, let's jump forward - do you do findViewById() before setContentView()? Apr 08 04:45:04 :g00s thank you :) Apr 08 04:45:11 yw Apr 08 04:45:55 Leeds: lol tired of holding my hand through my first time :) Apr 08 04:46:13 yeah, little bit :) Apr 08 04:46:13 and no Apr 08 04:46:14 Button select = (Button) findViewById(R.id.btnSubmit); Apr 08 04:46:23 setContentView is at the very top Apr 08 04:46:38 either way, it's likely that select is null... test for it, then work out why Apr 08 04:46:44 Mango_Man hmm …looks cool. incomplete syllabus though Apr 08 04:46:54 I guess that's what Mango_Man was pointing at also Apr 08 04:47:03 I commented out everything but the Button line and it's still giving it Apr 08 04:47:11 g00s: the java concurrency review seems useful Apr 08 04:47:18 sure Apr 08 04:47:33 pastebin your code and your layout, if you fancy Apr 08 04:48:25 what if he doesn't fancy ? Apr 08 04:48:39 then he need not paste Apr 08 04:48:58 also, use hastebin Apr 08 04:48:58 I do not demand, I merely invite :) Apr 08 04:49:10 Leeds: will do shortly testing for null Apr 08 04:49:12 hastebin.com Apr 08 04:49:19 http://www.hastebin.com/ Apr 08 04:49:38 Mango_Man: yes, thanks for repeating that three times... is it so much faster than pastebin or any of the thousand others? Apr 08 04:49:58 haha, the third one is clickable though Apr 08 04:50:14 i use it because it looks nice Apr 08 04:50:36 hastebin, haven't used that before Apr 08 04:51:08 with a name like that, one would hope it would be speedy... Apr 08 04:51:19 Leeds: http://www.hastebin.com/mupetifime.java Apr 08 04:51:36 what's the layout just the xml file? Apr 08 04:51:39 text version Apr 08 04:51:47 yup Apr 08 04:52:10 in that case: http://www.hastebin.com/litodidufe.xml Apr 08 04:52:33 sorry if it sucks, go easy on me still first time :) Apr 08 04:53:09 Kevin-_-: your problem is that btnSubmit is defined twice Apr 08 04:53:26 Mango_Man: good catch Apr 08 04:54:04 ummmm, where do you see that? Apr 08 04:54:58 Kevin-_-: @+id/foo defines the id value foo... @id/foo refers to it Apr 08 04:55:52 so each of the android:layout_alignLeft="@+id/TextView01" 's should just be @id/...? Apr 08 04:55:55 yup Apr 08 04:56:03 presumably you wrote this layout by hand? Apr 08 04:56:26 nope, eclipse did it for me Apr 08 04:57:18 that's odd then Apr 08 04:57:37 yeah Apr 08 04:58:07 Does proguard rename inner classes (Foo$Bar) to still appear like inner classe (a$a) or just another random letter in the list? Apr 08 05:00:47 still throwing an error Apr 08 05:01:06 did you clean? Apr 08 05:01:09 http://www.hastebin.com/mavefuhabi.xml Apr 08 05:01:19 I fixed everyone but the id's Apr 08 05:02:11 and commented everything out that wasn't there initially, then outputted some text to the txtResult field Apr 08 05:02:20 yeah, but... did you clean? Apr 08 05:02:27 clean? Apr 08 05:02:44 oh nm Apr 08 05:02:47 found the clean part Apr 08 05:04:23 how can i print some debug string in Android.mk ?. @echo "blablabla" did not work ? Apr 08 05:05:08 well this is still frustrating Apr 08 05:06:30 JakeWharton: http://stackoverflow.com/questions/1165658/exposing-inner-classes-when-obfuscating-with-proguard Apr 08 05:07:35 that's close to what i want Apr 08 05:09:08 Leeds: did you find anything else wrong with that file? Apr 08 05:09:22 nothing obvious, no Apr 08 05:10:11 yeah still having issues with it Apr 08 05:31:09 ... All I'm doing is making the button Apr 08 05:31:12 object Apr 08 05:35:40 bankai_au have you tried intellij full screen with 2 projects opened simultaneously ? one of the windows isn't showing, i can't get control of it Apr 08 05:35:47 on mac Apr 08 05:36:27 fuu, ANR Apr 08 05:42:11 well, that blows. doesn't seem to be an easy way to switch between projects *quickly* unless you have multiple windows up. Apr 08 05:47:34 is there an easy way to alert on the change of a website? Apr 08 06:03:11 hey Leeds, stackoverflow is recommending Move the code that needs to access the fragment views to that fragment's onCreateView(). Apr 08 06:03:29 would that be done in this part? public static class PlaceholderFragment extends Fragment { Apr 08 06:04:55 morning Apr 08 06:05:16 hi, how can i make access for service mode on android 4.3 versions.. the code doesn't work no more.. Apr 08 06:07:34 :JakeWharton I trying U2020 to make it run on Fragment like Dagger’s sample (android-activity-graphs). However, I am confuced where to put GalleryView into ActivityModule? Apr 08 06:08:10 yes Apr 08 06:08:55 JakeWharton: but I am getting error http://pastie.org/9002606 Apr 08 06:09:24 does your activity module have addsTo=U2020Module.class or whatever it's called? Apr 08 06:10:35 it has addsTo = AndroidModule.class, Apr 08 06:11:08 http://pastie.org/9002607 Apr 08 06:11:47 JakeWharton if AS/Prefs/Gradle is set to "in-process build" its obviously not using the daemon right? Apr 08 06:12:11 yes and no Apr 08 06:12:23 the daemon is just a warmed up JVM Apr 08 06:12:37 AS is running on the JVM... Apr 08 06:14:30 OK. i'm trying to do tasks from the command line *and* AS, I'd like them both to use the same daemon. when i go something from command line, i see a daemon start; when I do something from AS i see another daemon start - is there a way to get them to use the same one ? Apr 08 06:14:53 i dont have enought memory to run 2 500 mb processes Apr 08 06:15:14 i know i need more memory :) Apr 08 06:19:55 not sure how to make that work. you should be able to start the daemon yourself and then any future invocations will join to it Apr 08 06:25:43 Can I require exported service to have multiple permissions? Apr 08 06:47:29 Can I require exported service to have multiple permissions? Apr 08 06:48:18 hey guys! I've been playing with android studio for a couple of days now and i finally started to get the hang of it but there's one problem Apr 08 06:48:39 when i try to emulate my code. I mean when i try to emulate a machine i get this error "NAND: could not write file /tmp/android-marko/emulator-ZVuHkl, No space left on device". I'm running ubuntu 13.10 64bit Apr 08 06:48:43 and java 8 Apr 08 06:48:53 java 1.8.0* Apr 08 06:48:59 if you could please help me out :) Apr 08 06:49:20 sometimes i get this error -> NAND: could not write file /tmp/android-marko/emulator-VDvTQe, File exists this error Apr 08 06:51:36 kamol: and does AndroidModule provide a Picasso instance? Apr 08 06:52:11 :JakeWharton no Apr 08 06:53:27 :JakeWharton you want to say, someone module should provide picasso, so GalleryView is able to inject picaso? Apr 08 06:53:37 yes Apr 08 06:53:43 that's what that error means Apr 08 06:53:54 marko-_- don't really know; make sure you created the AVD with enough space, and don't use java 8 unless you know what you're doing Apr 08 06:54:23 using JDK 8 is fine. all the tools specify a sourceVersion and targetVersion of 1.6 Apr 08 06:54:42 :JakeWharton that’s thing I couldn’t find in u2020… Apr 08 06:55:12 https://github.com/JakeWharton/u2020/blob/master/src/main/java/com/jakewharton/u2020/data/DataModule.java#L36-45 Apr 08 06:55:35 U2020Module includes DataModule.class Apr 08 07:01:29 Hi Apr 08 07:01:46 Hello can you please answer of my question here http://stackoverflow.com/questions/22928920/system-call-onpause-and-onstop Apr 08 07:04:09 g00s, apparently it's a problem with 32bit libraries under linux or something Apr 08 07:04:22 but i will rather use java 7 yes Apr 08 07:04:24 ah, maybe need ia32 Apr 08 07:04:46 yes but that package doesn't exist anymore and i've installed a bunch of other 32 bit libraries and read some forums etc etc nothing works. Will play around more Apr 08 07:09:06 :JakeWharton sorry, it was there. I will try to include DataModule in my application module Apr 08 07:25:19 Hi all! Apr 08 07:27:09 I have a datasource class for accessing my sqlite database tables. When the app starts I open() which does this: dbHelper.getWritableDatabase(). But when the app is in the background for a long time, my datasource is null. When does is get to null? To avoid this nullpointexption, it is oké to open the datasource again? Apr 08 07:29:09 it shouldn't go null unless you did it. or, you initialized it in the app's entry point (main activity) but the process was killed while in another activity (B), then you went back to your app (activity B) and got NPE because its only initialized from A. Apr 08 07:29:39 just make it a singleton ;) Apr 08 07:31:10 g00s, i followed a bunch of tutorials, installed a bunch of 32 libraries and even added a repository back which has the ia32 package and i installed it. I still get the: "NAND: could not write file /tmp/android-marko/emulator-DBVPes, No space left on device" error when trying to launch Apr 08 07:31:32 there's enough space, over 80gb Apr 08 07:31:36 no idea. try genymotion Apr 08 07:32:12 okay Apr 08 07:37:48 http://stackoverflow.com/questions/84556/whats-your-favorite-programmer-cartoon Apr 08 07:38:26 #android-dev Apr 08 07:39:14 Has any one made an alarm app ? Apr 08 07:39:23 I'm looking in the AlarmManager Apr 08 07:39:47 I don't get it, I thought it would store the events in a table like in the calendar calendar Apr 08 07:40:11 Siamaster why not look at aosp Clock? that has alarms, right ? Apr 08 07:40:22 aosp? Apr 08 07:42:05 I mean, it should be stored somewhere else besides the RAM right? It should still remember the alarm on device restart Apr 08 07:44:21 cool talk -> http://parleys.com/play/52988518e4b0e619540cc372 Apr 08 07:44:45 g00s: so I need to make the datasource class singleton? Apr 08 07:45:08 Siamaster, http://stackoverflow.com/questions/12512717/android-alarmmanager-after-reboot Apr 08 07:58:44 thnx Apr 08 08:06:57 g00s, i fixed it. The emulator runs now but i get a blank screen Apr 08 08:06:59 and this message Apr 08 08:07:05 Target device: AVD_for_Nexus_10_by_Google [emulator-5554] Apr 08 08:07:06 Uploading file Apr 08 08:07:06 local path: /home/marko/AndroidStudioProjects/MyApplication/app/build/apk/app-debug-unaligned.apk Apr 08 08:07:06 remote path: /data/local/tmp/com.example.myapplication.app Apr 08 08:07:06 Installing com.example.myapplication.app Apr 08 08:07:06 DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.myapplication.app" Apr 08 08:07:08 Error: Could not access the Package Manager. Is the system running? Apr 08 08:10:03 guys I have to implement animation on my character. And I'm concern between fla file with animation or use it tool for it http://www.brashmonkey.com/spriter.htm Apr 08 08:10:40 did you had experienc with it? Apr 08 08:12:57 okay Apr 08 08:13:02 choosing nexus 4 as a emulator runs Apr 08 08:13:10 i see the android logo booting up but i get the same error message Apr 08 08:13:12 but i'll wait Apr 08 08:13:17 is this normal that i takes so long? Apr 08 08:13:43 is it possible to wait for one of two buttons to be pressed before continuing in a loop? Apr 08 08:13:49 if tis emulator, then it has to take take long time Apr 08 08:18:40 IT'S Apr 08 08:18:40 ALIVE Apr 08 08:18:42 FINALLY OH MY GOD Apr 08 08:20:02 is it beautiful marko-_- :-P Apr 08 08:20:11 it's crippled but still Apr 08 08:24:28 use x86/GPU acceleration/HAXM for it to run fast Apr 08 08:26:22 Mavrik: I always recommend using phone Apr 08 08:26:48 that can be annoying Apr 08 08:26:56 and alot of people can't afford 15 phones :) Apr 08 08:27:18 even here where we have bout 20 phones/tablets to test I prefer emulators for layouting work, much quicker Apr 08 08:33:29 Is it possible to release an app that uses admob as open source? I don't totally understand the licensing. Apr 08 08:34:06 I need to import this lib in my project: http://www.slf4j.org/android/ should I use the binary or the source jar? Apr 08 08:37:58 If I have minSdkVersion=13 and targetSdkVersion=19 do I need to have all the versions between installed as well? Apr 08 08:38:21 In the Android SDK Manager? Apr 08 08:46:02 hello all, i have a circular progressbar. I need to draw stripes when the progress is say at 10. How can i do that? Please help Apr 08 08:56:37 Gentelmen, can any1 assist a newbie in nullpointexception at http://pastebin.com/07dXHWus Apr 08 08:58:36 droidNub, what exactly? Apr 08 08:58:44 you have nullpointer going from Table.java:22 Apr 08 08:58:49 fix whatever is null there Apr 08 08:59:51 ye, but at table.java:22 there just a default constructor with params as (Context context) Apr 08 09:00:08 does that mean that context is null? Apr 08 09:00:08 somebody used mobac before? (mobile atlas creator) Apr 08 09:01:09 droidNub, seems so. Apr 08 09:06:41 Hey am I missing something obvious? Docs for IntentService says "and will not block application's main loop" but when I call IntentService that does bunch of downloading from network via DefaultHttpClient(called in class extending AsyncTask) the program doesn't seem to respond to user input until job is done. Apr 08 09:13:31 Mavrik, i have edited the creation of object, which eliminated most of the nullpointexception errors, but not all of them, currently this: http://pastebin.com/y4wJwUbU Apr 08 09:14:02 go over the stack trace Apr 08 09:14:07 find where form your code it comes from Apr 08 09:14:12 see why you're passing null Apr 08 09:14:17 use breakpoints to help you Apr 08 09:14:25 somebody experience with osmdroid? Apr 08 09:14:30 the sooner you learn to do that yourself, the sooner you'll actually be able to write proper software Apr 08 09:16:49 Mavrik, thanks for the pointers Apr 08 09:21:05 Hello everyone, How can i use two different colors for progress in progressbar? Apr 08 09:27:01 i hooked up my colleagues device to my developer machine and now the app closes immediately. we both use eclipse (ADT), we have the exact same code. i can't find a real error in the log cat. i had this once before and restarting my computer/eclipse/phone finally did the trick, but not today. any ideas what this might be? Apr 08 09:28:09 Binu, you'll have to make your own animated drawable Apr 08 09:32:17 My god, the ammount of code that I have to write just to create a socket service o_O Apr 08 09:33:16 copy paste helps Apr 08 09:33:29 @Mavrik Can you please elaborate? Apr 08 09:33:46 Binu, progress bar is just a set of images Apr 08 09:33:52 they're single color Apr 08 09:33:59 if you want multicolor you'll have to draw and provide your own set. Apr 08 09:35:11 droidNub: yeah, but I also want to understand the code. Copy pasting is easy mode. :D Apr 08 09:35:41 TylerDurden36 socket service? Apr 08 09:36:49 g00s: completely new to both java and android so I don't know really if this is how I should do it. I want to create a service that maintains a connection to something until cancelled. Apr 08 09:37:05 that's rarely done on Android :) Apr 08 09:37:08 due to tons of issues Apr 08 09:37:35 TylerDurden36 yeah, your service will get killed unless its foreground, and people get pissed with foreground services ;) Apr 08 09:38:25 TylerDurden36, is there another way of doing what you want? :) Apr 08 09:38:34 g00s: this isn't something for the market. It's to turn my android phone into a remote control for my PC. I actually did this a few months ago, but I deleted the code. :D Apr 08 09:38:35 OTOH, if you aren't holding any wakelocks, and your service just blocks on a socket, then that might not be too bad Apr 08 09:38:38 yeah, also conneciton will drop, device will roam, radio will switch, etc. Apr 08 09:39:10 TylerDurden36, I suggest you think of just making a REST endpoint on your PC and calling it for each keypress Apr 08 09:39:10 ooo Apr 08 09:39:10 o Apr 08 09:39:10 ono Apr 08 09:39:53 nobody used OpenStraatMap before (osmdroid)? Apr 08 09:40:09 Damn it, freenode! I want a refund! Apr 08 09:40:23 d Apr 08 09:40:23 d Apr 08 09:40:25 o Apr 08 09:40:26 s Apr 08 09:40:40 :)) Apr 08 09:41:41 oh, just restarting servers for openssl patch Apr 08 09:41:57 So, the OS'll eventually kill my socket connection even if it's connected through a router? Apr 08 09:55:15 :JakeWharton sorry, for bugging again. I am getting error here https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/gallery/GalleryView.java#L48 and cannot trace in debug mode Apr 08 09:56:53 can i set text size relatively, like “weight” with layout size? Apr 08 10:07:38 :mylord did you try to use “weight” thing in textview itself? Apr 08 10:14:12 ya Apr 08 10:14:27 doesn’t seem to change font size, just with that Apr 08 10:15:16 do you use `sp` for font size? Apr 08 10:16:56 :mylord do you use `sp` for font size? Apr 08 10:17:55 yes Apr 08 10:18:29 somebody experience with mono for android? Apr 08 10:19:07 i want to udate a progress bar inside a fragment thats in a viewpager, i want to update it with progress of operation in some service. is it ok to use brocastreciever to get the progress from service to progress bar? **** BEGIN LOGGING AT Tue Apr 08 10:28:04 2014 Apr 08 10:37:36 :FrancescoV I used in xamarin Apr 08 10:38:25 :FrancescoV why? Apr 08 10:57:26 http://developer.android.com/design/media/settings_master_on_off_2.png how can I do this master switch in menu item Apr 08 10:58:59 Good morning (UGT) people.. Can anyone help me figure out why my settings screen is empty when I start the activity?? http://pastebin.com/WjHpAYYe Apr 08 11:00:00 what does an android app do differently on the initial launch? if i uninstall my app and start it, it crashes immediately. except if i have some breakpoints and take a little time debugging through the code, if i press "play" then, it works. if i relaunch it from eclipse, it works, too. if i uninstall it and launch it again, it doesn't work anymore... Apr 08 11:04:12 kamol: Is it possible to use 3th party libs (jars) with xamarin? And is there a big difference with buidling apps with xamerin / eclipse? Apr 08 11:05:40 Pitel_IPEX i'm curious about that too. you can make a checkable menu item, but thats not a switch. and if you say 'actionView' i'm not sure if thats just when the item is in the AB, not overflow Apr 08 11:05:51 :FrancescoV as I remember, you cannot use jars, you will need to convert to c#. yes, big difference. Apr 08 11:05:52 * g00s just getting up to speed on android 4 :) Apr 08 11:06:42 Pitel_IPEX but if you are trying to do that in PreferenceFragment or something, like your screen shot, just look at the Settings App Apr 08 11:06:45 not android related but really liking the pf firewall Apr 08 11:06:48 block in quick on $ext_if proto { tcp, udp } from any to any port { 139, 445, 2049, 3306 } Apr 08 11:06:56 kamol: how much time did you spend on learning mono for android? Apr 08 11:06:58 yeah i hear pf is nice Apr 08 11:07:28 Pitel_IPEX do you just want to put the switch in the AB ? Apr 08 11:08:11 g00s: I want to use it in preferences. Apr 08 11:08:27 yeah, i would just check out the Settings app Apr 08 11:08:53 you mean some example app, or settings on the phone? Apr 08 11:09:06 *the* Settings app Apr 08 11:09:09 code Apr 08 11:09:11 aosp Apr 08 11:09:16 :FrancescoV I tried a week to play with it. But, it require to know c# and each platform (android, io) very well. That’s the hardest part to know boths for UX. I gave up at the end. It will not simplify or speed up (for my case). And end apk files kind of hude Apr 08 11:09:16 kthx Apr 08 11:09:17 hmm does the gcm tokens expire ? Apr 08 11:09:29 tagrudev: afaik yes Apr 08 11:09:51 hmm after how long ? Apr 08 11:10:06 kamol: so you create one project that works on ios and android? Apr 08 11:11:26 I don Apr 08 11:11:33 't see anything in the documentation Apr 08 11:11:47 http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html Apr 08 11:13:01 yes, but it was just learning, prototype. And it should be exceed certen Mbs, otherwise you have to pay. One more drawback, I had a difficulties to use already ready java libraries so easy Apr 08 11:35:14 why is AndroidStudio adding android.R instead of just R, and breaking my code? Apr 08 11:43:35 mylord, clean your project and rebuild it Apr 08 11:51:38 tagrudev, didn’t work :/ Apr 08 11:55:39 somebody experience with mapbox? Apr 08 11:56:33 mylord, didn't work what ? is there any output ? Apr 08 11:56:47 FrancescoV, ask if someone know he/she would answer Apr 08 11:59:01 does mapbox support routing/directions? is it allowed to create your own route with lines (+ 300 lines) on a map with the free version? (need to work offline) maybe use something else for offline map + directions? Apr 08 12:01:50 ah now I remember we talked yesterday about mapbox yeah well not sure about that maybe you can try and contact their support FrancescoV Apr 08 12:02:31 although it pretty much sucks (osm) it's the best solution I've found so far ( gmaps not an option ) Apr 08 12:03:27 tagrudev, tnx, i'll try it out. I gues it's not possible to put offline google map in apk and use some source for default MapFragment? Apr 08 12:03:55 currently it's not possible Apr 08 12:05:37 wtf? when I delete last of my drawable-*-v* from my project, which uses google play services, and running `ant clean debug`, the google play services project doesn't build. Apr 08 12:05:52 Hello . . . I downloaded the code for: < http://www.androidhive.info/2013/10/android-tab-layout-with-swipeable-views-1/ >. It works fine. I tried modifying the code to make my own tab by making the file: "AboutFragment.java" and "fragment_about_xml", then adding them to the code. But I get the error: "AboutFragment can not be resolved to a type". Where can I look to see what I have done wrong? Apr 08 12:07:32 there seem to be need for ic_menu_refresh.png. and even when it;s empty file, it builds Apr 08 12:07:37 without the file, it fails Apr 08 12:08:04 Technicus, check if you've imported the => Apr 08 12:08:04 import android.support.v4.app.Fragment; Apr 08 12:08:05 and it doesn't matter if it's drawable-ldpi-v1 or drawable-xhdpi-v11 Apr 08 12:08:10 srsly, wt?! Apr 08 12:09:06 tagrudev: I'm a noob getting my feet wet, I'm not sure what file to look for that in? Apr 08 12:09:21 Technicus, in your AboutFragment :) Apr 08 12:11:05 hi guys i have a problem. listview is null? this is debug: http://paste.ubuntu.com/7221285/ Apr 08 12:11:59 this is my code: http://paste.ubuntu.com/7221319/ Apr 08 12:12:43 my app crash... line 41: list=(ListView)findViewById(R.id.listView1); Apr 08 12:12:44 tagrudev: here is the file: < https://gist.github.com/Technicus/f4af9c8383ca579cc55a >. Apr 08 12:13:23 Technicus, it's ok show the other files Apr 08 12:17:52 rox: maybe list=(ListView)ios.findViewById(R.id.listView1); Apr 08 12:18:08 roxdragon, -> https://gist.github.com/tagrudev/10115912 Apr 08 12:19:01 also I strongly recommend you fix your code style and read about naming conventions Apr 08 12:21:28 tagrudev: I'm having problems with Eclipse. It keeps crashing. Apr 08 12:22:28 tagrudev: It makes learning this extreamely difficult. I can't seem to get it to stabalize. Apr 08 12:22:33 Technicus, if you're just starting why don't you try using Android Studio Apr 08 12:23:11 I haven't used the eclipse bundle in about a year Apr 08 12:23:14 Maybe update JDK? Apr 08 12:23:18 and reinstall Apr 08 12:23:30 tagrudev: I have tried that, but it doesn't seem as intuitive to me. Apr 08 12:23:33 what does it have to do with the jdk ? Apr 08 12:23:44 JulianNL: I have updated and reinstalled. Apr 08 12:23:49 doesnt eclipse run on it, or am i confused with netbeans:p Apr 08 12:24:18 does the eclipse crash or the project Apr 08 12:24:21 moving to eclipse, from androidstudio.. how do i change classpath from com.example to com.mysite? Apr 08 12:24:21 :) Apr 08 12:24:52 I'm having a hard time understanding everything. I would like to do this with a plain text editor, but Android is so complicated I need some hand holding. Apr 08 12:25:28 tagrudev: the eclipse IDE crashes Apr 08 12:25:47 tagrudev: requireing restart or eclipse Apr 08 12:25:51 I just recently starting using it aswel, but I find Google provides me with most answers Apr 08 12:26:04 Technicus, it is possible to use a plain editor :) Apr 08 12:26:19 yeah, good luck with all the xml... Apr 08 12:26:34 I don't think the xml is the problem Apr 08 12:26:45 :) Apr 08 12:26:49 the IDE autocompletion is a godsend in those situations Apr 08 12:27:03 and the code navigation features (ctrl+click) Apr 08 12:30:23 setContentView(R.layout); // R.layout cannot be resolved to a variable Apr 08 12:30:29 in eclipse.. any help? Apr 08 12:30:48 intellisense is able, though, to see my layouts after “.” Apr 08 12:31:37 R.layout.layout Apr 08 12:32:18 or R.layout.whatever_your_layout_is_named Apr 08 12:33:27 there’s no layout.layout Apr 08 12:33:43 ah, latter worked :) Apr 08 12:47:14 hello Apr 08 12:47:50 do any of you guys know if the android OS comes with a OMA OTA provisioning client ? Apr 08 13:06:38 hey, does anyone have the name of this tool which automatically scales your graphics for mdpi, hdpi, etc? Apr 08 13:06:40 Hi there, tyring to pull a file from my Android device through adb, though I'm getting a "No such file or directory error", but the problem seems to be my second (i.e. local path). Here's my command 'adb -s pull /sdcard/myfile C:\Users\Android\pool Apr 08 13:07:05 The directory I set as second parameter exists Apr 08 13:07:21 Vanaheimr: did you try it w/o the first slash? Apr 08 13:07:51 \/sdcard -> sdcard Apr 08 13:08:30 No difference Apr 08 13:08:51 hi Apr 08 13:08:57 does somebody know how you can create directions with osmdroid (offline)? Apr 08 13:09:51 i have a layout but when i put my app in landscape , it now showing the scroll? Apr 08 13:09:55 how i can solve this? Apr 08 13:10:11 do you have a scroll layout? Apr 08 13:10:15 no Apr 08 13:10:23 Linear Apr 08 13:10:51 then embed that linear layout in a scroll view and set the linear layouts height to wrap content Apr 08 13:10:56 ok Apr 08 13:10:58 trying Apr 08 13:11:00 thanks Apr 08 13:11:23 tagrudev: with this: < https://gist.github.com/Technicus/10121592 >, I get the error: "ActionBar cannot be resolved to a type MainActivity.java" Apr 08 13:11:51 tagrudev: What does that mean? Apr 08 13:12:42 Scrollview can host only one direct... Apr 08 13:13:02 I guys. I'ld like to have your opinion. I've a DAO which is instanciated in an Application object in order to be available/accessible in my whole application. This DAO has a dedicated class file (obviously) and has a bunch of method like getAllUsers(), doesUserExists(), etc. Do I need to put AsyncTasks in that DAO class, in each methods, or put the AsyncTasks in the activity that calls that static DAO? Apr 08 13:13:18 t0th_-: yes. what's your main layout in which everything is embedded? Apr 08 13:14:02 can i post my code to you? Apr 08 13:14:15 I'ld like to respect an OOP paradigm as much as I can. Apr 08 13:14:20 yes, but please use pastebin Apr 08 13:14:25 wget asynctasks in the DAO ? gross, no way Apr 08 13:14:27 thanks Apr 08 13:14:30 where in /res should i put my icons etc? Apr 08 13:14:58 mylord: drawable Apr 08 13:15:13 which one? hdpi, ldpi, etc? Apr 08 13:15:38 can i put in 1 place for all for starters? Apr 08 13:15:42 http://pastebin.com/FZxYrqCi Apr 08 13:16:41 mylord: you should read this http://developer.android.com/guide/topics/resources/providing-resources.html Apr 08 13:17:14 tagrudev: I got it thanks! Somehow when I was messing around with the xml layout I added gridlayout, which I didn't implement properly, so I figured out how to remove it by: < http://stackoverflow.com/questions/18830736/actionbaractivity-cannot-be-resolved-to-a-type >. Apr 08 13:17:51 t0th_-: your scrollview contains two layouts: your linearlayout and the included one in ad_view Apr 08 13:18:13 ok Apr 08 13:18:25 So my next question is, how do I put a grid of 8X8 squares in the layout? I tried gridlayout, but it was a failure. Apr 08 13:18:43 how to make eclipse show preview of .xml side by side with .xml view? Apr 08 13:18:52 you have to either include the ad_view into your linearlayout aswell or put both into another layout (I'd recomment #1) Apr 08 13:19:09 working Apr 08 13:19:10 thanls Apr 08 13:19:56 Hi, as I can get the value of the sum of the elements of an arraylist? Apr 08 13:22:02 ansgarm: i have a problem, my map height... is too small Apr 08 13:22:53 trying some configs Apr 08 13:23:45 can eclipse show a preview of an xml layout side-by-side with xml text? Apr 08 13:24:08 mylord i dont know Apr 08 13:25:02 i guess no Apr 08 13:31:24 mylord: Android Studio can. Never seen it in Eclipse though Apr 08 13:32:50 t0th_-: you could try to specify some min height Apr 08 13:33:00 300dp ? Apr 08 13:33:09 for example Apr 08 13:33:14 ok Apr 08 13:33:22 dp is the best way? Apr 08 13:34:43 How to hang share intent on the menu, if I create menu programmatically? http://developer.android.com/training/sharing/shareaction.html Apr 08 13:35:17 I mean, how to set android:actionProviderClass="android.widget.ShareActionProvider" ? Apr 08 13:36:19 Hi, as I can get the value of the sum of the elements of an arraylist? Apr 08 13:37:45 @b0t iterate over the array ? Apr 08 13:38:33 a list where users are counted, I pray that I return the number, for example: 180, 20, 30 Apr 08 13:38:43 woohoo, b0t's back Apr 08 13:38:54 Leeds: hello brother Apr 08 13:39:21 is this google translate? : x Apr 08 13:39:42 yeahh Apr 08 13:39:46 im spanish Apr 08 13:39:49 ^^' Apr 08 13:40:06 arraylist --> total count ---> valor ---> number Apr 08 13:40:18 * Leeds will be in Spain in, oh, 9 days Apr 08 13:40:42 come home Apr 08 13:40:52 i have 5 spanish girls Apr 08 13:40:59 rebeca linares, eg, eg ,eg Apr 08 13:41:06 @b0t myArrayLit.size() returns the number of items Apr 08 13:41:23 aha Apr 08 13:41:27 thanks danijoo Apr 08 13:41:42 but this is a question vor java doc, not irc :p Apr 08 13:42:22 danijoo, my question is for irc :) Apr 08 13:42:35 but i cant answer it :p Apr 08 13:43:02 im a noob :( Apr 08 13:47:15 in androidstudio it seems i need to specify which drawable dir, as in: android:drawable="@drawable-xhdpi/browsegamesbutton" Apr 08 13:47:20 is that normal? Apr 08 13:47:35 no Apr 08 13:47:36 if i just write @drawable/ it will show red, not found Apr 08 13:47:43 thats strange Apr 08 13:47:46 it's not just not normal, it's wrong Apr 08 13:48:16 i’ve copied browsegamesbutton.png to each drawable dir, including -xhdpi Apr 08 13:48:36 the whole point of the -xhdpi stuff is that the system can choose appropriate resources at runtime, without you having to manually handle every case Apr 08 13:49:02 do you have a drawable directory in your project? Apr 08 13:49:15 mylord even if you wanted to do that, you would use aliases ;) Apr 08 13:50:14 razor- i don’t see just drawable in AndroidStudio (AS), I see just -xhdpi, etc, Apr 08 13:50:30 maybe there’s a drawable dir in the FS, i’ll check.. why? Apr 08 13:50:52 g00s: how do i use the image then? with imageview, i was able to see it using :src Apr 08 13:51:13 but i want text atop the image, so i’ve decided using textview or button with drawable background Apr 08 13:51:32 hi, is there a way for me to track the visitor count of my app's google play store page? Apr 08 13:56:21 Mornin'! Apr 08 13:56:36 "(15:14:25) g00s: wget asynctasks in the DAO ? gross, no way" Apr 08 13:56:36 Yep, I wanted to do that because in each fragment or activity I'm calling the DAO, I have to write each time the same code to create an AsyncTask (which is annoying) Apr 08 13:56:36 An employee (I'm an intern) had another solution. Extends each DialogFragment or Activity I use, from its Abstract version (e.g. MyActivity extends AbstractActivity,...). Apr 08 13:56:36 In each abstract classes, write the code to create the AsyncTask and implement the doInBackground() method in the subclass (e.g. MyActivity) Apr 08 13:56:36 g00s: Which solution is better? Apr 08 13:58:55 wget neither, your employee shouldn't be writing code Apr 08 13:59:22 I have implemented a service that is started by another one that binds it. Is there a way to recognize that a service is bound (from the view of the service itself)? I want to start some operations when the service is successfully bound by the other one. Apr 08 14:00:02 wget look at rxjava, or maybe even https://github.com/path/android-priority-jobqueue Apr 08 14:01:32 g00s: :D Actually, he is a junior dev who has been hired only one year ago. Apr 08 14:01:32 I prefer to ask before writing anything, when I'm unsure. Apr 08 14:02:16 g00s: Thanks for your link. It seems in android-priority-jobqueue, they are using an Observer-like pattern. Apr 08 14:04:25 (actually nothing to do with observer, but same logic: call an interface on each side which will be used to communicate) Apr 08 14:07:33 mylord: there isnt a drawable. You have to create it. well, its that way in intellij 13.1.x Apr 08 14:08:29 What's the most liked method of gathering debug data from your apps? Any 3rd party tools you guys like? Apr 08 14:10:13 I believe you can set it up so all stack traces will be sent to a google dashboard of some sort Apr 08 14:11:04 is osmand (osmandroid) an api or just an app? Apr 08 14:11:09 Elderwolf, define debug data Apr 08 14:11:57 Stack Traces are the most importance right now. But I'd also like to get some data such as connection strength, average response time, memory usage Apr 08 14:12:46 Then ultimate wish list would be to include my own paramters from my app that I would define in some object that would be sent on crashes or intermittently. But for now I just really need some stack traces. Apr 08 14:14:20 For further clarification I've got a beta version of my app in which I've handed the client an apk for direct installation. So not going through play store yet. Apr 08 14:17:13 Anyone know some useful tutorials / resources for learning Android NDK debugging ? Apr 08 14:22:54 I am getting error at this line https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/gallery/GalleryView.java#L48 even cannot debug to find the issue. Apr 08 14:29:53 Elderwolf: crashlytics.com is quite nice for crashreporting Apr 08 14:30:22 for custom data points you could use google analytics if legally possible Apr 08 14:31:32 or use ACRA (https://github.com/ACRA/acra). haven't used it myself though Apr 08 14:35:28 rgr: ok, in eclipse i’m not supposed to create drawable tho, right? (and its not there iether) Apr 08 14:35:42 in AS, i created drawable in /res/drawable Apr 08 14:35:48 but its still red/not-found Apr 08 14:35:56 cannot resolve Apr 08 14:37:03 nvm, was wrong /res folder, i have 2 for some reasons Apr 08 14:37:37 1 in app and 1 in app/src Apr 08 14:37:43 app/src one is found Apr 08 14:37:53 i don’t really get what “app” is anyhow.. seems to be generated Apr 08 14:39:09 bah.. i like AS over eclipse except it keept giving that android.R problem until I restart AS Apr 08 14:40:18 mylord: that app/src folder is the default project structure/layout Apr 08 14:40:27 *of AS / gradle Apr 08 14:40:42 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure Apr 08 14:40:58 i shouldn’t have another /res folder in /app/res right? maybe its screwed up from some copying over files or somethign.. i should be able to delete that? Apr 08 14:45:44 doh! Apr 08 14:50:59 my TextView text isn’t visible when I set this: android:drawableStart="@drawable/browsegamesbutton" Apr 08 14:51:15 how can I show the image under the text? Apr 08 15:04:39 Does anyone know how to read a CheckboxPreference in the account manager settings for our authenticator? Apr 08 15:06:47 I have implemented a service that is started by another one that binds it. Is there a way to recognize that a service is bound (from the view of the service itself)? I want to start some operations when the service is successfully bound by the other one. Has anyone an idea about how to do this? Apr 08 15:29:11 hey Apr 08 15:30:19 so i have a horizontal layout with a couple views in it, is there a way to make the entire layout clickable like a button? or can i put it on a button or something? Apr 08 15:37:19 All the old advice on StackOverflow for account preferences only seems to produce nothing on newer Android versions. Somehow, all of the major apps with sync adapters figured out how to get this working. Apr 08 15:40:10 I am confused with `injects` and `includes` in dagger. can any one explain it? Apr 08 15:40:57 can I use gpg to automatically prompt for a password from android plugin in Gradle? Apr 08 15:41:29 in order to have gradle.properties encrypted Apr 08 15:48:08 what do you think guys/gals? 2 space tabs or 4 space tabs? Apr 08 15:48:46 there's a lot of 2-space tabbing in square oss Apr 08 15:52:35 I like 4 Apr 08 15:52:51 That's just MHO Apr 08 15:53:01 or taste rather Apr 08 15:56:18 i like 2 space tabs Apr 08 16:05:40 is it acceptable practice to store objects in the application object to save their state across configuration changes? Apr 08 16:06:00 is this ok in a button onClick? new Dialog(mContext).show(); ? Apr 08 16:06:12 I get: WindowManager$BadTokenException: Unable to add window -- token null is not for an application Apr 08 16:06:17 how can I fix that? Apr 08 16:06:31 fancy42: http://developer.android.com/guide/topics/data/data-storage.html Apr 08 16:07:24 fixed: new Dialog(MainActivity.this); Apr 08 16:08:38 Mango_Man, i want to store a complete instance of an object Apr 08 16:09:12 Mango_Man, shouldn't the instance survive in the application object until the complete application is killed? Apr 08 16:10:34 fancy42: seems kinda silly to store things in the app object, when you could store it in the class where it's used. Apr 08 16:11:02 fancy42: ignore the link i pasted above if you don't want persistence Apr 08 16:11:33 fancy42 http://www.javaworld.com/article/2073352/core-java/simply-singleton.html Apr 08 16:12:44 fancy42: to answer your original question, saving state is usually done via onSaveInstanceState Apr 08 16:14:17 Mango_Man, i tried to do it with that, but that would've gotten too complicated because the instance i wanted to preserve is rather complex Apr 08 16:15:42 fancy42: it shouldn't be that complex. make the object you want to save parcelable, then it's a straightforward bundle.putParcelable(). something like that. Apr 08 16:16:01 fancy42: if you're using fragments, setRetainInstance(true) avoids the onSaveInstanceState dance entirely Apr 08 16:16:02 MohammadAG, thanks, but a Singleton isn't what I'm looking for Apr 08 16:16:03 I have D1 extends Dialog, and onCreate() is calls: setContentView(R.layout.D1); Apr 08 16:16:25 but none of the layout from D1.xml is showing up.. D1 appears as just a thin bar Apr 08 16:17:22 Mango_Man, i can't make it parcelable the class should stay straight java Apr 08 16:19:16 fancy42: eh, i got nothin' else for you. that's the way i would do it. Apr 08 16:21:04 I want my app to draw music scores on a musical sheet. I was thinking of simply making a background image and placing png images on top of that. Sounds about right? What should I look into to do this? Any tutorials? Apr 08 16:22:33 Zta, you should probably look into how canvases work (I think I did this once years ago :D) Apr 08 16:22:59 Zta, if I remember correctly, you can draw images and stuff on a canvas Apr 08 16:23:54 ok Apr 08 16:26:39 thanks =) Apr 08 16:35:38 Zta: you probably want a custom view which will give you the canvas. http://developer.android.com/guide/topics/graphics/2d-graphics.html Apr 08 16:35:57 Zta: depending what you want to a surfaceview should work, but it has some quirks of laying that aren't easily solved Apr 08 16:41:14 This guy extends ImageView: http://www.techrepublic.com/blog/software-engineer/bouncing-a-ball-on-androids-canvas/ Apr 08 16:52:15 Hi, I'm using xampp and have a login.php file in my xampp/htdocs/395 folder, why does this not connect to to the database? Apr 08 16:52:29 HttpPost httppost = new HttpPost("http://localhost/395/login.php"); Apr 08 16:52:37 that's where i get the error Apr 08 17:06:00 Whats the common way to add an item to a listview from another activity? Apr 08 17:08:43 No3x: provide a public method like addToList(item) and let the activity that holds the list handle the rest? Alternately send it as an extra through an intent, if you are not sure if the activity is already started. Apr 08 17:10:13 klaw: connect to what database? How you connect to the file from the app shouldn't affect whether the website has connection to the website database Apr 08 17:10:45 Thorbear: Thank you. I think i prefer the Intent Apr 08 17:11:39 klaw: Although, "localhost" usually means "this device" so calling it from a phone app will usually never reach the website (even if the website is available from the computer) Apr 08 17:17:05 how do I find out what eclipse version the ADT uses? Apr 08 17:17:28 the connection info to the database is in the php file Apr 08 17:18:04 klaw: and have you verified that the app manages to find the php file at all? Apr 08 17:18:55 no, how do i do that? that is where the issue is because debugging stops at that line Apr 08 17:20:12 HttpPost should throw some sort of exception if it does not find the file. Apr 08 17:24:11 Thorbear: if i start an intent the receiving app will be displayed. I wan't to add several items per second and in background. Do you have an advice? Apr 08 17:25:47 No3x: store all the items up in one list then send the entire list with an intent when you are ready to display the activity Apr 08 17:27:59 figured it out, thanks,. Apr 08 17:28:06 The items are produced asynchronously via external events (particular serial read messages.) I can't collect them and send them at a specific time. Apr 08 17:35:08 There is always somewhere to store them, and the receiving activity can query for them when it is ready to be displayed Apr 08 17:36:11 Good morning (UGT) people.. Does any one know if there is a problem with Ubuntu 12.04 lts and the latest version of AS regarding the SDK manager... Someone in the G+ group has no menu like I have in Redhat or Windows for adding add-on sites : http://tinypic.com/view.php?pic=se69gj&s=8#.U0QyMfl_uT8 Apr 08 17:37:41 I wonder if there is something amiss in his configuration or... ;) Apr 08 17:43:39 Does the DialogFramgent class mess with systemUIVisibility flags at all behind the scenes? I am trying to keep a certain Activity in my app full screen and whenever I start up the dialog fragment all of the systemUIVisibility flags are being reset inbetween onResume and onPause Apr 08 17:45:11 yiati: every new Fragment or Activity that is shown on top of a visible activity or fragment will call it's onPause and onResume Apr 08 17:49:41 thepoosh: right, I am just saying that somewhere between those two functions the systemUIVisibility is changing in my DialogFragment Apr 08 17:50:00 Looks like there actually is something weird about DialogFragments with systemUIVisibility :P Apr 08 17:50:01 https://code.google.com/p/android/issues/detail?id=62537 Apr 08 17:51:35 I am making a release build of my native code with ndk-build, but I keep getting the -g flag put in and I want it out. Is there any way to make this happen? I tried APP_CFLAGS -= -g but no dice Apr 08 18:03:23 Is it possible to record video in an app and send it live in the form of a sequence of byte arrays? Apr 08 18:07:44 Do you need to extend the ActionBarActivity class for the action bar to appear when using the android support library? Apr 08 18:07:56 yes Apr 08 18:07:57 yes Apr 08 18:08:07 So, you can't extend any other kind of activity? Apr 08 18:08:13 correct Apr 08 18:08:25 only if that other activity in turn extends ActionBarActivity Apr 08 18:09:32 i have two abstract activity classes that extend actionbaractivity, all of my activities are subclasses of one of the two abstract activities Apr 08 18:09:33 Interesting, and it seems like most don't. Apr 08 18:10:39 Is it still possible to emulate the futures of other kinds of activities, like list activities? Apr 08 18:11:10 isnt there an ActionBarListActivity (im not sure) Apr 08 18:11:31 you can emulate a list activity very easily, but most prefer not to use it Apr 08 18:11:53 you can also simple put a listview in your acitivty :) Apr 08 18:11:54 a list activity simply binds to a listview with the id android.R.id.list Apr 08 18:11:57 or a listfragment Apr 08 18:11:59 Takes like 5 lines of code to do what ListActivity does Apr 08 18:12:15 Interesting. Thanks for the help. Apr 08 18:19:48 Hi, I have a problem with this code, I can not get the value of the sum total of my listview Apr 08 18:19:53 http://pastebin.com/hMtQu8MR Apr 08 18:20:15 someone please look at my code Apr 08 18:20:30 hi. im trying to build for the first time an android rom, but I'm stuck in configuring/using "repo".. can someone give me a light on some things in pvt with me please? Apr 08 18:23:46 @heilerb, check #android-root, this room is for application development Apr 08 18:24:21 ok thanks Apr 08 18:25:11 getCount(); Apr 08 18:25:18 b0t: what are you summing? i dont see anything being summed Apr 08 18:25:37 the total elements on the list Apr 08 18:25:42 but i think its getItemCount() though that may be on adapter... however, you are looping before you add the items Apr 08 18:25:49 one valor, one number Apr 08 18:26:15 ok i see now Apr 08 18:27:26 The method getItemCount() is undefined for the type Bundle Apr 08 18:29:01 Any Ubuntu 12.04LTS people around that uses AS? Apr 08 18:29:38 i have, but im on 13.04 now Apr 08 18:30:15 Ok - I was wondering if you had the menu bar available in the SDK Manager? Or have experienced it being missing? Apr 08 18:30:39 birbeck like in this image : http://tinypic.com/view.php?pic=se69gj&s=8#.U0QyMfl_uT8 Apr 08 18:31:52 birbeck: Apr 08 18:31:52 ok, now it works, now tell me as I show in my xml valoar Apr 08 18:32:00 getListView().getCount(); Apr 08 18:32:21 within textview Apr 08 18:33:19 bot, the menu should be at the top of the screen Apr 08 18:33:45 getChildAt Apr 08 18:33:46 :S Apr 08 18:33:53 f**ck Apr 08 18:34:31 see it Apr 08 18:34:36 getItemAtPosition() Apr 08 18:34:38 b0t, list.getAdapter().getItemCount() ? Apr 08 18:34:50 getListView().getChildAt(R.id.conectados); Apr 08 18:35:04 getCount() is fine Apr 08 18:35:15 android:id="@+id/conectados" Apr 08 18:36:20 leslie: is getlistview Apr 08 18:36:21 does r.layout.useritem have a viewgroup with id conectados? Apr 08 18:36:53 mm Apr 08 18:37:04 setContentView(R.layout.users); Apr 08 18:37:35 why? Apr 08 18:38:07 which IDE are you using? IntelliJ, Eclipse or Android Studio? Apr 08 18:38:15 eclipse Apr 08 18:38:29 setContentView(R.layout.users); Apr 08 18:38:29 getListView().getChildAt(R.id.conectados); Apr 08 18:38:33 in the xml Apr 08 18:38:46 android:id="@+id/conectados" Apr 08 18:38:47 android:layout_width="fill_parent" Apr 08 18:38:51 !paste Apr 08 18:38:58 !nopaste Apr 08 18:39:01 its only 5 lines Apr 08 18:39:04 sorry Apr 08 18:39:32 b0t: still.. it will be rendered as 5 separate messages which can be torn apart if anyone loggs in/leaves or writes a message or.... Apr 08 18:39:34 should work? Apr 08 18:39:44 textview is not a viewgroup Apr 08 18:39:56 b0t: plus: no syntax-highlighting and no possibility to copypaste the code directly into a class Apr 08 18:39:59 pastebin want? Apr 08 18:40:05 b0t: *everytime' Apr 08 18:40:05 ok Apr 08 18:40:06 * Apr 08 18:40:07 nevermind Apr 08 18:40:14 pastebin now Apr 08 18:40:17 waiting Apr 08 18:40:34 b0t: anything with more than 1 lines should not be pasted directly into irc Apr 08 18:41:22 its is all Apr 08 18:41:23 http://pastebin.com/v0unN78T Apr 08 18:41:43 birbeck - did you have the menu bar in the SDK Manager?? Apr 08 18:41:59 I do not know why it does not work, i see god Apr 08 18:42:08 codetroll: at the top of the screen in the unified menu when you mouse over android sdk manager title Apr 08 18:42:31 DOH!! Yeah.. will ask him that.. Apr 08 18:42:51 I have only played with Unity when use a live CD... Apr 08 18:43:18 the menu is only visible all the time if the window is maximized Apr 08 18:43:43 ahh Apr 08 18:43:59 b0t: whats the actual problem? Apr 08 18:44:03 Thank you ;) Apr 08 18:44:33 I want to show on layout.xml the number of users online Apr 08 18:44:42 Can getLoaderManager() be used in an Activity? Apr 08 18:45:27 Its supposedly only for fragments and ActivityFragments(with support getLoaderManager() implementation). Apr 08 18:45:29 see my small code Apr 08 18:45:31 b0t: for that you only need the size of the users array, assuming the array only has online users Apr 08 18:45:40 b0t: I mean: whats wrong? what is not working? whats is the error? Apr 08 18:46:13 I can not see them in the layout xml Apr 08 18:46:24 b0t copy pasta the code will ya? Apr 08 18:46:28 Im interested! Apr 08 18:46:54 grabbizle: getLoaderManager() has existed in Activity since API 11 Apr 08 18:47:14 Anyone using Android Studio, what does module name mean? app seems like a bad name as well...? Apr 08 18:47:16 I have already copied Apr 08 18:47:26 b0t: how would you see them in the layout file? you mean when you run the app and your activity is shown the listview in the layout is empty? Apr 08 18:47:29 grabbizle: it is available in the support library also Apr 08 18:47:46 birbeck, no wonder it doesnt give an error. Im looking at the API guides and it states that it's for Fragments and FragmentActivity Apr 08 18:48:13 b0t: what is Extra.USERS refering to? Apr 08 18:48:56 in another class Apr 08 18:49:24 a module can be considered a 'target' of sorts, rento Apr 08 18:49:35 grabbizle: well, its not in activitycompat, so if you want it before api 11, you need to use a class which provides it, namely fragmentactivity, actionbaractivity or fragment Apr 08 18:50:03 I just want to show all connected to my list Apr 08 18:50:04 it could be a library, or an app, or a logical step in the build process (i.e. a post-build module for zipping up your library and all resources for distribution) Apr 08 18:50:12 I'm asking a lot? Apr 08 18:51:04 b0t: you are not clearly defining the problem or giving people enough information to help you Apr 08 18:51:28 b0t: yes, youve been asked several times now to tell what the actual problem is Apr 08 18:51:32 need the activity, the two views and a description of what the problem is and what you expect Apr 08 18:51:34 birbeck thanks. Apr 08 18:51:45 b0t: "i want to show users" is not a problem we can help you with, except you pay us for doing your work 8-)) Apr 08 18:51:47 I have pasted the code of the class and the xml code that more info than that? Apr 08 18:51:57 b0t: what is the error you are seeing Apr 08 18:53:19 the error is that I no see the total number in my xml Apr 08 18:53:20 b0t: i mean any error messages in the logs or anything thats strange..? your code pretty much looks like it should work, i havent tried it because it misses some extra data (e.g. Extra.USERS) which would involve us investigating how your code *may* run, so you need to spare more information about what you've tried and what (and why) it hasnt worked Apr 08 18:53:39 if my own app calls requestSingleUpdate, once that update happens, will later calls to getLastKnownLocation return at least that single update? Apr 08 18:53:53 How do I make a database query, ie a username/password, to send the information queried to a php script Apr 08 18:53:54 forget extrausers Apr 08 18:54:34 b0t: the docs have pretty examples about listviews and arrayadapters and listactivities.. have you tried them? Apr 08 18:54:41 b0t: the code you posted works, but you are never counting the number of users or setting it anywhere Apr 08 18:55:14 birbeck: I assume that he doesnt mean the "number" as in the total number of all users but just all users Apr 08 18:55:21 birbeck: tell me how the story to appear on my layout then Apr 08 18:55:34 I think this is well Apr 08 18:55:42 getListView().getChildAt(R.id.conectados); Apr 08 18:55:49 b0t: that does nothing Apr 08 18:55:58 b0t: it just returns a view with this id Apr 08 18:56:00 b0t: you have to have a textview in the layout. do setText(Integer.toString(nUsers)) on the textview Apr 08 18:56:08 b0t: but as you dont assign that return value the statement is just useless Apr 08 18:56:20 you dont need to loop through the list and find ids or anything Apr 08 18:56:41 its is complicated Apr 08 18:56:48 im crazy now Apr 08 18:56:51 b0t: try to explain what you want Apr 08 18:56:52 right now your code works, it just doesnt do anything Apr 08 18:56:59 I'm getting an error using the support libraries. Failed resolving Landroid/support/v7/app/ActionBarActivity; interface 221 'Landroid/support/v4/app/TaskStackBuilder$SupportParentable;' Apr 08 18:57:00 b0t: again Apr 08 18:57:03 b0t: the line you pasted Apr 08 18:57:14 b0t: does nothing (getListView().getChildAt...) Apr 08 18:57:25 b0t: as this statement returns a view, which you never assign Apr 08 18:57:43 Jonathan_Eyre: are you running proguard? Apr 08 18:57:48 stoooooop Apr 08 18:57:50 b0t: so the question remains: have you done the listview examples and are they working? Apr 08 18:58:00 I'm not really sure how to include the compat libraries in my project. Apr 08 18:58:29 I ended up finding a file that was android-support-v7-appcompat.jar and pasted it into my libs folder. Apr 08 18:58:38 Jonathan_Eyre: https://developer.android.com/tools/support-library/setup.html Apr 08 18:58:40 I've just done that. Apr 08 18:58:41 I pasted in android-support-v4.jar as well. Apr 08 18:58:48 thell my a example Apr 08 18:59:00 b0t: just google android listview Apr 08 18:59:11 birbeck: Not proguard. I'm looking at the link. Apr 08 18:59:45 http://stackoverflow.com/questions/4895089/how-to-get-a-count-of-list-items-from-listview Apr 08 18:59:50 ??????????? Apr 08 19:00:13 b0t: http://developer.android.com/guide/topics/ui/layout/listview.html Apr 08 19:00:33 Can an app that uses admob still be open source? Apr 08 19:00:41 Just not sure about the licensing of that library. Apr 08 19:01:48 I see the number of users, I see all the users in the list, but I put up on my list, THE NUMBER OF USERS ON THAT LIST Apr 08 19:02:13 example: 150 user connected Apr 08 19:02:47 b0t: you just get the length of your adapters backing data Apr 08 19:03:04 int usersCount = users.length; Apr 08 19:03:07 so I am looking to count the values ​​in the list Apr 08 19:03:13 b0t: which line in your pasted code do you expect to display the data actually? Apr 08 19:03:34 *to display the number Apr 08 19:04:02 believed that this Apr 08 19:04:11 getListView().getChildAt(R.id.conectados); Apr 08 19:04:13 or getcount Apr 08 19:04:20 b0t: did you understand that this _cannot_ do anything? Apr 08 19:04:23 could see the number Apr 08 19:04:24 b0t: and why it cannot? Apr 08 19:04:33 b0t: I mean after I explained it here.. Apr 08 19:05:36 b0t: ? Apr 08 19:05:42 I have spoken many, I have forgotten the code Apr 08 19:05:57 b0t: I'm just asking if you a) read my explanation and b) understand it Apr 08 19:07:22 b0t: if not, I'll repeat it once: getListView() returns the current ListView of your activity (which is a property it inherits from the superclass ListViewActivity). you then call getChildAt(anId) with this very listView. what it does it searches a view that has the id 'anID' in your listview and returns it... Apr 08 19:07:36 b0t: first: your listview does not contain another view with the id you have passed in to the method Apr 08 19:08:08 b0t: second: this method only _returns_ the view in question (if there is any - see first), it does not do anything with it nor will it set any magical value on it Apr 08 19:08:26 can anyone tell me why my settings page is just blank, I expect the default settings to be shown.. but alas... : http://pastebin.com/WjHpAYYe If more code/xml is needed I am happy to provide it.. ;) Apr 08 19:08:59 b0t: it would have make sense if you assigned that view to any other variable and then call a setter on that variable or something like that.. but as you dont assigned the returned view, this statement is 100% useless Apr 08 19:09:20 b0t: eclipse should even mark this as "unused return value", but I'm not sure how verbose the IDE is there Apr 08 19:10:38 eclipse does not mark anything, it would be easier for you to do me the line of code and explain how it works, because I think not only to get Apr 08 19:11:05 b0t: as I dont understand what you want exactly I cannot paste the line for you Apr 08 19:11:39 see'll explain once more Apr 08 19:11:49 b0t: stop it Apr 08 19:11:53 b0t: I want code for you Apr 08 19:12:04 *wont Apr 08 19:12:05 lol Apr 08 19:12:11 with that code, I see a list of users, as the list of mirc, I see all the names Apr 08 19:12:33 I want to add up on that list, the number of users that are there Apr 08 19:12:36 EG Apr 08 19:12:41 b0t: i'm asking you again: do you understand now why your statement is useless? Apr 08 19:12:45 "3" users connected Apr 08 19:12:46 brian Apr 08 19:12:48 john Apr 08 19:12:50 b0t: Apr 08 19:12:51 b0t: please stop that Apr 08 19:12:54 ok Apr 08 19:13:10 b0t: do you understand why your getChildAt statement is useless? Apr 08 19:13:32 How to hang share intent on the menu, if I create menu programmatically? http://developer.android.com/training/sharing/shareaction.html Apr 08 19:13:33 I understand Apr 08 19:13:37 I mean, how to set android:actionProviderClass="android.widget.ShareActionProvider" ? Apr 08 19:13:58 has no function, no nothing invokes Apr 08 19:14:16 b0t: I dont know what this means but maybe you've understand Apr 08 19:14:28 <_nexxus_> quick question for anyone familiar with the emulator in the sdk.. i've got it running fine, it seems, but there are no apps..no background.. just a black screen, a clock, and a button with a phone with a slash through it .. pushing an app from android studio seems to work .. it loads the app and such.. but installing any other apk doesn't give me an icon i can click.. there's literally nothing on the screen other than the clock Apr 08 19:14:40 <_nexxus_> here's what it looks like: http://www.enlightenment.org/ss/e-534448c65c9657.74294305.jpg Apr 08 19:14:41 b0t: another question: is it right that you want to replace the text "Introduce tu Nick" with the number you are talking about? Apr 08 19:14:56 b0t: i.e. do you want the text "Introduce tu Nick" to disappear and instead show the number? Apr 08 19:15:03 YESSS Apr 08 19:15:06 its correct Apr 08 19:15:10 !!! Apr 08 19:15:25 <_nexxus_> anyone have any ideas? Apr 08 19:15:27 b0t: a) find that view on your contentView just with findViewById Apr 08 19:15:35 hi Apr 08 19:15:36 b0t: b) cast it to a (TextView) Apr 08 19:15:50 my R.java is generated, but the .java have an error, how i can solve? Apr 08 19:16:01 b0t: set the value of that TextView with the appropriate setter - eclipse and if necessary google will help your with the name of that setter Apr 08 19:16:21 b0t: hint: it definitely doesnt start with "get" Apr 08 19:16:24 t0th_-: fix whatever broken thing you put into R then? ie naming files foo-bar.png won't work and so on. Apr 08 19:16:40 ok Apr 08 19:16:51 _nexxus_ have you tried with other system images? Apr 08 19:18:15 _nexxus_: tl;dr: drop the emulator, use genymotion Apr 08 19:19:10 <_nexxus_> leslie: not yet.. perhaps with a shot Apr 08 19:19:15 <_nexxus_> ohcibi: let me check that out Apr 08 19:19:50 _nexxus_: just dont bother about the emulator.. it has all sorts of issues, some of them unsolveable - its terrible performance amongst the unsolveables Apr 08 19:20:02 well I heard about x86 and snapshot and bla, but..... genymotion! Apr 08 19:21:44 <_nexxus_> ohcibi: looks decent..but no package in gentoo package manager and would have to do a manual install Apr 08 19:21:47 <_nexxus_> suppose i can do that Apr 08 19:21:58 <_nexxus_> or does it run under linux? Apr 08 19:22:40 _nexxus_: the images run in a virtualbox, so it runs everywhere Apr 08 19:22:54 ohcibi: Apr 08 19:22:55 ((TextView) this.findViewById((R.id.conectados)).getListView().getChildAt; Apr 08 19:23:03 there is a client that does the setup with virtualbox and loads the images and stuff, but this exists for linux as wlel Apr 08 19:23:06 I'm around? Apr 08 19:23:35 birbeck: Thanks for the link. I apparently need to include it with resources, so I was missing quite a bit. Apr 08 19:23:38 I get it soon Apr 08 19:23:45 b0t: why are you calling getListView() again? Apr 08 19:23:52 jaja Apr 08 19:23:56 stop Apr 08 19:24:00 im create Apr 08 19:24:02 process Apr 08 19:24:20 b0t maybe you should start by looking up a listview tutorial Apr 08 19:24:34 an android tutorial would be better Apr 08 19:24:39 listview is to specific actually Apr 08 19:24:41 ok one moment Apr 08 19:24:44 10 minutes Apr 08 19:24:45 or a java-tutorial 8-))) Apr 08 19:24:52 hah, yeah Apr 08 19:33:18 ohcibi: Apr 08 19:34:15 is getlistview? Apr 08 19:34:30 sorry Apr 08 19:34:32 set Apr 08 19:34:35 oojjo Apr 08 19:35:15 Hihi. Apr 08 19:36:27 hey KittenKoder Apr 08 19:37:01 How to run traceview from command line? tells me it is deprecated and to use ddms instead Apr 08 19:38:40 b0t: ? Apr 08 19:45:58 <_nexxus_> ohcibi: thanks for the pointer there.. i'll probably install it later Apr 08 19:48:04 ohcibi: one moment Apr 08 19:49:54 Alright, now the part/join messages are filtered out I can see actual chat lines. Apr 08 19:57:16 what can I use as a "HorizontalListView"? Apr 08 20:02:07 ohcibi: I can not get it, you have given me few clues Apr 08 20:02:20 ((TextView) findViewById(R.id.conectados)) Apr 08 20:02:33 getChildAt(anId) Apr 08 20:03:55 so, doesn't Android have anything like a ListView, but horizontal? Apr 08 20:04:24 b0t: i didnt say get the textview with your Id and then search for another child view on it but get the textview and set its text Apr 08 20:04:46 b0t: do some basic tutorials for android Apr 08 20:04:53 b0t: covering views and how to interact with them Apr 08 20:05:18 b0t: if you are done with that you can move on to listviews and adapters Apr 08 20:06:20 b0t: your problem is not "display the length of a list" but just "display any arbitrary value on any arbitrary view in your layout" Apr 08 20:07:13 value is only users account on that list Apr 08 20:07:21 .h Apr 08 20:07:38 #android-dev .Users: 381 Apr 08 20:08:08 Just released my first app, when do I start making the flappy bird money? So far my admob earning are zero. Apr 08 20:08:35 Henry_Gale: paste the link, i wanna download. :) Apr 08 20:08:35 Henry_Gale: pay some company to give lots of likes and recommendations on Facebook Apr 08 20:09:02 b0t: it doesnt matter what your value is... you already fail to understand how to set any value.. not speaking of a length of a list Apr 08 20:09:07 adapters Apr 08 20:09:30 b0t: so you need to learn on that topic first, and then you can advance to adapters Apr 08 20:10:06 im newbie Apr 08 20:10:11 Hehe we have 130k downloads - got a total of 100 EUR out of that. Damn we are ineffective on the commercial part (: Apr 08 20:11:37 My first Android app, my learning one basically, is an evolution simulator. Apr 08 20:12:54 to no one in particular: how long did it take to make your first app? Apr 08 20:13:10 The differences between Android Java and Java EE are so few it's easy to figure it out. The GUI is the biggest difference. Apr 08 20:13:23 keeping in mind various definitions of "complete" Apr 08 20:13:24 took me about 4 weeks to build my first app Apr 08 20:14:07 Mango_Man: I started about a week ago, still working on it. Apr 08 20:14:25 I honestly think that android dev is too awkward, Java is too verbose and everything is too over-engineered Apr 08 20:14:40 KittenKoder: is it a game? Apr 08 20:15:06 Nope. Apr 08 20:15:19 Denommus: i agree with you, but learning about dependency injection and square OSS changed my mind Apr 08 20:15:23 It's just a simulator you run and watch the results. Apr 08 20:15:35 Mango_Man: two spaces is the only way (late reply) Apr 08 20:15:52 I have always been a huge fan of Java conventions. Apr 08 20:15:54 compared to what, Denommus ? Apr 08 20:16:45 if i want to port my game to iOS, do i have to re-write mu java into C? Apr 08 20:16:51 M first class was a hex grid map with pathfinder methods. Apr 08 20:16:54 Henry_Gale: yes Apr 08 20:17:22 Henry_Gale: alternatively you could do it with xamarin, you write c# and it compiles to native apps for ios _and_ android... its not for free though Apr 08 20:17:22 Henry_Gale: you can likely share core logic with j2obc Apr 08 20:17:29 then why arent all android apps written in C so they can be ported easily? Apr 08 20:17:37 Henry_Gale: xamarin Apr 08 20:17:50 Native code is c. Apr 08 20:18:12 Henry_Gale: because the biggest hurdle to porting android apps to ios is not the programming language. Apr 08 20:18:21 the frameworks are totally different (and i do mean totally different). Apr 08 20:18:26 ^ Apr 08 20:18:26 none of your code will make any sense on ios. Apr 08 20:18:30 and vice versa Apr 08 20:18:37 in some way java is more portable, even after compiled it can be run on other architectures Apr 08 20:18:48 it cant Apr 08 20:18:50 the jvm can Apr 08 20:18:52 but not the code Apr 08 20:18:56 if portability was your goal, you would have been better off using other frameworks that provide a lowest common denominator kind of design. like those pathetic web-based ones ;) Apr 08 20:18:57 the code can only run on the jvm Apr 08 20:19:37 lol … web-based games … Apr 08 20:20:08 there are actually general purpose gaming frameworks that are written in C++ and do work very well Apr 08 20:20:15 Are these cross platform web things like phone gap getting any better? tried them a while ago ... was a total mess ... Apr 08 20:20:20 i used one when i was first experimenting with OUYA development Apr 08 20:20:24 whats an example of a web-based game that is an android app? Apr 08 20:20:31 heNNa-: crap... Apr 08 20:20:41 HTML was hyped up, then the only people to actually use it for games kind of suck. Apr 08 20:20:59 HTML5 … forgot the 5 Apr 08 20:21:01 Henry_Gale: a game is a poor choice for the web-based frameworks. there are other native frameworks (C++ usually) that are well suited for portable game dev Apr 08 20:21:18 but they rely on heavy abstraction layers that you would have never thought to build yourself if not focusing on portability from the start. Apr 08 20:21:25 ohcibi: nice, so the conclusion of my bachelor thesis is still valid :) Apr 08 20:22:08 Python is the only cross-platform scripting language that's viable. Apr 08 20:22:33 yeah python is simply awesome Apr 08 20:22:48 heNNa-: idk.. there is xamarin which looks very interesting.. its cross-platform but not webview-suck-crap-my-ass-cross-platform Apr 08 20:23:18 ohcibi: but its a native-mapper right? like titanium? Apr 08 20:23:25 Most powerful scripting language, even if the conventions are nonexistent and syntax sucks. Apr 08 20:23:30 html5 -is- a huge leap forward Apr 08 20:23:45 considering it standardized a lot of things that were done with 3rd party tools and languages before Apr 08 20:24:09 html5 is great, but not for simulating android or ios-apps Apr 08 20:24:18 oh, of course not Apr 08 20:24:25 html5 is a platform, not a vm Apr 08 20:24:38 True. kailoAtWork, but yeah, some people expected more from it. Apr 08 20:24:55 infact html+css is the most powerful manner of building GUIs, the problem is (was) just the browsers Apr 08 20:25:09 not really Apr 08 20:25:13 html sucks for building guis Apr 08 20:25:20 which is why javascript was so pervasive Apr 08 20:25:31 oh Apr 08 20:25:32 now html5 handles a lot of what javascript aimed to do Apr 08 20:25:40 in a standard way Apr 08 20:25:41 i meant build guis Apr 08 20:25:47 not change its elements Apr 08 20:25:50 Javascript was a mess. Apr 08 20:25:52 or interact with them Apr 08 20:26:05 I still think it's not good Apr 08 20:26:19 qt is a much stronger approach to ui dev Apr 08 20:27:05 well i never looked at qt tbh.. but what I know from java, objc and various native smart-TV platforms... Apr 08 20:27:23 obvc/android views are terrible, yes Apr 08 20:27:29 objc* Apr 08 20:27:53 ??? Apr 08 20:34:06 what do objective-c and android views have in common? Apr 08 20:34:20 they both have pretty bad implementations for ui development Apr 08 20:34:34 ^^ Apr 08 20:34:35 referring to cocoa of course Apr 08 20:35:44 actually, i quite like android views. way better than html/css Apr 08 20:36:08 it's closer to something reasonable, yes Apr 08 20:36:09 when people ask me about android ui development, i say its 1000x better than web Apr 08 20:36:26 and its better than qt and gtk Apr 08 20:36:33 qt/slate are still much better imho Apr 08 20:36:57 its been a while since ive done desktop apps, and i dont know what slate is, so maybe Apr 08 20:36:58 even though slate uses archaic re-implementations of common containers Apr 08 20:37:14 it's epic's proprietary ui framework, pure c++/opengl/directx Apr 08 20:37:15 ios design reminds me of visual basic Apr 08 20:37:53 i.e. it sucks and is not scalable Apr 08 20:37:57 iOS is at its core, nicer than android for ui dev.. but it falls apart with all of the proprietary you-must-do-things-the-apple-way-or-else nonsense Apr 08 20:38:20 so many things you just 'have to know' Apr 08 20:39:12 like a couple weeks ago, I just wanted to add a subject line to some share handler Apr 08 20:39:29 and I literally had to make a subclass of some nonsense, about 50 lines of code in total Apr 08 20:39:37 android was like "yup, call this one function" Apr 08 20:42:14 Pure object oriented code has that issue, kailoAtWork … it's why so few like it. Apr 08 20:43:01 I actually prefer it like that, but I'm strange. Apr 08 20:43:53 yeah, there's not much need for pure OoP Apr 08 20:44:11 ui is one of the few places where it can make sense, but it's still a huge PITA Apr 08 20:45:03 For most people it is a pain, because it's still relatively new in the grand scheme of things, and rarely enforced. Apr 08 20:45:19 not really. smalltalk has been around forever Apr 08 20:45:45 and there's a reason it's not highly-adopted. apple is the only reason a fragment of it exists today Apr 08 20:46:07 pure OoP is near impossible to debug Apr 08 20:46:16 ??? Apr 08 20:46:34 sphagetti code ftw! Apr 08 20:46:39 stageful systems are terrible Apr 08 20:46:45 ilkk stick to assembly Apr 08 20:46:47 Java error output helps me debug a lot. Apr 08 20:46:58 spaghetti code is one thing in a deterministic stack Apr 08 20:47:12 but with message passing and non-determinism of call order, etc, it can get really gross Apr 08 20:47:24 usually best to write pure functions, and wrap them in a simple class Apr 08 20:47:42 You mean multithreaded specifically? Apr 08 20:47:50 no Apr 08 20:48:01 any kind of stageful or 'pure' OOP Apr 08 20:48:05 stateful* Apr 08 20:48:19 can you link to one of your published apps? Apr 08 20:48:20 I want to load an image into an imageview on my screen. Simple. But then I want to add the ability to drag it around, and rotate it. Is this possible with an imageView? Apr 08 20:48:51 Method calls in one thread will be in order called. The messaging systems are usually on their own threads. Apr 08 20:49:19 eghdk: it's actually really easy. Apr 08 20:49:35 usually yes, but it's just an example of how things are obfuscated Apr 08 20:49:54 call stacks with strict function pointer delegates are much cleaner in 99% of cases Apr 08 20:49:55 Crap, lol I don't have the link for eghdk .... Apr 08 20:50:52 KittenKoder: Oh NO! It sounds like you had something in mind! Apr 08 20:50:54 hi Apr 08 20:51:19 i create a listview with row layout, but when i click in a listviewitem i dont have the pressed effect... Apr 08 20:51:21 how i can solve? Apr 08 20:51:26 Henry_Gale, UE4, Horn, Dark Meadow are the biggest Apr 08 20:51:57 kailoAtWork: the flaw comes from the the old school sequential thinking. To me, multithreading is second nature. Apr 08 20:52:14 multithreading has nothing to do with it Apr 08 20:52:28 To me, multithreading is first nature. Apr 08 20:52:38 eghdk: I did have a link to the interfaces for all that. Apr 08 20:52:50 if you're marshaling all of your calls to the ui thread anyways, threading doesn't impact anything Apr 08 20:53:22 I just learned about it and found a really easy to read tutorial that focused specifically on exactly what you mentioned. Apr 08 20:54:19 kailoAtWork: but then you also run into bottlenecks and bad loops if you do that now. Apr 08 20:54:36 I was using Asynctask for stuff, but now I don't see a need for it Apr 08 20:55:00 if stuff can run on the main thread without causing lag I let it Apr 08 20:55:35 I write my own messaging system tailored to the app in Java, based on what's needed. Apr 08 20:56:08 do any of you have published apps? Apr 08 20:56:35 several. Apr 08 20:56:46 can you share your google play link? Apr 08 20:56:56 http://sentinel-engine.org/dusten Apr 08 20:56:57 Not yet, I literally just started with Android Java a week ago, my past experience is Java EE Apr 08 20:57:38 Java 1 to 7 Apr 08 20:57:53 Looking forward to Java 8! Apr 08 20:58:04 Once I replaced my dead PC. Apr 08 20:58:10 I just learned Java and Android about 4 weeks ago Apr 08 20:58:35 the kilobolt tutorials were great Apr 08 20:58:44 I've written messaging systems and a couple ui frameworks from scratch as well. Believe me, it doesn't need to be pure OoP to be performant and multithreaded Apr 08 20:58:46 any? Apr 08 20:58:59 I like the Android UI classes better than Swing though. Apr 08 21:00:09 Henry_Gale, nice. Keep at it, and don't bother with iOS lol Apr 08 21:00:19 kailoAtWork: the primary reason for pure OoP is convention enforcement. I can't stand c/c++ because now they're all over the place. Apr 08 21:00:35 there are plenty of ways to do stupid things with OoP Apr 08 21:00:39 I remember the days of mode X and 0x13 when doom 1 was out you had to stick with C because C++ was too slow Apr 08 21:00:43 but yes, C++ doesn't restrict much Apr 08 21:00:54 But fewer are allowed. Apr 08 21:01:21 That's really a matter of code review/enforcement Apr 08 21:01:23 Like macros … outdated garbage that people still use which makes code unreadable. Apr 08 21:02:03 Overloading of operators makes code less readable as well. Apr 08 21:02:03 Hi all. General Android question: If my app is running as a cached backgroun application, and then manualy stopped (through for example through the Application Manager), it seems to be crashing upon re-opening. I get nullpointer's on a fragment. Apr 08 21:02:25 Am I correct in assuming that stopping the cached application doesn't really Stop it? Apr 08 21:02:29 ThomQ: look into the lifecycle. Apr 08 21:02:58 KittenKoder, it can. Apr 08 21:03:13 why my press listviewitem i dont see my left and right color? only top and bottom Apr 08 21:03:29 but str = [[NSString alloc] StringWIthString:str2]; Apr 08 21:03:29 Different portions of the app get destroyed and restarted at certain times, ThomQ Apr 08 21:03:31 is a lot uglier than Apr 08 21:03:37 str1 += str2; Apr 08 21:03:58 Uglier, but more reeadable. Apr 08 21:04:05 KittenKoder: I did, but from what I can tell, if a hidden activity is stopped, it should destroy it, right? Apr 08 21:04:09 lol ok Apr 08 21:04:32 It may not, ThomQ Apr 08 21:04:36 readable like a bad novel Apr 08 21:05:30 so, after it being destroyed, there are still some objects left over? Apr 08 21:05:44 that I should clean up in OnDestroy / OnStop? Apr 08 21:05:56 It may not be destroyed at all. Apr 08 21:06:14 How would I make an app that displays an image view, and then allows you to rotate it and resize it? Apr 08 21:06:39 Ahh k, k, so I need to check that first Apr 08 21:06:40 So yeah, you need to use the onDestroy and onStop. Apr 08 21:07:18 And then manualy remove all the fragments and stuff? Apr 08 21:07:56 thanks, i'll get on it. Apr 08 21:09:18 eghdk: http://www.techotopia.com/index.php/Android_Touch_and_Multi-touch_Event_Handling Apr 08 21:10:38 The excerpt has the information. Apr 08 21:11:15 Thinking of buying one of the actual books for my tablet. Apr 08 21:11:40 I need to go for a bit, BBL Apr 08 21:20:01 How can I compile projects from terminal? Apr 08 21:20:25 use gradle Apr 08 21:26:41 How do I compile projects for a c-64? Apr 08 21:28:09 more readable? Lol. Apr 08 21:29:51 what rgr? Apr 08 21:30:22 10 PRINT "HELLO WORLD" Apr 08 21:30:26 20 GOTO 10 Apr 08 21:30:33 RUN Apr 08 21:31:36 i miss goto's Apr 08 21:33:05 you miss goto's what? Apr 08 21:44:13 Question: i'm trying to set NavigationMode of my actionbar compat to List mode: actionBar.setNavigationMode(NAVIGATION_MODE_LIST); however, I can't resolve NAVIGATION_MODE__LIST. I'm trying to do this in a OnCreate method within an ActionBarActivity Apr 08 21:45:09 what is the best way to refresh the screen at a certain interval, say 30 fps Apr 08 21:46:31 I can just update a textview, just need to force a redraw, but I'm wondering the most accurate way to time it Apr 08 21:54:33 if you call getAllProviders, are the providers in any order or does passive just always come first? Apr 08 22:03:11 Anyone else think people who use kickstarter for funding game development are lame. Apr 08 22:03:31 Just build the damn game and if its good it'll make you money. Apr 08 22:03:58 Same goes for people "making a living" on youtube who ebeg constantly Apr 08 22:07:42 Hi! I've written a service that binds another service. The services should talk to eachother by messaging. I wrote a simple IncomingMessageHandler like explained in the most tutorials. The problem is now, that I receive the first incoming message in an endless loop, which i have not created. Android is calling my handler again and again. has anyone an idea? Apr 08 22:08:42 amiloxa: that could have so many reasons. Might be handy to paste the code Apr 08 22:10:53 ThomQ: http://pastebin.com/UmWq7YBa Apr 08 22:11:00 this is the class with the handler Apr 08 22:11:09 i am sure that the other class is only binding it for once Apr 08 22:11:13 and sending the message for once Apr 08 22:11:34 the handler is receiving it in an endless loop Apr 08 22:12:37 oh, i got an idea... maybe it's my fault :| Apr 08 22:12:57 :) that's ok, it happens to me Hundreds of times Apr 08 22:13:29 the sendMessageToNFCApp() method should send a message to the other side Apr 08 22:13:43 maybe the reason for my problem is that it is sending a message to itself? Apr 08 22:14:03 well, yeah, that would account for the infinite loop Apr 08 22:14:48 are you familiar with messengers? Apr 08 22:15:20 tiny bit, but am familiar with loop bugs ;) Apr 08 22:15:31 hmm Apr 08 22:15:50 an idea what i have to change in this code? :) Apr 08 22:16:44 can anyone tell me how to verify test ads (by admob)? Apr 08 22:16:55 I'm not sure if I get the testads or real ads Apr 08 22:18:00 not specificly. But what I would do is debug the very last lines before the looping occurs, and see where it goes from there. If sendMessageToNFCApp gets looped indefinately, then check backwards from there Apr 08 22:18:47 skullcrasher, you'll know its a test because it will say "this is a test ad" Apr 08 22:19:31 ah ok :) Apr 08 22:19:42 then i get the real ones -.- Apr 08 22:20:07 although i just use the .addTestDevice() .. Apr 08 22:22:24 yeah, I just implemented admob myself, but I'm pretty disapointed with it. Apr 08 22:22:38 why? Apr 08 22:23:02 for one, it seems to cause slowdowns in my game, and secondly, i don't seem to earn anything unless someone physically clicks the ad, and then its only 6 cents Apr 08 22:23:21 at least adsense pays even if its not clicked Apr 08 22:24:31 hmm Apr 08 22:24:44 for me it would be enough for now that test-ads work :D Apr 08 22:24:54 General question: Can a Messenger be used for bidirectional communication or do i need a second one (or a broadcast) to send messages back? Apr 08 22:24:54 I get more then 6 cents on average Apr 08 22:25:32 granted I'm using a smartbanner so its super thin and doesn't obstruct the gameplay. I suppose if I position in to get in the way of the controls, I'd make more, but that would just piss off the gamer Apr 08 22:26:12 ThomQ, how much do you make on average per click? Apr 08 22:26:28 6 cents seemed ridiculous. Adsense pays like 60 cents! Apr 08 22:27:59 -.- also emulator gets normal ads Apr 08 22:28:00 wtf Apr 08 22:28:32 that would be expected since the emulator doesnt use your device ID Apr 08 22:28:59 added AdRequest.DEVICE_ID_EMULATOR ;) Apr 08 22:29:06 just like in the docs Apr 08 22:29:40 oh, nevermind then :) Apr 08 22:30:03 quite bad -.- Apr 08 22:30:07 just don't click your own ads too many times :) Apr 08 22:30:20 what kind of game you making? Apr 08 22:30:24 no game :D Apr 08 22:30:42 you mean there's non-game apps for the Android? Apr 08 22:30:55 an app for a local ..erm fair/festival Apr 08 22:31:10 It's not another Craigslist notifier is it? Apr 08 22:31:35 what is craigslist xD Apr 08 22:31:37 nope Apr 08 22:32:55 it marks all booths on a map, list the events etc Apr 08 22:35:40 cool Apr 08 22:35:56 but for now unofficial :) Apr 08 22:36:19 we hope the will take it and also promote it officially for this/coming years :) Apr 08 22:36:47 iPhone also in work Apr 08 22:55:33 omfg -.- Apr 08 22:55:48 looks like test ads only work if device language is english...WTF seriously oO Apr 08 23:00:52 60c a click? Really? Jesus. Artists dont get that when their songs are played. Apr 08 23:03:59 they are in the wrong business Apr 08 23:05:41 hello, i put my html & .js files files on the assets folder and load them using webview. my app only targets API 14 (ICS) and above. can i use proguard to obfuscate the assets folder? Apr 08 23:05:55 an advertiser would be crazy to pay $0.60/click unless it was a very high conversion or extremely targetted Apr 08 23:06:23 my guess is no Apr 08 23:06:36 what is webview expected to do with the obfuscated files? Apr 08 23:06:50 you can use a javascript obfuscater, but not proguard Apr 08 23:07:12 just to protect html files from prying eyes. thats all :) Apr 08 23:07:21 well what niche Apr 08 23:07:28 it is completelly realistic in some neaches Apr 08 23:07:30 niches Apr 08 23:08:12 twiceaday: yeah, im sure people even pay a lot more than that, though thats not the norm Apr 08 23:08:33 johnc--: just like on a website, your html and js are visible to all Apr 08 23:08:46 ok birbeck Apr 08 23:08:50 i can pull the apk from my device, extract it and view the assets Apr 08 23:09:03 or i can root my device and use a root file explorer to see them Apr 08 23:09:11 so what about i put in res/raw folder? Apr 08 23:09:21 same Apr 08 23:09:29 those files dont get compiled Apr 08 23:09:38 i see, thanks. Apr 08 23:10:27 johnc--: that doesnt mean you cant obfuscate them though. Apr 08 23:10:38 especially the js. Apr 08 23:10:40 you could include an encrypted zip file containing the assets, unzip it at runtime and clean up on exit... though the files will still exist on the filesystem during runtime Apr 08 23:10:44 for js use an js ugliyfier :D Apr 08 23:11:25 plus theere can be bandwidth benefits. Apr 08 23:11:46 yeah Apr 08 23:12:08 always minimize and obfuscate java and js code Apr 08 23:12:28 okay... js uglifier will do :D Apr 08 23:12:31 thanks everyone. Apr 08 23:16:13 so i have a horizontal layout with a couple views in it, is there a way to make the entire layout clickable like a button? or can i put it on a button or something? Apr 08 23:20:17 I need to write an app that poll a web service every 5 seconds for an SMS to send and then sends it, updating the SMS status to the server (sent, delivered). What is the best way to do this? This must always execute, even if the device is going to blow up (it'll be on dedicated devices). Apr 08 23:26:52 cmircea: use google cloud messaging and push the message to the device when ready instead of polling. receive it in a wakefulbroadcastreceiver Apr 08 23:27:11 birbeck, for other reasons, I can't use push; I have to do polling. Apr 08 23:27:40 mathis98: i have no idea why you want this, but you can make the root view clickable and then child views can inherit state Apr 08 23:28:09 cmircea: i cannot think of a single case where polling is required or would be more efficient Apr 08 23:28:32 birbeck: I can think of at least two reasons, immediately, why gcm might not be the answer Apr 08 23:28:39 well i have several views inside a layout that comprises the information I want to display - and i want that entire box to be clickable, ideally i would just put these views on a button Apr 08 23:28:45 but i found android:clickable Apr 08 23:28:45 birbeck, it isn't more efficient; in fact, it's horrible compared to push. But implementing push would require rewriting a good chunk of the web service, which is not an option right now. Apr 08 23:28:58 you can integrate with gcm using cms to have a always present connection and be notified immediately Apr 08 23:29:07 birbeck, since the service relies on being polled; it cannot notify anybody of anything. Apr 08 23:29:17 Leeds: all i can think of is targeting non-google certified devices Apr 08 23:29:29 birbeck: or running on a non-Internet network Apr 08 23:29:51 Leeds: perhaps Apr 08 23:31:02 birbeck, due to this, I have to use polling for the moment. Thing is, I am not sure how to implement it so that it's reliable, that is Android doesn't kill my app while it does its job. Apr 08 23:31:11 Hello! Apr 08 23:31:32 I have a linear layout with some text and images inside... How to highlight it when it's pressed? Apr 08 23:31:49 Normally I'd use a state selector, but the image is a product image Apr 08 23:31:54 so I only find a single version... Apr 08 23:31:56 gavilan2: kinda looking for the same thing but i found this https://github.com/shamanland/AndroidLayoutSelector Apr 08 23:32:03 How can I highlight it? Apr 08 23:32:18 cmircea: either the activity has to be in the foreground, or you have to use a foreground service. you can set high priority on them, but you have zero way to absolutely prevent the os from killing your process Apr 08 23:32:54 cmircea: on a dedicated device you should be reasonably safe Apr 08 23:32:54 My issue is actually the image Apr 08 23:33:02 Highlighting text is easy Apr 08 23:33:03 gavilan2: use a compound view or wrap the image in another view Apr 08 23:33:09 birbeck, well, do everything I can to minimize the killing, and if killed, restart ASAP. Since the device won't be running anything else, hopefully it'll never happen, but I have to handle it just in case. Apr 08 23:33:21 birbeck how does a listview do to highlight items? Apr 08 23:33:40 Can I use that for a linear layout? Apr 08 23:33:53 huh? Apr 08 23:34:00 birbeck, searching around people are recommending a plain Service, an IntentService, or AlarmManager. Since I'm not too familiar with Android dev I'm not sure which is the best option. Apr 08 23:35:23 gavilan2: one approach is to use a framelayout with your imageview inside it. make the framelayout clickable and put a foreground drawable Apr 08 23:35:39 cmircea: they all have different uses. Apr 08 23:35:45 birebeck: that seems like a good idea Apr 08 23:35:58 can I set the color of the foreground with a state selector? Apr 08 23:36:57 cmircea: for your case, probably a regular service with start_sticky and high priority Apr 08 23:37:04 gavilan2: yes Apr 08 23:38:04 cmircea: if you start it as a foreground service, it will be unlikely to be killed, but you must show a notification in the system tray while it is running Apr 08 23:38:27 birbeck, alright; why would that be better over AlarmManager? As far as I can tell with a plain service I have to manage another thread that does the polling and so on. Apr 08 23:38:32 if you dont provide a notification, android 4.2+ will provide one for you telling the user your app is a hack Apr 08 23:38:45 That's fine. Apr 08 23:39:12 This'll run on 2.3.6 for now. Apr 08 23:39:31 So yeah, as a plain service I'll have to show a dummy notification, not an issue. Apr 08 23:39:43 yeah you do have to manage the threading yourself. you can use alarm manager to fire off a intentservice every 5 sec, by why? just start a new thread in a loop, sleep for 5s at the end. terminate the loop and call stopSelf() when the conditions are met Apr 08 23:40:10 on 2.3, you do not have to provide a notification Apr 08 23:40:46 great! thanks Apr 08 23:41:06 birbeck, that's not a bad way to do it. Apr 08 23:41:10 birbeck, I found this: http://stackoverflow.com/questions/4459058/alarm-manager-example Apr 08 23:42:05 birbeck, it uses AlarmManager, handles the boot event to start the repeating alarm. I don't know if in the "Put here YOUR code." part I can do sync work, or I'd have to start a thread or some other solution. Apr 08 23:42:12 If I'm going to use that over a service. Apr 08 23:43:11 cmircea: that is the basis for doing it. but you dont need to use alarm manager. just sleep in your thread. why start and stop a service every 5s if you can just keep one running. you are then depending on alarm manager to run, your intent to get delivered and the thread to run and complete in under 5s every time Apr 08 23:43:51 you have to start a thread, or you could do the exact same thing in an intent service which will handle the thread Apr 08 23:43:52 my app crashes when I set a state selector as a View background... any ideas? Apr 08 23:44:01 Resource not found Apr 08 23:44:07 birbeck, well an option would be to set a single-shot alarm then at the end set it again 5 secs from now, but I suppose all of this is more work than just sleeping a thread. Apr 08 23:44:09 instead of onStartCommand(), onHandleIntent will be called Apr 08 23:44:14 Since memory usage isn't a concern. Apr 08 23:44:41 the more memory you use, the more chance of the system stopping the service Apr 08 23:45:06 and doing that full cycle every 5s is putting a lot of load on the system. i hope this isnt an app you want to release to the play store Apr 08 23:45:27 gavilan2: resource not found is a pretty explicit error Apr 08 23:45:42 birbeck, no, it'll be a private app. The device (right now a Galaxy Mini 2) has about 200 megs free, I don't plan on using anywhere near that much. Apr 08 23:45:46 it cant find the resource you declared as the background Apr 08 23:46:00 birbeck, can I use an infinite loop in onHandleIntent? Cause if I return from that the service quits. Apr 08 23:46:57 birbeck, and then, can I set an IntentService as foreground? Or is it not necessary? Apr 08 23:47:05 birbeck: I did define it Apr 08 23:47:38 cmircea: no, onStartCommand() is never called on an intentservice, so you cannot attach to foreground Apr 08 23:48:05 I have a selector that works on textColor I set it on the same view in background and the app crashes Apr 08 23:48:39 birbeck, alright then, well: I handle BOOT_COMPLETED, start my service. I set my service to run in the foreground, then start a worker thread that never ends where I do my polling and whatever else. Is that okay? Apr 08 23:49:23 why do you need to start on boot? Apr 08 23:49:52 are you not looking for a single message? are you polling indefinitely for new messages? Apr 08 23:50:39 this is exactly why push was invented Apr 08 23:50:54 birbeck, I am polling indefinitely - until the device is turned off. The whole point of this app is to send SMS messages for a website (notifications, whatever); this is not something that will be released outside my organization. Apr 08 23:51:18 yeah i get that Apr 08 23:51:48 gavilan2: pastebin your layout and drawable xml Apr 08 23:52:53 birbeck, at the moment we use a few modems and a Windows service to send the SMS notifications, but that solution is not very reliable. Smartphones are better suited for our needs, since they don't break and hang because the sun is a bit brighter today. Apr 08 23:54:58 birbeck, anyway, so, uh, is the service at boot, with an infinite loop on a separate thread a good option? If Android wants to kill the service, how can I make sure it is restarted ASAP? Apr 08 23:55:01 if I use an empty selector it works Apr 08 23:55:11 if I try to put in the selector it crashes Apr 08 23:55:59 cmircea: if you return Service.START_STICKY from onStartCommand() the service will be restarted ASAP by the system if killed Apr 08 23:56:10 birbeck, well, that's great. Apr 08 23:56:22 but if you follow that example, alarm manager will be restarting the service every 5 seconds Apr 08 23:56:24 gavilan2: does android:drawable="@color/your_color" work? Apr 08 23:57:10 birbeck, well I suppose it doesn't make much sense to have an alarm allocate a service, restart it, initialize everyting, let it execute for a couple of seconds and then leave the GC to clean everything. Apr 08 23:57:11 canvs2321: yeah thats what i was thinking, you cannot (i believe) use a color value in @drawable, only a @color reference Apr 08 23:57:28 birbeck, sounds better to just use the few megs to keep it running and have the sytem do nothing most of the time. Apr 08 23:57:56 gavilan2: or Apr 08 23:58:07 cmircea: oh fuck no, never rely on a service to be garbage collected, if you dont call stopSelf() at the end, and you keep spawning it, android will run out of memory and not know which instance to kill Apr 08 23:58:37 canvs2321: i dont think that is legal Apr 08 23:58:42 birbeck, right, right. In the AlarmManager case I'd have use IntentService, which would stop itself Apr 08 23:58:46 *used Apr 08 23:58:49 yeah it is Apr 08 23:58:51 android.content.res.Resources$NotFoundException: File res/drawable/highlight_selector.xml from drawable resource ID #0x7f0200a9 Apr 08 23:59:05 or atleast second one i said is Apr 08 23:59:27 tag requires a 'drawable' attribute or child tag defining a drawable Apr 08 23:59:55 gavilan2: works Apr 09 00:00:01 cmircea: right. if you use alarm manager, use an intent service. still, you should be just fine with a single foreground service started at boot Apr 09 00:00:05 the child tag is Apr 09 00:00:16 birbeck, alright, I'll use a simple foreground service. Apr 09 00:00:19 birbeck, now, for the actual polling, I'm going to use Retrofit to fire the HTTP requests. Should I use it in a sync fashion, just block the thread until a response is received? Since the thread will always be running I don't see the point of async code, since I can't do anything until I get a response or timeout anyway. Apr 09 00:00:44 yes Apr 09 00:00:50 android:color crashed, and android:drawable works Apr 09 00:00:51 gavilan2: yeah, you need @drawable which can reference an @color but not a color value, and you cannot but xml tags inside of Apr 09 00:00:52 Thanks guys! Apr 09 00:01:31 cmircea: sounds like a good use for sync Apr 09 00:01:51 JakeWharton, alright then! Apr 09 00:02:12 cmircea: either way. run your own thread or use a callback... probably better going the callback route and calling stopSelf() from both onSuccess() and onFailure() in retrofit Apr 09 00:02:29 heh, if jake says sync, go sync :) Apr 09 00:02:48 birbeck, heh. I'll do a sync request in the thread loop then. Apr 09 00:02:54 birbeck, thanks for the help so far! Apr 09 00:03:09 oh yeah, i forgot we were looping in an indefinite thread Apr 09 00:03:21 if you are already running inside your own thread, definitely do sync Apr 09 00:03:27 birbeck, now uh, if you still have time, I have some questions about SmsManager. Apr 09 00:03:47 i actually have very little experience with smsmanager Apr 09 00:04:13 birbeck, well hopefully somebody with more experience could chime in :) Apr 09 00:04:38 ive used it before, the documentation was fine Apr 09 00:05:16 sendMultipartTextMessage takes a list of intents for the sent and delivered events; how do I provide those? I need to know if the whole SMS was sent/delivered, not an individual part, and if so, fire another HTTP request to tell the server. Apr 09 00:06:49 not sure, sounds like you've got some research to do Apr 09 00:07:59 birbeck, the bad thing is, there's not much about SmsManager on the web. Apr 09 00:08:00 man Chronometer is a pita, can't it be like any other stopwatch view without me having to carry around extra state and timebase offsets Apr 09 00:08:33 g00s: yeah, i just experienced chronometer for the first time Apr 09 00:12:10 what's the best listener to use to write from an edit text to a database (comment field), i want to use the onFocusChanged listener but the edittext doesnt seem to lose focus when i click on other elements. thoughts? Apr 09 00:19:55 Hello . . . how can I compile and run an application with Android Studio? Apr 09 00:21:53 http://developer.android.com/sdk/installing/studio.html Apr 09 00:28:24 Question: I got a Spinner on my actionbar, but I can't get it to work. More specificly, I can't get onNavigationItemSelected to be called in the following code http://pastebin.com/ANTbEnps Apr 09 00:29:12 the spinner and the OnNavigationListener are being created, I can even see the spinner being pressed visually. onNavigationSelected never fires though, and no list is being shown Apr 09 00:43:45 birbeck gotta remember to stop chronometer otherwise it might leak stuff Apr 09 00:44:19 * g00s thinks they should just start over again with a new framework Apr 09 00:44:51 g00s: interesting, i wasnt aware of that... well good thing i stopped working on that app Apr 09 00:45:00 I keep getting the error: "Rendering Problems No Android SDK found. Please configure an Android SDK. " with Android Studio. How can I fix it? The SDK is installed. Apr 09 00:50:12 ugh, i think i found the bug. for some reason, btadapter status seems to be lying sometimes when airplane is on . this looks like it https://code.google.com/p/android/issues/detail?id=11387 Apr 09 00:50:26 how can a finite amount of code have infinite # of bugs ? Apr 09 00:50:39 Technicus: that error should have a link to configure sdk, just point android studio to the sdk path Apr 09 00:50:59 birbeck: I did that. Apr 09 00:51:42 is there a way to see the very last return value in the debugger? Apr 09 00:51:55 when i step out of a method Apr 09 00:54:32 intellij supports it for java debugging, but its not supported in android studio for android apps Apr 09 00:55:32 good night Apr 09 01:04:45 Android Studio is working properly now, and it is MEGA AWESOME!!! Thanks for the help! Apr 09 01:05:09 meh Apr 09 01:05:14 * frankdrey prefers IntelliJ Apr 09 01:05:26 but they're the same thing Apr 09 01:05:35 not really Apr 09 01:05:38 AS forces Gradle Apr 09 01:05:51 Well, compared to the constant failure of Eclipse, and the nice Dracula theam, it is maximum improvement. Apr 09 01:06:01 and projects break every other update >.> Apr 09 01:06:09 i use darcula with IntelliJ :P Apr 09 01:06:41 Well, Eclipse dosen't even have that. Apr 09 01:07:08 you wasn't leet enough to hack your eclipse to be dark Apr 09 01:07:32 does the eclipse theme plugin get to all the corners of the api yet ? Apr 09 01:07:39 it used to mostly just be the editor Apr 09 01:07:41 I tried, but I'm not even l33t enough to get Eclipse to run without crashing. Apr 09 01:07:44 not the project workspace tree Apr 09 01:07:58 *corners of the IDE Apr 09 01:08:26 darcula in AS keeps showing me black text on dark grey in some areas Apr 09 01:08:30 this is a new bug Apr 09 01:13:04 man Apr 09 01:13:08 I wish one of two things Apr 09 01:13:15 1. I knew this shit better Apr 09 01:13:28 2. I could compile faster so that I can find my bugs faster :P Apr 09 01:13:47 g00s: probably some style definition missing for darcula, using colours that are chosen for light theme Apr 09 01:14:10 frankdrey, 1 that'll come with time Apr 09 01:14:13 how to suspend the device (put it to sleep) using ndk? Apr 09 01:14:23 2, you don't need to compile the whole thing at once Apr 09 01:14:39 I don't think IntelliJ is Apr 09 01:15:02 it's just that 1. my laptop is slow as it is and 2. my Nexus S has to run dex2oat each install Apr 09 01:15:42 turn off art? Apr 09 01:15:58 but it "saves battery" :P Apr 09 01:16:03 i dunno, I guess I should Apr 09 01:16:11 isn't you device plugged in for adb? Apr 09 01:16:24 yeah, but this is also my daily Apr 09 01:17:03 did the Nexus S get 4.4.2 ? Apr 09 01:18:13 shmooz, unofficial Apr 09 01:18:21 works MUCH better than 4.1 Apr 09 01:18:39 cool Apr 09 01:19:00 awesome 4.1 was almost useless on a NS Apr 09 01:20:27 ok, selection is Contacts.DISPLAY_NAME_PRIMARY + " LIKE ?"; but it's not working :S Apr 09 01:20:37 the search term and selectionArgs are set up correctly Apr 09 01:20:42 i'm just getting 0 results Apr 09 01:21:21 post the whole query and params to pastebin? Apr 09 01:21:30 oh! Apr 09 01:21:57 just noticed I have to surround the search string with % Apr 09 01:22:41 also, I'm guessing it's not possible to get phone and email in the same query? Apr 09 01:23:32 should be able to Apr 09 01:24:07 hmmm Apr 09 01:24:20 i'm not really sure if what i'm saying is correct but: Apr 09 01:24:33 if you do a query on phones, it gives their number(s) in columns Apr 09 01:24:45 but if you're doing a contacts query, it's 1 column per contact? Apr 09 01:24:54 * frankdrey isn't very familiar with these types of dbs Apr 09 01:25:01 only App Engine Datastore :P Apr 09 01:25:02 not sure Apr 09 01:25:18 you should be able to specify as manu cols from that provider as you want Apr 09 01:25:21 like in SQL Apr 09 01:26:04 use commas for multi selects Apr 09 01:27:13 well when I add Phone.NUMBER and Email.ADDRESS to the projection, I get that it's an invalid column Apr 09 01:27:37 the rest of the projection is Contacts._ID and Contacts.DISPLAY_NAME_PRIMARY Apr 09 01:28:38 frankdrey: you are using Cursor ? Apr 09 01:28:55 CursorLoader, so yeah? Apr 09 01:29:52 you should be able to have many projections Apr 09 01:30:45 waiiiit Apr 09 01:31:11 so a projection isn't the array, but each string in the array is a projection? Apr 09 01:31:20 yes Apr 09 01:31:41 separated by commas Apr 09 01:32:06 ok, so how would the data be organized? Apr 09 01:33:02 and then you get the results like c.getString(position) Apr 09 01:33:22 ok so let's say I have projection = {A, B, C} Apr 09 01:33:29 c.getString(0) would get the first one in the array Apr 09 01:33:33 and A is a multi select Apr 09 01:33:45 what does moveToNext() move? Apr 09 01:34:22 it iterates through the number of results Apr 09 01:34:30 like the number of returned rows in your case Apr 09 01:35:29 there's also moveToPosition(pos) Apr 09 01:35:35 so each contact is a row? Apr 09 01:36:08 and column would be id, name, etc.? Apr 09 01:36:17 yeah Apr 09 01:37:37 wait, but doesn't the content uri have to be Phone.CONTENT_URI not Contacts.CONTENT_URI? Apr 09 01:37:54 I think that's my problem, I want to get name, phone, email in one query but they're in different URIs? Apr 09 01:38:38 maybe Apr 09 01:39:04 sorry, i meant to say - it depends what the docs say Apr 09 01:39:55 lol Apr 09 01:45:01 How do I set a button's text color programmably in an xml file? Apr 09 01:45:31 programmatically .. in xml :| Apr 09 01:45:31 ememem: that wouldn't be programmatically Apr 09 01:46:14 okay, then how do I set the bottons color in xml, period. Apr 09 01:46:20 text color specifically Apr 09 01:46:23 probably android:textColor or something Apr 09 01:46:46 I got this spinner in my action bar set up and working, but it's not exactly what I'm looking for. I was trying to create a dropdown menu for the settings button, so basicly a spinner with just a list of values, so without the Title change as it were. Apr 09 01:46:50 it'd be so nice if android used JSON resource files instead of xml ones Apr 09 01:47:00 Is this achievable with a spinner, or should I be looking into something else? Apr 09 01:47:38 thanks mango, that did it Apr 09 01:48:56 ememem: in java there should be like b.setTextColor(Color.BLUE); Apr 09 01:49:14 ThomQ, basically like the options menu?:P Apr 09 01:50:09 why do web rendering engines parse html instead of json? an all JSON world would be so nice omg Apr 09 01:51:53 So, I have a situation I don’t know how to solve. I have an app that needs to keep the vibration function active while docked Apr 09 01:52:15 Mango_Man, less do it Apr 09 01:52:22 It works fine until I plug it in Apr 09 01:52:40 frankdrey: not exactly. I need the functionality of the options menu, but the look of a spinner Apr 09 01:53:15 to clarify, i'm using actionbar apcompat Apr 09 01:53:48 Anyone know of a way to force vibration functions permanently on regardless of the situation? Apr 09 01:54:29 Hello. How do I filter a listView with multiple parameters other than a single charsequence? Apr 09 01:54:35 ThomQ: you can do android:spinnnerMode="dropdown" Apr 09 01:58:04 I’m starting to think its not possible Apr 09 02:01:07 shmooz: i already got that mode Apr 09 02:01:16 ran out of RAM as always >.> Apr 09 02:03:27 I think I found what I was looking for Apr 09 02:03:34 god, I feel so fucking stupid sometimes :D Apr 09 02:03:57 :D Apr 09 02:04:15 in my defence, it is 04:00 am here Apr 09 02:04:26 :p Apr 09 02:04:27 during the day time i ask less stupid questions :P (I hope) Apr 09 02:04:33 I'm making dumb mistakes and it's 7 pm Apr 09 02:04:39 * RaveTZ is going out to get some food Apr 09 02:04:45 but I am feelin' like shit, think i have a cold Apr 09 02:04:45 FrankDrey, same here Apr 09 02:04:50 6 a.m. Apr 09 02:05:02 no remedy for my filtering problem still Apr 09 02:05:04 I’ve been tackling this stupid vibrate issue for hours Apr 09 02:05:14 I hate auto changes when docked Apr 09 02:05:46 hopefully food will fix it somehow Apr 09 02:06:08 i've just spend an hour trying to figure out how to get a spinner.. For nothing Apr 09 02:06:16 well nothing.. For the future :P Apr 09 02:08:16 :JakeWharton sorry for bugging you `request` is getting null in https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/gallery/GalleryView.java#L48 and I don’t know how to trace it to find the reason. Apr 09 02:08:45 can't you debug through that method? Apr 09 02:08:54 it never returns null in my version Apr 09 02:08:56 dear IntelliJ, -1px is a perfectly valid margin Apr 09 02:08:59 so shut up Apr 09 02:09:36 ok, yeah, I'm gonna switch back to Dalvik, this takes way too long Apr 09 02:10:02 will oat be eventually packaged in the apk? Apr 09 02:11:10 or is that even possible? Apr 09 02:11:16 isn't oat cpu-specific? Apr 09 02:13:55 :JakeWharton I tried in AS, step in with debuging but still getting java.lang.NullPointerException. Btw, if I remove Debug part in U2020 is loosly coupled, right, there is no any libraries which depends on? Apr 09 02:14:20 frankdrey: i filed a bug for that a while back Apr 09 02:14:58 linkie? Apr 09 02:15:02 kamol: i don't understand the question Apr 09 02:15:20 frankdrey: http://b.android.com/60735 Apr 09 02:15:25 thanks Apr 09 02:15:40 ah Apr 09 02:15:44 cool :) Apr 09 02:17:38 yeah, that's weird Apr 09 02:17:48 i wonder if maybe in some specific api they were broken Apr 09 02:18:54 :JakeWharton I cannot find the joining between GalleryDatabase and OkHttpClient in U2020. Maybe that part I did wrong… Apr 09 02:20:31 GalleryDatabase injects GalleryService. GalleryService depends on RestAdapter. RestAdapter depends on Client, Client depends on OkHttpClient Apr 09 02:22:19 :JakeWharton thank you, let me trace it by those componenets Apr 09 02:22:58 it doesn’t sent http request at all :P Apr 09 02:31:18 If anyone has worked with imageviews a lot, I would appreciate help on this question: http://stackoverflow.com/questions/22951375/how-to-show-the-user-that-an-imageview-is-selected-android Apr 09 02:32:16 EGHDK, put a transparent view on top of it? Apr 09 02:33:05 wait, what do you mean by background color if it's transparent? Apr 09 02:33:12 what do you expect to show behind it? Apr 09 02:34:12 or are you trying to get a "glow" around it? Apr 09 02:35:43 frankdrey: Yes. Apr 09 02:35:53 oh my. that is such a better way to put it. Apr 09 02:36:00 a "glow" Apr 09 02:37:41 http://stackoverflow.com/questions/10580052/how-to-make-glow-effect-in-my-images Apr 09 02:38:22 I don't really like how the above one is done :p but basically you don't need OpenGl, just Canvas Apr 09 02:39:38 * frankdrey loves the screen recording thing from 4.4 Apr 09 02:40:34 haha So I just need to figure out how to make my imageview into a canvas when its touched? Or do you think I should make a custom imageView Apr 09 02:42:27 just pull out the bitmap, stick it into a canvas, modify it, and put it back into the imageview Apr 09 02:45:00 though i wish there were visual feedback for "back", "home", "menu" on devices that have it off screen Apr 09 02:47:29 EGHDK, I think a good way would be to make a copy of it, tint it to a single color, and lay them on top of each other Apr 09 02:47:34 but I'm no Canvas expert :) **** ENDING LOGGING AT Wed Apr 09 02:59:58 2014