**** BEGIN LOGGING AT Mon Sep 02 02:59:58 2013 Sep 02 03:00:06 https://github.com/JesusFreke/teensyhand/blob/master/main.S.pl Sep 02 03:00:12 yes. that is perl. Sep 02 03:00:21 I thankfully don't actually have anything against perl. Sep 02 03:01:02 JesusFreke congrats, nice perl Sep 02 03:01:44 Plus I use Ruby for a lot of stuff, so I'd be a gigantic hypocrite if I had problems with Perl, seeing as Ruby borrows tons from it. Sep 02 03:02:15 g00s: I find it amusing that you consider what is essentially low level assembly to be nice perl :) Sep 02 03:02:18 CPAN is pretty good Sep 02 03:02:24 JesusFreke :D Sep 02 03:02:44 if you stick to inline assembly and comments, can't go wrong Sep 02 03:02:50 with perl :D Sep 02 03:03:03 well, it's not inline, per say Sep 02 03:03:07 it's more of a generator Sep 02 03:03:20 CPAN solves almost any problem you can think of Sep 02 03:03:30 i.e. _mov is just a perl function that emits a mov instruction Sep 02 03:03:55 Like when I needed to my own dictionary for a sort, there's a CPAN module for that Sep 02 03:04:05 it's basically using perl as a macro language on top of the base assembly language. Sep 02 03:04:27 And adding some structured aspects to it Sep 02 03:04:35 There's a standard XML parser in CPAN, and then there's an XML parser if you want to do giant XML files with limited processor/memory Sep 02 03:05:59 It might be due to my ignorance, but I don't know of a language with better libraries in terms of functionality than Perl Sep 02 03:08:35 It's pretty extensive. Sep 02 03:16:51 Hello, I developed an app that get gps or network data (longitutde, latitude) and sended it to a webservice... I neeed to executed this app in background all the time (independently if someone close the app)... How I do that? services? thread? asynctask? Thank you Sep 02 03:22:58 use a service Sep 02 03:27:58 sounds rather dodgy to me Sep 02 03:28:31 one way to do it is the request location updates with a pending intent and do your work in the receiver Sep 02 03:29:26 the next question he'll ask is how to start a service without an activity being run... Sep 02 03:51:19 can you still use the NDK with Android Studio? Sep 02 03:51:34 the project directory is different. I'm not sure where to put it Sep 02 03:51:56 native code used to belong in /jni Sep 02 04:05:43 Nilium, I hear that ruby borrows tons from perl, but the language seems not the least bit similar Sep 02 04:06:01 It depends on how hard you try. Sep 02 04:06:11 You can recreate barewords if you want. It's not hard. Sep 02 04:08:57 Ologn, java has more libraries than perl :p Sep 02 04:09:14 people love to write freaking libraries with java... Sep 02 04:09:41 RustyShackleford, android studio does not support ndk, but it will pick up libraries out of src/main/jni Sep 02 04:09:45 I don't think Java has more public open source libraries than Java. God knows I've tried to port all the lucrative ones to Android. Sep 02 04:10:16 pfn, so if I put them in src/main/jni I can build with ndk-build? Sep 02 04:10:28 RustyShackleford, you can put it anywhere and build with ndk-build Sep 02 04:10:35 iirc, the output .so must go under src/main/jni Sep 02 04:10:38 also, will the libraries be copied to my apk? Sep 02 04:10:44 iirc, the output .so must go under src/main/jni Sep 02 04:10:44 iirc, the output .so must go under src/main/jni Sep 02 04:11:10 say it again Sep 02 04:19:07 I had to convert my PreferenceActivity to a FragmentActivity and now I can't get onSharePreferenceChanged to get called. I've tried adding mySharedPreferences.registerOnSharedPreferenceChangeListener(this); to the constructor and even defining onSharedPreferenceChanged implicitly in the constructor but can't get it to work, any ideas? Sep 02 04:23:31 pfn, I'm trying to build with ndk-build. I get: "Android NDK: Please define the NDK_PROJECT_PATH variable to point to it" Sep 02 04:37:18 hi Sep 02 04:37:33 hi Sep 02 04:37:39 i follow this tutorial Sep 02 04:37:40 i follow this tutorial Sep 02 04:37:47 http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html Sep 02 04:38:06 Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml Sep 02 04:39:32 ok , i put APP_PLATFORM := android-8 on android.mk and error disapeared Sep 02 04:39:42 but i give another error Sep 02 04:39:52 Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml Sep 02 04:39:52 make: *** No rule to make target `jni/OpenCV-Tutorial-3-Camera-Control.cpp', needed by `obj/local/armeabi/objs/OpenCV-Tutorial-3-Camera-Control/OpenCV-Tutorial-3-Camera-Control.o'. Stop. Sep 02 04:41:30 oh no , i have one error first warning is there and i have an error there Sep 02 04:47:47 no idea? Sep 02 04:48:04 i remove android:minSdkVersion="8" and set android:targetSdkVersion="9" Sep 02 04:48:16 so first warring disapeared Sep 02 04:49:37 but i give above error Sep 02 04:53:37 best fix that error then :) Sep 02 04:56:18 RustyShackleford, you can leave the old jni stuff at the top level and it should still continue to build fine Sep 02 04:56:33 only output has changed from ./libs to ./src/main/jni Sep 02 05:22:30 iguay Sep 02 05:22:34 jni Sep 02 05:22:45 could java have made java->c interop any shittier Sep 02 05:22:49 I truthfully dont know Sep 02 06:32:49 Hi. I am making a simple app that shows some of my phone's sensor values inside of EditText fields. I have a Timer setup with a 10Hz TimerTask that calls setText() on my fields and their value is from a string generated by String.format(). Some of the values are floats, some are integers. I've noticed even at 10Hz, having two integers and a float string being generated brings the GUI to an... Sep 02 06:32:50 ...absolute halt. It is no longer responsive. I have no other background tasks or anything else going on with the main GUI thread. Any ideas? Is there is a better way to do what I am trying to achieve? Sep 02 06:34:18 setText causes a requestLayout(), whicj means that the whole activity will be remeaured and laid out 10 times a second Sep 02 06:34:35 and that's quite an expencive operation Sep 02 06:36:54 better approach? opengl everything? Sep 02 06:37:05 avoid that requestLayout Sep 02 06:37:32 just custom draw something with canvas.rendertext and measurestring stuff Sep 02 06:37:34 write the values out with a custom view would be what I'd do Sep 02 06:37:43 yeah, that'd work Sep 02 06:37:49 opengl depending on stuff could be bad news Sep 02 06:38:13 I know in older androids if you put font text too big, it wouldnt be able to render the string into gl texture and it would grenade Sep 02 06:38:21 or, extend EditText and override setText() and requestlayout(), so the request is ignored if it's called from inside a settext Sep 02 06:38:47 though, i'm not sure that's a great idea Sep 02 07:05:05 How is apktool and dex2jar different? Sep 02 08:12:42 hm, interesting. "An object is considered to be completely initialized when its constructor finishes. A thread that can only see a reference to an object after that object has been completely initialized is guaranteed to see the correctly initialized values for that object's **final** fields. " Sep 02 08:12:50 i thought it was all fields :| Sep 02 08:13:40 err... only the final fields must be initialized after the constructor runs. Maybe that's what it means. Sep 02 08:13:44 the others might not be initialized Sep 02 08:13:53 the others would have the value null, what lese Sep 02 08:14:04 or some other value Sep 02 08:14:05 or the corresponding zero value if they aren't objects. Sep 02 08:14:09 yep Sep 02 08:14:49 final guarantees a happens-before relationship for other threads accessing those fields Sep 02 08:15:24 Hi. Any idea why i get (sometimes) this error while showing a dialog? http://pastebin.com/B2LtRQ1Z Sep 02 08:16:30 g00s: I think it must guarantee it to all fields. AFAIK the fields aren't laid out specially in the object or anything else, so what applies to finals must apply to other fields that get initialized during the constructor also Sep 02 08:17:03 alankila no, thats the whole point :| i thought so too, only guarantees to final fields Sep 02 08:17:15 http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.5 Sep 02 08:17:26 I'm not sure you are interpreting this correctly. Sep 02 08:17:38 i'm sure i am Sep 02 08:17:45 I don't see how the memory locations holding finals could be special. Sep 02 08:19:33 unless, of course, the JIT is at liberty of reordering the instruction stream to return object instance as soon as finals are initialized even if other fields are still not yet initialized. Seems like a stretch to me, though. Sep 02 08:20:49 anyway, java language specification says one thing, it's probable that implementations conform to a much tighter behavioral contract. Sep 02 08:22:33 * alankila prefers writing to implementation and fixing if it breaks. :-/ life is too short for specifications, and when everyone does the same the implementation's behavior becomes the specification on the long run anyway ;-) so we win Sep 02 08:23:23 yeah, not like dvm was ever tested against the sun/oracle java test suite :( Sep 02 08:25:14 But the idea that to be sure about behavior, you'd have to synchronize the 'new' method and the thread about to receive the object, is exactly the kind of bullshit that keeps me from reading specs. If it really doesn't work in the obvious way, there will be tutorial and gotcha documents advertising that this here is a bug Sep 02 08:25:28 and I'll just keep on doing 'new Thread(new Foo())' without caring one bit about the potential problem Sep 02 08:25:36 new FooThread(new Foo()) that is Sep 02 08:29:01 there's also the 'while (foo) { ... }' loop where foo is a member of class and updated from another thread. In theory the JLS allows turning this into a if (! foo) { return; } while (true) { } kind of equivalent because you'd be allowed to read the value of 'foo' only once without a synchronization barrier Sep 02 08:29:19 but I don't think any java VMs actually do this Sep 02 08:29:34 never heard of that before @if/while Sep 02 08:30:05 if you have a member reference, they just seem to read the value from the object every time. Sep 02 08:30:15 alankila, but if thread B (not the one with the loop) updates it using synchronized, that woul work, right? Sep 02 08:30:20 *would Sep 02 08:30:47 PatrickBic: in practice not even synchronized is required. The update to the value will get written out eventually, so the updated value appears sooner or later Sep 02 08:31:02 I wouldn't recommend doing this though. java has those AtomicBooleans and crap like that, so use those Sep 02 08:31:04 in practice not, yea Sep 02 08:31:10 but i was thinking of "to be sure" :P Sep 02 08:31:23 well.. never thought that much about it :P Sep 02 08:31:41 the synchronization is kind of meaningless without the other thread in the while synchronizing also. You don't get any guarantees about program behavior if only one thread syncs Sep 02 08:31:51 other than that any pending memory writes will be done before and after the synchronized region Sep 02 08:39:01 So, anyway, to summarize, I think it's fairly good that java is, most of the time, actually executed in runtime much in the way it's written. There are some optimizations applied but they seem to be kind of conservative and largely invisible. The only one that I disagree with so far is the one where public final static members get cached into classes during compile-time, rather than being resolved at runtime as they ought to. Sep 02 08:40:04 that means that even if class B references class A's value, both class B and A must be recompiled if you change the values in A. I think this optimization is very much a mistake, because it violates the expectation of optimization being a runtime problem. Sep 02 08:41:32 and this seems like something they could just do at runtime. It was probably early SNAFU from time before jit Sep 02 08:42:14 Can be disabled with option too, so no point to complain. I don't expect to actually run into it, but it's a blemish imho. Sep 02 08:53:59 i wish it was possible to make primitive arrays immutable Sep 02 08:56:43 Is it too costly to make an object out of it providing a read-only accessor method? Sep 02 08:57:13 though sure, java could probably do final foo[] = final { ... } or some such monstrosity and then disallow the setitem OP against this Sep 02 08:58:19 clearly final only applies to members of a class and not the references per se Sep 02 08:58:36 yeah, this is for number crunching. i have a lot of these things Sep 02 08:59:31 so you said, you even were motivated to do your own decimal number format parser for this Sep 02 08:59:42 yeah Sep 02 09:00:05 though if I were you I'd consider formats compatible from Float.fromIntBits or Double.fromLongBits or something Sep 02 09:00:31 when it gets that extreme representation as human readable numbers itself becomes a questionable choice. Sep 02 09:05:51 alankila did you mean floatToIntBits ? i've never used that before Sep 02 09:06:26 no, the reverse operation Sep 02 09:06:44 wasn't your problem getting a floating point value out of a string representation? Sep 02 09:07:05 this one is a static method of the corresponding IEEE float class Sep 02 09:07:36 oh, intBitsToFloat Sep 02 09:07:39 it constructs the value -- and probably has to normalize it -- from a little endian binary dump of such a value, contained in int for float or long for double Sep 02 09:07:54 ah, apologies, I seem to have misremembered the name Sep 02 09:08:30 * alankila names his own converting static constructors leading by 'fromSomething' Sep 02 09:13:20 alankila i may try to ask you some questions about these later :) Sep 02 09:17:20 Good news, I finally figured out what was tweaked in Android 4.3 with mmap Sep 02 09:17:40 MAP_PRIVATE was tweaked and it was causing me issues :P Sep 02 09:18:17 Hi All Sep 02 09:18:52 whats the best way to detect parts of my app that could be locking up my view thread? Sep 02 09:18:53 Hey Mickey you so fine, you so fine you blow my mind Sep 02 09:19:28 *claps hands like on the video* Sep 02 09:19:46 Doesn't DDMS provide a profiler somewhere in itl? Sep 02 09:19:49 it* Sep 02 09:20:20 it does but I'm having a hard time understanding it Sep 02 09:20:53 I've never used it because it doesn't profile JNI code Sep 02 09:28:19 g00s: that's fine by me Sep 02 09:28:42 g00s: if you are going to use that stuff you should probably familiarize yourself with the IEEE floating point representation Sep 02 09:28:57 i'm familiar with it Sep 02 09:29:08 well in that case you should be set up to debug any problems you might have Sep 02 09:31:00 Looks like my process is being held up by the size of the images I'm trying to pull from the internet which are causing my heap to be over the default 32mb Sep 02 09:31:30 man.. havent built my android project in a year.. since ndk r8b.. now trying r9 for days and havent managed to build =( Sep 02 09:33:04 some problem with libstdc++ Sep 02 09:34:36 MickeySoFine: spill the data to disk as you read it? Sep 02 09:35:06 And use small in-memory buffers, like 100 kB or so Sep 02 09:36:17 alankila, I'm using Picasso so I'm checking to see if it has any built in options I can use Sep 02 09:36:48 I'm not familiar with picasso myself. Sep 02 09:37:10 sounds like waste of time to me. You must be using it wrong if it chokes on this sort of thing. Sep 02 09:38:14 alankila, you could be right, I'll check the docs Sep 02 09:38:33 more closely Sep 02 09:38:42 I think any caching it does is already based on the httpurlconnection's setUseCaches(true) with a cache provided Sep 02 09:38:48 if that's all you need it for, throw the library away Sep 02 09:39:12 nah I need to do some filtering too Sep 02 09:40:10 hey guys, fairly new to android/eclipse - trying to get the facebook sdk working with the example app, can't seem to get it working though - there seems to be class not found errors when i run the app Sep 02 09:40:17 How can I use drop-down navigation without Fragments? Sep 02 09:40:43 tried importing the sdk, tried importing into the current workspace, remoivng the jar, copying the jar to my project Sep 02 09:41:14 how is this supposed to work lol.. Sep 02 09:41:52 techitch, umm, facebook sdk is an android project library Sep 02 09:41:59 you import it as a project into your workspace Sep 02 09:42:05 and then reference it from your application project Sep 02 09:42:14 if you're using a jar you're doing it wrong Sep 02 09:42:18 sure, so i right click, goto properties and add it as a library Sep 02 09:42:31 then when i compile and run it gives me an error Sep 02 09:43:03 I'm getting a logmsg saying "Scheduling restart of crashed service some.service.of.mine/.MyServiceClass", although there are no logs or anything saying why it crashed. This happens when I kill the activity (but I want to keep the service running). Any idea where to look or how to figure this out? Sep 02 09:45:07 MickeySoFine: if your images are very large you must process them in pieces or downscale on load time or use large heap option if none of these can work for your use case Sep 02 09:47:28 one item i do notice is that in the my project properties > android - after i select hte facebook sdk and add it, i jump back in and it has a red X next to the project Sep 02 09:47:37 alankila, I was using large heap option but I think I've found a way to stop using that, thanks for pointing this out though Sep 02 09:49:43 btw the only reason i touched the jars was cuz a forum told me to :x Sep 02 09:51:57 Hi! I'm currently looking for a good library to generate graphs from static data with a simple method to change the x-axis-labels to dates. Google only finds links which are at least a year old. Any ideas? Thanks. Sep 02 09:52:00 How would you navigate between a shopping list and a list of products? Sep 02 09:56:51 i'm fairyl sure the red X is the problem Sep 02 09:59:34 Anyone else having fun with OpenGL ES 3? Sep 02 09:59:37 hmm ok so when i put the facebook sdk in the same directory as my project and import as library it resolves the red tick issue Sep 02 10:00:09 but i get a jar mismatch error then.. Sep 02 10:06:02 what's the difference between @id and @+id ? Sep 02 10:06:19 @+ creates it, @ just refers to it Sep 02 10:06:24 omfg - got it working! Sep 02 10:06:25 thanks Sep 02 10:07:52 ole ole ole - now to repeat build hell on iphone Sep 02 10:07:55 thanks all Sep 02 10:13:14 weee got it working Sep 02 10:13:52 was referencing wrong folder in build path Sep 02 10:20:30 hello Sep 02 10:21:30 https://android.googlesource.com/platform/bionic/+/android-4.2_r1/libc/include/termios.h Sep 02 10:21:47 how come is this present in API v17 although the ndk does not contain it for platforms 8? Sep 02 10:21:50 18* Sep 02 10:24:24 can you pas a SipAudioCall through an intent? Sep 02 10:24:45 hi. any one here is using youtube api for android? why I am getting "cannot connect to server"? and most of my videos do run? Sep 02 10:26:38 what is the best way to handle receiving input from a server when you don't know how many lines the server will respond with? to call readLine() on the input stream means you're expecting one line from the server. What's the best way to handle when I can't predict the number of lines the server will respond with? I want get all lines without pausing execution for long and without knowing how many lines Sep 02 10:26:40 the server will respond with if any. Sep 02 10:27:15 BullShark`: readLine loop in an ASyncTask? Sep 02 10:27:53 i have an searchable activity that should beform an api call over network and then show the results it recieved. Should i use a new thread or an AsyncTask for this search call? does it even matter which one i use? Sep 02 10:28:37 skullcrasher: doesnt really matter, AsyncTask is simpler to use Sep 02 10:28:55 ok, thanks. kinda thought that Sep 02 10:30:17 clever -> are you saying that I should put waiting and reading input from a stream on a separate thread so while it's waiting, executing other lines doesn't have to wait? Sep 02 10:31:01 BullShark`: depends on what your doing Sep 02 10:31:13 BullShark`: i would just have a thread read one line, process it, read another, process that Sep 02 10:32:33 the entire loop in an AsyncTask Sep 02 10:34:09 clever -> i cant assume every different type of server will respond in the same way. when i say readLine(), all other execution of code stops because it's waiting to get one line of input before continuing to execute the code. I don't wait to pause execution or say wait for any specific lines of input when that can't be predicted. Sep 02 10:34:55 BullShark`: what kind of protocol is it? Sep 02 10:35:09 can I force an activity to recreate when a user backs into it? Sep 02 10:36:55 clever -> should it matter? isn't there a best practice way to handle that regardless of the protocol? i imagine many programmers have came across this before, and there is a best practice way of handling that. Sep 02 10:37:16 BullShark`: you should know what the protocol expects of the server, and design arround that Sep 02 10:38:30 clever -> you're telling me to always predict input from a server? Sep 02 10:38:55 BullShark`: that depends on what kind of protocol your trying to interact with Sep 02 10:39:50 clever -> with many protocols, you can predict input. im saying what's the best way of handling when the input can't be predicted. Sep 02 10:40:07 shouldnt you know exactly what your connecting to? Sep 02 10:40:16 or are you trying to make a telnet style program? Sep 02 10:41:03 Hi! I'm currently looking for a good library to generate graphs from static data with a simple method to change the x-axis-labels to dates. Google only finds links which are at least a year old. Any ideas? Thanks. Sep 02 10:43:10 what do you mean by telnet style program? it's not exactly like telnet. id just use telnet if it was. but it does make a connection to a server daemon on a port to communicate with it (sending input and reading output) Sep 02 10:44:07 BullShark`: sounds like you may want to just use a dedicated network Thread then, let that block on readLine, and use runOnUiThread to send data back to the main thread whenever you need to Sep 02 10:45:44 http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable) Sep 02 10:50:20 Hello, can i develop android apps with this jdk: Sep 02 10:50:28 java version "1.7.0_25" Sep 02 10:50:28 OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2) Sep 02 10:50:44 yes Sep 02 10:51:05 KeyboardNotFound: you can, but it's not recommended. Especially if you want to use Android Studio Sep 02 10:51:34 is android studio is avaiable for linux ? Sep 02 10:51:47 KeyboardNotFound: of course Sep 02 10:52:09 are you reccomend me to use android studio or eclipse ? Sep 02 10:52:20 KeyboardNotFound: http://developer.android.com/sdk/installing/studio.html Sep 02 10:53:32 Ankhwatcher, thank you very very much :) Sep 02 10:53:48 KeyboardNotFound: I'd recommend android studio, gradle is a little tricky to get started with but it's a much better environment Sep 02 10:54:19 Ankhwatcher: better how? Sep 02 10:55:02 KeyboardNotFound -> I hope android will support java 1.7 and 1.8 (especially with lamda expressions coming to the java language), but currently, only java 1.6 is supported =/ Sep 02 10:55:36 can i downgrade java to 1.6 ? Sep 02 10:55:53 or maybe i can develop android apps using html5 and jquery ? Sep 02 10:56:18 downgrade what exactly? code, the sdk? Sep 02 10:56:32 html5/jquery for android apps? just dont. Sep 02 10:57:42 KeyboardNotFound -> im not so sure you can't use a recent version of the java jdk. i just know that additions to the language such as try with resources in java 1.7 is not supported Sep 02 10:57:42 KeyboardNotFound: http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ Sep 02 10:59:41 can i install java 1.6 ?? Sep 02 11:00:32 hi- is it okay to make an aidl call to a background service every second? Sep 02 11:01:00 or is that bad for performance? Sep 02 11:01:28 KeyboardNotFound -> i just checked. I have a java jdk 1.7. no others installed, so no, you don't need to use an old version of jdk Sep 02 11:03:02 id like to know if google plans to provide updates to the dalvik jvm to support newer java code Sep 02 11:03:52 newer versions of the jdk (1.7) outputs older version bytecode (1.6) just fine, that's why it works. As long as the proper options are set/detected, it will work. Sep 02 11:05:06 kjeldahl -> do you know if google plans to support newer versions of the language or if android will be stuck at java 1.6 for a long time? Sep 02 11:06:17 BullShark`: probably stuck for a long time, because of java licensing changes Sep 02 11:07:02 ^^ Sep 02 11:07:04 not good. languages have to evolve or we'd still all be coding in fortran. Sep 02 11:07:30 BullShark`, Nah, we all just move to C++ Sep 02 11:07:44 thanks for help :) Sep 02 11:10:52 Hi. Any idea why i get (sometimes) this error while showing a dialog? http://pastebin.com/B2LtRQ1Z Sep 02 11:10:56 Why is this needed : "xmlns:android="http://schemas.android.com/apk/res/android"" Sep 02 11:12:18 SimonVT: General programming question. Would you go for setVisible() and setHidden() (maybe even .visible() and .hide(), depending on context) or for setVisibility(boolean visibility)? Sep 02 11:13:17 kakazza: i tend to use setVisibility(View.GONE) Sep 02 11:13:37 GONE makes layout ignore it, so things resize to fill the gap Sep 02 11:13:55 and setVisibility(View.VISIBLE) brings it back Sep 02 11:14:23 I know. But in this case I do not hide a View. Sep 02 11:14:46 I hide a few elements. I am just pondering what would be more legible. Sep 02 11:14:54 In Android, can we send a json object to a HTTP GET request? Sep 02 11:15:18 anoop: send it in which direction? Sep 02 11:16:01 clever: To the server, along with the request Sep 02 11:16:23 anoop: a GET request isnt meant to send large ammounts of data, your better off using a POST request Sep 02 11:17:48 clever: Thanks, but I am aware of that. But the web API which I have requires JSON data, And it's a get request Sep 02 11:18:30 anoop: org.json will let you generate the json data Sep 02 11:18:39 if I assign an OnClickListener to an image then animated it away from its original position: should the listener still work if I tap the image in the new position? Sep 02 11:18:50 Sonicadvance1 -> does that have something to do with oracle trying to sue google that happened a while back? Sep 02 11:18:55 anoop: but the only way to send data in a GET request is inside the url, and the entire url is limited in size Sep 02 11:19:08 BullShark`, Probably Sep 02 11:19:42 clever: mmmhmm. Should look at it in detail then Sep 02 11:19:48 Thanks for the help Sep 02 11:20:39 i'm sure google has some plans to whether android will be stuck at java 1.6 or to support newer versions but maybe google isn't making that info public Sep 02 11:22:27 if I use a preferenceactivity to change settings, how do I detect those changes in mainactivity? Sep 02 11:23:13 currently mainactivity implements OnSharedPreferenceChangeListeneder but that's not working Sep 02 11:23:27 Jonno_FTW: are you removing the listener in onStop? Sep 02 11:25:57 my tablet can drain battery faster than it will charge at times =/ Sep 02 11:26:47 BullShark`: it takes a lot of power to push pixels to those big screens Sep 02 11:27:49 Ankhwatcher -> the newer nexus 7 is supposed to have a higher resolution. i wonder if that means more power draining. Sep 02 11:27:52 BullShark`: that's why newer devices need chargers and don't charge well (or at all) over computer connection Sep 02 11:28:27 I managed to discharge my N4 (back before the battery broke) while connected to computer with OS claiming to be "charging" :) Sep 02 11:28:33 i download android studio and run it, but i need to set jdk location? what's to set ? i don't know where is installed my jdk Sep 02 11:28:36 p_l -> i'm considering tcp debugging so i can develop while having it to a wall charger. Sep 02 11:28:37 for some time it ran displaying "0" for battery Sep 02 11:28:54 p_l: my kindle will show up a warning whenever its on a low power charger, and clearly tells me to turn off the screen to let it charge Sep 02 11:29:48 clever -> does the kindle ever drain the battery and power off while being plugged in to a wall charger? Sep 02 11:30:12 maybe it's just the high end hardware specs from the nexus 7 causing that to happen Sep 02 11:30:14 BullShark`: only ever had that happen once, when i was killing it with a skype video call Sep 02 11:30:31 My current charing speed from usb is 1% every 2 and half minutes Sep 02 11:30:39 and the warning only comes up when charging from a pc Sep 02 11:31:06 Ankhwatcher -> you mean while idling right Sep 02 11:31:19 nope, I'm debugging on it Sep 02 11:31:37 Hey there! Sep 02 11:31:43 I'm pretty sure it's plugged into a USB 3.0 port Sep 02 11:31:51 Ankhwatcher -> there's supposed to a fifth hidden core on the nexus 7 that's used when idling that consumes less battery Sep 02 11:31:54 In eclipse, how can I see where a layout xml is used? Sep 02 11:31:58 Ankhwatcher: i'm using 'battery monitor widget' and it says that i peak at about 24%/hour when the screen is off and its on the best charger Sep 02 11:32:19 Ankhwatcher -> how can you determine the rate at which it charges? Is there an app for that? Sep 02 11:32:22 Ankhwatcher: and it can be anywhere from -12% to -18%/hour when off charge and doing things Sep 02 11:32:33 BullShark`: 'battery monitor widget' is what i use Sep 02 11:32:37 I'm using Battery? Widget! Reborn? Sep 02 11:33:10 that's a silly question. there's an app for everything on android O.O Sep 02 11:33:50 I simply plug it in when I get home and unplug it when I go to bed, no battery statistics needed ;) Sep 02 11:34:10 UnbertKant: i just plug it in any time i sleep, we both sleep together Sep 02 11:34:19 if the battery is running low, i probly need sleep! Sep 02 11:34:32 I used to use custom roms that showed the percentage, but now I'm on the N4 I'm stock and I need an app for that Sep 02 11:34:40 * BullShark` thinks there's probably cpu frequency scaling on this quad core. ill check /proc/cpuinfo. Sep 02 11:35:14 BullShark`: my kindle fire clearly has scaling, the speed drops massively when the screen is off, it really slows down logcat when it tries to dump the buffer Sep 02 11:35:20 wakelocks have no effect on that Sep 02 11:35:26 * Ankhwatcher places his phone on a Qi charger at night and finds it slid off and only has 60% charge in the morning Sep 02 11:38:59 I get following error with ABS res/values/styles.xml: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.Sherlock.Light' Sep 02 11:39:17 what can cause that? Sep 02 11:39:33 it was just fine until I updated android studio today Sep 02 11:40:35 try running clean Sep 02 11:40:49 clever -> so i've heard. i was told to use an app that's only job is to keep the screen awake when using tcp debugging. otherwise, debugging slows to a crawl. but that could be a software only feature. Sep 02 11:41:59 BullShark`: you can use wakelocks to force the screen to stay on Sep 02 11:42:09 clever -> check /proc/cpuinfo. i know it works to see the current clock rate the processor is running at on my desktop. Sep 02 11:42:16 BullShark`: but in the case of my app, i didnt need that, so i forced it to only keep the cpu 'on' Sep 02 11:42:24 and amazon feels that slow is still 'on' Sep 02 11:42:43 hydrogenase: where is clean in android studio? Sep 02 11:42:55 BullShark`: BogoMIPS : 699.04 Sep 02 11:43:00 BullShark`: and it was so slow (over adb shell) that it couldnt keep up with my typing Sep 02 11:43:12 BullShark`: BogoMIPS : 2399.58 Sep 02 11:43:19 i usually use gradle clean from the command line Sep 02 11:43:21 and thats just at the keyguard, its not even unlocked Sep 02 11:43:21 clever -> is BogoMIPS the same thing as the megahertz speed? Sep 02 11:43:32 BullShark`: not exactly, but they scale together Sep 02 11:44:13 on mine, im getting BogoMIPS 1993.93 while it's mostly idling Sep 02 11:44:30 seems too high Sep 02 11:44:43 BullShark`: my tablet doesnt seem to be capable of reducing speed when idle Sep 02 11:44:58 if the screen is on, the cpu runs at full speed Sep 02 11:45:06 if the screen is off, it runs at ~1/3rd speed Sep 02 11:45:19 oh right Sep 02 11:45:46 i should be able to check through ssh and turn it off Sep 02 11:45:57 adb shell works even with the screen off Sep 02 11:46:48 Can I use the android canvas to stroke pixels of a bitmap with an alpha channel? Sep 02 11:48:21 hydrogenase: are you on mac? Sep 02 11:48:28 no Sep 02 11:53:52 hydrogenase: that doesn't help much Sep 02 11:54:04 what do you mean? Sep 02 11:54:23 do you know how to use gradle? are you using gradle? Sep 02 11:54:27 nope Sep 02 11:54:36 I just rebuild the project Sep 02 11:54:48 i suggest reading about the build system you are using Sep 02 11:54:49 is the kernel put on a nexus monolithic or modular? Sep 02 11:55:46 yeah, some time ago I was going to read about previous build systems Sep 02 11:56:10 somehow I skipped that, have feeling that I'll skip same step now too Sep 02 11:56:13 it is pretty easy to drop into a shell and run gradle clean Sep 02 11:56:25 sure, if you tell me where is it? Sep 02 11:56:34 on macos android studio comes as package Sep 02 11:56:44 inside that package there is no gradle binary Sep 02 11:57:21 is it possible to get the .config file that was used to build the kernel? Sep 02 11:58:30 i already checked for a /proc/config.gz. this kernel was built without support for that. Sep 02 11:59:36 BullShark`: there are 3 options for that, the first includes it in the kernel, but gives no way to access it (you must run a script on the kernel file) Sep 02 11:59:55 BullShark`: the 2nd provides /proc/config, and the 3rd one zips it up Sep 02 12:00:59 clever -> for /proc/config.gz to exist, the kernel had to be configured to enable that feature before being built. the file doesn't exist on my tablet. Sep 02 12:01:15 BullShark`: there are 3 options for that, the first includes it in the kernel, but gives no way to access it (you must run a script on the kernel file) Sep 02 12:01:30 if that first option was enabled, the file wouldnt exist, but the data would still be inside the kernel file Sep 02 12:02:00 clever -> what's the name of the script? Sep 02 12:02:15 never had to use it, i just know that it exists somewhere Sep 02 12:18:07 can just one image to be used for all devices instead of having to a picture with different resolutions in res/drawable-hdpi, ldpi, xhdpi, xxhdpi? Sep 02 12:18:24 hydrogenase: > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. Sep 02 12:18:34 BullShark`: yes, android will rescale. Just provide the highest resolution image if you don't want to control every pixel Sep 02 12:18:58 I suppose android studio was not designed to use gradle independently Sep 02 12:19:23 alankila -> ok, in the res/drawable-xxhdpi directory? Sep 02 12:19:41 android is always low quality software, and this is frustrating. Sep 02 12:20:06 BullShark`: that would be a good choice, I guess. Sep 02 12:20:30 alankila -> is the device doing a resize during runtime each time the app with the scaled picture is run? Sep 02 12:20:31 anyone here on mac with android studio using gradle? Sep 02 12:21:32 i don't know how much overhead that would have on a slow device with not so much ram Sep 02 12:22:22 BullShark`: it does resize each time picture needs to be changed in size Sep 02 12:23:00 BullShark`: the image loading seems to be quite fast, so I wouldn't worry about it Sep 02 12:23:35 not really an issue, just get curious Sep 02 12:24:37 there are a few tricks android employs here. For instance, jpeg images can be decoded directly to a lower resolution. A good filtered bitmap can be obtained by making it so that there's an integer factor downscaling step at decoding time followed by downscaling less than by factor of 2 next. Sep 02 12:25:08 this produces a fairly well smoothed image without using a lot of memory or wasting a lot of time averaging pixels Sep 02 12:25:32 alankila: can you describe that in simpler words? Sep 02 12:25:35 Now I haven't read the android framework code to know if it really does this but I assume they're sane and they do it exactly like this Sep 02 12:25:47 Typically is the most recent version, or the first that supports all your APIs without reflection. Sep 02 12:25:51 What is reflection here ? Sep 02 12:25:53 integer factor downscaling? is that about an algorithm that compresses images? Sep 02 12:26:20 looks like collection of unconnected words Sep 02 12:27:47 Well there's an inSampleSize option to BitmapFactory.Options Sep 02 12:29:00 using this will cause the decoder to downsample the image by throwing away pixels but it also does some kind of filtering on this stage. For instance, jpeg is 8x8 squares encoded in some 2D fourier transform. You can easily for instance halve the image dimension by throwing away the high-frequency components, then decoding to 4x4, and get filtered result Sep 02 12:29:59 so you do less work and get a reasonable estimate for the pixels that you do keep. Sep 02 12:31:34 so for instance if you had 1000x1000 image and wanted to downscale to say 300x300 you would probably decode the image to 334x334 intermediate image by throwing away 2/3 of the pixels followed by simple 2d bilinear interpolation from 334x334 to 300x300. Sep 02 12:31:59 the result would look better than a direct bilinear sampling from 1000x1000 to 300x300, because aliasing becomes suppressed in this process, and there's less data in memory at once. Sep 02 12:32:33 alankila -> squares means pixels? Sep 02 12:33:26 yes, a bitmap of 8x8 dimension pixels, though jpeg encodes it in some type of YCrCb encoding if memory serves and the chroma resolution is only half of y resolution. Sep 02 12:33:36 but yeah the data outputs a 8x8 pixels RGB square. Sep 02 12:34:44 There's an interesting detail about jpeg compression which is that images can be rotated without loss of quality by basically modifying every one of those 8x8 blocks so that 90 degree rotation is obtained and then writing them in new order in the image. Sep 02 12:35:44 it's an involved process that probably takes a while to work out how to do, given all the interesting subproblems that appear, though. Sep 02 12:36:56 alankila: i remember seeing a function somewhere in android, that would decode an image directly to a given resolution Sep 02 12:37:26 clever: really? I thought you have to do it in two steps yourself. But it isn't a difficult utility function, anyway. Sep 02 12:38:09 alankila: it would save a lot of ram, letting you directly get a thumbnail out of a high res image, without having to handle a massive bitmap in the middle Sep 02 12:38:12 but i cant find it now Sep 02 12:38:38 I did this once in pure java because I wanted to visualize arbitrary digicam picture in a fixed window and do it pretty quickly Sep 02 12:39:06 just wondering why you learned about how image encoding works? it was a college or university? i had to create data structures in school, learn big O on them, had to create my own stack data structure, then write a program that used it to convert math expressions from infix to postfix notation and then again to evaluate the postfix expression even though it's very unlikely to be used in the students Sep 02 12:39:08 career Sep 02 12:39:16 so whether the camera gives me 2M or 10M image, I'll just decode it optimally for whatever the window direction currently happens to be Sep 02 12:39:59 alankila: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html#load-bitmap maybe? Sep 02 12:40:04 Hi Sep 02 12:40:29 also window direction = dimension, of course. Sep 02 12:40:55 BullShark`: understanding of all that definitely helps later on, IMO :) Sep 02 12:41:00 even the BigInt data structure, not sure why. you can always use stuff like that from the api java.math.BigInteger Sep 02 12:41:04 clever: I'd disagree with this. The error is with Math.round. Should be Math.floor() followed by downsampling by bilinear interpolation. Sep 02 12:41:25 Im creating a chatbot in android, was wondering if i should use a process or singleton? Sep 02 12:41:29 There's something wrong with learning how to make your own BigInt? Sep 02 12:41:42 clever: you always want to downscale when preparing the final version, never upscale, because you lose some of the resolution that you could have kept if you do this Sep 02 12:41:55 BullShark`: there's the difference of just using it, and understanding the consequences involved Sep 02 12:42:07 Plus it teaches you problem solving skills. Sep 02 12:42:07 BullShark`: and there, knowledge about algorithms and datastructures helps Sep 02 12:42:11 p_l -> and maybe another way for professors to be brutal to students. the worst insult to those math/computer science professors is they are easy. Sep 02 12:42:13 alankila: i think its going to give a resolution bigger then you requested, but smaller then the actual image size Sep 02 12:42:58 BullShark`: I've seen "easy tasks" that students continuously complained were too hard, and no, they were pretty common tasks in this brave new world full of concurrency Sep 02 12:43:00 good brain exercise maybe Sep 02 12:43:10 clever: nope, try it out if you like. Math.round is the wrong function in sense that you are going to upscale if it decides to downscale too much at decoding time, then you must upscale later Sep 02 12:43:18 JakeWharton: are you here? Sep 02 12:43:30 Concurrency is fun and an enormous pain in the ass Sep 02 12:43:35 JakeWharton: how to use ABS with Android Studio + gradle? Sep 02 12:43:37 Concurrently. Sep 02 12:43:38 alankila: read the 3 comments after Math.round Sep 02 12:43:44 BullShark`: I recommend you skim through Algorithm Design Manual, it has the nice feature of discussing real world examples instead of being dry academic text Sep 02 12:43:56 Also read Programming Pearls. Sep 02 12:44:17 clever: I don't care what the comments say. Sep 02 12:44:29 p_l -> i had to write some pattern matching in C once. i asked if i could use pcre.h. the professor said that was cheating and it should be implemented myself. Sep 02 12:44:39 Nilium: it was a simple assignment of passing M integers through N-byte buffer, where M > 10xN, using a shared memory buffer Sep 02 12:44:59 creating regular expression = cheating Sep 02 12:45:24 Were the integers all unique? Sep 02 12:45:30 BullShark`: because the task was about *writing* pattern matching, not using regexes. It's fine to use ready made code for stuff that isn't the goal of assignment Sep 02 12:45:38 i don't think he even knew what pcre was lol Sep 02 12:45:41 Nilium: the idea was that you don't know integers you're passing in Sep 02 12:45:44 pcre.h* Sep 02 12:45:50 Ah. Sep 02 12:45:57 Sounds fun. Sep 02 12:46:04 Nilium: basically, an in-memory pipe between two concurrent programs Sep 02 12:46:25 clever: let's take a look at a scenario of 100 px original, decoding target 60. You calculate 100 / 60 and get 1.6666, and round upwards, reaching inSampleSize 2. So your decoded image is now 50 px wide, and will be displayed on 60 px canvas. It will be upscaled. Sep 02 12:46:46 BullShark`: you see, pcre.h *was* cheating, because pcre is a pattern matching implementation Sep 02 12:46:51 p_l -> i created a vi like editor in c. it could only work with a file having one line of text xD Sep 02 12:46:53 I haven't got much of an idea how I'd approach that off the top of my head, but that's mostly 'cause I've never done it. Sep 02 12:46:59 You can only use inSampleSize = 2 when the canvas is 50 px wide or less to avoid upscaling. Sep 02 12:47:34 I think BullShark is one of those programmers who doesn't actually enjoy programming Sep 02 12:47:55 alankila: at that ratio, your only option is to leave the image as-is, or downscale it a bit too much Sep 02 12:48:19 Nilium: Best solution (IMO - no student used it, afaik): use two addresses at the start of the shared memory block to store offsets into it, marked as volatile and preferably accessed using CAS, and use them to implement a circular buffer over the shared memory block Sep 02 12:48:36 clever: yes, but by leaving it as-is, and using bilinear filtering, every pixel will be a fairly well calculated average. The output considers every source pixel, which means that aliasing will be well controlled Sep 02 12:48:56 when output misses source pixels, you are in trouble, you will get very pronounced aliasing artifacts. Sep 02 12:48:59 p_l -> i see how not implementing it yourself can be considered cheating but also creating regular expressions means you must learn about those. well it was worth a try. Sep 02 12:49:31 BullShark`: creating regular expressions is nothing compared to actually understanding them, most of the time Sep 02 12:49:43 clever: so I do believe I can rest my case Math.floor is more correct than Math.round if you care about not needlessly blurring the image in the downscaling process. Sep 02 12:50:44 I think I'll sleep. Nearly 6am. Made progress. That means I get to sleep. Sep 02 12:51:00 BullShark`: to finally answer the question, I'm just generally curious about algorithms Sep 02 12:51:25 BullShark`: I have no formal training. Sep 02 12:51:35 p_l -> simple vi like editor worked by having one line of text, in a doubly linked list and doing operators on that doubly linked list, rearranging pointers to remove a character, etc, your currsor would follow the links to move between characters. Sep 02 12:51:46 alankila -> i found it all interesting too Sep 02 12:52:09 BullShark`: neat, and reminds me of how the C64 stored basic programs in ram&disk Sep 02 12:52:15 alankila -> but a vi editor that handles only one line of text is useless lol Sep 02 12:52:27 BullShark`: regarding applicability of all that "sadistic" stuff - without it, people end up writing things like RBAR pattern in databases etc. Sep 02 12:52:37 BullShark`: i believe it also used a linked list in ram, and just wrote the whole list to disk as-is, links and all Sep 02 12:52:38 Unless you have multiple editor processes running and writing to different lines of the output Sep 02 12:52:45 Then you have multiple lines Sep 02 12:53:42 you think the university is going to be mad if i put all my assignments on github? i finished school already. Sep 02 12:54:02 Did anyone else contribute to them? Sep 02 12:54:17 Did any of your syllabi say not to? Sep 02 12:54:30 Bearing in mind the whole syllabi-as-contracts thing. Sep 02 12:54:31 no, we weren't supposed to work together with other students. all of it is code i wrote. Sep 02 12:55:35 Then you probably can, though you might inadvertently be helping other less ethical students cheat. Sep 02 12:55:41 Nilium -> the syllabis probably don't share your work with other students, not keep your assignments off of github Sep 02 12:55:48 probably said* Sep 02 12:55:58 I think it's merely a good thing to help people to cheat Sep 02 12:56:12 I think it's merely a thing I don't care about because they'll cheat anyway. Sep 02 12:56:34 a company may be interested in seeing how well i write code before interviewing me Sep 02 12:56:43 the people with low morals will achieve excellent results, get hired, fired, and companies learn that education tokens have no value, the education racket collapses, then we'll all be self-styled men and women who don't have to go to school for 20 years first Sep 02 12:57:16 Maybe that'll finally result in me getting a job. Sep 02 12:57:29 I think you're supposed to make your own job Sep 02 12:58:17 BullShark`: the better ones would be more interested in projects you did (preferably real-world ones, things like open source contributions too), and will probably include code-writing as part of interview (on a whiteboard, even) Sep 02 12:58:21 That only works if you plan to start an unprofitable free service and sell it for tons of money and then bail because really you were in it for the cash grab to begin with Sep 02 12:58:44 But honestly there's always been a degree of uselessness to education. It's bit of a paradox. You need exposure to wide variety of subjects and methods for systematic thinking but simultaneously a lot of the school stuff ultimately doesn't benefit you except maybe very indirectly. Sep 02 12:58:57 Nilium: don't forget the unknown source of money to start it at all Sep 02 12:59:00 Education's only as useful as you make it. Sep 02 12:59:08 Oh yes, the "angel" monies Sep 02 12:59:13 Nilium -> I was told by a standford university student (where google, microsoft, other large corporations send job recruiters on their campus) that companies like to see your open source code Sep 02 12:59:28 alankila: i recently had an offer to work at a company, because of how impressed they where with an android app i made Sep 02 12:59:44 i ended up making an open source app and putting it on my resumes Sep 02 12:59:45 alankila: after i applied, they played musical chairs with the open positions, and tested me against a completely different role Sep 02 12:59:52 clever: good for you! It's probably great advertisement for your person. Sep 02 12:59:56 then said 'shoo, your not qualified' :P Sep 02 13:00:09 BullShark`: they do. But at least Google puts a *lot* worth on coding on whiteboard Sep 02 13:00:10 clever: I take it you got the offer from a recruiter? Sep 02 13:00:13 clever: eh, well that sounds like a typical megacorp way of thinking Sep 02 13:00:30 Nilium: nope, i was asking for permission to sell the app that used their servers Sep 02 13:00:39 Ah. Sep 02 13:00:43 clever: if they ask, never accept a switchover to position you're not sure about Sep 02 13:00:51 * p_l probably bungled his last Google interview this way :D Sep 02 13:00:52 p_l -> yes, i have an open source real world app. you can view here if interested https://github.com/BullShark/JRobo Sep 02 13:01:11 The only offer I've gotten so far was to work at some place that uses VB6. Which I refused. Because VB6. Sep 02 13:01:19 alankila: its mostly a problem of them taking a month to notice i had applied Sep 02 13:01:28 alankila: and by then, they had deleted the position on their management site Sep 02 13:01:38 then they just paired me up with a random position! Sep 02 13:01:47 p_l -> sorry, wrong link. it is https://github.com/BullShark/JSpeak Sep 02 13:02:02 Someone also sent my info along to Wikimedia, but I never got anything back from that, so I'm now trying to get over the depression of being thoroughly ignored. Sep 02 13:02:06 p_l -> ignore the other one. that was a group project and not really practical. Sep 02 13:02:56 I hate job hunting. Yes, sleep is now time. Sep 02 13:05:17 anyone know how to setup cache setting in Picasso? Sep 02 13:06:10 are there many jobs available for android developers? i did create an app for a company, but it was more freelance. i'm working as a linux admin for servers right now. Sep 02 13:06:54 is there a demand in the market or do mostly people create apps to sell themselves rather than a company hired them to write android apps? Sep 02 13:07:06 BullShark`: you know that the Process you get out of Runtime's exec is likely the right way to send signals to the process? For instance, a process has a method destroy() with description "Kills the subprocess"? Sep 02 13:08:20 BullShark`, I get equiries quite a lot about android dev jobs so I would say theres a fair few companies looking to employ Sep 02 13:08:28 alankila -> looking into it now, but im not having any bugs with the way it's implemented Sep 02 13:08:43 alankila -> is there something wrong with the way ive done it? Sep 02 13:08:44 BullShark`: no, but it's suboptimal and weird, to fork a killall when you are already in possession of a handle to the process Sep 02 13:10:17 alankila -> forgot i did that. thanks for pointing it out. i didn't know Process.destroy() existed. Sep 02 13:10:18 Well, I guess I don't like the way this code has been written very much. Sep 02 13:11:12 for instance the method setSpeed() rather than changing a simple private member 'speed' of type integer does some kind of option array manipulation instead. IMHO the option array should be constructed where espeak command itself is constructed and thrown away right after Sep 02 13:11:48 and you are doing stuff like new Integer(foo).toString() for an "int foo". I guess it's a matter of style but you know '"-s " + foo' would work, right? Sep 02 13:12:28 java has compiler smarts to try to make string concatenations easy, might as well use the crap Sep 02 13:12:46 Though I personally prefer String.format and MessageFormat.format for these types of tasks Sep 02 13:13:10 and if your trying to avoid triggering GC, remember that "-s " + foo creates an instance of StringBuilder Sep 02 13:15:03 alankila -> setSpeed() is changing a private member. im using encapsulation instead of making those variables public. Sep 02 13:15:29 BullShark`: that's fine, I just don't like how setSpeed() is implemented. It should be: "public setSpeed(int speed) { this.speed = speed; }" imho ;-p Sep 02 13:15:44 check the range of values if you must, no harm about that, just left out for brevity Sep 02 13:16:19 normally you'd provide also a getSpeed() method, and this formulation makes getSpeed() suck Sep 02 13:16:50 so no wonder you aren't providing it Sep 02 13:18:29 * alankila idly wonders if forked processes are zombies if you don't get around to waitFor'ing them, or if java somehow notices that a Process object was gc'd and then makes some other thread listen to them or what Sep 02 13:19:40 I think they're going to be zombies until program's exit. That's another thing that should be handled with care, I guess. Sep 02 13:20:49 you have to waitFor every Process before getting rid of the reference, and waitFor will block until the program exits. I guess you could do destroy() + waitFor() to make sure that the process gets cleaned up from kernel's task list Sep 02 13:22:16 Actually this is pretty odd. The ClipReader's replay() will actually return, meaning that the thread started from the main program, Replay instance, will also go away almost immediately Sep 02 13:22:20 huh Sep 02 13:23:53 so yeah, this thread is completely pointless... and then there's an instance set up on every constructor but accessed by a static method ... Aaagh, I can't take this anymore Sep 02 13:24:09 alankila -> ok why are you suggesting an extra variable for speed when i only need it in the array after -s Sep 02 13:25:05 BullShark`: "int speed; public void replay() { String args[] = new String[] { PROGRAM_NAME, "-s " + speed, ... }; Runtime.getRuntime().exec(args); ... } Sep 02 13:26:07 so you see, construct the argument array for Runtime's exec only right before using it, that way you can have natural variables like speed and pitch and language and whatnot, rather than access array index 3 to do this or array index 4 to do that and encode integer values as strings Sep 02 13:28:20 alankila -> creating a new array each time seems a waste of memory. i just a value changed in the array. Sep 02 13:28:30 just need* Sep 02 13:28:53 You're using java. Memory is managed for you. Creating a few hundred bytes of garbage at response to user events which are infrequent is not a large trouble for the memory management. Sep 02 13:28:59 Afternoon #android-dev, In android studio after importing a gradle project my dependencies are marked as TEST rather than compile. Is there a setting to fix this? Its a bit or a problem when sharing a project with new developers Sep 02 13:29:28 the Swing framework already probably made 1000 times more allocations when user's finger touched the button Sep 02 13:30:29 and you actually create a pointless thread to call this method which will return immediately anyway after setting up a process Sep 02 13:33:36 alankila -> i understand GC. I'm not seeing the point in allocating more memory for creating a new array when the current array only needs a value here and there changed. anyway, create more arrays if that floats your boat. Sep 02 13:34:15 well, Guava has optimized variants for such cases Sep 02 13:35:18 BullShark`: right. I guess this conversation is over. Sep 02 13:43:25 alankila -> you made some other valid critisms/suggestions, probably better you pointed then an employer. It can use tweaking. Overall, it's not horrible. Sep 02 13:46:58 Well, I like minimal code. This code is not minimal, and doesn't take appropriate care to handle tricky stuff like external processes, so I don't personally like it for those reasons. Sep 02 13:47:48 The UI though is Swing and I'm convinced it's impossible to make a swing application that doesn't look like complete mess in the inside, it's just designed that way. I hate it. Sep 02 13:47:53 so no comments about that. Sep 02 13:49:16 My sole attempt at Swing was so horrible that I never want to touch it again if I can help it Sep 02 13:50:18 alankila -> the UI takes on the appearance of gtk+. i had one problem with swing, getting the expand/retract button working. miglayout allows me to do that. Sep 02 13:50:19 GridBagLayoutConstraints! Or GBLC. Anyone who has done this stuff probably ends up using GBL in the end and struggles with that pile of utter shit. Goddamn. Sep 02 13:51:23 where are you seeing that Sep 02 13:51:27 i have MigLayout Sep 02 13:51:33 Just having flashbacks Sep 02 13:51:34 never mind Sep 02 13:52:55 do you know that java has anonymous inner classes? Sep 02 13:53:38 They're pretty good for UI work and for making throwaway things like thread runnables or something that is invoked later in UI thread or making a click handler for particular button rather than having to test event source to find which button was pressed Sep 02 13:54:08 based on the code so far it seems you might not be aware that they exist Sep 02 13:57:35 Any idea why Parcelable was not designed as a Generic interface, so the getArray and createFromParcel methods could be used by the class directly? The current implementation of Parcelable seems broken Sep 02 13:57:42 How would you navigate between a shopping list and a list of products? Sep 02 13:58:14 hi everyone. Do you know a good way to put a calendar view with a datapicker on version 2.2?. Thanks. Sep 02 14:00:43 Im making a chatbot, should i use content providers & services for chat history or just a direct sql class Sep 02 14:01:42 sonOfRa: indeed, it could have worked if we had had 'class Foo implements Parcelable' because Parcelable's type parameters gets recorded in the class signature of Foo, and would be available for reflection. Sep 02 14:02:40 though in general it could have worked in many ways and that's just one way Sep 02 14:02:52 The current way is broken, and in no way idiomatic. Sep 02 14:03:43 I mean, really if you have 'class Foo implements Parcelable', then the android framework could be smart enough to work out what class to construct arrays of Sep 02 14:03:51 It's easy, they are of type Foo[] Sep 02 14:04:13 I think the whole thing might have stemmed from lack of reflection in some earlier versions of android -- maybe pre-1.0 even. Sep 02 14:04:52 so anyway the whole thing is just fubar really, there's no argument about this thing being both confusing and weird Sep 02 14:04:54 alankila -> do you still make a getter method for each set method even when you're code never will call or use it? Sep 02 14:05:26 BullShark`: I generally avoid having those methods altogether, I prefer objects to be constructed immutable if possible. Sep 02 14:05:45 But when I do have a property on an object, I generally conceptualize it as such and write both a get and set. Sep 02 14:05:51 it isn't a property without a getter Sep 02 14:06:12 it takes very few keypresses for something like eclipse to generate one Sep 02 14:06:42 How would you navigate between a shopping list and a list of products? Sep 02 14:06:51 just curious about having code that's never used, not the work it takes to write it Sep 02 14:07:41 sonOfRa: my general tip to people struggling with Parcelable is to actually use Bundles. They are just like hashmaps and implement Parcelable, so they are fairly good stand-ins and you never have to deal with that bullshit for most purposes Sep 02 14:08:53 I'm not struggling with it, I just realized the way it works is kind of silly, and was wondering why the designers implemented it this way Sep 02 14:09:21 the answer may be lost in mists of time, but I'm betting it rhymes with hysterical raisins Sep 02 14:10:31 BullShark`: yes, well, we all strike some kind of balance. I generally write the get method even if I don't currently call it, or the set method if that happens to be the case, so that when I do make a change in the program I don't have to interrupt the flow of thought to add that method. Sep 02 14:11:36 How could I make it so I can "instantiate" an Activity? For example, I want to have multiple shopping lists. Is it posible to programatically create an Activity for each list? (the amount of lists is unlimited) Sep 02 14:12:03 If i get that sort of message: E/InputDispatcher: channel ' (server)' ~ Channel is unrecoverably broken and will be disposed! Sep 02 14:12:03 it tells i got a memory leak, is that right? Sep 02 14:12:06 zyngawow: you can ask android to create an activity for you on demand, through an Intent which names it and gives it the parmaters it needs Sep 02 14:12:31 zyngawow: that activity will then go to foreground immediately and can be reconstructed from the intent's data by android when necessary. Sep 02 14:12:44 alankila, can I do that through dropdown navigation? Sep 02 14:13:05 zyngawow: yes, when an item is selected, you would do startActivity(someIntent), where you set up the someIntent based on what item user chose. Sep 02 14:13:31 alankila, what Activity should implement the ActionBar.onNavigationListener? Sep 02 14:13:36 the intent must hold all the relevant parameters for the target activity. Sep 02 14:13:53 if I call removeAllViews() on a layout, does it destroy all the contained elements? or do they just become orphaned? Sep 02 14:13:55 zyngawow: eh, I guess the main activity which has the actionbar view Sep 02 14:14:07 Ok, thanks! Sep 02 14:17:41 someone can help with android studio + actionbar sherlock? Sep 02 14:24:29 I have an Android 4 app that also runs on Android 2 devices. My understanding is that the Lint Warning "New Api" is severe in Java code, but not really a problem in xml layouts. Is that true? If so, is there an elegant way to disable that warning for .xml but not for .java? Sep 02 14:28:18 some of them might be a problem in xml too Sep 02 14:28:25 squ, what's your problem? Sep 02 14:31:55 UnbertKant, http://tools.android.com/tips/lint/suppressing-lint-warnings I can't remember the details but I think this might help you find what you're looking for Sep 02 14:32:12 does anybody know if Google has included network MIDI support for android yet? Sep 02 14:32:40 i'm not too optimistic, but it has been a year since i last checked Sep 02 14:36:28 there's no network midi Sep 02 14:39:48 I'm using a resource string as HTML here

]]>
Sep 02 14:40:06 rciovati: fixed already, thanks Sep 02 14:40:07 but it prints it as a regular string, not as html Sep 02 14:40:21 too bad, i wish google would get serious about audio Sep 02 14:40:32 it shows the

Sep 02 14:40:59 Thanks. But how can I see where an xml file is used in the project? Sep 02 14:41:02 rciovati: used SO solution to create 1 new directory with settings.gradle file in it, put there myProject & ABS Sep 02 14:42:01 then delete all support-library, download 1 newest, put it into ABS, setup "support-library -> provided" in myProject Sep 02 14:42:28 because ABS by some reason use old support lib Sep 02 14:42:28 squ, why don't you use ABS aar dependency? Sep 02 14:42:35 rciovati: that is how? Sep 02 14:42:52 I didn't find any explanation on web Sep 02 14:43:04 abs page have info only for eclipse Sep 02 14:43:15 adding compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' ;) Sep 02 14:43:28 can you be more specific? Sep 02 14:44:05 Switch to gradle, add that line to your build file Sep 02 14:44:20 under dependency { } ? Sep 02 14:44:24 yep Sep 02 14:44:30 in where? Sep 02 14:44:43 1) abs directory 2) my project directory 3) their common dir Sep 02 14:45:10 ok CDATA is no longer needed Sep 02 14:45:18 and what this line does? Sep 02 14:45:31 what changes do I have to make with that new feature? Sep 02 14:45:37 and where is information on that? Sep 02 14:45:57 you won't need that structure anymore, just your project directory is enough Sep 02 14:47:26 aar is file extension? Sep 02 14:47:36 like jar? Sep 02 14:50:40 hello Sep 02 14:51:00 can i use fts for multiple columns ? Sep 02 14:51:28 eg. Sep 02 14:51:47 SELECT FROM cal_events WHERE evt_name OR evt_descr MATCH 'test' Sep 02 14:54:36 squ, yes, something like that but with also android resources inside. Sep 02 14:55:21 rciovati: something in android studio needs to be done too? Sep 02 14:55:36 like adding libraries in “Project Structure” Sep 02 14:55:37 ? Sep 02 14:56:00 compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' Sep 02 14:56:15 is that path to local directory? Sep 02 14:56:41 hi timroes Sep 02 14:56:47 no, it will fetch it from maven central Sep 02 14:58:05 rciovati: thats great, but my project errors with abs can't be found Sep 02 14:58:44 res/values/styles.xml:20: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.Sherlock.Light'. Sep 02 14:59:40 btw, does that mean that it can't be compiled offline? Sep 02 15:00:00 Hi Sep 02 15:00:33 squ: try pushing the "Sync project with gradle files" Sep 02 15:00:59 it whould be the 5th button from the right Sep 02 15:01:33 squ, it can be compiled offline, the dependency is downloaded in you pc Sep 02 15:02:34 I have a problem with in-app billing support for subscription (version 3). What happens when an user cancel his subscription? I know I will continue to receive a JSON with "purchaseState" equal to "0" (Purchase.STATE_PURCHASED) if the user is inside his billing cycle. But after that? Sep 02 15:03:26 When the billing cycle is over and the subscription is expired, what will I receive? A JSON with "purchaseState" equal to "1" (Purchase.STATE_CANCELED)? Nothing? Sep 02 15:05:07 gendag: sorry mate, can't help you with in-app billing. Sep 02 15:05:08 rciovati: http://imageupload.co.uk/files/29oj27q1icafze7xxk1w.png Sep 02 15:06:48 squ, under tools -> android ? Sep 02 15:07:26 \impedancee thank you :) Sep 02 15:08:53 rciovati: http://imageupload.co.uk/files/z6o4am1hn6f7wvaxwdfo.png Sep 02 15:10:41 squ: :\ Sep 02 15:11:55 after doing ‘gradlew clean’ getting this: > Could not find com.actionbarsherlock:actionbarsherlock:4.4.0. Sep 02 15:13:04 in build.gradle: dependencies { Sep 02 15:13:04 compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' Sep 02 15:16:36 is there any reason when adding in-app billing my app's ads stop working? Sep 02 15:18:07 You broke something Sep 02 15:18:19 it makes no freaking sense, I touched *nothing* Sep 02 15:18:46 just added a piece of code from the TrivialDrive sample app Sep 02 15:18:58 somehow when that exists ads stop displaying Sep 02 15:19:02 LaZ: android is not yet ready for release Sep 02 15:19:03 ) Sep 02 15:19:29 by definition you touched something ;) Sep 02 15:19:37 yea I did, I admit that Sep 02 15:19:37 I would add about 5-10 years more to develop it Sep 02 15:19:54 but what I mean is I touched nothing relating to the ads Sep 02 15:20:03 and to confirm it I removed that code now everything works Sep 02 15:20:47 squ: 5-10 years? Sep 02 15:21:58 right, now I uncomment the code again and it works? Sep 02 15:22:03 this is what I hate about android lol Sep 02 15:22:33 That you don't know what you're doing? Sep 02 15:23:00 LaZ: to reach quality level of apple Sep 02 15:23:26 SimonVT: when dealing with something that has no checks around it and somehow ti stops, that makes 0 sense Sep 02 15:23:34 eveyrthing should be black and white Sep 02 15:24:07 at one point my boolean was both true and false, so whats up with that lol Sep 02 15:24:15 No it wasn't Sep 02 15:25:43 I blame android studio every time Sep 02 15:25:49 becuasr thats easy lol Sep 02 15:27:04 well eveyrthing seems to work now anyway so I'm happy :) Sep 02 15:31:09 LaZ: why don't you use the normal ADT/Eclipse? Sep 02 15:32:10 impedancee: I prefer the intelij system, plus Android Studio is what motivated me to actually start developing Sep 02 15:32:34 LaZ: how in the world did Android Studio motivate you?! Sep 02 15:32:58 LaZ: I tried going from eclipse to intellij. Couldn't cope with the switch. Sep 02 15:33:23 I love Eclipse for standard java work Sep 02 15:33:43 but I like dedicated envronments for a platform, Android Studio for Android as an example Sep 02 15:35:04 not sure if that msg made it Sep 02 15:35:11 Am i correct in saying that the google calendar api uses just the keystore hash and the package name in order to authenticate the client? i dont have to enter the client id into my app anywhere? Sep 02 15:35:19 hi everyone. Do you know a good way to put a calendar view with a datapicker on version 2.2?. Thanks. Sep 02 15:52:47 rciovati: something additional needs to be setup for @aar ? Sep 02 15:53:10 SimonVT: same question Sep 02 16:09:37 I'm using android studio. I have a shared library I build with NDK build Sep 02 16:09:47 it's not getting copied into my apk Sep 02 16:10:29 src/main/jni Sep 02 16:10:55 read the Android gradle guide, it tells you where it should be Sep 02 16:11:06 yeah, thats the location of my native code and Android.mk Sep 02 16:11:43 wrong Sep 02 16:11:45 Is "Recents" an app? I'd like to replace it with the multitasking menu from Android 2 where you saw the app icons instead of screenshots. Sep 02 16:11:59 I said a bunch of times yesterday! Sep 02 16:11:59 RustyShackleford, are you using gradle? Sep 02 16:12:10 OUTPUT goes there Sep 02 16:12:10 pfn, so src/main/jni is the output directory? Sep 02 16:12:23 thanks for paying attention Sep 02 16:12:29 Mavrik, yes Sep 02 16:12:34 Does the "android-support-v4.jar" is assigned automatically ? Sep 02 16:12:40 did they even integrate NDK support in it? Sep 02 16:12:42 pfn, so where does my native code go? Sep 02 16:12:52 last I check gradle didn's support NDK code at all Sep 02 16:12:54 RustyShackleford, anywhere else Sep 02 16:12:59 ? Sep 02 16:13:06 Is there a channel for people who might want to contribute to AOSP? Sep 02 16:13:14 Mavrik, not building, but it'll package built code Sep 02 16:13:25 Mavrik, I'm building wtih ndk. I just need the library incluced in my apk Sep 02 16:13:34 *building with ndk-build Sep 02 16:14:47 hmmm, in standard layout NDK code goes into "libs/" Sep 02 16:14:47 RustyShackleford, just do what I say and it works Sep 02 16:14:47 this example shows it's the same: https://github.com/nowsprinting/GradleAndroidNdkExample/blob/master/build.gradle Sep 02 16:14:47 put jni source in top level if you want Sep 02 16:14:47 pfn, still confused. Where would YOU put the native code? Sep 02 16:16:15 RustyShackleford, http://stackoverflow.com/questions/16683775/include-so-library-in-apk-in-android-studio Sep 02 16:16:26 where should I call ndk-build? Sep 02 16:16:46 RustyShackleford, from the same place you normally would... Sep 02 16:16:59 did you even check the build.gradle example I linked? -_- Sep 02 16:17:39 the location of the sources do not matter at all Sep 02 16:17:57 only the output must go where I said Sep 02 16:18:17 no, the output certanly doesn't go into a jni folder Sep 02 16:18:33 src/main/jni is correct Sep 02 16:19:36 i have native code in MyAppProject/MyApp/jni. Output is created in MyAppProject/MyApp/libs Sep 02 16:20:00 why aren't you listening... Sep 02 16:20:13 move the output! Sep 02 16:20:47 okay,so I need to do it manually? Sep 02 16:21:03 i thought ndk-build would put it in the right place Sep 02 16:21:06 RustyShackleford, now just add the task, like in that example, that'll package the contents of libs folder Sep 02 16:21:06 yes! Sep 02 16:21:23 and stop listening to people telling you to put compiled binaries in source folders -_- Sep 02 16:29:21 Hello all. Sep 02 16:29:44 I want to build a language learning application and want to store 'old quiz' data per user. Is it best to use a databse for this? Sep 02 16:32:58 j0b0x, yes. Sep 02 16:37:38 Thanks, Mavrik. Just wanted to see the best option. Sep 02 16:38:18 perhaps mavrik is right, looks like jnidir doesn't get set on the package task by default Sep 02 16:38:44 it only gets set to src/main/jni in the test cases Sep 02 16:40:54 yeah, gradle is funny that way Sep 02 16:41:17 by funny I mean "need to slap the dev next I/O" funny. Sep 02 16:44:02 I guess I'll fix my plug in to point back to top level libs for ndk output Sep 02 16:57:49 hmm, I wonder how much of a pain it is to write a custom ime and switch to it automatically Sep 02 17:03:11 the ime switch part must be easy, since the stock keyboard switches to voice input seamlessly Sep 02 17:08:47 Do I need all my Activities to have a onNavigationItemSelected() if I want to have dropdown navigation? Sep 02 17:17:39 hi, is it good practice to include the startup broadcast receiver in the "app entry" activity ? ? Sep 02 17:18:09 what do you mean include it? Sep 02 17:18:20 or it should be in separate .java file Sep 02 17:18:23 oh Sep 02 17:18:34 write the lines of code Sep 02 17:18:43 yeah, it should be a separate class Sep 02 17:19:02 ok, cool gotta make a new .java Sep 02 17:24:14 How do I catch exceptions in renderscripts? It just seems to 'crash' without giving a warning Sep 02 17:27:31 Do I need all my Activities to have a onNavigationItemSelected() if I want to have dropdown navigation? Sep 02 17:29:07 Or should I really use Fragment? Sep 02 17:37:08 Yes and yes Sep 02 17:41:22 SimonVT, both? huh Sep 02 17:41:52 Also.. why do I get the app name and the drop down activity list? Sep 02 17:42:06 Yes, you need to add drop down navigation to all the activities where you want drop down navigation Sep 02 17:42:13 And yes, you should switch to fragments Sep 02 17:46:00 SimonVT, do you have any worth seeing Fragment examples? Sep 02 17:46:24 Look up how to remove and add fragments Sep 02 17:46:29 That's all the example you need Sep 02 17:46:51 caverdude !!! Sep 02 17:48:25 guys, do you think this is ugly? http://www.youtube.com/watch?v=VN_5ecvboiM&feature=player_detailpage Sep 02 18:01:21 under: what did you use to record that? Sep 02 18:01:35 SCR Free Sep 02 18:01:55 under: what's wrong with it Sep 02 18:03:19 you see the image loads after a while and the text is shifted down Sep 02 18:03:33 that's not very beautiful Sep 02 18:15:02 Can someone explain to me what's the big difference between fill parent and match parent? Sep 02 18:15:31 One of my friends tested my app and the text wasn't on the same line, so have to change the design of my app Sep 02 18:16:12 http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html Sep 02 18:18:18 markyosullivan: if you are too lazy to read the link: no difference, they are the same. with api level 8, fill_parent was renamed into Match_parent Sep 02 18:18:36 Yeah I just looked at that link before I came on here Sep 02 18:18:43 first thing I did was go to the developer page Sep 02 18:18:54 so i don't understand the question Sep 02 18:18:58 Is the best solution to just resize my text? Sep 02 18:19:22 Thought I'd ask in here just in case that web page was dated hydrogenase Sep 02 18:19:23 match_parent will not resize your text, it will just resize the container the text is in Sep 02 18:23:42 markyosullivan: generally if the docs say something that explicitly, you can trust it Sep 02 18:31:42 hydrogenase: what you think about that issue? Mrono ? Sep 02 18:32:22 thanks for your help hydrogenase Sep 02 18:34:17 hi Sep 02 18:34:41 i am developing a webview app, need some advice. Sep 02 18:35:25 the app loads the same website. if i want to cache the static elements which never changes on the site - for example the menu bar elemets, logo etc... Sep 02 18:35:42 how can i do that? would you mind pointing me to the right direction? Sep 02 18:35:53 is it okay if i use this line: webSettings.setCacheMode(WebSettings.LOAD_DEFAULT); Sep 02 18:36:23 guys why does my PurchaseFlow not close after a completed purchase? it hangs and crashes when I try and buy again Sep 02 18:43:46 We need a little help here... Sep 02 18:44:23 It is regarding the recovery partition on the Sony Tablet S. Sep 02 18:44:26 Hey guys, quick question; I was told that in order to remove some bugs in my application, I should make my flashlight feature a service. I looked up the documentation for services but I could not figure out which would be best for this type of service: the generic Service class or the IntentService class. Opinions? Sep 02 18:47:07 Are you allowing your application to use the LED while outside the application? Sep 02 18:49:20 CoolApps: Something I'm still debating with myself on. While being able to multitask with it is very useful, it also blocks out access from the camera from other apps Sep 02 18:49:36 As of now you can use it outside the app Sep 02 18:49:43 but that may or may not be changed Sep 02 18:49:55 If I have Permissions.INTERNET, any ideas why I get "java.net.SocketException: Permission denied"? Sep 02 18:50:54 Hang on. Sep 02 18:50:57 Hi Kake_Fisk Sep 02 18:51:08 Actually, I think I was having the wrong manifest file open :S Sep 02 18:51:42 Hi ferros ^^ Sep 02 18:51:50 Kake_Fisk: It's a monday :P Sep 02 18:52:25 Hehe, yeah, shouldn't be possible this early in the week Sep 02 18:52:34 Yeah I tested a flashlight app and it actually doesn't allow me to use the camera until I switch off the LED. Sep 02 18:54:21 CoolApps: Yeah, it leaves me at a bit of a moral dilemna Sep 02 18:54:39 do you guys know anything about programmtically logging into a website? Sep 02 18:55:15 Use it has a service but make sure it stops the service when not in use. Sep 02 18:56:05 CoolApps: I think that will be the path I go down. But refering to my original question, what service method do you advice I use Sep 02 18:56:15 the Service or the IntentService Sep 02 18:57:37 IntentSerice is used for short tasks but Service is used for longer ones so use Service. Sep 02 18:58:21 Alright, thanks. Haven't created a service before so I'm on unfamiliar grounds. I'll give that a shot though Sep 02 19:00:25 Is InputStream immutable? Sep 02 19:01:02 I'm passing an InputStream as an argument, but it doesn't update it in the function? Sep 02 19:13:34 is it possible to have a app which uses minsdk 8, and a widget in the same app which uses minsdk 11? Sep 02 19:16:10 Yes Sep 02 19:16:23 Use android:enabled and a bool in values/ and values-v11/ Sep 02 19:21:59 SimonVT, do you know how to log in to a website to scrape it? Sep 02 19:29:55 Is anyone here bored and could check my app's code and see what I could improve? (I doubt I'll find someone that'll do that) Sep 02 19:30:10 $50/hour :P Sep 02 19:30:19 wait that's half my usual rate ;) Sep 02 19:30:45 You charge 100$/hour? I'm quite a bit more humble (25€/hour) Sep 02 19:31:10 Is there any website similar to stackoverflow that'd do that? Sep 02 19:31:15 well its been a while since i've done any consulting Sep 02 19:31:18 (the users, not the website) Sep 02 19:31:31 you want people to look at your app for free? Sep 02 19:31:45 if someone agrees to that, they're probably trying to steal your code Sep 02 19:32:12 They could learn from it, people answer questions on stackoverflow for free \(°_o)/¯ Sep 02 19:32:32 try it, but dont blame me if someone else releases your app :P Sep 02 19:32:44 I have the code on github Sep 02 19:32:45 So... Sep 02 19:32:57 Quick question regarding the onPostExecute when using AsyncTask: onPostExecute runs on the UI thread meaning you shouldn't do a "for(...) { add a bunch of stuff to the UI }", right ? Sep 02 19:33:14 right Sep 02 19:33:31 err Sep 02 19:33:32 what? Sep 02 19:33:37 Depends what "add a bunch of stuff to the ui" means Sep 02 19:33:41 you can ONLY add stuff to the ui on the ui thread :P Sep 02 19:33:48 And yeah, that Sep 02 19:33:58 SimonVT: thanks! Sep 02 19:34:24 serrghi, I'm sure you can do the for loop out of the UI thread and then only give the UI the relevant data Sep 02 19:34:33 I need to add like 30 - 100 tablerows to a table - this would be a bad thing to do on the UI thread Sep 02 19:34:50 I meant Zurfer Sep 02 19:34:53 not serrghi Sep 02 19:34:56 canadiancow> you can ONLY add stuff to the ui on the ui thread :P Sep 02 19:35:28 But simply having 100 tablerows is probably a bad idea Sep 02 19:35:49 I love code cleanup! Sep 02 19:36:26 I'm trying to a basic "list running apps" app and need to run the code in a thread so I dont block the UI thread and I also want to display a "Loading"-ProgressDialog until it is finished Sep 02 19:37:34 sounds like a job for listview Sep 02 19:38:25 Yeah, ListView would normally do but I want to display the icon of the apps as well - forgot this detail.. sorry about that Sep 02 19:38:51 I want to show the icon, app name (friendly name) and package name Sep 02 19:38:55 And why can't you show the icon in a listview? Sep 02 19:39:42 Well, me being a noob I'm not sure how to do it.. :) Is it the same way tablerows work? Sep 02 19:39:59 You should find a listview tutorial then Sep 02 19:40:04 Because you want to use a listview for this Sep 02 19:40:07 Why does the app name show along with the dropdown navigation spinner? Sep 02 19:40:46 Would a ListView result in better performance? Sep 02 19:43:35 JSoup doesn't emulate a browser having javascript enabled does it? Sep 02 19:45:44 I need to log in to a website. Sep 02 19:45:45 How Sep 02 19:45:46 do Sep 02 19:45:46 i Sep 02 19:45:47 do Sep 02 19:45:47 that Sep 02 19:46:01 HtmlUnit has too many jaras Sep 02 19:46:02 jars Sep 02 19:46:04 Don't do that Sep 02 19:46:11 do what Sep 02 19:46:13 Form full sentences, please Sep 02 19:46:27 Not one word per message Sep 02 19:46:38 the hell Sep 02 19:46:48 Switching to Fragments is going to be nice too Sep 02 19:46:56 The problem is that I've asked a couple times. Everyone seems to ignore the question. Sep 02 19:47:25 If you're not getting any answers, that's too bad Sep 02 19:47:27 Ask again later Sep 02 19:47:32 Or find another forum to ask your questions Sep 02 19:47:44 Q48VW: just because you sent more messages doesn't mean anyone will answer Sep 02 19:48:05 also you'll just get yourself hated rather than listened to Sep 02 19:48:39 So seems to be the case now Sep 02 19:57:31 How can I get Context on Fragment#onCreateView()? Sep 02 19:59:05 zyngawow, getActivity().getApplicationContext() Sep 02 19:59:20 Q48VW, thanks! Sep 02 19:59:32 that should do it anyways Sep 02 20:02:29 is it possible to do something similar to addTextChangedListener which you can use for Edit Texts except for Spinners? Sep 02 20:04:26 is anyone able to tell me why half of my layout is destroyed after changing orientation but the other half isnt? Sep 02 20:04:55 and I mean destroyed as in recreated Sep 02 20:05:10 What do you mean it's recreated? Sep 02 20:05:34 say in portrait mode I set a textview to "hello" Sep 02 20:05:46 changing to landscape it sets it back to default text Sep 02 20:05:59 it runs onCreate again Sep 02 20:06:23 Weird Sep 02 20:06:24 but the bottom of my layout where I entered some text in an EditText stays with its text Sep 02 20:06:41 Your entire layout is re-created Sep 02 20:06:45 Some views just save state Sep 02 20:07:02 ah, how can I make all states saved? since I hide and inhid some views etc Sep 02 20:07:15 An EditText will save its input, TextView will, by default, not save its text Sep 02 20:07:40 Visibility isn't saved Sep 02 20:07:48 You have to do that yourself Sep 02 20:07:51 that would explain it Sep 02 20:07:53 SimonVT: Is there a method for Spinners so that when it changes, it performs a method? Sep 02 20:08:11 markyosullivan: Elaborate Sep 02 20:08:41 https://lh5.ggpht.com/NULCFSOBEIgAIc9e5UCDB8F5VGPy77POjrzvJmXjPjKVWCL2tJ71Z93sh_8Fff-H_WHm=h900-rw Sep 02 20:08:51 markyosullivan: OnItemSelectedListener Sep 02 20:09:03 OnItemSelectedListener? Sep 02 20:09:13 Would that work for Spinners though? Sep 02 20:09:14 I see you never looked up Spinner in the docs Sep 02 20:09:14 SimonVT: when you say "do that yourself" do you mean manually populate and reset each thing? Sep 02 20:09:25 LaZ: yes Sep 02 20:09:43 https://developer.android.com/reference/android/widget/Spinner.html takes you to https://developer.android.com/guide/topics/ui/controls/spinner.html Sep 02 20:09:47 Which answers your question Sep 02 20:09:49 markyosullivan: spinner is basically the same as a menu except accessible anywhere, so the concpt is the same s OnItemSelectedListener I believe Sep 02 20:10:09 I can't find the Rect class Sep 02 20:10:15 Thanks Laz Sep 02 20:10:32 markyosullivan: read SimonVT's links too Sep 02 20:11:35 SimonVT: ok, so how would I store the states and get that info? I dont see how its possible Sep 02 20:13:27 I can't seem to be able to use the Rect class in Android Sep 02 20:14:48 you need to use ProjectileVomit instead, if Retching doesn't work Sep 02 20:15:02 LaZ: Use Activity#onSaveInstanceState Sep 02 20:15:11 Kake_Fisk: https://developer.android.com/index.html#q=Rect Sep 02 20:15:15 It's right there Sep 02 20:15:18 lol alankila Sep 02 20:16:25 "The method Rect() is undefined for the type CommunityMaps" :| Sep 02 20:16:42 I did import it Sep 02 20:16:46 eh, 'new Rect()' maybe? Sep 02 20:16:55 Oh, sorry Sep 02 20:24:10 Should I do the logic on the Fragment or on the Activity? Sep 02 20:31:18 Aw, got an error with no logcat Sep 02 20:31:27 a crash rather Sep 02 20:32:38 SimonVT: this has to be a bad design choice, why did they do this lol Sep 02 20:33:04 Not really Sep 02 20:33:56 I dont see why they dont keep everything as is Sep 02 20:34:10 who would want to lose stuff when changing orientation anyway Sep 02 20:35:14 People who don't use the same layout for portrait and landscape Sep 02 20:35:58 I guess thats one viable reason Sep 02 20:36:19 You have to save the state anyway for other reasons Sep 02 20:36:27 So this is not extra work in any way Sep 02 20:36:36 I dont mind saving the state its just restoring it all manually Sep 02 20:36:45 they should of handled that if its the same layout as before Sep 02 20:37:25 The framework doesn't know what the correct thing to do is Sep 02 20:37:33 Even if the layout is the same the behavior might be different Sep 02 20:38:01 then allow for an attribute on the activity like android:autoSavedInstanceRestore Sep 02 20:38:13 i dunno lol Sep 02 20:38:24 just feels like an exra step to me Sep 02 20:40:00 It's too implementation specific Sep 02 20:40:14 Views save what makes sense. Input for an edittext, scroll position for a listview, .. Sep 02 20:42:00 the way I did this app its gonna be a huge pain, the views have 3 different "states" it can be in and I have to restore them all depending on what the hell is happening with orientation Sep 02 20:42:11 not to mention asysnc task is lost Sep 02 20:42:26 Guys, I can't seem to figure out how to add a sms to messages Sep 02 20:42:55 like say im restoring sms messages, how would I add them back in? SmsManager gives no luck, thats for sending, not adding to messages Sep 02 20:47:59 How do I enable warning/error on eclipse about android version? I restored default in Lint but I don't get any warning/error Sep 02 20:52:41 Solved Sep 02 20:53:08 Hey guys, cany any of you reccomend a good book for a begginer developer coming from a .net backgrounf developing for android? Sep 02 20:54:30 Anton2k Programming Android applications Sep 02 20:54:57 cheers papachan Sep 02 20:55:17 http://www.amazon.com/dp/1118102274/ref=cm_sw_r_tw_dp_LSpjsb11TNYVV Sep 02 20:55:26 i read this one Sep 02 20:57:17 did you know java before you started developing for android? Sep 02 20:57:37 Good question: no Sep 02 20:57:40 i have never programmed in java but from what i hear it fairly simular to c# Sep 02 20:58:02 i was understanding java but not programming anything in java seriously Sep 02 20:58:05 now i am goan ask if you have any apps in the app store lol Sep 02 20:58:12 ah gotcha Sep 02 20:58:21 hello fellow devs.. What would you do if you need to recognize speech out of few words expected. Like the user should say either "answer" or "hang up". But API returns you "hovercraft" instead. Can I tell speech APIs what are they to expect? Sep 02 20:58:23 Anton2k: you won't have any problems Sep 02 20:58:50 cheers guys Sep 02 20:58:54 downlaod the book right now :) Sep 02 20:58:55 Anton2k yes i have two apps Sep 02 20:59:26 ah cool, games? or somthing else (i am not looking to develop games btw) Sep 02 20:59:49 Anton2k: no games. i am not game developer Sep 02 20:59:50 What is the correlation between a Handler and a Looper? Sep 02 21:00:48 A Looper is a message queue, a Handler lets you post messages into that queue Sep 02 21:01:05 got it! Sep 02 21:01:11 thank you lol Sep 02 21:06:09 hello Sep 02 21:06:26 holla holla Sep 02 21:06:55 I'm screwing around with some super noobish stuff. Currently I have this working "Toast.makeText(getApplicationContext(), gotname1, Toast.LENGTH_SHORT).show();" where gotname1 is a string I made from edittext Sep 02 21:07:17 I want to prefix that toast output with something like "Hello, gotname1!" Sep 02 21:08:15 Any tips on doing that? Can I do it in place within that makeText() or do I need to build the whole string first? Sep 02 21:09:07 Did you try any of those? Sep 02 21:09:46 SimonVT: I tried using "Hello, gotname1" but it shows literally Sep 02 21:10:05 <|0xD34D|> "Hello, " + gotname1 Sep 02 21:10:48 Can you do that in a Toast method? Sep 02 21:10:54 |0xD34D|: haha awesome thanks Sep 02 21:10:58 it worked Sep 02 21:11:04 really? Sep 02 21:11:10 yep Sep 02 21:11:12 <|0xD34D|> sure it just concatenates strings into another String Sep 02 21:11:29 thanks guys Sep 02 21:11:59 oh! right right right Sep 02 21:12:07 of course, string concatenation Sep 02 21:12:12 lol Sep 02 21:12:29 <|0xD34D|> gotta love oop and operator overloading Sep 02 21:12:38 Im wondering because there are 3 parameters, but you don't use comma Sep 02 21:12:50 yeah overloading is sweet Sep 02 21:15:07 Is it mandatory to implement the Handler callback interface when creating a Handler? Sep 02 21:16:59 <|0xD34D|> no Handler has a handleMessage() method in it so if you are extending it just override that Sep 02 21:18:32 would i need to create a subclass of Handler(extend Handler) in order for my overriding of handleMessage() event handler to be considered valid? Sep 02 21:19:21 <|0xD34D|> incognitto: if you are not extending it and need to handle messages then just pass it your callback Sep 02 21:19:28 i take it a toast notification is the small popup overlay you get like an error or somthing liek that Sep 02 21:19:54 abit like the windows toast notification for the old msn messanger Sep 02 21:19:57 Anton2K it's used as notification yes Sep 02 21:20:17 <|0xD34D|> or an annoyance depending on how you look at it Sep 02 21:20:29 but it only uses window space required for fitting the entire text notification Sep 02 21:21:04 So would it be either Handler(Handler.Callback callback) or MyHandler extend Handler{} ? Sep 02 21:21:51 <|0xD34D|> incognitto: do you need to do more than just handle messages? Sep 02 21:22:19 <|0xD34D|> if all I need to do is deal with handleMessage() then I'd implement the callback and pass that to the Handler constructor Sep 02 21:22:31 ah lol Sep 02 21:27:40 So implement Handler.Callback<> into my Activity and instantiate Handler() { handleMessage() } ? Sep 02 21:29:45 When you mean pass to the Handler constructor, do you mean it's automatically passed or with keyword super.()? Sep 02 21:32:53 would i need to implement this in a background thread that I've created as well or once its implemented in my activity, do i not need to implement this callback anymore regardless of creating an instance of Handler in another thread? Sep 02 21:34:58 incognitto, the handler should be instantiated Sep 02 21:35:11 inside the activity if you want to modify it Sep 02 21:35:56 So the Handler object would need to be instantiated in my main thread, my Activity, if I would want to override say the handleMessage() method? Sep 02 21:36:35 it has nothing to do with the overriding it Sep 02 21:36:48 you can have a seperate class MyHandler in a seperate file Sep 02 21:37:02 but you need to instantiate it (in let's say OnCreate()) Sep 02 21:37:05 by seperate file you mean seperate thread? Sep 02 21:37:15 no, I mean a seperate file Sep 02 21:37:21 Seperate class? Sep 02 21:37:21 with async task and handlers Sep 02 21:37:26 you are abstracted from threads Sep 02 21:37:54 I get you're abstracted from threads but I am able to create various Handler objects in background threads right? Sep 02 21:38:03 only if they're looper threads Sep 02 21:38:10 yes looper threads there you go Sep 02 21:38:11 sorry. Sep 02 21:38:32 you create the handler on the thread that you want to be processing the work Sep 02 21:38:42 either the UI thread, or another looper thread that you have going Sep 02 21:38:56 and then you can send a message to the handler from some other thread Sep 02 21:39:07 I understand that Sep 02 21:39:15 What I dont get is what SpearThruster said Sep 02 21:39:58 Wait I think I do. Sep 02 21:40:41 I just said what JesusFreke said Sep 02 21:40:54 just urging you to create a seperate file class definition Sep 02 21:40:56 I said what SpearThruster said Sep 02 21:41:11 * JesusFreke causes the universe to go into an infinite loop Sep 02 21:41:14 and not put everything inside the MainActivity Sep 02 21:41:15 lol Sep 02 21:41:23 So several files in a project heirarchy/directory can contain differet myHandler classes, but in order for me to use that Handler, I would have to instantiate that myHandler class in the onCreate() Activity handler in order to use it? Sep 02 21:41:24 no problem, we have looper threads! Sep 02 21:41:27 * SpearThruster ducks Sep 02 21:41:53 incognitto, in order for THAT handler to be able to modify THAT activity Sep 02 21:42:05 OOOOOOOOOOOOOOOH Sep 02 21:42:10 *jumps out window* Sep 02 21:42:14 I understand. Sep 02 21:42:28 not really. The UI thread is the UI thread, regardless of the activity Sep 02 21:42:49 ^ ? Sep 02 21:43:09 but the UI thread is only attached to a single Activity? Sep 02 21:43:32 there's only 1 active activity Sep 02 21:43:43 you're saying the UI thread is universally able to attach itself to any activity? Sep 02 21:43:50 any one* activity Sep 02 21:43:53 right? Sep 02 21:43:56 I'm saying there is only 1 UI thread in your process Sep 02 21:44:00 Yeah Sep 02 21:44:04 okay. Sep 02 21:44:05 any activity that gets started uses that same UI thread Sep 02 21:44:05 coolness Sep 02 21:44:09 right Sep 02 21:46:51 I am experimenting with simple framework xml thingy Sep 02 21:47:06 coming from jaxb in the server world, it's quite petite Sep 02 21:47:20 but can't make it to handle of things properly Sep 02 21:47:21 lol Sep 02 21:48:46 Let me ask a nub question Sep 02 21:49:13 why not use jaxb? it looks like it's open source. (note: I know nothing about jaxb :p) Sep 02 21:50:02 because it is not compatible with dalvik Sep 02 21:50:10 I started reading about it, and lost the nerve Sep 02 21:50:22 basically google doesn't provide some of the core jsr xml apis Sep 02 21:50:33 ah Sep 02 21:50:39 and .jar that is out there has some dalvik machine blah blah inconsistence Sep 02 21:50:49 so I need to build a whole library - and said fuck it Sep 02 21:50:56 lets try out a new framework for android Sep 02 21:50:57 :p Sep 02 21:50:59 it's cool Sep 02 21:51:03 though I can't Sep 02 21:51:14 make @ElementList(inline="true") Sep 02 21:51:16 play nice :( Sep 02 21:51:29 it camelcases my elements which is not how i want to send them Sep 02 21:51:31 nor recieve them Sep 02 21:51:32 X_X Sep 02 21:51:33 also: are you constrained to use xml? Sep 02 21:51:45 you could consider protobuf, or json, etc. Sep 02 21:52:19 If I use multiple Activities as opposed to an Activity that uses multiple Views, I wouldnt have to implement my own BACK button because the user pressing the BACK button to go back to the previous Activity would do so eloquently as opposed to pressing the BACK button on an Activity with multiple Views? Sep 02 21:52:59 Hey guys Sep 02 21:53:05 I love JSON but JSON in java world seems weird Sep 02 21:53:23 Hi Ben Sep 02 21:53:28 maybe I am spoiled by great JAXB and its marshalling/unmarshalling power Sep 02 21:53:29 I'm new here Sep 02 21:53:29 JSON is fine in the Java world Sep 02 21:53:31 I have some total noob questions. I know a little java but it's rusty. haven't made an android app before. trying to do this https://docs.google.com/document/d/14vn34EJY6mxLd4YdaKHNMfGJjKhp-yEWLUEb5hcDN1I/edit?usp=sharing Sep 02 21:53:46 you throwing in schema to jaxb BAM! you have generated classes Sep 02 21:53:50 JSON->GSON very nice ;) Sep 02 21:53:58 it tells me there's an error in the XML included on the line that says android:text="@string/strike_text_label" Sep 02 21:54:00 JSON->GSON->JPA ;) Sep 02 21:54:32 The error is "Description Resource Path Location Type error: Error: No resource found that matches the given name (at 'text' with value '@string/strike_text_label'). activity_umpire_buddy.xml /UmpireBuddy/res/layout line 11 Android AAPT Problem" Sep 02 21:55:15 But I have defined it in res/values/strings.xml Sep 02 21:55:34 You defined it? Sep 02 21:55:36 oh wait lol Sep 02 21:55:44 SpearThruster: The Android team even recommends it at http://developer.android.com/reference/java/io/Serializable.html Sep 02 21:55:44 lol Sep 02 21:55:54 strike_button_label is not the same as strike_text_label Sep 02 21:55:59 Never mind! :) Sep 02 21:56:02 "JSON is concise, human-readable and efficient. Android includes both a streaming API and a tree API to read and write JSON. Use a binding library like GSON to read and write Java objects directly." Sep 02 21:56:23 louielouie, tell them to make android manifest in json then :p Sep 02 21:56:24 hehe Sep 02 21:56:25 crap I have to learn Serializable too Sep 02 21:56:28 ;_; Sep 02 21:56:35 SpearThruster: hey that'd be nice! Sep 02 21:57:12 whenever I am making web services I am exposing both xml and json apis Sep 02 21:57:16 seems right Sep 02 21:57:25 but I consume the JSON from browsers only Sep 02 21:57:42 from other apps, I expect there to be a xml marshalling platform Sep 02 21:57:44 whats JSON? Sep 02 21:57:50 that is capable for generating classes from xsd Sep 02 21:58:30 JSON (an acronym for JavaScript Object Notation) is a lightweight text-based open standard designed for human-readable data interchange Sep 02 21:58:48 incognitto: mostly used with webservices Sep 02 22:02:04 By web services, you mean PHP, etc? Sep 02 22:02:17 just google it Sep 02 22:02:27 I googled it Sep 02 22:02:38 now you are mircing it? Sep 02 22:02:39 :D Sep 02 22:02:59 Looks like a convention most OO languages use Sep 02 22:03:01 Web services are typically application programming interfaces (API) or Web APIs that are accessed via Hypertext Transfer Protocol (HTTP) Sep 02 22:03:05 i think you need help with google then Sep 02 22:03:22 Can I quickly get the eclipse adt bundle to test apps on my actual android phone instead of a virtual one? Sep 02 22:03:31 Hi. I am developing an Android application. I have two activities, lets say A and B. A is the first activity to execute, but B needs some heavy initialization, and I want it to be performed when you open the application. What's the best way to do that (to initalize B, then execute A)? Sep 02 22:03:51 oh google web services Sep 02 22:04:01 Yes BenMcLean: Just connect your phone through USB or network ADB an voila Sep 02 22:04:05 BenMcLean: as long as you have debugging enabled on your phone and it is detected by adb correctly, you can just send the run to the device instead Sep 02 22:04:06 you will be able to debug on your phone Sep 02 22:04:24 i enabled debugging Sep 02 22:04:33 but how do i get the pc to detect ? Sep 02 22:04:50 if you are using ADB via network, you have to connect to it first Sep 02 22:05:01 with adb connect yours.phone.ip.address Sep 02 22:05:02 BenMcLean: First, are you certain that your cable is a data+charge cable? some crappy cables are only charge cables. Sep 02 22:05:24 i transfer files all the time Sep 02 22:05:27 ok Sep 02 22:05:40 BenMcLean: what do you get if you open a console and execute "adb devices"? Sep 02 22:05:45 do you get your device listed? Sep 02 22:05:46 noeom, you mean while A is executing, B is initializing? Sep 02 22:06:11 So B is initializing through A's execution? Sep 02 22:06:13 adb is not recognized but then, i don't have the java setup in my PATH Sep 02 22:06:15 incognitto: No, I can wait for B to initialize, then start executing A. Sep 02 22:06:18 gotta find that somehow Sep 02 22:06:53 incognitto: I don't really mind. All I want is the user to wait only once, at the beggining Sep 02 22:06:56 set Java up sylon, and use Eclipse Indigo if you arent already. Sep 02 22:07:01 and not when she decides to go from A to B. Sep 02 22:07:12 aha, it says it finds "bf155df5 device" Sep 02 22:07:54 Im guessing you would only have to wait a few seconds to go from A to B. Sep 02 22:07:59 Thats pretty fast. Sep 02 22:08:03 i got it Sep 02 22:08:11 had to change a setting in eclipse Sep 02 22:08:23 but thanks for the command "adb devices" that's good to know for future Sep 02 22:08:32 yes, sorry, but B's intialization can take quite a few seconds. That's why I want to initalize it at apps startup Sep 02 22:08:48 use android studio if you are brave Sep 02 22:08:52 B has to perform some heavy tasks to initialize itself (to read a 'big' file and load some attributes) Sep 02 22:09:07 Im assuming that can be done with background threads Sep 02 22:09:13 BenMcLean: adb commands are quite useful, have a look at them! Sep 02 22:09:22 ok Sep 02 22:09:47 yes, incognitto, can be done with background threads. Actually, I usually do these task using AsyncTask Sep 02 22:10:05 and that processing can be done on A seeing how when A is executed first, B would be ready because A has done the workload. But, wouldnt A be your main application? Sep 02 22:10:05 umm, could somebody take a look at this and tell me where step 6 goes? https://docs.google.com/document/d/14vn34EJY6mxLd4YdaKHNMfGJjKhp-yEWLUEb5hcDN1I/edit Sep 02 22:10:29 yes, A is my main Activity. And the initialization has to be done on B Sep 02 22:10:33 And if A is your main thread, that would cause your App to be a hell of a lot slower. Sep 02 22:11:03 AsyncTasks are good for fast processing only Sep 02 22:11:47 Im sorry, short processing. Sep 02 22:11:50 incognitto: Listen. The initialization has to be done only once. And it's perfectly ok to show a progress dialog and wait for it. No need for a background task (unless it's better) Sep 02 22:12:01 it takes a few seconds, four or five Sep 02 22:12:11 5 seconds is too slow Sep 02 22:12:23 but it's a bit annoying to stop for 5 seconds when you are using the app... Sep 02 22:12:27 yeah Sep 02 22:12:32 and you go from A to B. I prefer it to be at startup Sep 02 22:12:37 looks like more.. natural? Sep 02 22:13:05 so, how can I do it? Sep 02 22:13:21 do I have to execute B first, only to initialize it, then transfer control back to A? Sep 02 22:13:46 This is a challenge for me as well because Im learning the Android architecture at the moment as well. Sep 02 22:13:48 or is there a better way... Sep 02 22:13:50 xD Sep 02 22:13:56 But that doesnt mean I cant point you in the right direction. Sep 02 22:14:06 well, any ideas are appreciated :) Sep 02 22:14:07 Im using a book so I might find some info here to help Sep 02 22:14:34 never mind, I can take some time to read as well. Came here in case someone could offer a quick response. I don't want you to do my job ;) Sep 02 22:14:45 no this is great for me Sep 02 22:14:51 There are Intent Services Sep 02 22:14:54 Are you familiar with those? Sep 02 22:15:01 not at all. Let me read a bit Sep 02 22:15:45 It doesn't seem to be what I need. I don't need to handle asynchronous requests.... just perform some heavy initialization :) Sep 02 22:17:07 Id guess you would have to do it through separate Threads and Handlers Sep 02 22:17:23 and im just learning about Handlers at the moment :P Sep 02 22:17:35 I guess I'll have to read a bit too. Sep 02 22:17:35 I came in here to ask about Handlers Dx Sep 02 22:17:42 I'll be back ;) Sep 02 22:17:53 read up on Handlers and Threads Sep 02 22:18:56 I will, thanks! Sep 02 22:23:11 just made spring framework work :) Sep 02 22:23:14 aaaaaaaaaaaaaaaaahhhhhhhh Sep 02 22:23:21 simple* Sep 02 22:23:21 ups Sep 02 22:23:32 now a cigeratte to celelbrate Sep 02 22:30:05 is there some kind of configuration for eclipse designed for visually impaired people with small text and high contrast? Sep 02 22:30:26 or do i need to configure and try out each little teeny setting manually? seems like there should be an accessibility mode or something Sep 02 22:32:24 Im sure there is an all black and colored text and bigger font option Sep 02 22:32:25 google it Sep 02 22:33:23 been doing that Sep 02 22:55:43 Should I do the logic on the Fragment or on the Activity? Sep 02 23:40:54 hey- is it expensive to make aidl calls? Sep 02 23:55:36 relatively, yes Sep 02 23:55:42 it's ipc Sep 03 00:54:26 has anybody published an app? Sep 03 00:58:33 i dare say quite a few people here have, yes Sep 03 01:00:29 nice Sep 03 01:00:44 is it bad if you do it alone? mine is simple but taking so looooong Sep 03 01:01:20 i think eventually you should get someone to do it with, for procreation reasons Sep 03 01:02:19 if you're talking about code, then 'bad' is a subjective term :) Sep 03 01:03:00 yeah Sep 03 01:03:07 i got no one though Sep 03 01:04:31 im trying to find someone in new york to help me like become partners and it seems android developers are like rare pokemon to find in rael life Sep 03 01:04:53 met a few iphone devs Sep 03 01:05:51 SimonVT: ok I admit, savedInstanceState is pretty cool and useful xD Sep 03 01:19:00 How large is a WebArchive, typically? Is it a bad idea to store it in a database? Sep 03 01:52:03 i'm trying to follow the simple standard photo-taking example in http://developer.android.com/training/camera/photobasics.html and when i specify captureImage.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f)), the stock android camera app doesn't do anything after i choose the taken photo Sep 03 01:52:32 if i comment out the putExtra line, it works but obviously the EXTRA_OUTPUT value is null. Sep 03 01:52:35 what's going on? Sep 03 01:53:01 and by "doesn't do anything" i mean that the tick to say "OK" is a no-op Sep 03 02:04:28 guys, I'm trying up some qt on android, installing the apk from sdkcard and running it works but deployment from adb fails with INSTALL_FAILED_INVALID_APK, installing with -s for the sdcard I get a permission error. I'm looking up and it seems I'm with an issue about jellybean and umask, from adb shell my umask is 077, and people say everything works fines when umask is 000, anyone have an idea? **** ENDING LOGGING AT Tue Sep 03 02:59:58 2013