**** BEGIN LOGGING AT Thu Mar 20 02:59:59 2014 Mar 20 03:00:08 how did you get in with the survey companies? Mar 20 03:00:09 Hello all! I'm trying to find the source for the graph that is shown on the data usage screen. I assume it should be available in the aosp project. Can somebody tell me how to find it? Mar 20 03:00:41 my partner has a lot of background/relationships with a lot of major advertising/market research firms Mar 20 03:00:53 excellent Mar 20 03:01:11 still a bit of the chicken and egg situation though Mar 20 03:03:14 having enough developers willing to use it to impress the survey companies enough to get on board? Mar 20 03:03:26 QubeZ was 9/8/2013 the first release date for you? Mar 20 03:03:48 my first app came out about a week earlier than that... iOS though, working on the android version right now Mar 20 03:04:02 ultra-: no, Mar 2012 Mar 20 03:04:08 i've had several updates Mar 20 03:04:10 ah ok Mar 20 03:06:30 anyone have experience with speech recognition? I'm looking to write an always listening service/activity -- when in the app. Mar 20 03:06:49 basically, writing an audio remote control Google Glass app to control my Apple TV Mar 20 03:07:22 I have the remote codes I can post to my apple tv so that part is fine, if I can get an always listening serivce up then the rest is easy to hook in Mar 20 03:07:39 how lazy are you??? lol love it! Mar 20 03:08:04 well I have a 2 year told and we're on our 5th apple tv remote @ $30 each Mar 20 03:08:17 for now he's scared of my Google Glass so i figured use that lol Mar 20 03:09:06 he's also scared of cat toys (fake mice) but I can't write apps for those Mar 20 03:09:47 you sure can Mar 20 03:09:53 arduino or other microcontrollers :) Mar 20 03:10:03 some of my favorite coding has been C for microcontrollers Mar 20 03:10:08 i'm seen some samples of continuous speech recognition for newer APIs but Google Glass I must target API 15 Mar 20 03:10:39 you know though, with an always listening voice service once the kid starts talking more he could totally troll you ;) Mar 20 03:10:50 thammond: lol Mar 20 03:11:08 i'd leave the app after i start my show or movie Mar 20 03:11:19 its mean more for getting in and out of, start/stop the service Mar 20 03:11:35 so you have a google glass? Mar 20 03:11:40 i have the voice recognition code in place but its not an 'always on' Mar 20 03:11:47 ultra-: yes, just got it last Tues Mar 20 03:11:55 jealous Mar 20 03:12:06 would it be good for reading kindle books on? like being able to walk around and read a book Mar 20 03:12:13 is Glass gonna be built with Android Wear? or is GDK gonna stay? Mar 20 03:12:14 i'm afraid i'm going to bump into a wall with my phone Mar 20 03:12:27 you could have it read aloud -- Glass isn't really the right platform to read large amount of text Mar 20 03:12:34 oh too bad Mar 20 03:12:37 nor is any wearable, imho Mar 20 03:13:18 yeah i don't want it to read to me b/c i have to re-read often and sometimes i slip into the book for just a minute or two while i'm waiting on something Mar 20 03:13:19 I wonder if you can sprtiz on google glass yet Mar 20 03:13:19 i guess i'll stick to my phone and tablet for that Mar 20 03:13:22 i love the hands-free but get the weirdest stares however my experience so far has been positve when it comes to the public view. Everyone asks me in a shy way "is that google glass?", I let them try it out. Mar 20 03:13:37 thammond: what is sprtiz? Mar 20 03:13:37 spritz improves wpm but i think it probably worsens comprehension Mar 20 03:13:46 ahh ok reading fast Mar 20 03:13:50 faster Mar 20 03:13:55 http://www.spritzinc.com/ Mar 20 03:14:04 i think in the end spritz will be a sham Mar 20 03:14:10 cool idea. not sure how I feel about it Mar 20 03:15:00 if i was reading about what justin bieber was up to, maybe it would be fine... reading a book about space or something not so much Mar 20 03:16:38 would you really be "fine" if you were reading about justin bieber? Mar 20 03:16:42 probably something i should just look into on my own, but does anyone have a tablet stand (i have a n7) that they like? Mar 20 03:17:11 well no, but you know what i mean.... anything that actually matters or needs some kind of comprehension probably wouldn't work that well for most people Mar 20 03:17:40 personally i don't read about any celebrity... just don't care Mar 20 03:17:49 same Mar 20 03:17:54 too time consuming Mar 20 03:18:01 too insignificant Mar 20 03:18:03 sup guys Mar 20 03:18:06 too stupid Mar 20 03:18:12 hi jareddic Mar 20 03:18:19 time to work on the projet Mar 20 03:18:27 :D Mar 20 03:18:33 yeah i keep saying that but then i keep typing here Mar 20 03:19:19 I figured out the thing that was stumping me for hours. Such accomplishment leaves me with little incentive to continue working Mar 20 03:19:20 hahah ultra- well im usually on here, since im a n00b so i pop in every 15 mins Mar 20 03:19:40 and by figured out, I really mean someone much smarter than me on SO spoon fed me the answer ;) Mar 20 03:19:45 thammond: i often quit after something like that happens Mar 20 03:19:57 even if it's spoon fed Mar 20 03:20:41 jareddic: nothing wrong with that... i'm sort of a n00b too (to the android platform, at least) Mar 20 03:20:51 been using it a while but not as in-depth as the project i'm doing now Mar 20 03:21:30 SO spoonfeeds me answers every single day, 99% of which i don't have to ask myself which is even better Mar 20 03:21:46 hahaha yeah i like spoon fed. Mar 20 03:21:55 likewise. im n00b to android Mar 20 03:22:16 right now im trying to save some settings Mar 20 03:22:23 persistence* Mar 20 03:22:27 i just learned how to do that Mar 20 03:22:30 using shared preferences Mar 20 03:22:33 sharedPrefs? Mar 20 03:22:40 yeah it's simple Mar 20 03:22:43 yeah i need to use them inside a PreferenceFragment Mar 20 03:22:47 which i dont have a context Mar 20 03:22:54 so i need to figure out how to send it a context Mar 20 03:23:10 getContext() from the parent won't work? Mar 20 03:24:12 but how would i pass it Mar 20 03:24:19 :| Mar 20 03:24:34 well is it in your preference fragment's constructor? Mar 20 03:24:36 if not, add it Mar 20 03:24:50 Context context in the constructor Mar 20 03:24:51 nope Mar 20 03:24:56 i dont have a constructor... Mar 20 03:25:08 every class has a constructor Mar 20 03:25:17 i guess im not overridding it Mar 20 03:25:30 this is how im loading my prefFragment Mar 20 03:25:32 getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit(); Mar 20 03:25:44 so new SettingsFragment() is the class Mar 20 03:25:47 oh you don't have it subclassed Mar 20 03:25:55 i do Mar 20 03:26:36 i'm making my own custom settings screen since the interface is all custom anyway, and i'm just going to pass in shared preferences Mar 20 03:26:44 but you don't have to do that, you can add to the constructor Mar 20 03:26:57 pastebin your pref fragment Mar 20 03:27:25 here's a really basic example of shared preferences - seems like you might be a little past this point though https://github.com/aporter/coursera-android/blob/master/Examples/DataManagementSharedPreference/src/course/examples/DataManagement/SharedPreferences/SharedPreferenceReadWriteActivity.java Mar 20 03:28:06 oh that's right it'll extend activity Mar 20 03:28:12 thx thammond but im using preffragment Mar 20 03:28:14 https://github.com/jareddlc/TurquoiseBicuspid/blob/master/TurquoiseBicuspid/src/com/jareddlc/turquoisebicuspid/SettingsActivity.java Mar 20 03:28:28 i'm sorry i don't know much about that, i don't use fragments Mar 20 03:28:59 :D Mar 20 03:29:19 i was messing with it a bit but i forgot they make a new activity Mar 20 03:29:20 or whatever Mar 20 03:29:48 i probably don't do anything right... i don't even use xml Mar 20 03:29:49 I like fragments, they can be nifty Mar 20 03:30:10 but i need to pass context to it Mar 20 03:30:14 do u know how thammond Mar 20 03:30:16 and in iOS i don't use the interface editor Mar 20 03:30:25 im going to see how to override the contructor? Mar 20 03:30:25 I suspect there's a clear break between people who learned Android pre-fragment and post-fragment Mar 20 03:30:47 ultra-: it's awful isn't it? Mar 20 03:31:07 i started learning android when it was 1.6, dropped it for a couple years, then picked it up again about 3.0 and then came back to it recently Mar 20 03:31:15 bankai_: xml? Mar 20 03:31:21 IB Mar 20 03:31:30 oh, in all honestly i don't know haha Mar 20 03:31:39 can't you just call getActivity? Mar 20 03:31:41 i just shy away from those things, i like code Mar 20 03:31:49 to get the context from within the fragment Mar 20 03:31:55 i dont think so Mar 20 03:32:02 that requires a context does it not? Mar 20 03:32:19 with this being my interface, IB doesn't do jack for me Mar 20 03:32:20 http://www.sub-version.net/images/neural_screenshot.png Mar 20 03:32:54 ultra-: ur making sequencer? Mar 20 03:33:06 the middle area is a grid that can scroll in two directions simultaneously... the top and bottom rows scroll with it only horizontally, the right side scrolls with it only vertically Mar 20 03:33:16 jareddlc: I don't believe so - I can call it in one of my fragments Mar 20 03:33:18 this is a clips controller for ableton live Mar 20 03:33:24 connects to a python script that i wrote Mar 20 03:33:27 i cant Mar 20 03:33:34 ahh MIDI? Mar 20 03:33:40 thammond: i cant* Mar 20 03:33:53 it uses MIDI but the communication is proprietary... if you hooked it up to anything else, it would do weird things Mar 20 03:34:28 even those clip names you see are over MIDI SysEx, coming from ableton live Mar 20 03:34:32 Well, I'm played out of ideas Mar 20 03:34:37 cool ultra- I've made my own MIDI controller, but i piggied back off a USB to MIDI converter Mar 20 03:34:47 and just sent raw MIDI data Mar 20 03:34:51 thx thammond Mar 20 03:35:14 Hi, is there a way to programmatically check if APN is set to IPv6 only? Mar 20 03:36:04 using microcontroller? Mar 20 03:36:29 yep, arduino Mar 20 03:36:33 cool Mar 20 03:36:37 i got a video if u wanna see Mar 20 03:36:39 ever hear of midibox.org? Mar 20 03:36:45 yeah i wanna see Mar 20 03:36:50 i entered into a competition at school, but lost to some LED lights Mar 20 03:37:01 i've built a couple controllers myself, all midiboxes Mar 20 03:37:10 https://www.youtube.com/watch?v=gqDoO-c2j_E Mar 20 03:37:12 nice Mar 20 03:37:32 * jareddlc checking out midibox.org Mar 20 03:37:56 there's a lot of pre-defined projects or you can code your own Mar 20 03:38:53 cool, Mar 20 03:39:00 nice work Mar 20 03:39:00 i may have come across it before Mar 20 03:39:02 looks familiar Mar 20 03:39:06 i lvoe coming across people who are into this stuff Mar 20 03:39:21 i want to conitnue working on it but i havent Mar 20 03:39:29 my major obstacle was getting USB to work Mar 20 03:39:34 and i didnt get to it Mar 20 03:39:40 with midibox it already works Mar 20 03:39:41 i used a USB to MIDI Mar 20 03:40:33 here's how it works: the core module runs an operating system called MIOS... you can write in C for MIOS (which isn't very hard), to code your own, or use the pre-coded projects)... core has USB out right on it and shows up as class compliant midi on your computer Mar 20 03:40:54 then you have various modules... DIN (digital in) for rotary encoders and switches, and AIN (analog in) for potentiometers Mar 20 03:40:59 they just plug into the core Mar 20 03:41:10 that seems neat Mar 20 03:41:10 and people make their own various add-ons and what not Mar 20 03:41:24 http://mbhp.avishowtech.com Mar 20 03:41:36 there you can actually buy the PCB modules and parts kits if you want Mar 20 03:42:04 the guy who runs that actually taught me how to design circuit boards Mar 20 03:42:27 i ended up making this one and sold it online: http://www.midibox.org/dokuwiki/lib/exe/fetch.php?media=ultracore:ultracore.gif Mar 20 03:42:28 they are affordable Mar 20 03:42:50 it's a condensed version of the MIDIbox sequencer... sold about 160 of them :) Mar 20 03:42:57 yeah i think so Mar 20 03:43:01 neat Mar 20 03:43:03 the core module is probably around $30 Mar 20 03:43:07 the other modules are much cheaper Mar 20 03:43:30 but you get USB, regular MIDI DIN connectors Mar 20 03:43:36 can even be powered off USB Mar 20 03:44:08 there's a midibox SID too... a synth built out of the commodore 64 audio chip Mar 20 03:44:25 various other projects Mar 20 03:45:00 neat Mar 20 03:45:27 ucapps.de is the page to show the pre-existing projects, but you can always code your own if you want Mar 20 03:45:41 midibox.org is more for the forum Mar 20 03:46:17 cool, sorry to change topic Mar 20 03:46:22 np Mar 20 03:46:23 can a sub class call parent class private? Mar 20 03:46:44 hehe no idea Mar 20 04:05:08 i don't understand why you can't center text vertically on a label Mar 20 04:05:24 and take into account characters that go below the baseline, like p Mar 20 04:24:38 Guys, how do I update my ADT version? Mar 20 04:27:32 hey i'm looking for some advice on button design for my app... i noticed google doesn't really have much for design guidelines on buttons Mar 20 04:28:12 right now i'm playing with a gradient, but i can't get a neutral looking color combo that isn't weird looking. the background they are on is a light gray Mar 20 04:38:49 does the ID from AppWidgetHost.allocateAppWidgetId persist across device reboot, or do I have to recreate the widget every time? Mar 20 04:40:01 Hey jaxon11: how about light blue and light pink? Mar 20 04:40:26 Or royal green and lake blue? Mar 20 04:41:25 i actually just tried making the button color the same solid color as the background, then put a stroke of 1dp around it to give the user an idea of how big it is... i kinda like. wish i could show a screenshot easily Mar 20 04:46:29 what do you think? https://drive.google.com/file/d/0B0hiR3IiiHaSVXFsZV9Va1ZIeFE/edit?usp=sharing Mar 20 04:48:56 hae you upgraded your java yet :> Mar 20 04:54:42 anyone have exp with bluetooth? Mar 20 04:55:59 I had Mar 20 04:56:04 bad exp with bluetooth :) Mar 20 04:56:09 do u know mBluetoothAdapter.getBondedDevices(); Mar 20 04:56:18 why it wont get paired Mar 20 04:56:25 if bluetooth isnt already enabled? Mar 20 04:56:33 when i enable and call it it gets 0 Mar 20 04:56:43 I paired devices before Mar 20 04:56:44 but if i launch my app with bt enabled it gets paired Mar 20 04:56:46 in settings Mar 20 04:56:47 then used it Mar 20 04:56:54 thats what im doing Mar 20 04:57:02 but i need to get the paired devices to connect Mar 20 04:57:12 there was some sort of hack Mar 20 04:57:21 but I cannot remember it now Mar 20 04:57:25 it was... 2 years ago ? Mar 20 04:57:33 haha ok Mar 20 04:57:59 bt is horribl Mar 20 04:58:00 e Mar 20 04:59:40 im learning Mar 20 04:59:41 that Mar 20 05:00:10 the question now is Mar 20 05:00:21 how can I use java8 now :D Mar 20 05:01:39 some of the things they did with annotations in java8 is bleh Mar 20 05:01:56 havent seen that Mar 20 05:02:06 gordon_, you can't Mar 20 05:02:07 UGH Mar 20 05:02:08 stupid BT Mar 20 05:02:11 why dont u WORK Mar 20 05:02:21 pfn: I can! Mar 20 05:02:36 http://docs.oracle.com/javase/tutorial/java/annotations/type_annotations.html Mar 20 05:03:00 but lambdas ! Mar 20 05:03:11 JOOQ support lamdas AFAIK Mar 20 05:03:20 so looking forward to it :) Mar 20 05:03:59 where is g00s when i need him Mar 20 05:04:00 UGH Mar 20 05:04:12 bluezone: I really wanted jigsaw Mar 20 05:04:14 but eh.. Mar 20 05:04:16 Lambdas are relegated to relative obscurity until Java makes them popular by not having them. Mar 20 05:04:23 probaly everyone wanted to get jigsaw Mar 20 05:04:25 from http://james-iry.blogspot.com.au/2009/05/brief-incomplete-and-mostly-wrong.html Mar 20 05:04:42 wabz: I really liked lambdas in c# Mar 20 05:04:45 I don't care for jigsaw, maven takes care if that aspect Mar 20 05:05:17 hey there Mar 20 05:05:29 pfn: doesnt jigsaw let you do not load whole jvm but just a module ? Mar 20 05:06:31 gordon_, i'm "new" so i don't know what that is :P Mar 20 05:06:55 At work, I'm porting our C++ code base to a .so for Android. We'll eventually connect to the .so using JNI from an Android java-based app. My question is... can gradle or ant be used to kick off cmake builds for building the native portion? We don't use ndk-build because we already have things in cmake for our other platforms and don't want to write all sorts of makefiles ourselves. Mar 20 05:07:42 Gorroth: ant can Mar 20 05:07:52 gradle - dont know Mar 20 05:08:04 probably too Mar 20 05:08:11 Okay, sweet. Yeah, I was only asking about gradle because I think Android Studio depends on it. Mar 20 05:08:23 it doesnt depend Mar 20 05:08:29 but gradle *is* the future Mar 20 05:08:39 ant should be deprecaded long time ago ;) Mar 20 05:08:45 Yeah, ant sucks. :_) Mar 20 05:08:47 but that's only my opinion Mar 20 05:09:03 Is there an irc channel discussing gradle? Mar 20 05:09:11 probably #gradle Mar 20 05:09:14 yeah Mar 20 05:10:10 anyway Mar 20 05:10:17 if you have cmake installed Mar 20 05:10:25 infoking it from ant should be possible Mar 20 05:10:54 http://codemesh.com/products/junction/doc/ant_cpp.html Mar 20 05:13:16 gordon_, don't know about that, thought it was just a module system, don't really care, especially since java on the desktop is pretty much dead Mar 20 05:14:06 well Mar 20 05:14:22 it can always stand once again ;) Mar 20 05:16:43 hey guys Mar 20 05:16:49 how do i wait for 2 sces? Mar 20 05:18:21 one thousand one, one thousand 2. go! wait where? Mar 20 05:27:38 lol canvs2321- Mar 20 05:27:43 so bluetooth.enable Mar 20 05:27:46 is not blocking Mar 20 05:27:54 also no events fired when done Mar 20 05:27:56 so annoying Mar 20 05:38:53 jareddlc: sleep? Mar 20 05:39:25 jareddlc: so what's the sleeping, to check if enabled has gone through? Mar 20 05:39:29 myke: figure it out Mar 20 05:39:32 yep Mar 20 05:39:35 doing that Mar 20 05:39:52 im so used to event based Mar 20 05:39:56 you figured it out, or you telling myke to figure it out? Mar 20 05:39:57 and the docs Mar 20 05:40:02 doesnt say that its not blocking Mar 20 05:40:05 etc and u \should wait for it Mar 20 05:40:14 hahaha Mar 20 05:40:23 sorry myke i meant, i figured it out Mar 20 05:40:24 :P Mar 20 05:40:55 no block on ui thread though right? does bluetooth send a broadcast when actually enabled? Mar 20 05:41:28 meant not blocking UI for those 2secs r u Mar 20 05:41:52 i am Mar 20 05:41:55 i should move it to a thread Mar 20 05:42:03 but then Mar 20 05:42:09 how would i exit the function? Mar 20 05:42:14 like I need things to halt Mar 20 05:42:15 yes, or if bluetooth does send a broadcast, listen for it, then send back to your app that it is ready Mar 20 05:42:19 until the bt is fully enabled Mar 20 05:42:27 doesnt send broadcast Mar 20 05:42:30 atleast not in docs Mar 20 05:42:47 i'd think android would broadcast something like that Mar 20 05:42:54 not in docs Mar 20 05:44:06 so how can i move it away such that its not blocking? Mar 20 05:44:12 but prevent other code from executing Mar 20 05:44:13 ? Mar 20 05:44:17 http://developer.android.com/guide/topics/connectivity/bluetooth.html#TheBasics Mar 20 05:44:23 only with broadcast right? Mar 20 05:44:33 canvs2321-: yeah Mar 20 05:44:33 Optionally, your application can also listen for the ACTION_STATE_CHANGED broadcast Intent, which the system will broadcast whenever the Bluetooth state has changed. This broadcast contains the extra fields EXTRA_STATE and EXTRA_PREVIOUS_STATE, containing the new and old Bluetooth states, respectively. Possible values for these extra fields are STATE_TURNING_ON, STATE_ON, STATE_TURNING_OFF, Mar 20 05:44:33 and STATE_OFF. Listening for this broadcast can be useful to detect changes made to the Bluetooth state while your app is running. Mar 20 05:44:37 but they enable something diff Mar 20 05:45:02 im using bluetooth.enable() Mar 20 05:45:06 http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html Mar 20 05:47:14 well if you are using that adapter can you override methods, or create an adapter extended from BluetoothAdapter? Mar 20 05:47:44 dunno <- android/java n00b Mar 20 05:49:12 http://stackoverflow.com/questions/3806536/how-to-enable-disable-bluetooth-programmatically-in-android Mar 20 05:49:17 check the answer with 3+s Mar 20 05:49:32 sorry, i've never dealt with Bluetooth but i'm sure it's something simple Mar 20 05:49:47 This is an asynchronous call: it will return immediately, and clients should listen for ACTION_STATE_CHANGED to be notified of subsequent adapter state changes. If this call returns true, then the adapter state will immediately transition from STATE_OFF to STATE_TURNING_ON, and some time later transition to either STATE_OFF or STATE_ON. If this call returns false then there was an immediate Mar 20 05:49:48 problem that will prevent the adapter from being turned on - such as Airplane mode, or the adapter is already turned on. Mar 20 05:51:33 canvs2321-: i've read that Mar 20 05:51:37 but my code might be blocking Mar 20 05:51:43 want to know how to make it none blocking Mar 20 05:51:47 thx for the link Mar 20 05:52:16 this is what im doing currently http://stackoverflow.com/questions/14679699/how-to-auto-enable-bluetooth-base-on-the-android-simple-code Mar 20 05:52:18 #1 answer Mar 20 05:55:09 you can take that answer, wrap it in a thread. Inside that thread once slept for the 1000ms send a message to your handler on UI Mar 20 05:57:05 using local broadcast? Mar 20 05:57:09 sorry guess it sleeps 100ms Mar 20 05:57:46 you can use an alarm for timed notifications right? Mar 20 05:57:56 and make it sticky Mar 20 05:58:25 ? no idea myke Mar 20 05:58:46 hi, how can i detect if device have attached a mouse? Mar 20 05:59:39 no, just in your main activity declare a Handler mHandler; maybe in onCreate or where you want you define your handler mHandler = new Handler(){public void handleMessage(Message msg) { ... code for handling message..}}; & in your thread call mHandler.sendMessage(msg); where you set your args and whats and such in the msg before sending to ui Mar 20 06:01:50 canvs2321-: i dont have acitivity Mar 20 06:01:53 im using fragment Mar 20 06:02:14 that's still fine, is the thread gonna be in the fragment? Mar 20 06:02:19 nope Mar 20 06:02:21 seperate cass Mar 20 06:02:21 show some of your code Mar 20 06:02:23 class* Mar 20 06:02:30 well pass the handler to the class Mar 20 06:02:44 in constructor or however you want Mar 20 06:02:49 https://github.com/jareddlc/TurquoiseBicuspid/tree/master/TurquoiseBicuspid/src/com/jareddlc/turquoisebicuspid Mar 20 06:02:54 ive tried that with no success Mar 20 06:03:01 it works, i do it all the time Mar 20 06:03:11 Bluetooth.java and SettingsActivity.java Mar 20 06:03:56 in the constructor of your bluetooh class you can add a (Handler handler) constructor Mar 20 06:04:04 and set it to a local field in your class Mar 20 06:04:29 and when you either create your class pass the handler, or you can add a method in the bluetooth class to set it Mar 20 06:05:32 doesnt a handler require a context/ Mar 20 06:16:01 crap Mar 20 06:17:32 you end up getting it jareddlc? Mar 20 06:28:09 what exactly __is__ an instance of Context? Mar 20 06:29:10 hi, how can i detect if device have attached a mouse? Mar 20 06:29:19 bluezone: it's a Java object Mar 20 06:29:48 Leeds, well of cource, everything extends Object but what __is it__ Mar 20 06:30:02 course* Mar 20 06:30:54 Like if i ask you what Service does, it allows you to preform background tasks etc. An activity is the backbone of the display etc. Mar 20 06:32:14 per the docs, Context is an "Interface to global information about an application environment." Mar 20 06:32:32 yeah i don't understand the docs :S Mar 20 06:35:23 a less vague question may lead to a less vague answer... Mar 20 06:35:25 do you understand your question then? or atleast why you are asking it? Mar 20 06:35:57 you just learning, or you trying to put something into action, and have an issue? Mar 20 06:36:40 just learning Mar 20 06:37:05 Well, this should help. [02:32] per the docs, Context is an "Interface to global information about an application environment." Mar 20 06:37:39 minus the per the docs, read the rest of that if the docs r confusing :) Mar 20 06:38:08 basically, it's a somewhat abstract interface to the system, from which things like Activities inherit Mar 20 06:40:21 * bluezone still confused :S Mar 20 06:41:07 "application environment" refers to what exactly? Mar 20 06:41:19 your apps context Mar 20 06:41:29 bluezone: do you know what the word 'context' means? Mar 20 06:41:33 yes Mar 20 06:41:44 hi Mar 20 06:43:48 why programming is so hard to learn Mar 20 06:44:20 ^ Mar 20 06:44:55 i feel like i've been thrown into the middle of this Mar 20 06:45:17 so how would I have an AsyncTask update a TextView element? Mar 20 06:45:35 laphlaw, with the postExecute method Mar 20 06:45:35 bluezone: into the middle of programming? Mar 20 06:45:36 or whatnot Mar 20 06:45:44 Leeds, no just android development Mar 20 06:45:48 i know java well Mar 20 06:46:08 bluezone: but how can it access the TextView if its defined in another class? Mar 20 06:46:10 but some of these android concepts are hard to grasp Mar 20 06:46:24 i wanna learn Mar 20 06:46:29 Bluezone: just start making stuff, and learn/understand it as you go through it Mar 20 06:46:50 do the tutorials Mar 20 06:46:50 laphlaw, i wouldn't define it in anoter class if i was you, define it in the same class as your textview Mar 20 06:47:02 canvs2321: yeah but it's not enough. Mar 20 06:47:23 tutorial is not enough i think. Mar 20 06:48:14 i did some of the tutorials and im reading some books slowly, but this Context balony is skimmed over like you wouldnt believe Mar 20 06:48:17 Then get an idea, and make that idea an actual concept. If you are any good at problem solving, you'll finish&learn while you get to your end product Mar 20 06:48:23 bluezone: so I guess I don't know enough about OO/Android.. but I have a class that handles async stuff, that doesn't extend an Activity.. its more of a "library" class of methods I use Mar 20 06:49:08 once you've simply used and understood APIs you'll get when how and why you need that context Mar 20 06:49:26 i c Mar 20 06:49:48 I can hack it somewhat, but I know there's gotta be a better way Mar 20 06:49:48 laphlaw, simply define your Aysnctask class inside your activity class (inner class) Mar 20 06:50:05 I used to do that.. it feels kinda messy though, yeah? Mar 20 06:50:16 I wanted to separate it into a separate file/class Mar 20 06:50:36 i downloaded android studio but it's so hard Mar 20 06:50:52 yeah it is messy, maybe accesing textviews in other classes has to do with Context and i'm not aware :P Mar 20 06:51:19 is it common / best practice to do it the way you suggest? Mar 20 06:51:57 common yes, best practice no idea. Java is a messy language anyway it fits right it haha Mar 20 06:52:37 hmm ok.. feels kinda hackish Mar 20 06:52:50 whatever i guess, it works. its just an app for myself anyway :/ Mar 20 06:52:50 can always inside your seperate file/class pass a Context to it, then setup a method to run your AsyncTask. Mar 20 06:53:00 http://stackoverflow.com/questions/6119305/android-how-to-run-asynctask-from-different-class-file Mar 20 06:53:51 canvs2321: hmm I'll take a look.. not really familiar with Contexts.. I'll have to save that for a rainy day Mar 20 06:55:06 Main thing is, things are shareable, at what level and how you should or how often are up to you. But if you don't leak stuff or leave things hanging around when not needed. Anything is possible Mar 20 06:56:12 you guys are good in java? Mar 20 06:56:26 i'm a hobbyist :) Mar 20 06:56:31 I'm crap in Java Mar 20 06:56:36 but good at problem solving Mar 20 06:56:57 damn Mar 20 06:56:59 me too Mar 20 06:57:07 java is so hard Mar 20 06:57:25 easier than C++ Mar 20 06:57:27 the key is i have the capacity to get the job done in any language i want. cuz of determination and i'm able to learn and understand. I'm not great, but I can be if enough devotion :) Mar 20 06:57:30 hi all Mar 20 06:57:36 I so wish I could write real apps in Python :( Mar 20 06:57:46 hey Leeds Mar 20 06:59:27 Leeds: yea, java was a crap choice for android :) Mar 20 07:00:02 no one can make an app Mar 20 07:00:11 for make an app? :P Mar 20 07:00:24 easier Mar 20 07:01:59 if i have a gui Mar 20 07:02:25 bankai_: I acknowledge you have a dog! Mar 20 07:02:41 and automatic processes :P Mar 20 07:03:14 is simpler Mar 20 07:04:00 squ: I beg to differ, Java is a much more robust language than python Mar 20 07:04:25 the only issue is that there is no jython to dalvik interpreter Mar 20 07:04:57 thepoosh: you must have thought about an example before telling that? :) Mar 20 07:05:07 what? Mar 20 07:05:25 no, just came into work, made some coffee, came to my seat and saw this Mar 20 07:06:02 thepoosh: there is scala ;) Mar 20 07:06:31 thepoosh: ok, can you prove that somehow? :) Mar 20 07:06:59 gordon_: :P Mar 20 07:07:16 squ: since java is a compiled language it's faster Mar 20 07:07:28 it also has a better GC and more libraries Mar 20 07:07:30 python compiles to bytecode Mar 20 07:07:40 not by default Mar 20 07:07:42 well, python quite popular Mar 20 07:07:54 not even close to Java Mar 20 07:08:01 in popularity? Mar 20 07:08:03 like an apk maker Mar 20 07:08:12 without code skills Mar 20 07:08:15 in spread Mar 20 07:08:42 android was yet another spreading mistake for java :P Mar 20 07:08:57 i think it was nice choice Mar 20 07:09:05 wasn't there an app builder abstraction on top of java that google or someone released? Mar 20 07:09:15 what would you choose ? ;) Mar 20 07:09:27 canvs2321: no but i found an app on the play store Mar 20 07:09:43 canvs2321: do you mean app inventor? Mar 20 07:10:06 yes! Mar 20 07:10:16 https://play.google.com/store/apps/details?id=com.apkcreator.fwdfree Mar 20 07:10:18 like this Mar 20 07:10:20 cortexA9 app inventor Mar 20 07:10:24 oh Mar 20 07:10:31 app inventor i tried Mar 20 07:11:09 i wanna a good builder Mar 20 07:11:54 with automate script and something Mar 20 07:12:01 cortexA9: Just get an idea of what you want to create&use java. There'll be troubleshooting, but it'll be your best shot. Damn internet makes everything available now now now! But step back to 1980&allow time to be allowed to happen while you learn :) Mar 20 07:12:36 cortexA9: what exactly are you trying to achieve? Mar 20 07:12:52 thepoosh: because programming is complicated i mean. Mar 20 07:13:01 and... Mar 20 07:13:33 Programming is just trial/error/learn/accomplish/idea/trial/error/learn/accomplish Mar 20 07:13:41 wait, you mean that creating software for some of the most advanced technology ever built by mankind... isn't easy? Mar 20 07:13:49 lol Mar 20 07:14:09 cortexA9: it seems to me like you need to outsource your programming Mar 20 07:14:34 why no one can make a simpler builder Mar 20 07:14:54 we've been waiting on you to do it Mar 20 07:14:55 new one Mar 20 07:15:00 because you're asking for a dream Mar 20 07:15:14 "why can't anyone make something that will think for me?!" Mar 20 07:15:35 app inventor you know Mar 20 07:15:38 it's not complete Mar 20 07:15:42 no@ Mar 20 07:15:44 no! Mar 20 07:15:54 i tried it Mar 20 07:16:07 i need something better Mar 20 07:16:12 you are asking for an already made solution for problems that weren't yet introduced Mar 20 07:16:28 you need to learn how to program if you want to release programs Mar 20 07:16:32 or hire one Mar 20 07:16:32 cortexA9: you still haven't supplied your interest in what you are wanting todo Mar 20 07:16:33 app inventor is a teaching tool, not an app building tool Mar 20 07:17:01 Design and program your own apps using MIT App Inventor. Mar 20 07:17:18 cortexA9: a new calculator app? Mar 20 07:18:32 canvs2321: a new advanced maker Mar 20 07:18:42 you are wanting to make one? Mar 20 07:18:56 canvs2321: he doesn't know how to program Mar 20 07:19:02 canvs2321: if i can make one.. i'm not here. Mar 20 07:19:14 :P Mar 20 07:19:26 *i was Mar 20 07:19:37 cortexA9: you are at the channel for helping people who are programming, wth are you doing here if you don't want to program? Mar 20 07:19:51 thepoosh: a bit late, but why do you acknowledge 'them' ? Mar 20 07:20:09 thepoosh: yeah i know Mar 20 07:20:19 thepoosh: just looking for someone that can do that Mar 20 07:20:25 just because every morning in the past week started with you and g00s talking about your dogs Mar 20 07:20:46 oh hehehe ... well ... just like g00s you pinged me whilst i was on my commute home :P Mar 20 07:21:01 wat?! Mar 20 07:21:06 it's morning now!!! Mar 20 07:21:10 :P Mar 20 07:21:13 no no it's evening, check your clock Mar 20 07:21:17 lol Mar 20 07:21:18 hmmmm Mar 20 07:21:24 09:21 IL time Mar 20 07:21:40 oh :S maybe i had a little too much something this morning/last night :S Mar 20 07:21:52 lol Mar 20 07:21:56 where's IL ? Mar 20 07:22:00 you're from the land down under? Mar 20 07:22:04 GMT+2 Mar 20 07:22:04 ya Mar 20 07:22:07 Israel Mar 20 07:22:11 oh cool Mar 20 07:22:14 bankai_: either Israel or Illinois Mar 20 07:22:30 it sure as hell is not morning in Illinois Mar 20 07:22:34 well i did think an american state, but i didn't think it'd have its own TZ hehe Mar 20 07:22:52 ohio here, 322am so illinois is 222am Mar 20 07:23:02 thepoosh: i hear there's a lot of RH devs in Israel Mar 20 07:23:02 defaq are you doing up? Mar 20 07:23:03 I think there are one or two states with their own times, because they opt out of summer time Mar 20 07:23:07 222 pm here :D Mar 20 07:23:27 3:23 here, and I should go get my hair cut Mar 20 07:23:33 Leeds: the US has 3 different timezonse Mar 20 07:23:35 no? Mar 20 07:23:38 4 Mar 20 07:23:40 we are in the year 2014, and no one can provide a good advanced apk maker Mar 20 07:23:48 not including hawai Mar 20 07:23:51 with simple automate script Mar 20 07:24:02 to do what? i don't get it :S Mar 20 07:24:02 cortexA9: no, you are asking for the impossible Mar 20 07:24:17 mmm Mar 20 07:24:17 he want's a "no knoledge" click and play app maker Mar 20 07:24:21 impossible? Mar 20 07:24:26 yea Mar 20 07:24:27 Apk maker, would just be Winzip or WinRar? Mar 20 07:24:29 i want Mar 20 07:24:35 oh i thought there was a crude drag and drop thing a few years back, i can't see that ever producing anything usable Mar 20 07:24:46 cortexA9: ^ Mar 20 07:24:51 :P Mar 20 07:25:23 apk builder? Mar 20 07:25:25 if you're planning on making something bad that will both look and behave bad, this is the solution for you! Mar 20 07:25:26 gradle Mar 20 07:25:32 LOL!!! Mar 20 07:26:18 at MIT Mar 20 07:26:30 there are many people Mar 20 07:26:34 true Mar 20 07:26:37 and no one can provide this :P Mar 20 07:26:41 no Mar 20 07:26:44 lol Mar 20 07:27:00 cortexA9: you need to grasp what you're asking for Mar 20 07:27:22 yes, MIT should dedicate their research to providing a way for lazy idiots to write apps without doing any work Mar 20 07:27:23 there is no "Android Wordpress" Mar 20 07:27:38 :P Mar 20 07:27:44 lol Mar 20 07:27:48 Leeds: haha Mar 20 07:27:51 why are you laughing?! Mar 20 07:27:59 he was being serious Mar 20 07:28:01 cortexA9: that was me insulting you, in case you missed it Mar 20 07:28:06 oh Mar 20 07:28:10 LOLLLL Mar 20 07:28:23 Leeds: why insulting me? :P Mar 20 07:28:37 i'm not a lazy idiot Mar 20 07:28:38 because you are lazy Mar 20 07:28:39 I think cortexA9>=b0t. Kept off topic for a good amount of time, while never showing any actual code or suggesting conceptual knowledge of even code Mar 20 07:28:43 cortexA9: well, you are exhibiting characteristics thereof Mar 20 07:29:00 * Leeds -> haircut Mar 20 07:29:39 just i wanna make your life easier Mar 20 07:29:47 with my ideas Mar 20 07:29:54 :P Mar 20 07:29:59 so hire a programmer Mar 20 07:30:15 there are many programmers here Mar 20 07:30:26 you never asked to hire anyone Mar 20 07:30:31 and this is not the place for that Mar 20 07:30:34 try crageslist Mar 20 07:30:44 this is the official Mar 20 07:30:47 android dev channel Mar 20 07:30:47 no Mar 20 07:30:52 no no no no no ! Mar 20 07:31:06 yea android application dev Mar 20 07:31:10 this is were programmers come to ask their question on how to better program Mar 20 07:31:34 oh Mar 20 07:31:36 only? Mar 20 07:31:54 Stop feeding the troll already. My irc client icon is jumping like crazy for no legitimate reason. Mar 20 07:32:06 :P Mar 20 07:33:03 http://appinventor.mit.edu/explore/ai2/tutorials.html Mar 20 07:34:05 cezium: sorry Mar 20 07:34:17 cortexA9: NO MORE RESPONSES FROM ME! Mar 20 07:34:24 ok sry Mar 20 07:36:14 mmm Mar 20 07:36:33 i wanna try these beginner video tutorials Mar 20 07:37:31 precious info :) Mar 20 07:39:00 app inventor looks better since i tried it Mar 20 07:47:30 is there a a way to display ditance to a user in their locale? Mar 20 07:47:34 *distance Mar 20 07:50:58 do you mean 1,000.00 / 1.000,00 or miles / km Mar 20 07:51:04 f2prateek, Mar 20 07:51:42 miles/km Mar 20 07:52:19 not that i know of sorry Mar 20 07:52:24 ideally format it too (1.6km or 1m, not 1.60km 1.00m) Mar 20 07:52:28 most apps have a setting Mar 20 07:52:49 http://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html#getNumberInstance(java.util.Locale) will do the number formatting in a sane way Mar 20 07:53:22 if(Locale.getDefault() == Locale.US){// miles }else{//km} ?? Mar 20 07:53:31 that'd be ok for a settings default Mar 20 07:53:37 there are plenty of exceptions though Mar 20 07:55:52 bah Mar 20 07:55:58 app inventor isn't useful :P Mar 20 07:56:19 well this is canada only so I guess I can just keep whatever is the default here Mar 20 07:57:32 canada only changed in the 70s, so you might want to have both Mar 20 07:58:03 ah...thanks Mar 20 07:58:18 *started changing in Mar 20 08:00:39 Is there anyway to add quotes (") in a string? Mar 20 08:00:47 \" Mar 20 08:01:42 ? Mar 20 08:02:00 "\" is an escape character Mar 20 08:02:23 so you can have a string "hi \"Jon\"" Mar 20 08:02:40 which would be [hi "Jon"] Mar 20 08:02:43 Oh Mar 20 08:02:47 Nice Mar 20 08:20:08 hey guys, does fragment#onDetach() can solve memory leaking problem? Mar 20 08:20:40 I'm having a hard time thinking how to manage the memory usage in my app as I do not have any experience on it before Mar 20 08:23:04 piracyd3: start by finding out what's worth optimizing by determine whats responsible for largest part of the memory footprint https://developer.android.com/tools/debugging/debugging-memory.html Mar 20 08:25:22 Thanks. Then what do i do to reduce any memory leaks? I know there are a lot of ways. I wish to learn it all and use which fits me. Mar 20 08:27:09 Start by finding if/what you leak to determine where in your code you should try to optimize/fix. There is no silver bullet afaik. Mar 20 08:28:09 Generally you just find out what part of your code is consuming memory and then find a way to change it. Usually once you've discovered what consumes memory you can google how to fix it. Mar 20 08:28:43 Alright thanks for the tips. Mar 20 08:32:29 Once you've done it a few times you'll probably also get better at predicting what parts are consuming memory, but starting out you can look at any place where something is repeated many times (a loop with 100+ items of something for example), or a place where you use GUI items that are known to be problematic (like WebView). Mar 20 08:35:38 hello, I have on one PNG numbers form 0 to 9 and I want use this one png for several number sprites. How can I do it in andengine? Mar 20 08:35:43 How about the usage of 'final' or 'static' (if im not mistaken) keyword in code? I've read in an article, says that one of the two may cause leaks. Mar 20 08:40:20 piracyd3: I don't know of any general rules about memory leaks with final and/or static. Mar 20 08:41:04 static reference to an Activty object would certainly leak memory after recreation of that activity Mar 20 08:43:41 One way to check for this is to open your app, trigger an activity recreation (for example rotating your device), and check if memory keeps increasing, If yes: you are refrencing old activity objects, which can cause memory consumption to grow fast Mar 20 08:50:10 Thanks guys Mar 20 08:51:16 Someone who knows something about the paypal sdk on Android? Mar 20 08:55:49 Click66: I don't have any knowledge on paypal sdk, but what are you looking for with it? Mar 20 08:56:41 piracyd3 I want to disable the credit card button. My code looks like this: intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION,new PayPalConfiguration().acceptCreditCards(false)); Mar 20 08:56:52 piracyd3 it compiles but the button still shows up :p Mar 20 09:02:32 hi all, i am not able to play a youtube video in my android emulator any idea? Mar 20 09:36:03 I can't figure out where to place instrumentsCursor.moveToNext() while still not getting out of bounds, getAllInstruments does "SELECT * FROM Instrument" and returns a Cursor object. please halp! Mar 20 09:36:06 http://pastie.org/8952907 Mar 20 09:36:26 hmm if i have conflicts in my android project from git. it appears just to be the compiled stuff. What is the best way to deal with them? I guess really there should be a git ignore on the folders perhaps? Mar 20 09:36:38 the way it is being done right now, I always get the first result from that table because obviously I have instrumentsCursor.moveToFirst() in the constructor which is only called once Mar 20 09:36:45 what I need is the moveToNext() Mar 20 09:49:38 When I call env->CallStaticBooleanMethod(activity_class, showtextinput_method, x, y, w, h) I get a return value 1 sometimes, and then the onscreen keyboard shows up just fine. But other times i get what looks like a random number < 255, and the onscreen keyboard doesn't open Mar 20 09:49:41 any thoughts? Mar 20 09:55:13 Is it possible to override, or make it possible to override, the style of an activity I make available trough a library ? Mar 20 09:58:25 any ideas why intellij frequently sites there forever in a make phase? Happens every now and again and I have to forcibly kill the process. Mar 20 09:58:32 s/sites/sits Mar 20 10:03:47 oh lordy what am i saying, that's an sdl function Mar 20 10:13:54 you need cursor.moveToPosition(position) to be inside getView() Mar 20 10:14:05 and you already have position from the overridden function Mar 20 10:14:11 that way you never "moveToNext()" Mar 20 10:14:21 and stay out of "CursorOutOfBoundException" Mar 20 10:17:52 is there anyone have a experience in Jsoup? Mar 20 10:24:59 not here Mar 20 10:25:34 say I am in Activity A and I launch Activity B, when I press back on B, what happens to A? which of its methods are called? onResume()? Mar 20 10:30:01 How can i use -lm when compiling native android code? I want to use mathematical functions. Ex: pow Mar 20 10:31:56 you mean java.lang.Math? Just use it as usual. Mar 20 10:33:05 rgr: NDK, presumably Mar 20 10:33:15 MalekAlrwily: I did something Mar 20 10:33:19 but it was small Mar 20 10:33:21 and from normal java Mar 20 10:33:40 yes Mar 20 10:33:56 someone in #java say like this Mar 20 10:37:22 it was like one big site Mar 20 10:37:25 pretty regular Mar 20 10:37:31 and actually it went pretty well Mar 20 10:38:19 Hi everyone, I'm having some trouble combining TransitionManager and Fragments to work together, can anybody help me please? Mar 20 10:39:44 gordon_ Thanks for this information Mar 20 10:41:44 I'm experiencing crashes with my app when I try to open the camera while another process is accessing it (because it's locked). Is there a way to check if another process is already using the camera without even triggering the error? Mar 20 10:42:36 I would just try/catch it, but my senior developers don't like that. Mar 20 10:46:05 np Mar 20 10:46:06 then ask them how to do it properly or make do. Since it is an "exception" its in bounds of acceptance to do it that way to a degree. Mar 20 10:46:42 does anybody have a working solution for centering text vertically in a textview? i see all kinds of answers that don't work for me Mar 20 10:47:11 centering, as in uppercase letters and lowercase like "p" don't change its spacing Mar 20 10:58:39 At what point in the fragment lifecycle can I measure my views? I've tried onCreateView and onViewCreated but I get 0 in both cases Mar 20 11:02:39 hey guys, i have a listview with an applist, which the user can pick and start an installed app. but when i click on phone or contacts the app crashes. is there something special to consider at starting these apps with an intent? Mar 20 11:21:56 Hi guys. I'm trying to define a setting page using the Android Preference API, and my app needs to be compatible from 1.6 without using deprecated code. Mar 20 11:21:56 My implementation idea was to use the fragment technique --> http://developer.android.com/guide/topics/ui/settings.html#Fragment and redefine the PreferenceFragment in a way to use the app compat. Mar 20 11:21:56 I wanted to know why in the link posted just above, Google is defining the Fragment as static. Is this intended to be used inside another class, in the activity receiving the fragment? Mar 20 11:32:21 http://pastebin.com/cnTifwT8 Mar 20 11:38:22 :( Mar 20 11:39:09 guys? Mar 20 11:41:41 MalekAlrwily, java.lang.NoClassDefFoundError: org.jsoup.Jsoup Mar 20 11:41:52 yes? Mar 20 11:42:28 yes Mar 20 11:42:57 did you include Jsoup? Mar 20 11:46:25 wget: " a static nested class is behaviorally a top-level class that has been nested in another top-level class for packaging convenience." Mar 20 11:48:53 EPG maybe i don't include it correctly Mar 20 11:49:15 pduin: Hmm. Ok. I just removed the static keyword and put the fragment in its dedicated non nested class, it seems it is working flawlessly Mar 20 11:50:43 MalekAlrwily, also check that xposed doesn't cause any issues Mar 20 11:53:32 EPG: Excuse me, What is xposed? Mar 20 11:55:18 "at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)" Mar 20 11:55:39 it's a framework for mods Mar 20 11:55:52 i know Mar 20 11:55:55 MalekAlrwily, isn't this your device the stacktrace is from? Mar 20 11:56:12 but why it's in my stacktrace? Mar 20 11:56:24 yes it is Mar 20 11:57:44 EPG, is that problem from xposed? Mar 20 11:58:11 dunno Mar 20 11:59:08 :( Mar 20 12:00:28 what are common reasons for ant build failing? Mar 20 12:03:16 santosh: are you mean me? Mar 20 12:05:00 https://gist.github.com/santosh/af166cad30e1d9e5698c Mar 20 12:15:55 guys, any solution? http://pastebin.com/cnTifwT8 Mar 20 12:21:18 ? Mar 20 12:21:25 -_- Mar 20 12:28:09 * PING!!! Mar 20 12:41:56 --------- Mar 20 12:41:59 was wondering, does it hurt to try and start a service when it's already started? Mar 20 12:42:17 or wouldit end up starting a second instance of that service? Mar 20 12:43:04 2 Mar 20 12:54:03 I'm stuck on layouts Mar 20 12:54:38 I have 3 layouts except main.xml Mar 20 12:55:08 the problem is from main layout on click on a button I want to call layouts Mar 20 12:55:52 I did implemented onClick interface and set it on the button called setConentView() with the layout to change within Mar 20 12:56:24 but when I am click back button I'm existing the app instead of going to previous layout Mar 20 12:57:13 I'm just a nooblet myself, but I use the following: Mar 20 12:57:17 finish(); Mar 20 12:57:18 Intent intent = new Intent(CurrentActivity.this, NextClassThatContainsYourLayout.class); Mar 20 12:57:19 startActivity(intent); Mar 20 12:57:36 I did implemented the onBackButtonPressed method with again call to setContentView with main.xml which I don't seem right thought am going to the main method that way but the button stop working on the layout Mar 20 12:58:03 Rellac: do you have a demo app for this? Mar 20 12:58:27 I did implemented it that way but its not working Mar 20 12:58:41 not really :P Mar 20 12:59:03 ok will you help me with one more question? Mar 20 12:59:23 http://pastie.org/8953308 Mar 20 12:59:25 try that Mar 20 13:00:13 and here is my gamesetup: http://pastie.org/8953310 Mar 20 13:00:16 Inside NextClassThatContainsYourLayout.class which contains your layout you want to move to.. Inside onCreate what have you done?? Mar 20 13:01:24 no, your conteent should be defined in the next class pointed to by your button click Mar 20 13:01:31 I don'#t know if this is the best way, but it's my way Mar 20 13:02:57 ah get it thx Mar 20 13:03:02 last question though Mar 20 13:03:04 :) Mar 20 13:03:34 What happens when you click back from the GameSetup layout?? Mar 20 13:04:01 just close the class and load up the previous class in the same way Mar 20 13:04:40 this is what am looking for thanks Rellac bro a lot.. :) Mar 20 13:04:52 no worries Mar 20 13:04:54 good morning all Mar 20 13:05:12 Rescue9: GM Mar 20 13:05:13 my first conversation in here where I'm not a hinderance :P Mar 20 13:06:18 Rellac: I have been through that here and understand what you meant.. :) Mar 20 13:06:23 I'm trying to build with the newest linaro 4.8 toolchain. I've figured out how to install the toolchain, but I can't seem to find documentation on where to set the optimizations. Can someone point me to the right place? Mar 20 13:06:51 Rescue9: bro am a complete n00b sorry.. :) Mar 20 13:07:11 no worries mate. I'm fairly noob myself. Mar 20 13:07:18 thus why I'm here. :-D Mar 20 13:07:36 :) Mar 20 13:10:28 so we're all noobs? Mar 20 13:10:34 hmm Mar 20 13:12:31 yolks on you Mar 20 13:12:32 a lot of the time the noobs are the only ones talking in these channels. You can always tell a noob by someone who asks questions then chats afterwards. Mar 20 13:12:46 says the noob Mar 20 13:12:52 most devs are smart enough to ask a question, then come back 4 hours later to research the answer. Mar 20 13:13:02 * Rescue9 is most definitely a newb Mar 20 13:13:51 mikedg: have ans answer for the above optimization question? Mar 20 13:16:09 jaynewstrom, It does not use your friends interests (just saw the message on my work computer), I originally had it using them, but the way facebook limits the number of interests you can get from the graph api now just doesn't allow this to work fast enough Mar 20 13:16:39 Rellac: You still here? Mar 20 13:16:40 gotcha. i just wondered why it had access to my friends list :p Mar 20 13:16:45 it can take 20-80 seconds to process a user and their friends Mar 20 13:17:07 It shouldn't, I only have permissions for interests I think Mar 20 13:17:08 no Mar 20 13:17:11 lol Mar 20 13:17:35 all i know is it said access to your public profile and your friends list Mar 20 13:17:36 I'll have to check the page itself, because you have to declare permissions in multiple spots (in html and also on the dev site) Mar 20 13:17:44 Rellac: Bro if you don't mind pasting the xml files for both.. that will be of great help Mar 20 13:17:49 and I may have not changed the html portion Mar 20 13:17:53 gotcha Mar 20 13:19:03 no sorry Mar 20 13:19:04 i dont even know what Linaro means Mar 20 13:19:06 http://pastie.org/8953355 Mar 20 13:19:14 the second is the same with diffreent imageview ids Mar 20 13:19:51 yep now all good Mar 20 13:21:15 I was looking for a tut on this and there is a guy who had mentioned the something tools::context att on the layout which got me to ask you for the layout as well Mar 20 13:21:33 what's the problem Rellac Mar 20 13:21:45 I have no problem Mar 20 13:21:47 yet Mar 20 13:22:24 although I'm not sure how to reference the context from a View, I could use some help with it if anyone is in the know Mar 20 13:23:01 Rellac: https://www.youtube.com/watch?v=0den5M_vJeM Mar 20 13:23:06 "Cannot make a static reference to the non-static method getContext() from the type View" Mar 20 13:23:09 here the guy have it in the layout Mar 20 13:23:59 there is usually a hundred ways to achieve a result Mar 20 13:24:18 yea.... have seen that many times. Been a while since I've dev'd an app though so I can't remember off hand what I did to fix. Mar 20 13:27:58 um, what do I need to include or do to get basic colours recognised in my acitivity xml? intellij wount allow, for example, android:background="@color/red". Are the "basic" colours not available as a predefined tag? Mar 20 13:28:24 you need to define them Mar 20 13:28:31 yeah I see that. no probs. Mar 20 13:28:39 in strings.xml Mar 20 13:28:52 eg. #000000 Mar 20 13:46:59 hi, how can i detect or check if android device use hardware mouse? Mar 20 13:47:37 I want to make private and public key when other ones install my app . Is there any api , library or something to do it ? Mar 20 13:49:22 devandroidnew, What do you mean by that ? Mar 20 13:50:29 ok, i have a mini pc android, i'd like know when user use a mouse Mar 20 13:51:05 i'd like know if device has a mouse or it haven't Mar 20 13:56:44 interweb do you understand? Mar 20 13:56:52 Rellac: many views have getContent Mar 20 13:57:16 sounds like you have a static method though Mar 20 14:08:10 pleese :( http://pastebin.com/cnTifwT8 Mar 20 14:09:55 Could I make android apps using python ? Mar 20 14:11:05 i think no Mar 20 14:11:13 you can't Mar 20 14:16:29 MalekAlrwily, It just supports java ? Mar 20 14:17:11 yes, someone say it support c# Mar 20 14:17:43 but i don't think it can support c# Mar 20 14:17:54 there are different development tools Mar 20 14:19:46 is there a way to open mxplayer on left and andchat on right? Mar 20 14:19:56 can i write app like this? Mar 20 14:20:03 to just open two apps on one window Mar 20 14:20:47 maybe you can do this by using Xposed Bridge Mar 20 14:20:55 no Mar 20 14:21:28 samsung has done that Mar 20 14:21:34 yes Mar 20 14:21:45 on tablets right? Mar 20 14:21:58 on phones too Mar 20 14:22:10 hmm Mar 20 14:23:09 hayuto: you can create an app to do this in other phones Mar 20 14:23:28 just want a rtmp strim with irc chat Mar 20 14:23:34 thinking of easiest way Mar 20 14:23:52 if i be able to just run this two apps at time it would be best Mar 20 14:24:04 cause one is best for rtmp and second is best on irc on android Mar 20 14:24:07 in my toughts Mar 20 14:24:32 s/on/for/ Mar 20 14:25:29 http://pastebin.com/cnTifwT8 Mar 20 14:28:24 mikedg: If you want some more information, I have posted all of my classes and troubleshooting here: http://redd.it/20nrab Mar 20 14:31:01 hey guys; what are some reasons putting a button into a GridView item would cause the gridview's OnItemClickListener to stop working? Mar 20 14:34:11 sigmabeta, that's default behaviour when there's something focusable in it Mar 20 14:34:23 sigmabeta, it happens the same with ListView, see Google for solutions about that :) Mar 20 14:34:39 http://stackoverflow.com/questions/8413656/onitemclicklistener-doesnt-work-with-listview-item-containing-button Mar 20 14:37:34 How do I use Java 1.7 with Android in Eclipse? I hear that it's possible in Android Studio. Mar 20 14:38:57 Hello. I am trying to animate an ImageView with the Animation framework. Now I want to move this ImageView in between a layer list at a certain point. Any idea how to do that? Mar 20 14:38:57 sigmabeta, are you wanting the the button to work for clicking? Mar 20 14:38:58 Telling Eclipse to use 1.7 doesn't work. Mar 20 14:39:55 I get "Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties". Mar 20 14:40:21 Mavrik, good call. I'm perusing your link for a solution, ergo the lack of response. :) Mar 20 14:40:48 matt1982_, i have a button in the gridview item I want to do thing X, and if the user clicks anywhere else in the item i want thing Y to happen Mar 20 14:41:01 ahh right Mar 20 14:41:22 Tobbi, can you clarify what you mean by a layer list? Mar 20 14:41:31 i just figured out how to make the click work for a button last night Mar 20 14:41:35 int position = getListView().getPositionForView((LinearLayout)v.getParent()); Mar 20 14:42:05 matt1982_, were we talking about listview buttons yesterday? Mar 20 14:42:26 erm it could of been yeah i was in here Mar 20 14:45:01 sigmabeta: http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList Mar 20 14:47:28 Tobbi, sorry, don't know anything about that. i've done a little bit of animation stuff but that's out of my wheelhouse Mar 20 14:49:43 Hi, I wanna use android as embedded system... any way to prevent an user to leave my app and/or to change any settings? Mar 20 14:50:14 Hi Mar 20 14:51:21 yes you can Mar 20 14:51:52 just google it Mar 20 14:52:12 Alarm window Mar 20 14:53:32 kartoffelauflauf: if you're basing on Nexus devices, modify the stock firmare: remove default launcher, install your own app (acting as launcher) in /system/priv-app Mar 20 14:53:59 kartoffelauflauf: this will give it pretty much all permissions you request, and the swipe-from-the-top menus disappear Mar 20 14:55:12 VLC can do the same without all that Mar 20 14:55:12 its probably really close to waht you are after, try it, and see Mar 20 14:56:07 mlehmk1: pop-up window? Mar 20 14:56:27 I don't know, but when the player plays, no other menus are showing at all Mar 20 14:57:11 Thank you Chainfire. Mar 20 14:57:41 and about that question from above, home screen replacement: http://stackoverflow.com/questions/8248213/use-my-own-android-app-apk-as-launcher-home-screen-replacement Mar 20 14:57:44 i need to test some junk Mar 20 14:57:49 can someone send me some hangout messages Mar 20 14:57:52 vinblau@gmail.com Mar 20 14:58:01 kartoffelauflauf I use this setup on several Android tablets that act as embedded devices Mar 20 14:58:06 for various projects Mar 20 14:58:11 and btw, apps can run in front of a locked lockscreen Mar 20 14:58:31 so you can have kind of a kiosk mode app running on top of the locked screen, that you can protect with a password Mar 20 14:59:58 mlehmk1 and you would use such a setup for an embedded system device? Mar 20 15:00:42 I wouldn't use android Mar 20 15:01:27 (in my own case, additional system permissions and adjustment were required anyway, so modifying stock firmware was the only way to go, but I would not consider running a sort of overlay app) Mar 20 15:01:58 what would you use, then ? Mar 20 15:02:26 I'd go with the least to use, linux kernel with a framebuffer and go from there maybe Mar 20 15:02:55 what buggers me with that is the extended development time because it's barebone Mar 20 15:03:02 exactly Mar 20 15:04:23 exactamundo Mar 20 15:04:55 and android is the wrong platform for a kiosk mode I think Mar 20 15:05:08 no way Mar 20 15:06:26 since I'm new to android and coming from a C# world, I'd use Windows Embedded Mar 20 15:09:16 if you control the platform, as in your own rom, android works fine for a kiosk mode Mar 20 15:09:51 just disable settings, and boot into your own launcher Mar 20 15:09:59 disable settings and disable lock screen Mar 20 15:10:09 your own launcher being your kiosk app Mar 20 15:11:14 right, exactly how I've used it - very succesfully, I might add Mar 20 15:11:27 rapid development time as well Mar 20 15:11:33 sounds nice Mar 20 15:14:43 yeah, so if you're building for your own device already, really easy Mar 20 15:14:59 although I think writing an app that can run on top of the lockscreen would make the device secure and servicable Mar 20 15:15:10 that's easy, too Mar 20 15:15:28 easier Mar 20 15:17:28 my first tweet "Working and testing twitting" Mar 20 15:18:10 I have debian installed on my device Mar 20 15:20:01 what is an alternative to javax.swing.fileChooser for android file uploading? Mar 20 15:22:18 Chainfire, can you confirm or disconfirm that you need to root your phone to be able to set a new wifi password in android? Mar 20 15:22:30 ..with an app. Mar 20 15:22:49 dnied Mar 20 15:24:13 mikedg, so it's possible to set a new wifi password? Mar 20 15:24:22 im fairly sure Mar 20 15:24:40 mikedg, how do I do it? Mar 20 15:25:31 what do you mean by set a new wifi password? Mar 20 15:25:42 like connect to a network with a different wifi passwor dprogramaticlaly? Mar 20 15:25:52 mikedg, yes. Mar 20 15:30:51 mikedg, just want to confirm if this one is possible: https://docs.google.com/document/d/15c3cS_yKMC1FA3cxdZ0jsJKmy-do5sTX0eIl_oIXZ5I/edit# Mar 20 15:35:00 can you declare styles in Android and apply them at runtime, like you would in CSS? for example, adding a class name to an html element Mar 20 15:46:22 how can I detect when my user is moving their finger down my listview when it is already at the top? Mar 20 15:47:04 Ankhwatcher are you perhaps looking for overscroll? Mar 20 15:47:04 Ankhwatcher, http://developer.android.com/reference/android/view/View.OnTouchListener.html Mar 20 15:47:30 mikedg, MalekAlrwily said it wasnt possible.. Mar 20 15:47:44 in #android. Mar 20 15:51:18 In my onDestroy method i'm calling saveProfile before super.onDestroy(), but saveProfile executes in a thread and has a progress indicator dialog. If I do it this way my progress indicator never stops. is there a way to keep the object from finishing until the thread closes? Mar 20 15:52:57 shouldn't have a progress dialog for that Mar 20 15:53:07 well, there's Skype WiFi, I don't know how it works though Mar 20 15:53:15 wrong way to do it Mar 20 15:53:27 save when onBackPressed, call finish when done saving Mar 20 15:54:19 when im using ViewHolder design pattern for a ListView, do i have to define my views in a "static class ViewHolder" or it can be non-static? Mar 20 15:54:30 pfn, onBackPressed is not the only way to leave that fragment Mar 20 15:55:13 Syzygy, then you do it every way you have of leaving the fragment Mar 20 15:55:26 omid8bimo: nothing is forcing it to be static, however you do only want one instance. if there is a reason you cant make it static there is definitely a design flaw somewhere Mar 20 15:55:40 Why does the user even have to wait, can't you just handle it in the background? Mar 20 15:56:33 mlehmk1, skype wifi doesn't change wifi passwords, it's not even protected Mar 20 15:56:39 mlehmk1, it just does captcha portal login Mar 20 15:56:47 birbeck: no, i can make it static; i was just wondering if it needs to be static since my code works with & without static! Mar 20 15:57:11 pfn, alright, thanks. Mar 20 15:57:45 omid8bimo: doesn't _have_ to be Mar 20 15:58:15 leslie, not really, they're done differently as in CSS Mar 20 15:58:57 is there any parallel, Mavrik, or do you have to just do all the styling in code? I was hoping there was some way to separate the two Mar 20 15:59:17 sander^work interestingly, I've had this very idea some time ago (never built it though) Mar 20 15:59:20 leslie, the thing is, styles are parsed and applied when the view is generated Mar 20 15:59:23 (avid traveller) Mar 20 15:59:39 leslie, you can't apply them later without recreating the view Mar 20 15:59:46 ah, I see Mar 20 15:59:46 they're also just resources Mar 20 15:59:58 as I recall, with the right permissions (that you can get as 3rd party app), it is of course impossible to retrieve Wi-Fi passwords without root, but it is possible to add networks and set passwords Mar 20 16:00:15 as in, I have done this in the past, and I think it didn't require anything funky. Mar 20 16:01:47 yeah, using WifiManage Mar 20 16:01:48 r Mar 20 16:02:06 sander^work > WifiManager::addNetwork ? Mar 20 16:09:07 Chainfire, thanks :-) Mar 20 16:10:29 How can I update Eclipse from Helios to Kepler? I added "http://download.eclipse.org/releases/kepler/" to software sites, but Check for Updates suggests there are no updates. Mar 20 16:10:47 I'm using the ADT version of Eclipse (says 'ADT' in the title bar0. Mar 20 16:10:51 ) * Mar 20 16:19:44 My android animation resets every other time. Does anyone know what to do? Mar 20 16:24:17 adt doesn't update Mar 20 16:24:26 if you want to update eclipse, download eclipse itself and add adt Mar 20 16:24:29 not vice versa Mar 20 16:24:59 pfn: The ADT one will never update? Mar 20 16:25:20 are there any plugins you guys recommend for Android Studio? Mar 20 16:26:00 pfn: if I deactivate an apk from staged rollout,does it affect the users that already downloaded? Mar 20 16:26:07 is there a way to remove an onKeyListener? Mar 20 16:26:25 you can set the onKeyListener to null Mar 20 16:26:29 I think that will do it Mar 20 16:27:25 I tried setting it to an empty onkeylistener, but apperently it can have several Mar 20 16:28:24 thepoosh, no Mar 20 16:28:38 thepoosh, unless you have a newer version for them to update Mar 20 16:31:25 totic, doesn't work Mar 20 16:37:54 I'm trying to get the home button on the action bar to function as "up" but all it does is close the activity. any idea where I'm going wrong? I added android:parentActivityName to the manifest Mar 20 16:41:46 leslie, I would advice against changing default functionality of a system. you might be better off changing the back button behavior (onBackPressed()) Mar 20 16:43:03 Syzygy, it's not so much that. I have an activity that can be accessed directly (from a shortcut, url, etc) and I want pressing the action bar title to return to the list. so it's not the same as pressing back Mar 20 16:43:06 onOptionsItemSelected : case item.getItemId == android.R.id.home : navigateUpFromSameTask Mar 20 16:44:25 leslie: all explained here http://developer.android.com/training/implementing-navigation/temporal.html Mar 20 16:44:34 just ran into the same problem today :) Mar 20 16:44:46 thanks, pduin, I'll take a look Mar 20 16:44:46 I am scaling down a bitmap to fit with the screen height and load it into a SurfaceView https://gist.github.com/bubuzzz/5898e114f6e37004aa17 Mar 20 16:45:10 pfn: playstore apk console states that it cannot deactivate the apk because it cannot downgrade existing users Mar 20 16:45:12 if the original bitmap 's height less than the screen height, then the image is loaded correctly Mar 20 16:45:16 any thoughts? Mar 20 16:45:29 but if it larger than the screen height, only the black screen appears Mar 20 16:45:35 what is wrong with this ? Mar 20 16:45:45 leslie: I'm sorry, got you the wrong link. Use this one instead http://developer.android.com/training/implementing-navigation/ancestral.html Mar 20 16:45:54 aha Mar 20 16:46:34 leslie, the XML element doesn't always work (it's rather new) so you're better off handling the click manually by handling android.R.home optionitem Mar 20 16:46:49 And if you, just like me, are seeing the wrong animation when using the action bar button: http://stackoverflow.com/questions/17927743/android-wrong-transition-when-using-navigateupfromsametask Mar 20 16:47:09 say, from 3264 * 1840 to 2270 * 1280 will create a black screen Mar 20 16:48:20 bubuzzz, is it possible you're simply running out of memory and you see an exception? Mar 20 16:48:23 those are some large images. Mar 20 16:49:18 hi everybobody! is there any standard way of stay connected to the emulator while setting ConnectionManager.setMobileDataEnabled to false? Mar 20 16:50:29 I want to use that reflected method in my tests subproject, and I'm able to, but I lose the connection to the emulator and "ant test" stays there forever Mar 20 16:51:04 Mavrik: yes. That is what i wondered. But there is no thing in the log cat Mar 20 16:51:19 bubuzzz, btw, are you prescaling the bitmap when loading it? Mar 20 16:51:24 e.g. doing subsampling? Mar 20 16:51:33 prescaling Mar 20 16:51:34 otherwise you'll have huge issues on devices with less memory Mar 20 16:52:02 this: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html :) Mar 20 16:52:33 hey so what is a better UX choice making the name clickable in a search if it is ME or not letting the users click it, I am assuming the one before... and if that is the case how do I start an intent and say open the 6th nav drawer fragment should I pass in an extra on the intent or is there a way to call it Mar 20 16:53:35 ok Mavrik, will try to implement it. Thanks Mar 20 16:53:53 http://developer.android.com/training/implementing-navigation/ancestral.html Mar 20 16:56:07 hmm, my customed SurfaceView will contain the whole bitmap in order to let the user edit the image. Therefore, the whole bitmap need to load in to the SurfaceView (with the scroll function, of course) Mar 20 16:56:21 what is the optimal way to do this Mar 20 16:56:48 and you want to let user edit arbitrarily sized images? Mar 20 16:56:49 currently, everything is fine. No memory defect when scaling up bit map Mar 20 16:57:18 yes Mavrik Mar 20 16:57:39 hmpf Mar 20 16:57:45 that complicates your solution Mar 20 16:57:52 I just detect this bug 2 days ago in my app Mar 20 16:57:58 only the big bitmap get the black screen Mar 20 16:59:22 if i scale from 1280* 800 to 2048 * 1280, then SurfaceView happily load my scaled bitmap Mar 20 16:59:39 thepoosh, dunno, make a new version and then deactivate Mar 20 17:01:18 bubuzzz, you also might be hitting OpenGL texture size limit Mar 20 17:01:29 but pretty much all of that should give at least a system error in logcat Mar 20 17:02:27 yeah, this time I just wish that there were an exception in the log cat :D Mar 20 17:08:56 is there a way to see the attributeset that is going to be sent to the constructor of a view that is being inflated from xml? Mar 20 17:09:09 besides from the constructor of that view ofc Mar 20 17:10:25 is this still the best way to preserve a webview during screen rotation? http://www.devahead.com/blog/2012/01/preserving-the-state-of-an-android-webview-on-screen-orientation-change/ Mar 20 17:11:25 pretty much Mar 20 17:11:36 oh, actually I think I'll just subclass LayoutInflater Mar 20 17:12:27 Mavrik: ah ok, it just seems like a lot of code Mar 20 17:13:49 mikeche1en, erm? Mar 20 17:13:55 how can I set mTag in the base fragment from a fragment implementation? as far as I can see it only has the default accessor so I should be able to use it as if it was a field variable of my fragment implementation Mar 20 17:14:05 mikeche1en, it's just the "saveState" and "restoreState" on WebView that's relevant Mar 20 17:14:10 but that isn't the case Mar 20 17:14:39 mikeche1en, put them inside onSaveInstanceState/onRestoreInstanceState and you're done. Mar 20 17:16:22 Mavrik: the "standard" solution he mentions is not too tricky, but it doesnt actually work, the proposed solution gets a little confusing because of the placeholder & framelayout stuff Mar 20 17:17:19 changes to the manifest etc. Mar 20 17:17:43 i am working my way through it all :) Mar 20 17:18:09 ah yea Mar 20 17:19:11 this looks interesting but it requires some other library: http://twigstechtips.blogspot.com/2013/08/android-retain-instance-of-webview.html Mar 20 17:19:11 there's not much you can do... you can either let WebView be recreated or handle orientation changes yourself Mar 20 17:19:12 A quick question. If I create a View using the Application context, instead of an activity, can I take that view and keep adding it to the new Activity's layout as they arrive? Mar 20 17:19:24 default accessor in java/android allows implementations of a base class to use the base classes field variables and functions, right? Mar 20 17:19:40 can someone confirm this? I'm a bit rusty on my inheritance D: Mar 20 17:20:08 Mavrik: yeah its just funny because webview is otherwise a pretty easy way to make a simple app, then everything breaks with rotation :) Mar 20 17:20:20 mmh, tue Mar 20 17:20:49 i am using jquery to manipulate the dom as well so literally all the content disappears Mar 20 17:21:14 at least that blog post instructions should be pretty easy to follow Mar 20 17:21:19 Syzygy, default access for things in Java is package private which is between public and protected Mar 20 17:21:22 Syzygy, so yes. Mar 20 17:22:08 Mavrik, thanks. So that's why it's not working, it's in a different package. Mar 20 17:22:23 :) Mar 20 17:22:46 the problem is that i'm talking about Fragment as the baseclass Mar 20 17:22:57 mhm, I get it Mar 20 17:23:09 I usually just fake it by stuffing my overriden class into a same package if possible Mar 20 17:24:21 not an option, but I just figgured out that I an do it via XML Mar 20 17:24:27 that will work for me i guess Mar 20 17:32:30 yay, well at least my app doesn't crash anymore... but I guess i got rid of that onClickListener... Mar 20 17:33:29 good morning folks... Is there a way that I can get a listview populated with both text and an id (the id should be hidden, but transferred to the next view when the list item is clicked?) Mar 20 17:34:11 codetroll, adaptes have getItemId() call which you can override Mar 20 17:34:25 then just do adapter.getItemId(position) in the click listener Mar 20 17:34:34 or if I recall correctly you even get ID passed Mar 20 17:35:47 Mavrik ok - but how should the list view be populated? So far I have only seen array of strings put into the listview.. The position will not match the id of the listitem.. Mar 20 17:36:15 codetroll i think i did somthing similar to you with a spinner menu? Mar 20 17:36:28 using a hasmap Mar 20 17:36:31 hashmap* Mar 20 17:36:33 The idea is that I need to use the id for looking up the full record using the id.. Mar 20 17:36:50 b0br ok - I will see if I can find some examples of that.. Mar 20 17:37:12 thank you both Mar 20 17:37:19 let us know! Mar 20 17:37:22 (^_^) Mar 20 17:37:36 I will - might take some time though :P Mar 20 17:37:48 its nice here Mar 20 17:38:00 :) Mar 20 17:38:07 :) Mar 20 17:38:10 hehehe Mar 20 17:38:39 codetroll, I suggest you make your own adapter by extending the BaseAdapter Mar 20 17:38:47 codetroll, using ArrayAdapter will just cause you grief Mar 20 17:39:09 Mavrik ok - I haven't tried making my own adapter yet.. Mar 20 17:39:25 codetroll, nothing much to it, you have to implement like 2 methods Mar 20 17:39:26 or 3 Mar 20 17:39:43 one to return number of items for listview, one to return ID according to position and one to return view according to position Mar 20 17:40:16 hmm ok - will try and dig up an example Mar 20 17:41:07 yeah it's alot of code at first but it gives you flexibility to do fancy stuff with listviews Mar 20 17:42:06 ;) I have no problem doing all the base java stuff I need done... But glueing it all together in android.. that's a lot of new stuff :) Mar 20 17:42:28 :) Mar 20 17:42:35 man, most custom adapter tutorials are shit Mar 20 17:42:46 keep insisting on extending ArrayAdapter -_- Mar 20 17:43:01 lol good to know, now that I embark on my first adapter adventure Mar 20 17:43:38 Does anyone here know JSoup? I'm trying to get a link thats wrapped around an img.. This is how it is in html http://pastebin.com/FR1dDCKx Mar 20 17:43:53 found this : http://stackoverflow.com/questions/8212810/pass-id-of-sqlite-table-from-listview-to-another-activity-android?rq=1 not sure if this is what I need Mar 20 17:46:43 not really Mar 20 17:46:59 oh well.. Mar 20 17:47:45 codetroll, see this: http://www.learn-android-easily.com/2013/06/listview-with-custom-adapter.html Mar 20 17:48:05 this is also one of the adapters I've used (it just has some additional update logic which you probably don't need) : https://bitbucket.org/mavrik/bicikel/src/757abb3cdf0e2f0b19ec36b095fd52acd59e1670/src/si/virag/bicikelj/stations/StationListAdapter.java?at=default Mar 20 17:48:23 ok - will take a look at it.. Mar 20 17:53:43 hello, is it possible to open a file descriptor by filename - i.e. do they have a special filename that one can use with a function like avformat_open_input Mar 20 17:53:45 ? Mar 20 17:54:09 I found some options that would involve compiling stuff with the NDK but I would want to avoid that Mar 20 18:02:26 I am trying to get qt for android up and going, using the simulator. I am getting a message about the bits/c++config.h not being found Mar 20 18:02:29 Any ideas? Mar 20 18:03:10 Regarding someone's earlier question about the ABI not found - I had to add a ANDROID_TARGET_ARCH build variables to say default/whateverABI Mar 20 18:03:30 Because the new SDK tools manager is putting a tag in front of the ABI name Qt is not expecting Mar 20 18:04:35 Hi there Mar 20 18:05:24 hello Mar 20 18:06:04 Images: Mar 20 18:06:34 yes Mar 20 18:06:37 ? Mar 20 18:07:12 you said hello Mar 20 18:07:27 oh, i also had a question about the simulator..woops Mar 20 18:16:55 Let say, I don't decide in favour of volley library for communicating with rest web service and I opt for HttpURLConnection due to official documentation and becaue I don't have a lot of knowladge for android apps that are network based. Would I need to create a local database in android app for communicating with web service? Mar 20 18:30:15 Hello Mar 20 18:30:30 Do google play game services work on kindle fire? Mar 20 18:31:20 highly doubt it Mar 20 18:32:06 added play services to my game, but dunno if I should upload the update to the amazon app store or not.... Mar 20 18:32:21 Any retrofit users in here? I am trying to decide between two possible solutions for my app since the server model layer does not map cleanly into the client model layer. 1) Create a ServerFoo class for every Foo model class and use the standard Gson adapter. Then write methods to create a Foo object from any ServerFoo object. 2) Create a custom Converter that does the JSON stuff myself (probably not streaming since the Mar 20 18:32:21 responses aren't super long). This converter would use N adapters that know how to construct each model object from the equivalent JSONObject. Mar 20 18:35:40 Ericthegreat i dont think anything from google play services works on kindle Mar 20 18:36:06 ty :/ Mar 20 18:36:58 Hi, is there any way to prevent shutdown by catching the action_shutdown action on a non-rooted device? Mar 20 18:38:49 I put my problem to SO http://stackoverflow.com/questions/22154055/stretch-image-s-height-to-fit-the-screen-height-while-keeping-the-old-images-r Mar 20 18:48:51 bubuzzz: Try making the bitmap smaller.. Android has a max bitmap size on hardware accelerated views Mar 20 18:49:46 Canvas#getMaximumBitmap(Width|Height) / GL_MAX_TEXTURE_SIZE Mar 20 18:51:14 I had 1 ad click on my site yesterday give me $3.30 Mar 20 18:51:22 It excited me Mar 20 18:52:35 SimonVT: if that is the case, then there is no way to load a big image and do some image processing on Android, rite ? Mar 20 18:53:50 jonc-1: which ad network do you use ? Mar 20 18:54:02 adsense Mar 20 18:54:22 from when google being so generous like that Mar 20 18:55:01 The max bitmap size is < the screen resolution, so as long as you're smart about how you display it Mar 20 18:57:12 is there any 3rd lib that do the partially loading the image like google maps ? just wondering Mar 20 18:59:10 anyway, have to sleep now. 2 AM here already. Thank god, no work tomorrow Mar 20 18:59:18 thanks guys Mar 20 18:59:21 The gallery does something like it Mar 20 19:02:56 scelis: i use it Mar 20 19:03:40 scelis: and in that case I deserialize responses to server model and then transform them to client model after Retrofit (using RxJava, but just as an implementation detail) Mar 20 19:04:08 JakeWharton: Interesting. Thanks. Mar 20 19:17:52 Hello! What's the best practice for generating a trial/limited version of your app? Mar 20 19:18:29 If I could set a variable at build time, I could build different versions, and handle the limitations in the general code.. Mar 20 19:18:42 Anyone know how to do that with IntelliJ, possibly? Mar 20 19:26:08 Gargron: this is easy with gradle build flavors Mar 20 19:29:01 Hi all Mar 20 19:34:49 Hello Mar 20 19:36:13 So I'm trying to clear a listview using the notifyDataSetChanged(), but when doing that i get this http://pastebin.com/nr58DvV6 Mar 20 19:39:30 meisolsson, have you tried .clear()? Mar 20 19:39:40 On the list? Mar 20 19:39:57 jaynewstrom, but IntelliJ didn't setup the project with gradle :( Damn. Mar 20 19:41:05 meisolsson, yes Mar 20 19:41:11 the adapter actually Mar 20 19:41:37 The method doesn't exist on neither Mar 20 19:41:58 oh uh. okay i guess i was thinking of the ArrayAdapter Mar 20 19:42:24 I'm using a custom adapter, so yeah Mar 20 19:42:31 forgot to say that Mar 20 19:44:11 meisolsson, it seems that either you called notifyDatasetChanged from wrong thread, or you changed contents of your listview while main thread was rendering it Mar 20 19:44:38 Want a code snippet? Mar 20 19:58:36 If the listview goes through its layout routine between you changing the dataset and you notifying it of changes, you'll get the exception Mar 20 19:58:45 So just stop doing that Mar 20 20:00:15 Hello, anyone know how to probe the memory allocations of native/ndk resources? Mar 20 20:13:30 Hey guys, is there a way in xml to tell a viewgroup to share the state between all children? ie, if a viewgroup holds an EditText and a Button, when the EditText is focused I want to show the Button focused state. Mar 20 20:19:20 eh, sort of, there's android:duplicateParentState, which you'd set on EditText... then I think you could set it for Button as well and make the parent ViewGroup focusable, for example Mar 20 20:19:26 jayd16: ^ Mar 20 20:19:35 if I create a fragment, in what callback is it most appropriate to populate it with data? For example, a ListView. Would it be onCreateView ? Mar 20 20:21:54 or onStart? Mar 20 20:37:12 DallasG: that doesn't actually work. If the edit box is focused then the parent isn't and you can't have duplicatedParentState and addStatesFromChildren. I'm looking into just playing with an activated state but now I'm confused about state_active vs state_activated Mar 20 20:37:51 ah, addStatesFromChildren, knew there was something for that Mar 20 20:39:09 I mean, it's weird UX-wise to have a two hierarchically-lateral views have focused states at the same time Mar 20 20:41:27 yeah I think state_activated is what is supposed to be used…sadly API 11 so I guess I'm changing fonts and backgrounds manually on focus change. -_- Mar 20 20:57:58 hey, so I created an activity with theme Theme.Dialog. the idea is that you can click on my apps notification to view the dialog. Mar 20 20:58:25 however when I do so, android takes me to the homescreen before showing the dialog Mar 20 21:19:23 rymate1234 were you expecting to draw on top of another app? Mar 20 21:27:26 hi Mar 20 21:27:56 anybody know how to automatically (with a script or an application) publish an app on google play ? Mar 20 21:29:42 jayd16, yes Mar 20 21:29:48 i have the permission to do so Mar 20 21:30:12 however no idea how to implement the actual drawing over apps part Mar 20 21:35:12 found this https://github.com/onepf/AppDF :) Mar 20 21:41:56 rymate: http://developer.android.com/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW Is that the permission you're using? it mentions opening the a window with type TYPE_SYSTEM_ALERT. so you probably need to add that to the window flags. Mar 20 21:42:53 im just starting an activity at the moment Mar 20 21:43:08 but yeah that's the perm im using Mar 20 21:44:29 hy all Mar 20 21:46:15 what does really mean AOSP for a certain phone? Mar 20 21:48:37 Hi, I recently upgraded my LG phone to jellybean 4.1.2... Something's up with vibration settings. I have a free SMS app, (Pinger Textfree) and before the upgrade, it would vibrate on text notification, but now I can't get it to... I can't find any haptic intensity settings... Mar 20 21:48:37 This seemed to be a relatively common issue and not sure if it's been fixed in newer versions - anyone have an idea about this for me? Mar 20 21:49:28 does anybody have Sony Xperia L? do you like that? Mar 20 21:50:08 this is an app dev channel not #android-help Mar 20 21:55:15 well this.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG); Mar 20 21:55:16 didnt work Mar 20 22:03:34 How do you change the text colour of a list item depending on whether it's selected or not? Mar 20 22:11:15 not sure why I am getting a null exception on text.setText line... http://pastebin.com/QudLT30i Mar 20 22:11:34 this is within an adapter for a listview Mar 20 22:11:53 LoneSoldier728 probably missing a view with that ID Mar 20 22:12:17 I have that id tho r.id.label Mar 20 22:12:43 it is in the layout being inflated Mar 20 22:12:45 but try separating it to see exactly which call is null Mar 20 22:13:02 there's at least 3 things there that could be null Mar 20 22:13:33 it might be the getPosition Mar 20 22:14:12 ya no errors Mar 20 22:14:16 that'd throw an index exception, I think, not NPE Mar 20 22:14:17 so why is the position getting an error Mar 20 22:14:21 hey guys, I'm new to Android. Is MVC an accepted architecture on for Android programming? Mar 20 22:14:52 ok so it sets the test Mar 20 22:14:58 text* if it is a plain string Mar 20 22:15:22 the position might be messed up but this should not be called even if the list is empty Mar 20 22:15:38 not exactly, yaw Mar 20 22:16:20 yeah leslie it is list.get(position) giving the error... Mar 20 22:16:43 it makes sense because when I am doing my search there is no value... Mar 20 22:16:59 leslie: ok. I'd be building a client for a REST API (which is probably what most android apps are). Any advice on how to structure the application? Mar 20 22:17:03 LoneSoldier728 probably a problem with your getCount() implementation Mar 20 22:17:27 get count returns list.size() Mar 20 22:17:57 yaw, not sure specifically, but have a look at the Retrofit library Mar 20 22:18:15 hm yea the list size is showing 1 Mar 20 22:18:22 when there is no value that is wierd why... Mar 20 22:25:11 yaw: it is helpful if you can pull it off Mar 20 22:26:01 lasserix: yes. I'm trying to implement it, and possibly extract a framework out of it. Mar 20 22:26:33 I'd be building a lot of Android applications so a framework would be required. Mar 20 22:26:45 yeah the way ive been able to is develop a generic model for views and abstract your controllers very well Mar 20 22:29:14 http://lpaste.net/101525 <- if level.index( i, j ) returns an ENUM, is that a reference to the level.index( i, j ) or a copy of it? meaning could this keep the whole Level class from being garbagecollected? Mar 20 22:30:05 http://stackoverflow.com/questions/22545811/android-reducing-memory-usage-store-sparse-array-as-key-value <- Can someone help me? I need to reduce memory usage of my app (using 14 to 17MB) Mar 20 22:32:05 try to figure out why hashmap is using so much memory Mar 20 22:32:16 is tiletype a huge type? Mar 20 22:32:36 normally that's the simplest way to do a sparse array...combine your cordinates into a key and hash it Mar 20 22:32:45 so the question is why the hashmap is bigger Mar 20 22:33:57 what if you had an array of references, instead of directly instantiating an array? Mar 20 22:34:00 how big is your tile board? Mar 20 22:35:15 board is 540*840, TILE_TYPE is just an enum Mar 20 22:35:38 heh Mar 20 22:38:22 heh? Mar 20 22:38:41 i am just trying to imagine playing checkers with each square the size of a pixel Mar 20 22:39:01 but i think that is way too big for a sparse array? Mar 20 22:39:46 well this is not checkers :). But I realized I am doign soime thing unncessary. I dont need to store it like that. I actually expand a tiled version of the board into a full version completely in vain I think. Mar 20 22:40:21 yeah Mar 20 22:40:24 also Mar 20 22:40:28 you can look into using enumset Mar 20 22:40:56 why not use the hash table, and return whatever the type is for empty if there's no key for a given coordinate? Mar 20 22:41:07 the only way the hash table could be bigger is if you are initializing every location Mar 20 22:41:24 ^^ Mar 20 22:43:12 rento you have used a viewport? Mar 20 22:43:35 It seemed hashmap had a huge table[][] underneatch that was way bigger than my map. I hashed like this: row * 10000 + col; does that create a 10000*row+col sized table[][] maybe? Mar 20 22:43:50 i guess it would, it is as an array underneath? Mar 20 22:44:46 array of linked lists i believe Mar 20 22:45:41 How to listen to when a web view finishes loading it's content? I need to put some conditional code depending on the size of the content .getContentHeight() Mar 20 22:46:15 subclass webview super the load method put your callback after? Mar 20 22:48:28 rento: well your hash function is no good Mar 20 22:48:40 you're supposed to hash into a space *smaller* than the total key psace Mar 20 22:48:40 space Mar 20 22:48:44 that's the whole point of a hash table Mar 20 22:49:47 http://stackoverflow.com/questions/682438/hash-function-providing-unique-uint-from-an-integer-coordinate-pair Mar 20 22:50:07 like the post says, hashes are supposed to collide...if you never collide you've just created an inefficient array Mar 20 22:52:23 if you want to be cheesy, (y * 540 + x) / 1000 Mar 20 22:52:45 well the floor() of that Mar 20 22:52:56 should give you 454 buckets in the hash table Mar 20 22:53:36 myke: yeah ty I feel stupid now. Mar 20 22:53:38 anyone have an issue where sqlite returned a list size of 1 back when there is none Mar 20 22:53:38 although it's not a great hash function and depending on your game (if there's long columsn/rows of pieces) may give you pretty poor hashing performance Mar 20 22:53:48 http://pastebin.com/mbNWGQVw that is the query it has to do with the cursor i believe Mar 20 22:54:29 actually sorry not divide but mod, % 1000, or whatever Mar 20 22:54:37 myke: I realized I can just store the board tiled and map screen cordinates into the tiles instead then I reduce the board[][] with tileSize (which is 32 for a 4.3" phone) so quite a lot... Mar 20 22:54:46 ah ok Mar 20 22:55:06 oh you were storing actual pixel coordinates? Mar 20 22:55:10 no wonder your game board was huge Mar 20 22:58:49 LoneSoldier 1 or -1? Mar 20 22:58:53 is that an error? Mar 20 22:59:18 sure you did not do an insert and forget to drop the table? Mar 20 23:00:07 also for some reason, it's possible that the cursor is returning blank values so you're returning db_d but actually it's anull Mar 20 23:04:56 um Mar 20 23:05:07 I am getting no error lasserix it just returns a size one Mar 20 23:05:26 exactly that is what is happening so how do I get it to return null Mar 20 23:06:01 i tried c.getCount()>0, c!=null and movefirst Mar 20 23:06:12 closing not closing the cursor... running out of ideas Mar 20 23:08:37 make sure you dropped the table first Mar 20 23:08:46 then check what values your getting back from c.get* Mar 20 23:10:04 i also like to set it up like Sqlite db = null; Cursor c = null; try { db = new Db(); c = query(); //do stuff// } finally { if (db != null) db.close; if (c != null) c.close } Mar 20 23:10:13 so you are garunteed to close db / cursor Mar 20 23:11:03 hm kk Mar 20 23:11:11 is your _id autoincrementing primary key? Mar 20 23:11:22 i just logged out which deletes the dbs Mar 20 23:11:47 and it still errors, returning size 1 Mar 20 23:11:48 i dont want know that means, but make sure it actually drops the tables Mar 20 23:12:11 what does c.getCount return? Mar 20 23:12:21 i call deleteDatabase? Mar 20 23:13:02 are you calling db.close first? Mar 20 23:13:07 hm lets see didnt think about that Mar 20 23:13:07 since you just return null Mar 20 23:13:26 if the db is still open apparently delete(db) can fail? Mar 20 23:13:32 I am using SQLiteOpenHelper which deals with closes Mar 20 23:15:27 hm Mar 20 23:15:34 it does not look like it enters the cursor Mar 20 23:15:39 is return null incorrect then Mar 20 23:16:31 no think you stil have to close it manually Mar 20 23:17:19 what db? Mar 20 23:19:26 getReadableDatabase Mar 20 23:19:39 Sqlite db = null; Cursor c = null; try { db = new Db(); c = query(); //do stuff// } finally { if (db != null) db.close; if (c != null) c.close } Mar 20 23:19:52 where new Db() is getReadableDatabse() Mar 20 23:21:13 kk Mar 20 23:23:16 close the db before the cursor? Mar 20 23:24:22 repeatedly getting this error D/clockwork(520): error while connecting to peer Mar 20 23:24:32 same thing lasserix Mar 20 23:24:49 after forwarding port 5601 while using in Android Wear SDK Mar 20 23:25:26 Is anyone else facing similar issue ? Mar 20 23:28:37 omg Mar 20 23:28:44 been editing the wrong query shit Mar 20 23:30:50 lonesoldier err after Mar 20 23:30:53 ;p Mar 20 23:31:27 it is still having bugs just now retrying your method Mar 20 23:31:42 same issue just didnt try your method on it Mar 20 23:32:30 lol i got it to work but it is incorrect because it shows a blank db row Mar 20 23:32:45 because i return the db_d just moved the declaration outside of the curose Mar 20 23:32:51 instead of null Mar 20 23:32:55 lets see what your method does Mar 20 23:34:46 LoneSolider you can download sqlite browser (if using windows) populate a dummy table and run queries through it to verify your query / table is working Mar 20 23:34:56 myke: hehe that made wonders for my memory :). tiling the board. so stupid of me :). Mar 20 23:35:06 well I cannot close the db as that is an error Mar 20 23:35:46 100 times less memory Mar 20 23:35:49 well count is 0 Mar 20 23:35:50 for the board Mar 20 23:36:57 well lasserix Mar 20 23:37:06 it cannot be the query if return null; Mar 20 23:37:14 returns an empty row...? Mar 20 23:51:57 ? Mar 20 23:52:12 if the thing is returning null then ifMoveToFirstFailed you can verify this all with logcat or debug mode Mar 20 23:52:24 thanks Mar 20 23:52:28 lasserix Mar 20 23:52:32 it was stupid Mar 20 23:52:35 heheh Mar 20 23:52:44 I had to run around adding if null statements around everything Mar 20 23:52:49 yep Mar 20 23:53:02 my coworker was giving my gruff that i have tons of null checks Mar 20 23:53:04 the source might have been at the end the server was sending back an empty array with an object Mar 20 23:53:07 and that's exactly why Mar 20 23:53:24 ahh Mar 20 23:54:30 how can I say if a boolean value equals null Mar 20 23:54:38 it it boolVal == null Mar 20 23:56:06 hm wierd because I am using Boolean Mar 20 23:59:15 why would a boolean ever be null ? Mar 20 23:59:32 because it might not get passed back at all Mar 20 23:59:43 for example trying to see if a user is a follower Mar 21 00:00:11 but when sending back all followers from the db in bunches, it is a waste of time to check if each user is a follower so not passing that value back Mar 21 00:00:46 no idea what you're saying but a boolean is true or false, if you haven't set anything then it's false Mar 21 00:00:54 yeah but java Mar 21 00:01:00 lets you pass null to Boolean Mar 21 00:01:13 http://stackoverflow.com/questions/15937715/java-check-if-boolean-is-null Mar 21 00:03:45 oh i see, why not boolean (instead of Boolean) ? Mar 21 00:04:02 huh? Mar 21 00:06:57 hm i think i got a solution... but it is so weird because it passed back null... but I should be able to see if it is Mar 21 00:10:19 LoneSoldier728: What are you trying to do? Mar 21 00:10:37 basically see if a value was passed in at all if so then check true or false Mar 21 00:11:24 I changed my package name and now R cannot be found :( Mar 21 00:11:40 hm ok it is just a null pointer exception does that make sense... it is suppose to be null lol Mar 21 00:12:11 which means the project is not building Mar 21 00:13:28 yaw: eclipse ? Mar 21 00:13:42 bankai_: yes Mar 21 00:13:45 yaw: The Android package name? Mar 21 00:14:21 codeguru: sg.fessup.fessup -> sg.fessup.android Mar 21 00:14:33 yaw: You can either change the Java package for all of your Java classes or import the R class into each Java file. Mar 21 00:15:38 codeguru: I used eclipse's refactor to rename the package so it's changed for all classes. and yes, I'm importing R everywhere I use it. Mar 21 00:15:38 LoneSoldier728: Can you default to false if the value isn't passed in? Mar 21 00:15:53 i just had to put them in else ifs Mar 21 00:15:56 It's just not available at sg.fessup.android.R Mar 21 00:16:07 give it a clean Mar 21 00:16:08 yaw: Did you rename the *java* package or the *android* package? Mar 21 00:16:16 codeguru I would but the issue is if it is false then it might be a lie since the value might be true Mar 21 00:16:21 and then i have an incorrect value Mar 21 00:16:30 umm Mar 21 00:16:35 codeguru: wait, I think the java package. Mar 21 00:17:02 because lets say instead of making a server request I want to show the users followers Mar 21 00:17:04 the stuff under APP_NAME/src/* Mar 21 00:17:13 then they might not show up when they are in fact followers Mar 21 00:17:17 yaw: In that case, you can either change the Android package to match or import the R class into all of the Java files. Mar 21 00:17:35 the R file is not generated anymore Mar 21 00:17:47 try cleaning the project Mar 21 00:17:53 Project -> Clean Mar 21 00:19:14 is there a clean project thing for android studio to get rid of unused imports Mar 21 00:19:50 codeguru: I just did. Mar 21 00:20:14 the files under APP_NAME/gen/* still have the old package name Mar 21 00:20:19 yaw: and still the same problem? Mar 21 00:20:28 yup :/ Mar 21 00:20:45 yaw: that's because "gen" uses the Android package name from the manifest file. Mar 21 00:21:18 yaw: You need to change the Android package in the manifest file Mar 21 00:21:59 http://pastebin.com/JHsEizAk why am I getting null pointer on position? Mar 21 00:22:24 if I do list.size() it is one and correct... but trying to the the index based on position messes it up? Mar 21 00:22:27 codeguru: ok, I did that. R is still not generating Mar 21 00:25:43 codeguru, could it be because the package under "gen" is the same as those under "src"? Mar 21 00:29:52 * g00s hopes 0.5.2 >>>>> 0.5.1 Mar 21 00:31:29 this is strange, android youtube app has a thing in settings for downloading subscriptions for offline use Mar 21 00:31:48 but when i went offline, the WHOLE fucking UI was blank, and said i was disconnected Mar 21 00:31:54 how that for shit UX Mar 21 00:32:51 even the nav drawer was blank and only said 'offline' Mar 21 00:33:04 may as well just use the website Mar 21 00:33:12 oh, thats probably the plan Mar 21 00:35:12 my build is failing.. :( Mar 21 00:35:14 g00s: do you have an example gradle config for unit testing? IJ just isn't picking up my sources Mar 21 00:35:16 maybe the MS WP ripoff works better Mar 21 00:35:45 bankai_ i just do the androidTest / instrumentTest stuff Mar 21 00:35:48 run it on genymotion Mar 21 00:36:10 do you have it in src/test/java... ? Mar 21 00:37:06 i have it like the gradle docs say; src/androidTest Mar 21 00:38:22 hellooo.. Mar 21 00:39:00 Hey guys. Got a strange question. I have runOnUiThread(new Runnable(){ @Override public void run() { Mar 21 00:39:17 I put a logcat print just before that line and also one inside the run() Mar 21 00:39:22 my Runnable is never being run Mar 21 00:39:37 does that seem like I'm blocking the UI thread somehow? What would cause my run() to never actually run? Mar 21 00:39:38 I can't build the .apk Mar 21 00:40:01 santosh: need more information than that Mar 21 00:40:39 codeguru: I found the solution. turns out I deleted Settings Mar 21 00:40:44 ProgramMax: can you pastebin an example? Mar 21 00:40:59 yaw: well, that would explain some errors ;-) Mar 21 00:41:14 codeguru: ;) Mar 21 00:41:26 mmm I might be able to but I don't know if I can distill it down to this problem. My gut feeling is that something else is blocking the UI thread. I just wanted to know if I'm hunting in the right direction Mar 21 00:41:40 bankai_: https://gist.github.com/santosh/af166cad30e1d9e5698c Mar 21 00:41:56 thanks for helping. it refined the domain of the possible causes. thumbs up Mar 21 00:43:03 bankai_: Working on this mini project, https://github.com/santosh/colorator/tree/android Mar 21 00:43:29 Any idea what android shows, and how to controll it, from Application.onCreate until my first activity is created? Mar 21 00:44:29 bankai_: Anything else I can tell? Mar 21 00:47:50 no idea, something screwy with your build.xml most likely Mar 21 00:49:56 bankai_: possible reasons? Mar 21 00:50:44 bankai_: was building flawlessly 2 days before.. Mar 21 00:54:52 undo what you changed then Mar 21 01:06:14 Anyone know much about kernel instrumentation? I need to dump kmesg from a state where usb is not yet initialized. Mar 21 01:06:35 I REALLY don't want to hook up to the UART ports. Mar 21 01:07:45 bankai_: how can adding colors.xml prevent building? Mar 21 01:11:38 bad syntax Mar 21 01:14:15 Poor taste? Perhaps if your colors are too gaudy it will refuse to build. ;P Mar 21 01:16:33 well, looks like AS 0.5.2 is crap too; "Project Structure' dialog doesn't even show and the IDE throws an internal error, class not found Mar 21 01:20:21 is there any point in filing a bug report manually if you 'send to google' ? probably not ? Mar 21 01:20:27 meh Mar 21 01:33:11 'bad syntax' sounds like a name of a SF hipster band featuring lots of trombones Mar 21 02:05:11 g00s: figured out what i did wrong re: unit :P seems IJ is a bit disconnected with gradle, had to do a 'refresh' and it picked up my non-standard test path :) Mar 21 02:05:42 oh yeah, there is an option for auto-import but its a bit too eager Mar 21 02:08:33 man this is weird, my N7 refuses to connect to this bluetooth device on the first try, it always takes on the second. this worked fine with my droid-1 Mar 21 02:08:53 the original version of my app did not attempt automatic connection retries with bluetooth Mar 21 02:09:01 wonder how many people got pissed Mar 21 02:09:16 analytics could have answered that. i need to add GA Mar 21 02:20:09 This line is giving error when I'm trying to put just inside the class.. Mar 21 02:20:11 public TextView colorful = (TextView)findViewById(R.id.colorful); Mar 21 02:20:13 but Mar 21 02:20:31 I need to put in just there, because other methods will use it Mar 21 02:20:41 jasta are you around ? Mar 21 02:20:49 I can't put it in onCreate() Mar 21 02:21:07 broaden the scope of colorful. define it in onCreate() and call when needed else where Mar 21 02:21:12 santosh: Mar 21 02:23:52 canvs2321: then I get "cannot find symbol" error upon building. in another method Mar 21 02:24:06 paste your code Mar 21 02:24:35 i'm saying declare it outside of your methods. define it in onCreate, and you can use it in any method in it's scope Mar 21 02:26:47 canvs2321: https://gist.github.com/santosh/380d81dc687ddac911bb#file-main-java-L19 Mar 21 02:28:22 canvs2321: actually my OnClickListener can't find it when I'm putting it in onCreate Mar 21 02:28:33 santosh, see comment Mar 21 02:29:08 also the view v in onClick is colorful Mar 21 02:30:42 I will use sensors in android for repetitive measurements for different users. What is the best way to save this data? Should I save data in file and add path to the database or should I create new table in the data base for each measurment and add name of tabel in main tabel of the database. Later I will need this data to analyzing them. Mar 21 02:30:51 santosh: not sure if you got it but, http://pastebin.com/3ax4ZuaP Mar 21 02:35:14 slani well, if you are saving frequently in sqlite there will be a lot of flash activity from the journal Mar 21 02:35:25 i guess you could disable the journal Mar 21 02:39:44 oh man, the darcula theme is messed up in AS 0.5.2, black text on dark grey Mar 21 02:39:51 in some spots Mar 21 02:40:50 g00s: journal?? Mar 21 02:40:54 just once ... ONCE, can you say something nice about AS ? Mar 21 02:41:14 bankai_ 0.4.6 was pretty good. 0.5.x have all sucked Mar 21 02:41:38 hello Mar 21 02:41:43 Mavrik: i found this option fixes my rotation issues: android:configChanges=”orientation|screenSize” Mar 21 02:41:43 anyone use ORMlite? Mar 21 02:42:52 does foreignAutoRefresh also fetches foreign collections? Mar 21 02:45:00 hi Mar 21 02:45:10 how i can resolve "R cannot be resolved"? Mar 21 02:45:12 Does anyone know of a library that simplifies getting weather data? The data that I am mainly concerned about is radar overlays to overlay onto a Google Map. Mar 21 02:45:18 mypackage.com.R Mar 21 02:46:14 t0th_- find your mistake. R cannot be resolved is usually caused by a faulty xml file Mar 21 02:46:21 or resource Mar 21 02:46:29 i dont have any error in my xml... Mar 21 02:46:33 or eclipse playing silly buggers ;) Mar 21 02:47:08 :( Mar 21 02:47:59 t0th_- R is built from your resources....soooo, either clean build or find the error Mar 21 02:48:15 clean... i dont have error in my xml Mar 21 02:49:01 ok, keep saying that, then remove R from project and rebuild, plus why mypackage.com.R, show some code or something, can't just go off [22:45] how i can resolve "R cannot be resolved"? Mar 21 02:49:22 canvs2321: thanks man Mar 21 02:51:10 if you don't get it, come back, but post alittle code if you can Mar 21 02:51:29 what code you want see? Mar 21 02:52:27 the problem is eclipse.... Mar 21 02:52:32 how big is your project? how many layouts you have? hell show some screen shots of the IDE. just something more than that error message. cuz it's just saying it can't build your resources, so a drawable could be f'd, layout xml could be f'd etc.... Mar 21 02:52:44 then download and use something else. Eclipse is a pain in the butt for sure Mar 21 02:53:11 what? Mar 21 02:53:16 android studio? Mar 21 02:53:50 that's an option Mar 21 02:54:02 ok Mar 21 02:54:04 thanks Mar 21 02:54:13 i left eclipse in the dust buried under several feet of rocks and mortar once i started with AS Mar 21 02:55:06 eclipse made me loose 15yrs off my life from the stress it caused haha, so now i'll die young unless my mind can recover whilst eclipse is gone Mar 21 02:56:09 eheheheh Mar 21 02:56:26 is simple to migrate to android studio from eclipse projects? Mar 21 02:57:53 just depends on how fast you can catch on. simple to one maybe hard to others. but it's worth the learning curve Mar 21 02:58:39 &do some research as AS is beta. i've been using 0.4.6 for awhile without issue Mar 21 02:59:14 or maybe for couple weeks can't remember when i upgraded. but there are newer versions than 0.4.6 i've just stuck with it for now since no issues **** ENDING LOGGING AT Fri Mar 21 02:59:58 2014