**** BEGIN LOGGING AT Mon Jun 27 02:59:58 2016 Jun 27 04:01:53 hey guys, I'm getting very wacky behavior where adding a loop inside a file compiled with -O2 causes a crash on assigning to a global int variable... with ARM64. what gives? Jun 27 04:02:25 My activity just crashed.. what to do? Jun 27 04:03:05 purplex88: :) Jun 27 04:03:10 what to do!! Jun 27 04:03:17 android.content.ActivityNotFoundException: Unable to find explicit activity class Jun 27 04:05:46 Ah.. Jun 27 04:05:55 Forgot to add it to XML Jun 27 04:06:04 Manifest. Jun 27 04:06:29 The Manifest! always happy to bite you. Jun 27 04:06:33 ESphynx: Java loop? Jun 27 04:06:43 purplex88: an eC loop, in fact. Jun 27 04:07:02 it's completely non-sense! the loop does nothing at all! Jun 27 04:07:37 for( index = 0 ; index < value; index++ ) if(index >= areaCount) printf("OH NO!\n"); Jun 27 04:07:47 eC? Jun 27 04:07:51 I leave this in, compile the file with -O2, crashes easily . Jun 27 04:08:04 I comment this out, compiled with -O2, works fine. If I don't compile with -O2 , either way still works fine. Jun 27 04:08:11 It looks like a Java loop Jun 27 04:08:13 Yes eC ( http://ec-lang.org ) Jun 27 04:08:19 Oh Jun 27 04:08:25 well eC is a C superset, like Java, C++, C# :P Jun 27 04:08:49 well, a bit more a superset than those 3 ;) Jun 27 04:09:18 Ah so many languages these days can be used to work with Android.. Jun 27 04:10:04 I just cannot make any sense out of this! Jun 27 04:10:11 What is the value? Jun 27 04:10:41 'value' ? I'm not sure, it changes :P Jun 27 04:10:59 Are you sure it crashes inside the loop? hmm Jun 27 04:11:08 it's actually not crashing inside the loop Jun 27 04:11:14 it crashes later on a assigning a value to a global int! Jun 27 04:11:24 but if I comment out that loop, no problem Jun 27 04:11:32 and if I don't compile that particular file with -O2, no problem Jun 27 04:11:53 at this point I think it's a compiler bug... Jun 27 04:12:13 Ah, try recompiling the whole thing Jun 27 04:12:33 Yeah could be bug Jun 27 04:13:06 some optimization error maybe Jun 27 04:13:59 yeah sounds very much like it :( Jun 27 04:14:10 I did try to recompile the whole thing, now I should probably try updating the NDK Jun 27 04:14:22 but I'm scared something breaks everytime I update anything :P Jun 27 04:14:41 Try changing the loop a bit Jun 27 04:15:12 wll this loop is so basic :P Jun 27 04:16:10 ah actually maybe I could try the 'aarch64-linux-android-clang3.6' Jun 27 04:17:48 hmm that's not installed/prebuilt yet :P Jun 27 04:18:22 Could it be interger overflow exception? Jun 27 04:18:46 in case the global variable is not same type as assignment Jun 27 04:20:45 I doubt it :P Jun 27 04:26:10 well apparently this 10e revision of the NDK is the last one that shipped with GCC by default :P Jun 27 04:26:56 there's good chances my problem will go away by completely changing the compiler ;) Jun 27 04:30:16 ESphynx: yes I was just going to suggest that Jun 27 04:30:54 I always keep more than one compiler :P Jun 27 04:32:16 Still crashes with the GCC 4.9 included in the NDK12 Jun 27 04:32:38 I'll try to see if I can build with Clang :S Jun 27 04:32:46 Hmm Jun 27 04:33:35 If not, then you will need to make sure it is the optimization error Jun 27 04:36:07 not sure how to configure clang though :S Jun 27 04:36:14 I get this: Linker Error: : unrecognised emulation mode: elf_x86_64 Jun 27 04:40:54 Guess -target arm64v8a-none-eabi would help :P Jun 27 04:41:16 i guess too Jun 27 04:42:35 "After some years Stockholm Syndrome kicks in and you start liking the decent bits, namely layouts and little else." this guy read my mind O.o Jun 27 04:44:27 That thread was a train wreck Jun 27 04:44:33 Should it be arm64v8a-linux-eabi ? Jun 27 04:45:39 that doesn't seem to define __linux__ Jun 27 04:46:02 #define __linux__ 1 Jun 27 04:46:04 done ! Jun 27 04:47:08 g00s: tried that :P Jun 27 04:47:23 I guess those errors either way: Relocations in generic ELF (EM: 183) Jun 27 04:57:59 CedricBeust lol the fused location provider gives stale data with current timestamps? i have to check that Jun 27 04:58:53 i thought the old non-GMS gps stuff was easy enough - although its geofencing was pretty busted Jun 27 05:02:38 but i generally agree with pokoito guy. if you make some internet enabled app that sends rest requests to some server, its pretty straightforward ... start using any of the sensors, hw apis, BLE, camera - basically the stuff that makes mobile interesting because of /context/ and it goes downhill fast Jun 27 05:03:38 i remember reading an article about some popular app that used camera, and it sent the model # back to its service to get correction / bug parameters Jun 27 05:04:14 i got the impression its almost impossible to use the camera correctly w/o lots of compensation for bugs Jun 27 05:04:49 and that is strange given android was originally envisioned for cameras, is my memory serves me correctly Jun 27 05:06:39 add wifi direct to the list Jun 27 05:10:08 ESphynx are you accessing sqlite from native code ? Jun 27 05:11:55 g00s: sqlite? I may be yes Jun 27 05:12:07 ESphynx did you see, there is a change there ... Jun 27 05:12:27 what change? Jun 27 05:12:41 I'm linking in my own sqlit though Jun 27 05:12:43 ESphynx http://android-developers.blogspot.com/2016/06/improving-stability-with-private-cc.html Jun 27 05:12:53 ok then you are safe Jun 27 05:13:33 I'm not targeting those modern versions either Jun 27 05:14:15 in fact my manifest says minSdkVersion="9" but I'm linking against platforms/android-21 at the moment -- is that a potential problem? Jun 27 05:14:31 nope Jun 27 05:14:35 g00s: my problem right now is I can't manage to link anything with Clang :P I get those Relocations in generic ELF errors Jun 27 05:14:58 and Google doesn't tell me anything useful about how to fix this :P Jun 27 05:14:59 a new NDK came out the other day, but i don't use these things Jun 27 05:15:33 ESphynx but i'd still target 24 anyhow Jun 27 05:20:59 this looks like it will be interesting http://www.informit.com/store/effective-debugging-66-specific-ways-to-debug-software-9780134394794 Jun 27 05:24:49 g00s, I'm implementing pictures in my categories listview as you suggested Jun 27 05:25:20 Because I finished the damned LocalActivityManager to modern tabs, with fragments and onsaveInstance rotation junk Jun 27 05:26:23 oh good , LocalActivityManager is gone :) Jun 27 05:27:40 Once I publish...I have some more things to cross off my list Jun 27 05:28:13 Ologn are you using any graphics libs ? Jun 27 05:28:45 g00s, I was familiar with Android Universal Image Loader so I used that Jun 27 05:30:14 Since v. 1 is out and v. 2 is not a big improvement from the user perspective I decided to take the time to do things right...so I use Mark Murpht's ArrayPagerAdapter since it is better than the vanilla Android Jun 27 05:33:13 i'll have to check out that class Jun 27 05:35:48 It's called CWAC-Pager Jun 27 05:37:02 Where could I find a guide how to compil with the NDK/Clang Jun 27 05:37:17 (without using any extra tool) Jun 27 05:50:00 is there any reference for "vdc" commands?? Jun 27 05:51:25 mistry: Please stop spreading your question across channels. Jun 27 05:52:17 LunarEclipse120: i didnt know which channel will respond. btw.. i've seen others doing the same. Jun 27 05:52:29 mistry: And they were told to stop. Jun 27 06:01:13 Will activity level android:theme override application android:theme tag? Jun 27 06:15:07 yes Jun 27 06:41:33 hi everyinoe Jun 27 06:41:51 Hello bash_turtle. Jun 27 06:41:56 kindly help me to appropriatae resources to the android development Jun 27 06:42:05 i wanted to develop the custom roms Jun 27 06:42:10 i am new to android Jun 27 06:42:30 however i am able to get resources for app development only Jun 27 06:42:43 whereas i need the resources for rom development Jun 27 06:42:46 kindly help Jun 27 06:43:48 There is no tutorial for developing ROMs. Jun 27 06:43:57 And a noob defiantly can't do it. Jun 27 06:44:04 bash_turtle, I'm not understanding. Are you talking about writing an app, or writing a native app, or customizing core components of the Linux Operating system or the Java interface components? Jun 27 06:44:55 i am talking about learning the original source code of android from scratch ,building kernels and develop my own custom rom for suiting my beeds Jun 27 06:45:02 like cyanogenmod etc. Jun 27 06:45:12 jesseg: He wants to make a custom ROM. Jun 27 06:45:22 bash_turtle: You aren't going to do that if you are new to Android. Jun 27 06:45:22 bash_turtle, ahhh, you want to know how to get set up to build cyanogenmod? Jun 27 06:45:32 jesseg: He wants to make an actual ROM. Jun 27 06:45:33 now Jun 27 06:45:36 no Jun 27 06:45:44 bash_turtle: It takes years of learning about Android as a whole. Jun 27 06:45:51 ohhh Jun 27 06:45:55 no issues Jun 27 06:45:55 I've been doing this for 2 years and I can't even make a ROM from scratch. Jun 27 06:46:09 but would be helpful if you could tell me how to do it from scratch Jun 27 06:46:18 You can't. Jun 27 06:46:22 It isn't just a guide. Jun 27 06:46:31 There are too many variables and different situation. Jun 27 06:46:33 any starating tips? Jun 27 06:46:33 *situations Jun 27 06:46:39 bash_turtle, best bet would be to get set up to build cyanogenmod from source, and go from there. Jun 27 06:46:43 Don't go right to the end goal. Jun 27 06:46:46 jesseg: Not even that far Jun 27 06:47:05 ok thanks for your help Jun 27 06:47:07 First learn how Android works in general and how to flash ROMs and stuff Jun 27 06:47:17 And why you are doing those steps Jun 27 06:47:31 LunarEclipse120: butbutbut no one under can have any knowledge of any subject, no matter what Jun 27 06:47:50 actually i am trying to do a project Jun 27 06:47:55 Robdgreat: Are you joking about my age? Jun 27 06:47:59 bash_turtle: What project? Jun 27 06:48:19 where you create an app and enter the phone number of the target Jun 27 06:48:27 which sends an sms Jun 27 06:48:27 And? Jun 27 06:48:38 and you can control the webcam of his device :) Jun 27 06:48:43 without the target being aware Jun 27 06:48:45 Oh for fucks sake. Jun 27 06:48:49 That is illegal. Jun 27 06:49:01 So no, don't do that. Jun 27 06:49:05 but it requires me to modify the core secutiyu components of android Jun 27 06:49:10 LunarEclipse120: getting channels confused. I was making fun of the one going on about not being able to be helped by someone younger than he is Jun 27 06:49:19 actually it is my project which o am submitting to mit Jun 27 06:49:31 bash_turtle: Well you aren't going to do it. Jun 27 06:49:33 as a application to masters program Jun 27 06:49:40 bash_turtle: Unless you find a security hole. Jun 27 06:49:50 bash_turtle, you might be able to start here: https://wiki.cyanogenmod.org/w/Development Jun 27 06:50:01 jesseg: That isnt't what he wants. For the 3rd time. Jun 27 06:50:30 bash_turtle: You aren't going to achieve what you want. Jun 27 06:50:52 anyways i ahve develped the app and i am able to send the spam mesage to the target device Jun 27 06:51:08 however the problem i am facing is that the target does not dend back the information Jun 27 06:51:11 bash_turtle: Also, you are in India. MIT is in the US. Jun 27 06:51:25 i know Jun 27 06:51:31 but i am applying there Jun 27 06:51:35 bash_turtle: You can't randomly control a device without some sort of client. Jun 27 06:51:45 i havae develope d a client also Jun 27 06:51:51 to be used as an apk Jun 27 06:51:54 on a device Jun 27 06:52:03 If you have a client running on the target device and then you use SMS to trigger it, then it would work. Jun 27 06:52:10 But you can't do it to any Android device. Jun 27 06:52:10 done that Jun 27 06:52:13 issue is Jun 27 06:52:14 LunarEclipse120, many fascinating MIT projects involve custom firmware and demonstrate a principle even though it's not practical on a wide scale basis. Jun 27 06:52:18 Ah ok. Jun 27 06:52:23 i dont waant to install a clint o nthe target device Jun 27 06:52:33 bash_turtle: Well that isn't going to happen. Jun 27 06:52:34 then what will be the use of my projrct ? Jun 27 06:52:44 that is what i am trying to do Jun 27 06:52:50 bash_turtle: What good use will it have anyway? Spying? Jun 27 06:52:55 It is illegal in the US. Jun 27 06:53:11 well if i am doing something it is just out of my interest Jun 27 06:53:20 bash_turtle: Well it isn't going to happen anyway. Jun 27 06:53:24 not illegal or anything Jun 27 06:53:31 ok thanks for your input Jun 27 06:53:54 Unless if you find a security hole. Which takes years of research and knowledge and a team of multiple people. Jun 27 06:53:55 bash_turtle, once you get to where you can compile cyanogenmod and install that on the target device then you can begin going through the source code for Linux and the java interface layer and modifying them as needed. Jun 27 06:54:03 Not to mention most of them were patched already. Jun 27 06:54:06 jesseg: Just stop. Jun 27 06:54:19 jesseg: He wants to be able to do it remotly without touching the device. Jun 27 06:54:27 Which isn't going to happen. Jun 27 06:55:28 bash_turtle, oh, yeah, if you want to be able to spy on the target without updating their firmware then you will have to wait for a security hole to pop up. But examining source code is the best way to find one of those ahead of time. Jun 27 06:55:32 Ah the midnight hours of IRC. Jun 27 06:55:40 Where the trolls and retards lurk. Jun 27 06:56:11 jesseg: He left. Jun 27 06:56:31 well he tried anyway ha ha Jun 27 06:56:49 Lol. Jun 27 06:57:10 I was trying so hard not to call him a retard. Jun 27 06:57:35 Robdgreat: Ah I see. The troll in #android? Jun 27 06:59:35 yeah Jun 27 07:00:16 I hoped you weren't lumping me in with the trolls and retards when I was merely taking the piss out of a troll, myself Jun 27 07:00:24 No. Jun 27 07:00:36 I think I was the retard, right? :P Jun 27 07:00:42 I was specifically talking about the guy in #android and they guy who was just here. Jun 27 07:00:53 jesseg: No, bash_turtle. Jun 27 07:01:00 ahh K :D Jun 27 07:01:17 The troll was a guy in #android named shovel_boss. Jun 27 07:01:25 ahh Jun 27 07:01:30 Saying how I am young and I was spamming the channel. Jun 27 07:01:45 When I was helping someone and all he did was tell people not to listen to me :P Jun 27 07:01:50 Ahh - LOL Jun 27 07:02:23 Good night Jun 27 07:02:32 Night. Jun 27 07:15:50 g00s: https://www.reddit.com/r/androiddev/comments/4pzu41/the_camera2_basic_example_is_over_1000_lines_long/ Jun 27 07:29:10 Hi. Is there a way to know when an object has become weakly reachable? Right now I'm holding a WeakReference to my object and checking every 100 ms if get() returns null. Is there a better way? Jun 27 07:29:44 using finalize() doesn't help as that gets called when the object is Garbage Collected, which can be a long time after it has become weakly reachable Jun 27 07:31:57 WeakReference will hold if object has no strong references and after that gc will kick in Jun 27 07:32:04 it may stay for a while Jun 27 07:33:21 I think you're looking at it in the wrong way Jun 27 07:33:35 WeakReference is for when it'll be nice to have the reference if needed Jun 27 07:33:44 not what you're trying to do from what it reads Jun 27 07:33:55 manixrock: what are you holding a reference to? Jun 27 07:34:23 also, probably having an interface to react to lifecycle events on the referenced object are probably a good idea Jun 27 07:35:33 @thepoosh I have a wrapper class for a GPU Texture, and I want to delete the GPU texture when it's no longer needed. The sooner the better Jun 27 07:35:57 but when is it unneeded? when it's strong-reference count becomes 0 right? Jun 27 07:35:59 ok, so why not react to lifecycle events in the parent? Jun 27 07:36:24 manixrock, that sounds like you're doing something awfully terrible :/ Jun 27 07:36:25 where is that TextureView? Jun 27 07:36:30 +1 Jun 27 07:37:28 @thepoosh I googled "java lifecycle events" but nothing came up about calling a method when an object becomes weakly-reachable Jun 27 07:37:35 manixrock: that is usually where youd use phantomref and not weakref Jun 27 07:37:57 There's also no concept like "weakly reachable" Jun 27 07:37:58 but theres no way to clear it faster than finalize - thats just how gc works Jun 27 07:38:10 if you need faster clearing then close it explicitly Jun 27 07:39:05 the reference is wither there or not, depending on what's the status and type of reference Jun 27 07:39:06 yawkat: but how can I close it explicitly when the only way to to know for sure it's no longer used is to keep a usage cont myself, so basically reimplement the Garbage Collector object pointer thing in my ap Jun 27 07:39:19 usage count* Jun 27 07:39:20 you should not be trying to do the GC work Jun 27 07:39:27 this ain't no cpp Jun 27 07:39:31 manixrock, there is no other way Jun 27 07:39:36 Java GC isn't reference counted Jun 27 07:39:42 or "usage counted" as you say Jun 27 07:39:44 in any case, have a reference while you need it and release it when you don't Jun 27 07:39:45 It's Mark & Sweep Jun 27 07:40:04 manixrock, so yes, you'll have to do reference counting if your application architecture demands that Jun 27 07:41:58 Mavrik: that's what I thought. So right now I'm using a WeakReference and checking every 100ms for when it becomes null. So now when a GPUTexture object is no longer used in one place I just call System.gc() which makes the WeakReference null if it's no longer used, which is exactly what I need with minimal coding Jun 27 07:42:15 that is not a good approach Jun 27 07:42:21 yawkat: why not? Jun 27 07:42:44 because it is not performant, not reliable and non-obvious. Jun 27 07:42:45 because you should react to changes in the lifecycle and not in the reference Jun 27 07:42:49 manixrock, what exactly are you trying to achieve by checking weak reference? Jun 27 07:43:01 manixrock, it'll become null only when GC collected the referenced object Jun 27 07:43:04 and adding a 100MS hook causes the app to context switch every 100 ms Jun 27 07:43:07 So it's the same as using a finalizer Jun 27 07:43:09 Just shit O.o Jun 27 07:43:34 It'll actually add delay to collection. Jun 27 07:43:39 yes, if you got critical resources (stuff that you want freed timely) use explicit resource management Jun 27 07:44:16 Mavrik: I'm ALSO using the finalize() method, but only as fallback. The reason I'm not using finalize() is because that gets called when the object was GC'd, which can be a LONG time after it became weakly-reachable Jun 27 07:44:29 you should never ever call finalize Jun 27 07:44:30 There is NO SUCH THING AS WEAKLY REACHABLE Jun 27 07:44:38 manixrock: it is impossible to know whether an object is weakly reachable before it is collected Jun 27 07:44:44 You're checking for GC Jun 27 07:44:48 what about weekly reachable? Jun 27 07:44:50 once a week Jun 27 07:44:57 Ashiren: oh you... Jun 27 07:45:25 manixrock: you shouldn't be doing the GC work by calling finalize, and you should become aware of the object in a different way Jun 27 07:45:25 and what thepoosh said. relying on finalize is *never* a good thing. there's literally no valid reason to use it. Jun 27 07:45:34 Mavrik: what do you mean? sure there is https://www.google.ro/search?q=java+"weakly+reachable" Jun 27 07:45:49 omg Jun 27 07:46:11 manixrock: the concept of "weakly reachable" is not something you can "check" because by the time you know an object is weakly reachable it has already been collected Jun 27 07:46:16 and finalize has been called Jun 27 07:46:19 thepoosh: I'm not calling finalize() myself, just overwriting it to call my own methods Jun 27 07:46:27 “The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.” Jun 27 07:46:27 x_x Jun 27 07:46:32 https://developer.android.com/reference/java/lang/Object.html#finalize() Jun 27 07:46:40 manixrock: you are doing it wrong Jun 27 07:46:46 change your sinful ways Jun 27 07:46:48 and repent Jun 27 07:46:58 thepoosh: that quote from the docs is irrelevant though. Jun 27 07:47:17 yawkat: well that's fine too. It's GOOD but not CRITICAL to have it called as soon as possible. Jun 27 07:47:21 true, I was looking for something else and half assed read Jun 27 07:47:21 manixrock, WeakReference.get() will be null only after the object has been collected, so your "weakly reachable" check really checks for GC of the object. Jun 27 07:47:30 manixrock: it will not be called sooner than gc - your solution sucks Jun 27 07:48:27 btw, if you're going to go with your bad solution of overriding finalize you should do it in the referencing object and clean up the Texture Jun 27 07:48:35 and not the other way around Jun 27 07:48:59 but still, it shouldn't be in filalize but in a regular lifecycle event such as onDestroy or onStop Jun 27 07:49:49 Mavrik: again, whether it's weakly-reference or has been GC'd completely are both fine. I no longer use the object, I simply want to know when it's no longer useable in the application so I can free GPU resources (for which I don't need the object itself) Jun 27 07:50:05 I know :) Jun 27 07:50:10 http://stackoverflow.com/a/28906/1056359 Jun 27 07:50:17 You can't know that by using JVM resource system, because of how GC works. Jun 27 07:50:30 It's possible in languages that use reference counting, but not in languages that use M&S like GC Jun 27 07:50:44 So you'll have to implement your own refcounting (or use C++ or find a library for it) Jun 27 07:51:14 netty solves this exact problem by reference counting too Jun 27 07:51:39 though for pooled off-memory buffers, not for textures Jun 27 07:51:42 thepoosh: I don't want to wait until onStop() or onDestroy() are called, it could be hours before those user-dependent methods get called Jun 27 07:51:57 wat Jun 27 07:52:36 thepoosh: again, I'm not calling finalize() myself, only overriding it Jun 27 07:53:07 as I said, you should not be relying on it, and if you are it should be in the referenced object to clean up it's child objects Jun 27 07:53:25 relying on finalize is always a bad solution Jun 27 07:53:37 always meaning also for experienced users Jun 27 07:53:53 this isnt a guideline that applies to most cases, it applies to *all* cases Jun 27 07:54:14 * thepoosh agrees Jun 27 07:55:08 effective java even has a chapter on this - if youre relying on finalization behaviour outside debugging, youre doing something wrong Jun 27 07:55:17 and weak ref checking is no better than finalizers Jun 27 07:56:28 Mavrik: GC is Mark&Sweep I know, but in my tests calling WeakReference.get() returns null, while finalize() hasn't been called yet. After 10 SECONDS I force a manual GC and only THEN does it call finalize() Jun 27 07:56:57 my method detects weak-reachability far faster than relying on finalize() alone Jun 27 07:57:04 do not rely on either behavior Jun 27 07:57:21 manixrock: what are you trying to achieve by that cannot be achieved by listening to normal events? Jun 27 07:57:28 it is certainly vm-specific, and may be device-specific Jun 27 07:57:30 and for the love of god dont call System.gc Jun 27 07:57:38 :D Jun 27 07:57:39 youre seriously fucking up Jun 27 07:59:06 yawkat: I know calling System.gc() is generally really bad practice. But my app uses almost no CPU memory itself, only wrappers for huge GPU objects. I don't really care about java performance Jun 27 07:59:10 if you think you have an excuse to rely on System.gc, weak ref or finalize behavior you are wrong and your code sucks Jun 27 07:59:22 no excuses - dont do it Jun 27 07:59:44 +1 Jun 27 07:59:54 and dont expect sensible improvement suggestions if you do something so blatantly wrong as that Jun 27 08:00:13 there is no way to fix this kind of logic - dont do it, use proper resource management Jun 27 08:00:25 your current approach is broken by design. Jun 27 08:00:26 eyyyy Jun 27 08:00:31 thepoosh: I'm trying to create GPU textures, and use them all over the place in my java code. But at some point when they are no longer used I want to free them. The sooner the better. Jun 27 08:00:50 then you should figure your shit out Jun 27 08:01:05 manixrock: whats stopping you from using automatic resource management such as try-with-resources or lomboks @Cleanup? Jun 27 08:01:20 do your textures ever leave a thread-local scope? Jun 27 08:01:35 if no: use ARM. if yes: use ref counting. Jun 27 08:02:02 But how do I detect when they're no longer used? So I create a dummy java object which gets used in my code. Then I detect when it's no longer being used by checking a WeakReference to it every 100ms, which when its get() returns null I know I can release the GPU resource Jun 27 08:02:32 no, this logic is broken. Jun 27 08:02:53 manixrock: try (MyTexture texture = openTexture("bla")) {} Jun 27 08:03:00 yawkat: try-with-resources only works for small bits of code. my GPUTexture object may be defined in some place, used in 20 different places at different points in time. Jun 27 08:03:09 ah okay. then use ref counting. Jun 27 08:03:31 increment ref counting at the start of that thread-local area where you use the texture, and decrement when youre done. Jun 27 08:04:03 in java there is unfortunately no alternative to that. Jun 27 08:04:28 yawkat: I always have to use the GL thread for those yes. So I use static-defined Runnables as callbacks from other threads so my code runs in the proper thread.. standard GL operations Jun 27 08:06:16 yawkat: ref counting is of course one option I've considered, but if I ever miscount it's trouble. But if I use the native GC and check with a WeakReference like I'm doing now it will work 100% of the time, with the only downside being that it's not instant but has a small delay which is FINE. Jun 27 08:06:30 gc will not work 100% of the time Jun 27 08:06:52 if you have a finite resource that is not memory, general-purpose gc like you get on general-purpose vms is unsuited for managing it Jun 27 08:06:54 yawkat: it won't. But even if it delays for 10 minutes it's also acceptable Jun 27 08:07:09 regional GC is a different story but android does not have a regional GC Jun 27 08:07:32 neither does hotspot for that matter. Jun 27 08:07:36 I've tested on several Android devices and versions 4.0.x-6.0.x and they work fine with my implementation. Jun 27 08:07:45 they work fine by accident. Jun 27 08:09:12 yawkat: if it works by accident, is there any way to test when it will not work? Jun 27 08:09:17 Your solution will work for specific work loads on specific vms on specific devices, but it will never work generally. Jun 27 08:10:36 yawkat: well I can (sorta) test that. I'll test on multiple different Android devices and see if it fails working on any. brb Jun 27 08:10:44 no, you cant. Jun 27 08:10:47 I tested only on 3 so far Jun 27 08:10:50 it will *never* work generally. Jun 27 08:11:01 because the GC does not manage GPU resources. Jun 27 08:11:10 as i said, broken by design. Jun 27 08:11:26 that's like relying on barrier behavior of classes for jvm concurrency. broken. Jun 27 08:12:02 and thats not even mentioning the performance penalty. Jun 27 08:13:18 java performance is not that important to my app Jun 27 08:13:27 sure. Jun 27 08:21:48 manixrock: note that finalizers are a great way to *test* ref counting. ref count should be 0 at collection time. Jun 27 08:21:54 but this is only for debugging purposes. Jun 27 08:25:41 yep Jun 27 08:32:01 oh, and i might come off a bit harsh about this, but that's because this kind of code will lead to unpredictale, unexpected bugs that are impossible to reproduce Jun 27 08:32:18 and i have seen these issues and have had to debug them Jun 27 08:33:50 tested on 9 devices (some old some really new), and they all detected the weak-reference within 100ms of it becoming unused Jun 27 08:34:39 yawkat: I agree. That's why I'm trying to get other opinions before choosing this path. Jun 27 08:35:12 manixrock: the problem is that youre relying on unspecified behavior, behavior that is actively exploited by vms Jun 27 08:35:40 you may not be able to reproduce it and thats the whole issue - when it breaks, and it will, you will be unable to find the issue and fix it Jun 27 08:36:11 my problem with manual usage/reference counting is it's almost impossible to do right. My object or texture-id may be used in other classes, passed as parameters then used at later points in time in Runnable callbacks, and a million other such things. Only the GC knows all these usages 100% correctly. Jun 27 08:36:33 ref counting is cumbersome but it isnt that hard to get right Jun 27 08:36:47 and you can still use finalizers to debug the ref counters Jun 27 08:37:08 yawkat: I think it's almost impossible to get right for all cases. Jun 27 08:37:56 No, actually it's not. But the fact that you're passing these things around async code and runnables show you have an architecture problem. Jun 27 08:38:12 manixrock: i disagree Jun 27 08:38:17 example: I pass my texture-object as a parameter to a method, which calls 10 other methods, several of which spawn a thread which uses the passed texture-object to draw on the scene. How do I do reference count here? Jun 27 08:38:21 And I think this is the point we keep returning to - you kinda didn't architect your application around the limitations of JVM and now keep hitting barriers :/ Jun 27 08:38:33 i have implemented applications using netty ref counting with great success Jun 27 08:38:47 and complex applications with complex data flows at that Jun 27 08:39:46 it takes a while to get used to, but if you structure your application sensibly it is a very managable solution Jun 27 08:39:47 how do i go about storing methods in a list? i'm not sure what to google for. i have several methods with equal method signature, and want to call one depending on a certain condition. Jun 27 08:40:05 as opposed to a big if-structure Jun 27 08:40:21 xorgate: either use a switch case, or anonymous classes, or retrolambda, or reflection. Jun 27 08:40:29 in that order from good to bad. Jun 27 08:41:04 what i was thinking of is something like: Method x = hashmap.get(conditionString); x(params); Jun 27 08:41:13 but i'm not sure what the syntax would be Jun 27 08:41:38 java does not have this, at least not on android without retrolambda. Jun 27 08:41:45 That's something that will make a future you / another developer murder you in your sleep. Jun 27 08:41:54 xorgate: Map myMethods = new HashMap(); myMethods.get(conditionString).run(...); Jun 27 08:41:58 (Even though you can do that with interfaces) Jun 27 08:43:17 yawkat: netty ref counting seems interesting, but I'd rather implement my own since it doesn't avoid the main issue of when to call `buf.retain()` and release Jun 27 08:43:28 hi Jun 27 08:43:53 guys, I wonder if there is any documention on gradle-experimental build system. Jun 27 08:44:00 manixrock: well netty ref counting isnt portable to other kinds of resources anyway but it is an example of a good approach to this Jun 27 08:44:12 Mavrik: being killed in our sleep by future developers is an occupational hazard we all take Jun 27 08:44:15 hero_biz, there's not much, it's marked experimental because it's not ready for wise use Jun 27 08:44:36 I wana use its ndk support Jun 27 08:45:16 I just wanted to see what elements is supported in ndk {} tag. Jun 27 08:45:39 if there is nothing about it, cannot do anything .... Jun 27 08:46:30 Mavrik: "And I think this is the point we keep returning to - you kinda didn't architect your application around the limitations of JVM and now keep hitting barriers" -- I'd like to allow my game engine to be used in many different situations, not limit it to certain usage patterns unless I really have to Jun 27 08:47:24 and this is not a barrier for me really, I've tested it and it seems to work fine on 9+ different devices, I'm simply trying to get more opinions Jun 27 08:48:09 manixrock: gc is unfortunately limited to ram managemet, theres no way around this Jun 27 08:48:45 and if you want other people to use this thing productively you have an even greater responsibility to do it right Jun 27 08:48:59 yawkat: that's why I'm monitoring a CPU/RAM object to know when to release my GPU resources. Jun 27 08:49:19 you have no way to trigger the gc reliably Jun 27 08:49:23 "You tested it on 9+ difference devices" O.o Jun 27 08:49:54 I'm not relying on the GC triggering reliably, only eventually (30+ mins later is still fine) Jun 27 08:50:18 Well if you insist on learning why your approach is bad the hard way, go ahead :) Jun 27 08:50:30 manixrock: i am assuming that the texture resource thing is a limited resource here Jun 27 08:51:01 Mavrik: since I'll probably be the one working on it in the future, hope future me won't travel back in time to murder current me. :) Jun 27 08:51:27 yawkat: what do you mean by "limited resource" ? Jun 27 08:51:47 something like file descriptors, video ram etc Jun 27 08:52:36 are we still talking about finalize? Jun 27 08:52:59 yawkat: when I create a GPU texture I get an `int` back (the GL Context-specific texture-id), which I store in my (wrapper) GpuTexture class, which I monitor for weak-referencability Jun 27 08:53:37 manixrock: yes, this is a finite resource Jun 27 08:53:49 you cannot allocate an infinite amount of textures Jun 27 08:53:56 yawkat: yep Jun 27 08:54:13 and that is why you need to manage it Jun 27 08:54:17 arent u sunbathing in eilat thepoosh Jun 27 08:54:27 raoul11: tomorrow Jun 27 08:54:38 just found out my father in-law is there :( Jun 27 08:54:52 free meals on his behalf? Jun 27 08:55:18 manixrock: it sounds to me like you want justification for your current approach, not actual opinions - you still insist on doing this gc-based even though everyone is saying it is bad design Jun 27 08:56:35 yawkat: I'm not set one way or the other. I'll simply start with my approach while keeping in mind all that was said here, and will change to manual ref counting (hellish) as soon as a problem appears Jun 27 08:57:07 you overestimate the overhead of ref counting Jun 27 08:57:24 try it, really try it for a while, and see how easy it is when you are used to it Jun 27 08:57:47 yawkat: I have used it on previous projects, that's why I'm so averse to it. Jun 27 08:58:22 hm okay. but there is no better solution Jun 27 08:58:29 raoul11: who knows Jun 27 09:01:49 if I have a Person which has pointer to Weapon which has pointer to DrawCache object which uses GpuTexture, and Weapon is removed, can I decrease ref count? Is Weapon still used elsewhere? what about DrawCache? what about GpuTexture? I have to add ref counting to the whole hierarchy and hope it never miscounts (even with testing) Jun 27 09:02:10 and miscounting in production is virtually impossible to reproduce Jun 27 09:02:38 you decrement the ref count when you release the weapon Jun 27 09:02:54 I feel so confused Jun 27 09:03:06 why are we discussing ref counting in a java channel? Jun 27 09:03:16 is this cpp? Jun 27 09:03:24 though a drawcache sounds like something that should manage the resources itself, for example with a limit of x textures Jun 27 09:03:40 and not to mention this limits me to not using objects without ref counting like parameters to methods with delayed usage, the list goes on :) Jun 27 09:04:16 manixrock: these arent exactly hard problems to solve... ref counting is easy Jun 27 09:04:47 a delayed task? sure, retain the resource on schedule and release on completion. easy Jun 27 09:05:28 passing to a method? document a calling convention like guaranteeing that a resource is retained during method runtime and make the callee retain if needed Jun 27 09:05:46 sure, you have to keep it in mind but it is far from hard Jun 27 09:07:00 when you get object state keeping references like that it gets more complex sure, because those wrappers often have to become ref counted as well, but if you learn to avoid those cases (they are never necessary!) it's fine Jun 27 09:08:45 by state i mean mutable state. Jun 27 09:09:52 yep Jun 27 09:10:48 you can take your ideas from other languages like c++. memory-gc does not provide a better solution to this problem Jun 27 09:13:00 sorry, general-purpose memory gc. there are other approaches but not on android or hotspot. Jun 27 09:26:29 thepoosh, even google recommends ref counting in Java in some guides ;) Jun 27 09:29:18 <_0xbadc0de> hello Jun 27 09:29:29 <_0xbadc0de> how can I add a certain lib to my project Jun 27 09:29:43 <_0xbadc0de> trying to use sqlcipher w/ Android Studio Jun 27 09:36:39 _0xbadc0de: add it in build.gradle Jun 27 09:53:09 Mavrik: I'll just say that those guides never mention WeakReference counting Jun 27 10:23:40 When you use firebase with your app do you have to use Aword and admod or is there a differnt way i can get use to my app? Jun 27 10:25:05 I hope someone can help me:) Jun 27 10:27:09 <_0xbadc0de> okay Jun 27 10:27:12 <_0xbadc0de> I think I nailed it Jun 27 10:27:17 <_0xbadc0de> in addition Jun 27 10:29:41 What could cause a crash in /system/lib64/libinput.so (android::PointerCoords::getAxisValue(int) const+28) ? (SEGV_MAPERR), fault addr 0x0 Jun 27 10:30:26 I'm just doing a AMotionEvent_getX(event, i) where i < AMotionEvent_getPointerCount(event) Jun 27 10:31:27 ESphynx: Did the loop crash fix? Jun 27 10:31:58 <_0xbadc0de> okay I have a project that uses both SQLite and SQLite cipher Jun 27 10:32:26 <_0xbadc0de> but they both use SQLiteDatabase Jun 27 10:32:30 Hey how everyone doing? Jun 27 10:32:44 <_0xbadc0de> is there a way to encapsulate SQLiteDatabase form SQLcipher so that names dont colide Jun 27 10:32:52 <_0xbadc0de> such as with namespace for cpp» Jun 27 10:32:53 <_0xbadc0de> ? Jun 27 10:33:34 purplex88: figured out what that was !! we were trashing the stack! Jun 27 10:33:56 ESphynx: recursion? Jun 27 10:34:06 purplex88 no not even. just writing past a local array. Jun 27 10:34:15 ahh Jun 27 10:34:22 <_0xbadc0de> armv7 makes few stack use afaik Jun 27 10:34:30 I thought it was global variable assignment Jun 27 10:34:44 So it happened somewhere else Jun 27 10:34:51 purplex88: I thought so too. but apparently th optimized code was giving a confusing location Jun 27 10:35:24 purplex88: Now I'm trying to figure out why I get these random crashes in libinput.so :S Jun 27 10:35:47 Ah, right optimization + debug doesn't give a correct location in my experience Jun 27 10:36:02 right Jun 27 10:41:15 <_0xbadc0de> guys Jun 27 10:41:17 <_0xbadc0de> plz help» Jun 27 10:41:18 <_0xbadc0de> ? Jun 27 10:41:43 _0xbadc0de: SQLite / SQLiteCipher are in C not C++ iirc? Jun 27 10:41:55 <_0xbadc0de> there is an Android Studio version Jun 27 10:42:00 no namespaces in C++.... you could use som #define's Jun 27 10:42:16 <_0xbadc0de> wut?? Jun 27 10:42:25 in C Jun 27 10:42:26 <_0xbadc0de> listen my problem is that they both use the same class Jun 27 10:42:39 <_0xbadc0de> SQLiteDatabase Jun 27 10:42:49 <_0xbadc0de> and I want to use both in my code! Jun 27 10:43:15 <_0xbadc0de> maybe I should make a new class that wraps the functionality of SQLiteDatabase in the case of SQLcipher Jun 27 10:43:48 _0xbadc0de: so use different instances? Jun 27 10:44:25 <_0xbadc0de> SQLiteDatabase db = <...> Jun 27 10:44:45 <_0xbadc0de> how can android studio decide if its the variable from import android.database.sqlite.SQLiteDatabase Jun 27 10:44:58 what? Jun 27 10:45:09 ooooh i think i get it. Jun 27 10:45:10 <_0xbadc0de> or the one from import net.sqlcipher.database.SQLiteDatabase; Jun 27 10:45:15 so use the fully qualified name Jun 27 10:45:27 you dont have to import anything. Jun 27 10:45:43 <_0xbadc0de> like android.database.sqlite.SQLiteDatabase db = <....> smth? Jun 27 10:45:49 try it Jun 27 10:46:20 <_0xbadc0de> okay and to make things smoother can't I use something like a define Jun 27 10:46:44 no Jun 27 10:46:47 <_0xbadc0de> #define PlainTextSQLiteDatabase android.database.sqlite.SQLiteDatabase Jun 27 10:46:53 <_0xbadc0de> ho >_> Jun 27 10:55:41 perlsyntax: what was you firebase question? Jun 27 11:02:00 thanks Jun 27 11:03:14 My firebase Question was can i use firebase without use Amod? Jun 27 11:04:08 thepoosh,I was not sure if i can use firebase without Admod and get more usrs. Jun 27 11:04:26 one has nothing to do with the other Jun 27 11:04:33 firebase has no ad support Jun 27 11:05:25 thepoosh,Thanks i try to find away to get more usr without useing ads. Jun 27 11:05:50 I don't know where i read that maybe a miss understanding.:) Jun 27 11:05:54 well, you can get users by being good at what you do and promote organic growth Jun 27 11:06:02 try using AppInvites Jun 27 11:06:12 which is part of firebase or at least gms Jun 27 11:06:53 thepoosh,I was watching some video on firebase. Jun 27 11:07:01 and? Jun 27 11:07:08 I feel like a newbie. Jun 27 11:07:28 thepoosh,I really like it.:) Jun 27 11:07:47 I've been messing around with it for the past 4.5 months Jun 27 11:07:52 so AMA Jun 27 11:08:28 thepoosh,The part i like it free.:) Jun 27 11:10:18 thepoosh,Thanks you save me some time. Jun 27 11:10:28 np Jun 27 11:11:45 guys, I have a strange problem Jun 27 11:12:22 I'm using gradle for jni using grale-experimental. Jun 27 11:12:54 I am running Android Studio inside a Mint VM, but I have trouble using adb. Can I reuse the host's (windows) adb somehow? Jun 27 11:12:57 when I use sample hello-jni, it is enough to declare a native function Jun 27 11:13:21 and press create function to create proper function in c file. Jun 27 11:13:51 but when I make a soultion myself, doing same thign just makes an empty c file. Jun 27 11:13:58 any idea why this happens? Jun 27 11:15:46 the only difference is that I have not declared native funtions in main activity, and using a seprate class for them. Jun 27 11:15:51 thepoosh,One more question do i need finsh my android app to setup my firebase?Sorry sound like a newbie. Jun 27 11:16:52 in order to use it you need to add an app and download the play-services.json file Jun 27 11:17:54 thepoosh,Thanks i think i finsh my app then before i add it.:) Jun 27 11:23:34 any idea? Jun 27 11:31:19 lol solved my problem idiotically.... Jun 27 11:31:51 when I declared 1st function, other functions get declared with no problem. Jun 27 11:31:56 probably a bug. Jun 27 11:33:00 Hi :). I need to get some analytics for my app - for example what buttons people press and when (we're doing research and need to understand how patients use the app). Any suggestions? Jun 27 11:33:12 Was thinking of perhaps using uxcam or something but it's not 100% reliable Jun 27 11:33:18 or building something myself to simply record actions taken Jun 27 11:33:36 and then perhaps record it as a macr :D Jun 27 11:35:24 Why can't I see my debuggable process under the devices in the DDMS? Jun 27 11:41:19 I got android:debuggable="true" in my manifest :( Jun 27 12:01:03 ad SDK 1.8 https://developer.android.com/preview/setup-sdk.html#java8 Jun 27 12:01:29 is it ok to install it and set it in AS, when I was programming my project on 1.7 ? Jun 27 12:03:19 is there an equivalent of ANR in ios? Jun 27 12:03:46 ios is perfect, no such thing as ANR Jun 27 12:03:56 INR? Jun 27 12:05:28 indian rupee? Jun 27 12:06:56 Ashiren https://developer.apple.com/library/ios/qa/qa1693/_index.html Jun 27 12:07:49 ha! so they fail too Jun 27 12:08:43 never Jun 27 12:09:12 https://developer.apple.com/library/ios/technotes/tn2151/_index.html Jun 27 12:13:24 good day. I have a question, I am doing encryption and decryption of string, part of the encryption and decryption function is the keypassword. if they say that they can disassemble the android package, will they be able to see what keypassword I use to encrypt so they can decrypt it ? Jun 27 12:13:56 rommel092079, if you save your key in the apk - yes Jun 27 12:14:50 what exactly do you want to encrypt? Jun 27 12:15:34 rommel092079, yes. Jun 27 12:15:58 I am using mysql connector to connect to mysql database. so I am trying to encrypt the connection string and decrypt it upon use. Jun 27 12:16:24 I know i read its better to use rest api, but I am comfortable to direct connection. Jun 27 12:16:28 here they wouldnt even need to decrypt it, just open up wireshark :E Jun 27 12:16:56 oh yeah. i forgot about that too. Jun 27 12:17:40 thanks for reminding me that. Jun 27 12:17:57 That's horrible in so many levels. Jun 27 12:21:44 Hey all, is there a way to see the duty cycle of the phone due to an application running? Jun 27 12:21:59 wat Jun 27 12:22:18 To find out which actions of the application is consuming how much power? Jun 27 12:24:40 your network calls Jun 27 12:24:47 and wakelocks Jun 27 12:24:55 that's pretty much it Jun 27 12:26:17 is there a way of reducing how much power the device consumes when in sleep mode? Jun 27 12:29:25 yes, only wake up if needed Jun 27 12:43:11 thepoosh: But the baseline power consumed in sleep mode can that be controlled? Jun 27 12:43:24 thepoosh: Using an application I mean Jun 27 12:44:39 no Jun 27 12:44:46 in deep sleep mode android suspends threads, counters and whatnot Jun 27 12:44:57 you can control how much power you consume by doing only what's needed Jun 27 12:45:00 the code is being executed while being awake Jun 27 12:46:04 it's like you're trying to overoptimize instead of writing good code Jun 27 12:46:59 So I presume changing the power consumption during sleep mode will be something looked after by the kernel and not the application layer? Jun 27 12:47:54 thepoosh: Firstly I am trying to bring what ever optimization I can using the application layer and then trying to preculate down Jun 27 12:48:24 shouldn't Uri.parse() take care of whitespaces on the given url ? Jun 27 12:49:29 DownloadManager is failing me on requests that include whitespaces in the uri request Jun 27 12:49:51 why would it take care of that? Jun 27 12:50:35 isnt it that part of the RFC 2396 ? Jun 27 12:51:12 ah, so it is. Jun 27 12:51:41 parse(String uriString) Jun 27 12:51:41 Creates a Uri which parses the given encoded URI string. Jun 27 12:52:25 so, what is the appropiate thing to do to a give string to become a valid Uri.parse() value ? Jun 27 12:52:33 s/give/given/ Jun 27 12:52:39 mz|alex: no, you should be compliant: https://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String) Jun 27 12:53:15 mz|alex: could try parsing with java.net.URI Jun 27 12:53:16 thepoosh ohhh! you're right, I thought the parse would make it rfc 2396 compliant!! Jun 27 12:53:37 of course I'm right, I linked to the docs Jun 27 12:53:42 what about URLEncoder.encode() Jun 27 12:53:52 thepoosh I was too, but mis-interpreted the rfc part Jun 27 12:54:12 well, read the method documentation and if needed also the source Jun 27 12:54:14 :P Jun 27 12:54:40 :) Jun 27 12:55:34 Ashiren I thikn the URLEncoder.encode() convets whitespaces to Jun 27 12:55:36 to + Jun 27 12:56:25 I'll try the java.net.URI to see how it goes Jun 27 13:17:08 one more question, does the phone go back to sleep as long as wakelock is released? Jun 27 13:19:06 you mean as soon? Jun 27 13:19:09 its not guaranteed Jun 27 13:21:28 it goes to sleep when the OS tells it to Jun 27 13:21:34 and you don't control it Jun 27 13:36:40 When trying to find a bug, and someone gives you a fairly large set of steps, like do x do y do z, and you get a crash. When in reality I just do z and I get a crash. What is the proper way to express that to a tester? I'm looking for the "lowest common denominator", "least common factors" etc? Has anyone come across this... or just me? Jun 27 13:38:03 eghdk I guess it's not an experimented tester if you have to explain that, ask him to isolate the cause Jun 27 13:39:25 a good tester is really hard to get Jun 27 13:39:35 Yeah, I've tried saying to lower the scope, or "hone in on the actual issue", but sometimes it's just ridiculous. It's like do this on 4 devices and you'll see that your account doesn't sync properly. Okay, so did you try 2 devices? That type of stuff mz|alex . Just getting frusterated. Maybe they're not cut out for this... Jun 27 13:39:41 Hello huys, Can somebody prompt an android application on github, that I can use like a guide? I don't mean a simple applciation or newbies guide... Jun 27 13:40:32 eghdk I feel your pain, it allways feel the other side does the bare minimum Jun 27 13:44:33 THis websocket client lib has been recommended in a few articles Jun 27 13:44:51 however it has not seen any love for almost 1 year now: https://github.com/crossbario/autobahn-android/graphs/contributors Jun 27 13:45:23 doesnt support wss and it's not even on maven Jun 27 13:45:37 I wonder what ppl are using for Android websockets :-( Jun 27 13:49:49 :o Jun 27 13:52:30 :/ Jun 27 13:53:08 at work were using TooTallNate Java-WebSocket, it seems older, yet we dont complain ~ Jun 27 13:56:27 Ashiren, thanks. what kind of app? Jun 27 13:57:15 a news reader Jun 27 13:57:24 but we use websockets only minority Jun 27 13:59:50 found this very useful stack overflow answer: Jun 27 13:59:51 http://stackoverflow.com/questions/30547517/which-websocket-library-to-use-in-android-app?lq=1 Jun 27 14:00:17 this guy basically covers evrything under the sun. wow Jun 27 14:00:35 hey, i'm using android publisher api to query subscription status. i have made purchases on test account (subscription should recur daily), but startTimeMillis and expiryTimeMillis differ by 26 hours! it looks like timezone issue (UTC <-> Poland) Jun 27 14:00:39 anyone experienced this? Jun 27 14:01:08 these are exact timestamps i received: start = 1467021045488, expiry = 1467114632988 Jun 27 14:01:26 is there anything i am missing? Jun 27 14:02:44 Hmm even with root I can't seem to see my native heap :S Jun 27 14:02:46 just move to Greewich Jun 27 14:02:54 just kidding ;) Jun 27 14:03:41 well, as long as we are testing this in Poland this isnt that bad, but when USA users will start using it... its half a day Jun 27 14:03:53 looks like google isnt sure when epoch happened Jun 27 14:04:09 or test subscriptions recur every 26 hours actually Jun 27 14:05:44 hi guys Jun 27 14:05:55 how does adb forward work? Jun 27 14:06:33 what does it do? Jun 27 14:07:05 the reboot command hangs infinetely. it is not coming out of the setproperty call. how can i debug the property system? Jun 27 14:18:00 Hi, if i killed the adb server, should the authorization popup on my device still pop up when I plug my phone in? Jun 27 14:18:56 trying to fix my device showing up as offline in adb and wonder if maybe some other tool hooks before my adb on my computer. e.g. VisualStudio Jun 27 14:20:09 i bet it would be fixed with a restart, but I have this problem again and again Jun 27 14:22:40 anotheryou: killing the adb-server wont, but if you cancel/reset usb approved debugging devices should launch the authorization popup again Jun 27 14:23:07 How can I have a heirarcy of data inside a recyclerview? Jun 27 14:23:23 Where clicking an item will hide its children Jun 27 14:23:24 ? Jun 27 14:23:26 if you have a running VM, check that it doesnt hook yer phone Jun 27 14:23:44 raoul11, yes, popup show imideately. but device in adb still shows as offline Jun 27 14:24:26 any active VM? Jun 27 14:24:30 no Jun 27 14:25:46 is the device listed? Jun 27 14:26:25 List of devices attached: TA93003CKP offline Jun 27 14:26:46 can you axx the device with a file explorer? Jun 27 14:27:28 access with explorer? yes (I'm on windows) Jun 27 14:27:37 could be some usb port issue, maybe try switichin to another? Jun 27 14:28:06 also, usb3/usb2 issue Jun 27 14:29:26 have only usb3, but in general it worked, no mater which port Jun 27 14:29:44 but every now and than it refuses again Jun 27 14:30:10 guys, looking to build an app that would extract text (OCR) based on a template picture (DL, IDCARD) from the camera and populate a database (local or otherwise) Jun 27 14:30:28 is there any library I could use that would make it possible Jun 27 14:30:39 like for instance opencv for face recognition and such Jun 27 14:31:31 raoul11, I'll restart without touching the cable to verify it's a software issue Jun 27 14:35:07 Blinx, you could use opencv Jun 27 14:36:28 pfn, I used it before and it is based on the CUDA architecture, no such thing on android Jun 27 14:36:45 openCL I mean Jun 27 14:38:24 JFlash: I believe OkHttp supports websockets out of the box. JakeWharton would know better though. Jun 27 14:38:45 eghdk thanks Jun 27 14:38:54 Is it possible to create an android app that will prevent other apps from accessing the network? Jun 27 14:39:12 eghdk, I did see an okhttp-ws repo from them on github, but it was marked as experimental Jun 27 14:39:21 eghdk, have you heard about Ion? Jun 27 14:39:25 eghdk, https://github.com/koush/ion/issues Jun 27 14:39:55 Blinx, false Jun 27 14:40:06 from my research so far this is the project with most user activity around it right now Jun 27 14:40:06 Oh, opencl, opencv is fine Jun 27 14:40:40 JFlash: Yeah I've used ion but for ws I've been using okhttp. No issues so far. But I don't use it a crazy amount. Jun 27 14:40:50 raoul11, outdated adb.exe. new one fixed it :) Jun 27 14:40:56 thx for the help Jun 27 14:41:19 eghdk, cool. checking okttp right now Jun 27 14:42:01 "What does Square use for Websockets on Android?" Jun 27 14:42:18 "We don't use WebSockets at this time." - JakeWharton Jun 27 14:42:22 lol! Jun 27 14:42:30 this was back in 2014 thou :) Jun 27 14:46:35 thepoosh lol, yeah saw that /r/ thread Jun 27 14:50:04 pfn, will try it, which is why I gave it as example, point I was trying to make is that I have no OpenCL support to enable hardware acceleration on it Jun 27 14:50:34 but I thought you guys might have some other ideas to compare with Jun 27 14:50:49 I'd be using JavaCV which is a wrapper of OpenCV Jun 27 14:51:37 g00s: that made me sad Jun 27 14:51:48 Blinx, works fine regardless Jun 27 14:52:11 don't need opencl for decent performance of image recognition of Jun 27 14:52:47 pfn, thought so too, I needed it for face recognition, sync every frame needs it badly Jun 27 14:52:54 but on picture I might not need it Jun 27 14:53:26 pfn, thanks a bunch, is less than I had :"> Jun 27 14:53:54 face recognition doesn't need it. badly Jun 27 14:54:17 cascade classifiers run fine on cpu Jun 27 14:55:40 well, I used it for video face recognition and the boost was there, but hey, maybe my implementation could have been better Jun 27 14:56:17 thanks, again Jun 27 14:56:54 JakeWharton, just posted this: https://github.com/square/okhttp/issues/2670 Jun 27 14:59:45 nice, finally got that uri parsing spaces correctly Jun 27 14:59:48 http://hastebin.com/ilatuweyon.avrasm Jun 27 15:01:11 it's not beauty, but it works Jun 27 15:05:34 Notice that after you select it, you have the option to click on ... to give you Jun 27 15:05:35 more options. Click on ... and scroll to the bottom of the list of options. These Jun 27 15:05:36 are all the image files that we can display in this ImageView Jun 27 15:05:39 i can’t find … Jun 27 15:05:45 what is … Jun 27 15:07:15 JakeWharton, I find it interesting that even tiny projects in javascript-land have a gitter or slack community chat... and a huge undertaking with millions of active users like okhttp doesn't have it... or does it? Jun 27 15:08:04 what is ‘…’? help me Jun 27 15:08:08 plz Jun 27 15:08:13 :| Jun 27 15:08:22 three dots Jun 27 15:08:28 yeah Jun 27 15:08:33 in the imageview Jun 27 15:09:04 dunno Jun 27 15:09:09 lol Jun 27 15:09:11 screenshot? Jun 27 15:09:28 pastebin? Jun 27 15:10:59 http://imgur.com/a/j4s9i JFlash Jun 27 15:11:09 morning all Jun 27 15:14:45 mimtf, this is some kind of button that android studio creates Jun 27 15:15:03 lol Jun 27 15:15:07 strange Jun 27 15:15:22 mimtf, in google chrome.. when a node or js code is very long it will not display fully Jun 27 15:15:36 you have to click on a (...) to open it and drill down more Jun 27 15:15:41 it must be something similar Jun 27 15:15:44 where? Jun 27 15:16:01 I dont use the design view at all.. so I dont have further details Jun 27 15:17:59 then what use? Jun 27 15:18:11 Xcode? Jun 27 15:18:19 what you use? Jun 27 15:19:46 JFlash: Jun 27 15:19:47 ? Jun 27 15:22:05 no I use android studio but code the xml by hand, most ppl do this Jun 27 15:22:33 few ppl use the design view in Android studio because it's clunky Jun 27 15:24:04 ok Jun 27 15:24:14 JFlash: anyway you make android game app? Jun 27 15:32:06 mimtf, I worked with game development for a few years, but in Android I havent dont any games in my job. we only do apps there Jun 27 15:32:49 im trying to import an existing android app to android studio and i get two gradle project data to import from one project. I'm not sure which one I want. what does the :app module do and why does it show up? Jun 27 15:32:50 apps? apps include game app? Jun 27 15:32:55 JFlash: Jun 27 15:34:14 kvikende, :app module is what actually has app sources Jun 27 15:34:27 kvikende, default android studio setup creates a multi-project build Jun 27 15:37:28 okay i think i understand Jun 27 15:38:11 mimtf, no I developed many games using other languages for Android but not using native Android SDK with Java Jun 27 15:38:51 i will die because i have no money to buy food. Jun 27 15:38:56 mimtf, here's an example of a game I made with over 1 million users http://www.appdownloader.net/Android/App/1232198/air.br.com.youthlab.pollyville Jun 27 15:39:20 so i want to earn money with android app, but i have no skill yet. so you can give me one? Jun 27 15:39:22 JFlash: Jun 27 15:39:30 put your shit on 1 line Jun 27 15:39:49 pfn: what you mean? Jun 27 15:40:01 like you just did Jun 27 15:40:19 you can give me pollyville? Jun 27 15:40:26 lol Jun 27 15:40:33 mimtf, yeah, usually evry twice or 3 times per week we have ppl come in here saying that they need help because they have no money to buy food Jun 27 15:40:50 lol Jun 27 15:41:30 mimtf, after a few years we eventually figured out the usually are in very fast connections... and use powerful computers... but somehow they "can't afford food" Jun 27 15:42:21 i don’t know what you mean? Jun 27 15:42:23 mimtf, most ppl in IRC have been here for 12 years or more.. so we have seem the starving developer trick before... usually more then once per week ... nice try thou :-) Jun 27 15:42:45 seem => seen* Jun 27 15:44:11 mimtf, your Mac's runnin' good ? Jun 27 15:44:29 r3v0: what you mean? Jun 27 15:48:28 I'm wondering where I can get a newer device for dev. I bought a Google Nexus 4 directly from Google a while back and just use it with WiFi, no SIM. It's been great. It seems you can no longer buy devices from Google without a contract – is that true? Jun 27 15:50:18 windsurf_, how is that relevant to android development? Jun 27 15:50:59 JFlash arguably not, but I'm wondering what a good phone is for development these days – in terms of popularity but also freedom to develop on it – as in no manufacturer or carrier restrictions Jun 27 15:51:07 and where to get it Jun 27 15:51:38 In my opinion a developer peer would be best suited to answer that question Jun 27 15:52:50 it's a fair question but you ll still have to support the most popular phones anyway.. regardless of vendor modifications Jun 27 15:53:35 windsurf_, I'm not in the US thou, so I wouldnt know :/ Jun 27 15:54:00 JFlash thx. I'm in Canada – I guess i'll just google around Jun 27 15:54:36 you could try stackover flow and mention canada on the question Jun 27 15:55:06 i havent posted many questions there but I usually get same day responses Jun 27 15:55:28 you could also try and ask in #android, which has a LOT more ppl on Jun 27 15:55:45 since this is not a developer only question Jun 27 15:56:06 windsurf_, ^ Jun 27 15:56:22 thank you, OK Jun 27 15:56:58 np. ttyl Jun 27 15:57:42 hi Jun 27 15:59:19 anyone around that might be able to assist me with a issue im having, im using php to try and send push notifications but keep getting MismatchSenderId error Jun 27 16:04:26 i have a service running, right before i stop it i .enqueue() a retrofit call to the backend. presumably the call will finish after the service is gone. is this a problem? will the service be kept alive until it's finished? or are they just unrelated? Jun 27 16:10:24 Schedulers.computation() in my tests freezes the test forever Jun 27 16:24:06 robolectric 3.1 is out Jun 27 16:24:12 what is in it Jun 27 16:24:32 oh they put up a changelog now Jun 27 16:29:33 hi all, I have a TextView that is showing a bunch of text read from a file. It is scrollable and is the only thing in my layout (LinearLayout) Jun 27 16:29:47 I've set it to focusable, focusableInTouchMode, longClickable, etabled, etc. Jun 27 16:30:15 but whenever I try to select some text, the logcat shows "TextView does not support text selection. Selection cancelled." Jun 27 16:30:43 what do I need to do to make my TextView support selection? implement a canSelectText method or something ? Jun 27 16:31:28 http://stackoverflow.com/questions/28605680/make-android-textview-or-edittext-selectable Jun 27 16:38:17 hi all, can somebody help me with a question. whats the trick to make the layout of a widget update while debugging? in my case event remove the widget and add it again to the screen does not help. i have to uninstall and reinstall the app. is there a faster way? Jun 27 16:38:59 s73v3r: yeah, I've tried all the suggestions there also Jun 27 16:39:19 I have no android:focusable="false" or android:focusableInTouchMode="false" Jun 27 16:39:41 I've tried setting layout_width to "wrap_content" rather than match_parent Jun 27 16:39:54 I've tried changing it to an EditText too, nothing seems to make a difference Jun 27 16:40:03 bug in android? Jun 27 16:40:27 I doubt it, I'm able to select text in many other applications just fine Jun 27 16:40:38 I'm doing something wrong, just have no idea what Jun 27 16:41:26 you’re also not the only one having this problem Jun 27 16:41:32 why do VectorDrawables need width/height? Jun 27 16:41:47 how else are they going to know what size to be drawn at? Jun 27 16:42:23 s73v3r, from the layout. the nice thing about vectors is, that the size is not fixed Jun 27 16:42:27 android:layout_width="fill_parent" or something Jun 27 16:43:00 but now it generates a bitmap in the resolution i write in to the file and than scales that .... Jun 27 16:43:14 i don’t think that would work, especially if they want to generate the bitmap ahead of tiem Jun 27 16:43:17 time Jun 27 16:43:55 "one bitmap cache is created for each VectorDrawable. Therefore, referring to the same VectorDrawable means sharing the same bitmap cache. If these references don't agree upon on the same size, the bitmap will be recreated and redrawn every time size is changed. " Jun 27 16:44:05 does not sound so far ahead Jun 27 16:44:28 file a bug, then Jun 27 16:44:51 I suppose it works as intended... Jun 27 16:45:00 bug/feature request Jun 27 16:45:03 s73v3r: heh, good point Jun 27 16:45:09 right :) Jun 27 16:45:19 maybe I should be using something other than TextView for now though Jun 27 16:45:35 well I will simply work arround it... don't know if there is really much need for it Jun 27 16:49:25 Is anyone familar with nestedscrollview? Jun 27 16:49:49 I have a recyclerview at the bottom of my nestedscrollview and I only want the recyclerview to scroll when the nestedscrollview has been scrolled to the bottom of the page Jun 27 16:54:45 anyone familiar with realm wanna check this out: https://stackoverflow.com/questions/38059225/realmresults-size-not-returning-expected-value Jun 27 16:59:23 hello Jun 27 16:59:54 What would you say is the "standard" organization for creating overlay tutoorials for your app? Jun 27 17:00:15 Just having an extra frame in the layout and handling it? Or making a new fragment that is tutorial only? Jun 27 17:00:37 what about those tooltip libs Jun 27 17:01:21 https://github.com/sephiroth74/android-target-tooltip Jun 27 17:03:01 hmm thats not a bad idea Jun 27 17:03:18 The screen is already so crowded though Jun 27 17:04:18 obsidian1, try not to need any. "standard" way seems to be this 50% black overlay with some hole in it to show what the text is describing... Jun 27 17:04:57 obsidian1, http://i.stack.imgur.com/MTIN6.png Jun 27 17:05:05 Yeah, thats what I was originally going for. It seems like its just sort of tacked on to the activity though Jun 27 17:05:12 yes Jun 27 17:05:20 and is really annoying :) Jun 27 17:05:46 often the empty state can show some tutorial. no Idea what your app is about though Jun 27 17:05:53 The easy answer is just build more intuitive apps lol Jun 27 17:06:31 indeed :) Jun 27 17:06:47 what are you building? got a screenshot? Jun 27 17:07:02 Theoretically, the empty state should already be a tutorial but user feedback was shit Jun 27 17:07:11 NDA, sorry. Jun 27 17:07:14 ah ok Jun 27 17:07:16 :) Jun 27 17:07:28 But the activity is for posting content Jun 27 17:07:31 hi all, can somebody help me with a question. whats the trick to make the layout of a widget update while debugging? in my case event remove the widget and add it again to the screen does not help. i have to uninstall and reinstall the app. is there a faster way? Jun 27 17:08:06 @wickeda what version of android studio are you running? Jun 27 17:08:19 obsidian1, to be safe: look at the twitter app. All menus are just one step deep, back button takes you home. All icons have a label Jun 27 17:08:46 ah und no hamburger! Jun 27 17:09:09 only the kebap for the power users when you can't get rid of some functionality not many people need Jun 27 17:09:21 Thanks for the help Jun 27 17:11:18 and something that is often done wrong: for toggles in the settings change the label to "is on" or "is off" onstead of "on" and "off". Otherwise you need additional cues to know if it's the "is" state or going in to that state when you press it :) Jun 27 17:11:28 hm, but more general quick tips i don't know :) Jun 27 17:12:47 g00s: the whole camera2 thing wouldn't bother me if we weren't already 4 weeks late on our schedule because it's so shitty Jun 27 17:13:04 we now need to have a whitelist and spend money for testing Jun 27 17:13:08 How come the button text always appears in capital? Jun 27 17:13:16 because this shit keeps on lying to us Jun 27 17:13:37 purplex88: in the xml it's set to android:allCaps="true" Jun 27 17:13:38 ? Jun 27 17:13:55 I did android:textAllCaps="false" Jun 27 17:14:05 what about themes? Jun 27 17:14:19 no i mean why is it default? Jun 27 17:14:43 what's your minSdk? Jun 27 17:14:48 using android:textAllCaps="false" fixed it Jun 27 17:14:57 17 Jun 27 17:15:06 i guess it's the material guidelines Jun 27 17:16:00 it shouldn't be default to make it appear in caps Jun 27 17:16:25 purplex88: https://material.google.com/components/buttons.html#buttons-button-types Jun 27 17:16:31 seems like that is the guideline Jun 27 17:16:46 "Button text should be capitalized in languages that have capitalization. For other languages, colored text on flat buttons distinguishes them from normal text. " Jun 27 17:17:12 interesting Jun 27 17:17:35 suggest reading through this doc Jun 27 17:19:10 i never heard of this doc before Jun 27 17:19:37 well, this is a good time to start Jun 27 17:19:50 and its on google.com hm Jun 27 17:20:10 purplex88: it's the official guide for material Jun 27 17:20:24 well, the design specification Jun 27 17:21:01 ah makes sense, word 'material' cannot be weird enough Jun 27 17:31:18 Only way I see to get the user-set device name is through the IBluetoothManager service, but I don't want to add permissions just for that string, is there another way? Jun 27 17:32:44 What is the amount of bandwidth required for Downloading Components part while installing android studio on deb sys ? Jun 27 17:33:04 it's several hundred megs Jun 27 17:33:26 Less than a gig ? Jun 27 17:33:33 can you style color resources in your theme in api 23? Jun 27 17:33:37 I can't find docs on that Jun 27 17:33:46 be more specific Jun 27 17:34:04 well before you would use attributes in your theme Jun 27 17:34:04 pfn: was it for me ? Jun 27 17:34:13 ?attrSomeColor which would resolve to different colors Jun 27 17:34:26 but now it looks like R.color.somecolor might somehow resolve different based on theme Jun 27 17:34:30 but no idea how Jun 27 17:36:38 missingno, it's because you can now use attributes in color xml, like selectors Jun 27 17:37:47 e.g. Hey, does someone knows a good tutorial to make 2D games with android? Jun 27 17:40:42 thepoosh i'd like to see a blog from you guys about what needed to be done to get camera2 working @ industrial strength Jun 27 17:41:00 well, i didn't touch that aspect Jun 27 17:41:05 will ask the guy Jun 27 17:41:21 nice Jun 27 17:42:36 thanks pfn! Jun 27 17:44:56 pfn: any luck with the size thing ? Jun 27 17:47:04 @obsidian1 the newest one Jun 27 17:55:32 Can I auto-start a regular app on phone bootup or only a service? Jun 27 18:01:19 only a service Jun 27 18:01:33 i think you’d have to be a system app to be auto started on boot Jun 27 18:05:12 ahh, like gmail app? Jun 27 18:07:16 I guess, although I’m not sure if that’s a system app Jun 27 18:14:51 souravbadami, what size thing Jun 27 18:17:21 thepoosh last night that thread was at least civil, now its turning into food fight ! Jun 27 18:21:12 *musing* For all its wonder, android has some very shortsighted constraints. Want to use it for a kiosk type setup where you simply want your app to start on boot and *stay* running at all costs? It could have been so simple, but no, it has to be a complex mix of UI & service :D */musing* Jun 27 18:21:51 jesseg i though there was a kiosk mode in later android , maybe 5 ? Jun 27 18:22:21 g00s, ahh I'll google for that. Jun 27 18:23:03 kiosk mode is easy Jun 27 18:23:16 replace default home app Jun 27 18:23:18 and pin Jun 27 18:24:59 g00s: http://www.telegraph.co.uk/technology/2016/06/26/google-to-step-up-smartphone-wars-with-release-of-own-handset/ Jun 27 18:25:41 hasn’t that rumor been thrown around every summer since the beginning of the nexus program? Jun 27 18:25:55 pfn, well, I wasn't thinking so much of the "Lock the user in the app" angle but the underlying reliability of having an app that Android won't kill off whimsically (i.e. like a service) but also always has a UI, and can be started on boot. If they'd added a "Don't kill my app" flag for non-service apps and allow a non-service app to receive the on-boot launch call then I'd be happy. Jun 27 18:26:06 thepoosh "The technology giant is in discussions with mobile operators about releasing a Google-branded phone that will extend the company’s move into hardware, sources familiar with the discussions told The Telegraph. " , lets see how well that goes haha Jun 27 18:26:19 however the boot launch may actually work for non-service apps, not sure yet Jun 27 18:26:19 'can we load our crapware on it ?' Jun 27 18:26:33 well, it worked for samsung Jun 27 18:26:48 jesseg: If they added that flag, every damn app on the phone would set that flag Jun 27 18:26:50 wasn't samsung sued for crapware, or was that somebody else ... Jun 27 18:27:10 jesseg, it's a kiosk app, why is there any concern about a service being killed Jun 27 18:27:30 thepoosh GMS 9.2.0 Jun 27 18:27:38 ? Jun 27 18:27:57 pfn, not sure I understand your question. My gripe is that a non-service app might get killed because it wasn't a service. Jun 27 18:28:26 huh? Jun 27 18:28:28 what are you talking about Jun 27 18:28:29 s73v3r, hahaha. Jun 27 18:29:09 jesseg: Why would your app be killed? Presumably as a kiosk thing, nothing else should be running Jun 27 18:29:10 pfn, well, android is much more likely to whimsically kill a non-service app as compared to a foreground-service. Jun 27 18:29:15 especially in the foreground Jun 27 18:30:06 s73v3r, well if the screen locked and nobody touched it for a long time maybe Android would say "Oh, there hasn't been any UI actions on this app for 5 days I think I'll kill it.." Jun 27 18:30:21 not if it’s still in the foreground Jun 27 18:30:31 and why would the screen lock? Jun 27 18:30:41 s73v3r, to save power Jun 27 18:30:59 you know how the screen goes black and you have to tap the home button and swipe finger on screen to unlock Jun 27 18:31:01 if it’s a kiosk, it should be plugged in Jun 27 18:31:34 jesseg, uh, android kills no foreground apps, ever Jun 27 18:31:40 Mine is a solar powered kiosk for monitoring (and reporting via cellular data) the water flow in farmer's irrigation ditches :D (while also allowing farmer to come by, wake up device, and see current flows.) Jun 27 18:31:58 that doesn’t really seem like a good fit for an android device Jun 27 18:32:00 android also rarely kills apps that are covered by screenlock Jun 27 18:32:03 pfn, but if the screen is locked, is there even a foreground app? Jun 27 18:32:11 especially if it’s just an off the shelf phone Jun 27 18:32:20 jesseg, it's still high priority, it's unlikely to be killed Jun 27 18:32:38 android still prioritizes paused activities Jun 27 18:32:53 s73v3r, why not a good fit? low power, off the shelf hardware, nice user interface, built in HTTP GET support, just super sweet Jun 27 18:32:54 your problem sounds nonexistent Jun 27 18:33:00 it’s not low power Jun 27 18:33:19 and the off the shelf hardware means you have to work around stuff like this Jun 27 18:33:20 pfn, excellent. I'll just not worry about it. Jun 27 18:33:35 whereas if you had a microcontroller based solution, you wouldn’t have to worry about it Jun 27 18:33:52 plus, the hardware is going to be more expensive Jun 27 18:33:55 what would be the best way for me to stream video from my android device to a server i have set up? it looks like android has RTP support but im not sure if there might be anything better Jun 27 18:33:59 s73v3r, well, it's pretty low power. Any time you have a cellular modem communicating every 15 minutes it's not going to be real low power but.. Jun 27 18:34:24 i still think it’s huge overkill for just reading a couple of sensors and broadcasting a bit Jun 27 18:35:08 s73v3r, actually, a Samsung S4 at wallmart is cheaper than most M2M cellular modems. And if I went the route of an embedded controller, I'd have the cost of that PLUS the modem. Jun 27 18:35:48 i’m gonna bet the cost of a microcontroller board and the cellular modem would be cheaper than the android device, especially when you go to productize this Jun 27 18:36:21 plus, it’ll be lower power Jun 27 18:37:32 s73v3r, I used an embedded python controller in a Janus Remote Terminus last time. Worked fine, but then the company obsoleted it, which obsoleted the coding time investment. Then AT&T and T-Mobile are dropping GSM support, so now I'm thinking of a path that's not tied to a particular carrier, phone brand, etc. Jun 27 18:37:57 if they’re dropping GSM support, then you’re S4 isn’t going to work, either Jun 27 18:38:19 s73v3r, unless it's on Verizon Jun 27 18:38:31 now you’ve got to get permission from Verizon Jun 27 18:38:35 ytjru Jun 27 18:38:52 they’re pretty notorious for having tight control over what goes on their network Jun 27 18:39:07 the neat thing of doing it with an android app is I'm suddenly freed from being locked to a particular carrier or band or hardware Jun 27 18:39:19 not really Jun 27 18:39:44 and like i said, there’s gonna be huge headaches when you try to make this into a product Jun 27 18:39:53 s73v3r, verizon is embracing the IoT/M2M world and would be happy to sell that kind of service Jun 27 18:40:13 i still say Android is not the way to go Jun 27 18:40:15 s73v3r, well, it's for a small farming community. Jun 27 18:41:18 an arduino and a couple cellular shields would be much more efficient Jun 27 18:41:24 s73v3r, I certainly have thought about using a PIC32 micro and then some other cell modem, but then my code will still be custom made for whatever cell modem protocol it's using, and my firmware would have to be re-written for whatever new ones I had to switch to Jun 27 18:41:36 why would you have to switch? Jun 27 18:41:55 s73v3r, that's just what I thought before this 2G sunset thing :P Jun 27 18:42:06 if you’re writing it in C for a PIC, that’d be fairly portable, and Microchip isn’t going out of business anytime soon Jun 27 18:43:00 s73v3r, right, but let's say "Cute Little Startup XYZ Cellular Experimentor Module Company" that made the arduino shield sent out of business.. Then I gotta switch to a different cellular modem, which may have a different serial protocol Jun 27 18:43:14 sent -> went Jun 27 18:43:54 hi guys Jun 27 18:44:09 i still say you’re going overboard Jun 27 18:44:21 With Android, it don't matter if it's a motorola, a samsung, or AT&T or Verizon or whatever - the android app will interface all the same to the internet and to the mic port (LOL) Jun 27 18:44:41 they’re still extremely power hungry, and far, far more expensive Jun 27 18:45:01 and like I said, when you go to productize this, you’re gonna run into problems Jun 27 18:45:02 guys,I'm trying to make a small config file automatically with my gradle script, so I could use it for building my app. Jun 27 18:45:24 i haev something like this: Jun 27 18:45:32 http://paste.ubuntu.com/17986104/ Jun 27 18:45:59 I would like to show image, but I need size ie 500x500px+, importing image of proper size through AS (import image asset ) creates of imported image in different sizes h/m/xx./'dpi, but the largest one xxxhdpi is 192x192px Jun 27 18:46:06 what would be the best way to import image Jun 27 18:46:10 but when I run app in both debug and release mode, I see "release". Jun 27 18:46:25 in order to open it through https://developer.android.com/training/displaying-bitmaps/load-bitmap.html#load-bitmap Jun 27 18:46:28 s73v3r, I see what you're saying, but I've tackled this problem from the other angles too, and with Android I get the nice UI, BMS/UPS, consistent network layer across all manufacturers and carriers. It's just for small scale anyway. But yeah, if it were large scale the instability of Android would be problematic Jun 27 18:46:39 is what i'm doing incorrect? Jun 27 18:46:52 I wish android devices had IR blasters standard Jun 27 18:47:00 that's one feature I like from samsung devices Jun 27 18:48:25 I had an HTC with one. The idea of a universal remote app on the phone was appealing Jun 27 18:50:18 pfn, I wish Android devices had a universal simple IO port standard :D Jun 27 18:50:25 Thanks guys! Jun 27 18:50:41 jesseg: they do. USB Jun 27 18:51:05 Lol. Jun 27 18:51:15 Also, a 3.5mm jack can be considered I/O. Jun 27 18:51:31 yes, headphone jack and usb is quite standard Jun 27 18:51:33 yup Jun 27 18:51:50 The power and volume buttons. Jun 27 18:51:53 wait, not anyomore. the last Motorola phone doesn’t have headphone jack Jun 27 18:51:56 s73v3r, well, USB is not really *simple* however if OTG were universal (and it's getting there I suppose) and USB to Serial converters were supported universally by drivers in Android then that would sort of qualify. Jun 27 18:52:04 s73v3r, as yet unreleased Jun 27 18:52:06 but still usb Jun 27 18:52:07 anyone to help my small problem? :) Jun 27 18:52:13 and includes a usb -> 3.5mm adapter Jun 27 18:52:40 hero_biz: Don't ask to ask, just ask. http://catb.org/~esr/faqs/smart-questions.html Jun 27 18:52:46 Someone will help if they can. Jun 27 18:53:23 lol already asked.. :P Jun 27 18:53:42 Then be patient. :P Jun 27 18:54:08 Are you clicking the build debug button? Jun 27 19:00:13 yea Jun 27 19:01:00 there is a green play button(release) and a green bug(debug)... Jun 27 19:02:55 I don't get how it really works. Jun 27 19:03:28 Does the Debug button build a debug apk? Jun 27 19:03:58 O.O it should, because it runs on emulator... <.< Jun 27 19:05:14 I don't get it, every time I press either button, I see buildtype debug runs first,then build type release. Jun 27 19:05:30 I don't know why this happens. Jun 27 19:05:58 what if you just run assembleDebug on the command line? Jun 27 19:11:29 i tried in in 2 flavors rather than debug/release build types. Jun 27 19:11:29 the debug button just launches the app in debug mode Jun 27 19:11:30 that is all Jun 27 19:11:59 you have to specifically tell it to build a debug version Jun 27 19:12:02 but building those different flavors I get same sting again. Jun 27 19:12:11 hero_biz, don't write generated files to src/main Jun 27 19:12:15 hero_biz, write it somewhere in build/ Jun 27 19:12:41 and separate it out by build flavor Jun 27 19:12:42 where in build? Jun 27 19:12:49 maybe write it to src/buildType/... Jun 27 19:12:52 intermediate? Jun 27 19:12:56 buit src/main is absolutely the wrong places Jun 27 19:12:56 that’d be the place to do it Jun 27 19:14:14 man, I totally don't remember playing ffix at all, but I'm pretty sure I did back in the day... Jun 27 19:14:35 it was the one that brought back the crystals Jun 27 19:14:47 and had the guy with the tail that absolutely no one questioned Jun 27 19:14:57 @pfn: where I can use in build directory that other jni files can have access to that generated file? Jun 27 19:15:10 hero_biz, add -I to your cflags as necessary Jun 27 19:15:54 oh you mean create in 2 different folder,then add them with -I Jun 27 19:15:57 got it :) Jun 27 19:34:16 still not working... Jun 27 19:34:28 but need to test more tomorrow,super sleep now. Jun 27 19:34:33 ty for all help. Jun 27 19:34:35 cu all later Jun 27 19:43:03 Hello, I've started helping out a friend with his app idea. I just got Android Studio up and running but I've also been reading about other technologies like React Native and Cordova. Can somone offer some advice on which will be the best for this project? Jun 27 19:45:15 whats your programming experience Jun 27 19:45:33 for starters you might want to keep out of cordova ~ Jun 27 19:46:02 normally here we just focus on "normal" android development, so android studio and java Jun 27 19:46:54 Thanks for responding :) Mostly web development, enough to get some brochure websites up Jun 27 19:47:19 and I've been making a javascript game in phaser. I would still consider myself a beginner Jun 27 19:49:48 The app should be basic text, buttons and pictures. I was interested in React because then we could develop for iOS and android at the same time Jun 27 19:50:40 I guess I'm wondering which has the lowest learning curve? Jun 27 19:50:43 i know nothing about react Jun 27 19:51:59 probably phonegap/cordova since its javascript. but most people i know who developed some projects in cordova complain how unstable and slowish apps are Jun 27 19:52:52 I did read a little about that Jun 27 19:54:36 does the DownloadManager have a concurrency limit? Jun 27 19:54:43 hi all, can somebody help me with a question. whats the trick to make the layout of a widget update while debugging? in my case event remove the widget and add it again to the screen does not help. i have to uninstall and reinstall the app. is there a faster way? Jun 27 19:55:37 Ok Ashiren thanks for helping, I'll keep on researching Jun 27 19:56:02 Hi everyone.. I have a problem with inflating children Layouts into a ExpandableListView that expanded. I have however received random errors that states nullpointerException on Elements that are initialized AND work on some but gets this error on other... Is it something to do with the ExpandableListView? Jun 27 19:57:19 Hi all. I have a layer-list which I use to cycle through three different layers. Is it possible to add a transition (fade?) when I switch layers? Jun 27 20:34:26 g00s: just found this: http://www.androidpolice.com/2016/06/27/dubious-report-says-google-will-release-non-nexus-phone-this-year-take-it-with-a-grain-of-salt/ Jun 27 20:43:56 if I have an Rx stream that throws an error on a worker thread, and I observe and subscribe with onNext and onError on the main thread, the error raised on the worker thread should propagate to the main thread, right? Jun 27 20:53:02 Hi all, when I pass a touch event up to a parent scrollview nothing happens. Jun 27 20:53:56 Any ideas why Jun 27 20:58:31 Is there any timeline for when AS 2.2 branch will go stable? Jun 27 21:15:56 s73v3r: I finally figured it out, phew Jun 27 21:16:11 if I do view.setMovementMethod(new ScrollingMovementMethod()); then selection doesn't work anymore Jun 27 21:16:16 if I don't do that selection works fine Jun 27 21:16:45 so need to figure out how to make it selectable and scrollable both, maybe I need to put the TextView inside a ScrollView instead of just making it scroll with this ScrollingMovementMethod ? Jun 27 21:18:46 i don’t think you want scrollingmovementmethod to make it scroll Jun 27 21:19:02 you don't need scrolling movement method to scroll Jun 27 21:34:02 guys, how can I get this ddm-nativeheap query functionality working these days? Jun 27 21:46:50 spudowiar: can tell me he please? Jun 27 21:54:57 hmm, without it it doesn't seem to move as I drag the screen Jun 27 21:54:59 * jpwhiting tries Jun 27 22:04:26 heh, works without, ok cool Jun 27 22:21:24 Hey could someone help me answer a simple string query in Android Studio (Java question)? Jun 27 22:21:59 Anubitek: Don't ask to ask, just ask. Someone will help if they can. Jun 27 22:22:04 public final static String INTENT_TESTER = "anubitek.anubitek.HELLO_ANDROID"; Jun 27 22:22:32 Please explain what the problem is. And steps you have tried to fix it. Jun 27 22:22:38 What is HELLO_ANDROID in this context and where would it be stored at in my project? Jun 27 22:22:42 That is my only question. Jun 27 22:22:52 i’ts nothing Jun 27 22:22:58 it’s just a string Jun 27 22:23:11 Anubitek: That is a just a string variable. Jun 27 22:23:35 I know it is a string declared in my main program, but I am watching a tutorial series that kinda glossed over this. So is it just the name of said string? Wouldn't that be INTENT_TESTER? Jun 27 22:24:04 INTENT_TESTER is the name of the string. HELLO_ANDROID has no specific meaning Jun 27 22:24:14 Anubitek: The variable name is INTENT_TESTER, anubitek.anubitek.HELLO_ANDROID is the value. Jun 27 22:24:41 Oh okay. Thanks guys, appreciate it. Jun 27 22:33:45 ok, next step, making the scrolling more like every other app that shows text. i.e. make it "kinetic" so it keeps scrolling for a bit after you let go of the screen Jun 27 22:46:09 So to my last question, can I leave what was in the quotation marks blank? Jun 27 22:46:32 So instead of "anubitek.anubitek.HELLO_ANDROID";, make it just ""; ? Jun 27 22:48:34 hello everyone, am trying to setup jenkins to install required sdks Jun 27 22:49:59 which sdk should be installed to have Jun 27 22:50:01 provided "com.google.android.support:wearable:2.0.0-alpha1" Jun 27 22:50:02 provided "com.google.android.gms:play-services-wearable:9.0.2" Jun 27 22:50:18 the problem is with support wearable 2 alpha1 Jun 27 22:50:38 each build throws 'Could not find com.google.android.support:wearable:2.0.0-alpha1.' Jun 27 22:51:01 which sdk includes wearable:2.0.0-alpha1? Jun 27 22:52:12 Anubitek: Why would you want it blank? Jun 27 22:52:22 you’d never be able to assign to it Jun 27 22:52:30 you’d not be able to compare against it Jun 27 22:52:39 Just wondering what I can and can't do with it. I'm very new to Android programming. Jun 27 22:52:55 it’s a string. it’s no different than any other programming Jun 27 22:53:57 So I could just as easily just make it "ayylmao" and that would be what is being assigned to INTENT_TESTER? Jun 27 22:54:16 Not to be so crass, just for sake of example. Jun 27 22:54:52 yeah, just like in any other programming environment Jun 27 22:57:16 Thanks mate, just checking if my information is correct. I wasn't sure if the text in the String was being held as some sort of key as this tutorial keeps refering to it as. Jun 27 22:57:42 For a little context, the lesson has to do with sending and receiving intent. Jun 27 23:00:44 it is a key, but in that case, you’re defining what the key is Jun 27 23:02:36 the documentation at https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md -- is so confusing and ambiguous Jun 27 23:02:52 What's app_process supposed to be? Jun 27 23:03:19 This setprop call at the end is not valid: setprop libc.debug.malloc.env_enabled Jun 27 23:03:38 Why on earth is there no way to unset what you set with setprop other than rebooting the device? Jun 27 23:03:50 i think that’s the wrong channel Jun 27 23:04:18 is it s73v3r? Jun 27 23:05:28 hmm, is there an easy way to get a "Character" from a "CharSequence" for a given index ? Jun 27 23:05:38 i.e. loop over the length of a CharSequence getting each "Character" Jun 27 23:05:51 charAt gives char, not Character Jun 27 23:06:26 ESphynx: maybe not Jun 28 00:10:07 hello all :) Jun 28 00:10:53 just looking around for some android developers that might want to checkout a killer job at Disney. Jun 28 00:11:07 if you might be interested feel free to pm me and lets chat! Jun 28 00:12:57 EvilPenguin lol, after their H1-B fiasco :) Jun 28 00:13:08 lol. Jun 28 00:13:14 yeah that shit was a mess! Jun 28 00:13:28 EvilPenguin, yeah i'm game Jun 28 00:50:11 jpwhiting, char is character for all intents and purposes Jun 28 00:55:41 Oh, slow afternoon Jun 28 01:01:39 char = 16 bits :P Jun 28 01:02:50 ive met a handful over engineer that doesnt know byte = 8 bits, char = 16 bits, and short = 16 bits. Jun 28 01:02:52 its insane. Jun 28 01:03:14 *mind blown* Jun 28 01:07:24 EvilPenguin, well, for so long chars were always 8 bits, and in some common languages still are strictly 8 bits. With other globalization of programming and a desire to support other human languages, now the width of strings may not be 8, or even 16. Jun 28 01:10:37 jesseg: correct. Jun 28 01:10:45 char on c-based languages are 8-bits Jun 28 01:10:59 but there are unicode values that go bigger than 8-bits required. Jun 28 01:11:11 So yeah if you come across an "engineer" who's entire engineering experience consists of a modern java class, he'll may tell you that chars are 16 bits. All the rest of engineers are going to say they are 8 bit, although a few may say "They can be any size depending on the language" Jun 28 01:11:12 so they use a short or sometimes even an int (32 respected) Jun 28 01:11:56 how would you start a shell inside a chroot from outside, if you can't do it directly? I'm using some app (linuxdeploy) that runs a chroot jail in my phone, but sadly, I can't open a shell from adb Jun 28 01:12:54 Do Activity's get destroyed on rotation or not? I see lots of web pages saying they do and you need to serialize to/from a Bundle, but I created a simple EditText and type some junk into it and it is never reset when I rotate the device... why? Jun 28 01:16:10 * inside a linux chroot Jun 28 01:29:59 Lewoco, because the platform does some state restoration for you Jun 28 01:30:24 built in widgets that have a unique id set will have their state managed automatically Jun 28 01:34:57 pfn: yep, now I just need to figure out how to get an ICU kHanyuPinLu for a given Character Jun 28 01:35:02 is anyone facing Connection to http://repository.jetbrains.com refused when trying build a project contains kotlin library? Jun 28 01:38:42 i have an error and it shows "06-27 18:14:41.810 20525 20525 E AndroidRuntime: ... 19 more" at the bottom - how do i see those 19 more? Jun 28 01:42:11 hello Jun 28 01:43:33 I try to run/debug and I pick the emulator and then I get ..... Jun 28 01:43:41 "Cannot launch AVD in emulator." Jun 28 01:43:46 Output: Jun 28 01:44:09 "emulator: ERROR: This AVD's configuration is missing a kernel file!!" Jun 28 01:44:27 "emulator: ERROR: ANDROID_SDK_ROOT is undefined" Jun 28 01:44:31 How to resolve that? Jun 28 01:45:27 Michyeoga, from google: https://stackoverflow.com/questions/9712605/emulator-error-this-avds-configuration-is-missing-a-kernel-file http://stackoverflow.com/questions/8190820/scala-android-newbie http://stackoverflow.com/a/15971119/664220 https://developer.android.com/studio/run/managing-avds.html Jun 28 01:46:04 Vainglory, theyre already shown Jun 28 01:47:13 pfn: hmm. 06-27 18:14:41.810 20525 20525 E AndroidRuntime: Caused by: java.lang.IllegalStateException: eadf20003f0a0901911414a731e9734c7004a1da11c4446ae6c78ffd01a045ec ..... 06-27 18:14:41.810 20525 20525 E AndroidRuntime: at com.google.common.base.Preconditions.checkState(Preconditions.java:173) - so Preconditions.java is causing this issue? Jun 28 01:47:40 i ask because i never touched the file, which is strange Jun 28 01:48:39 *reading...* Jun 28 01:49:30 check what calls Preconditions Jun 28 01:53:38 Do you know how to fix this layout error when using CircleImageView from support v7 ? https://gist.github.com/wviana/446517346482eec92c0a79f9331c6813 Jun 28 01:54:11 can I use retrofit to somehow pull from cache first then refresh once a network request has completed? Jun 28 02:12:21 Hi guys! How I start Activity on click on my Homescreen Widget? I try to use setOnClickPendingIntent but no luck Jun 28 02:16:27 Forget, just had to rebuild the project... Jun 28 02:24:35 How do you name classes that will get data from web service ? Jun 28 02:33:39 If I have a Class A with an InnerClass B, and I want B to be Parcelable Jun 28 02:33:49 I can have B be parcelable without A being parcelable, right? Jun 28 02:34:12 Im using Parceler, but I suppose I should just think about it as having B implement Parcelable without A implementing it, which would be fine Jun 28 02:34:14 Right? **** ENDING LOGGING AT Tue Jun 28 02:59:58 2016