**** BEGIN LOGGING AT Wed Jul 01 02:59:58 2015 Jul 01 04:01:32 can bootreceivers be dynamically registered to on/off or does it need to be static in the manifest? (im guessing static only since it doesnt work dynamically) Jul 01 04:01:40 Having trouble with gradle. I ran "gradlew clean" and when I run installDebug, gralde still uses an old image that I had in my resourese folder. How can I get rid of it? Jul 01 04:27:58 *crickets* Jul 01 04:41:48 anyway to automate android.mk? Jul 01 04:42:18 Is there a way to get the number of fields (not methods) by class from a DEX? The design library copies all the fields from appcompat into it's own autogenerated R class. I'm wondering how much of an impact this has on the overall "fields_ids_size". Jul 01 04:44:06 anyone? Jul 01 04:44:27 linuxuz3r: Cracking open a dex file and introspecting it is pretty easy Jul 01 04:44:42 cbeust: was that meant for me? Jul 01 04:44:56 yes Jul 01 04:45:09 sorry wrong attrib Jul 01 04:45:28 cbeust: example of getting fields by package (if it's so easy)? :P Jul 01 04:46:06 Here is a project that counts thenumber of methods in a dex, I'm sure you can adapt it to your needs: https://github.com/mihaip/dex-method-counts Jul 01 04:46:56 cbeust: I saw that. I'll look into it Jul 01 04:48:04 i submitted a feature request to the tools team - to add a report in AS. sounded like they would do it for a future release Jul 01 04:48:23 (dex method breakdown by deps, a nice graph, report, etc) Jul 01 04:49:15 g00ey: Yeah I'm surprised it's not part of the standard toolchain. There's a Gradle plugin for this too Jul 01 05:05:53 surf2b1, all library R classes are duplicates Jul 01 05:06:19 cbeust, that impl kinda sucks Jul 01 05:08:58 pfn: Yes. So all fields in android.support.v7.appcompat.R get copied over to android.support.design.R and make your fields_ids_size go up. Jul 01 05:09:43 and fields_ids_size has the same limit 65k limit, obviously. Jul 01 05:13:20 You're less likely to hit that limit than the method count limit Jul 01 05:16:03 cbeust: I hit it before a couple years ago when adding multiple libraries that all had a dependency on actionbarsherlock. I had to use the same package-name so unnecessary R classes would be generated. Right now I'm using MaterialViewPager, material-dialogs & design-library which all depend on appcompat. Jul 01 05:16:22 3 unnecessary copies of all fields in appcompat Jul 01 05:16:46 * wouldn't be Jul 01 05:16:55 why use material dialogs? i thought that was in newest appcompat Jul 01 05:17:18 g00s: I have yet to switch over and I personally like the added features of it Jul 01 05:17:28 i still think devs go too crazy bringing material backwards to pre-material devices Jul 01 05:18:15 g00s: My personal preference would be no appcompat library. But it's what the people want. Jul 01 05:18:24 surf2b1, https://github.com/pfn/android-sdk-plugin/blob/master/src/tasks.scala#L1271 Jul 01 05:18:38 surf2b1, link to spec and easy implementation Jul 01 05:19:02 surf2b1, and all resource id's get copied, not just appcompat Jul 01 05:19:33 I know. I'm just using appcompat as an example Jul 01 05:20:48 surf2b1, just set the correct offset per spec Jul 01 05:20:54 pfn: I modified the project cbeust pointed out and got it listing fields by package now :) Jul 01 05:21:04 or use head/cut as you prefer Jul 01 05:24:31 Actually, the listing format is kinda handy, I should adopt that Jul 01 05:24:37 1161 in appcompat. So if you are using appcompat + design library there will be 2322 unnecessary fields in your project. Jul 01 05:25:05 surf2b1, doesn't matter, not hitting the limit any time soon Jul 01 05:25:24 multidex is also a solution Jul 01 05:27:07 surf2b1, as a corollary, there's like 10k methods in appcompat Jul 01 05:27:19 2k fields is irrelevant Jul 01 05:28:49 pfn: yeah, it was just such a PITA for me years ago when no one really was doing anything about hitting the limit that it has always been in the back of my head that those fields can add up Jul 01 05:29:15 proguard addressed that Jul 01 05:29:30 I have a hard time hitting the limit with proguard Jul 01 05:29:36 no, proguard does not remove the fields from R. renames them, yes Jul 01 05:30:15 no, it removes Jul 01 05:30:41 pfn: hmmm.. are you sure? Jul 01 05:31:24 yes, it removes unused code, that includes fields Jul 01 05:31:42 it? Jul 01 05:31:51 it = proguard Jul 01 05:31:57 especially true since constants are typically inlined Jul 01 05:32:27 How is debugging after obfuscating with proguard? Jul 01 05:33:11 the same Jul 01 05:33:11 Not trivial but proguard gives you the method map so you can still read stack traces Jul 01 05:33:16 keep line numbers Jul 01 05:33:20 (you usually can't debug a release build though) Jul 01 05:33:22 also, don't obfuscate Jul 01 05:33:39 Why not? Jul 01 05:33:40 Why not? Obfuscating is fine Jul 01 05:33:55 because it makes debugging a pain Jul 01 05:33:56 Cuts down the size of the apk too Jul 01 05:34:06 eh, not significantly Jul 01 05:34:07 because JakeWharton doesn't and everyone wants to be like Jake \s Jul 01 05:34:11 Makes it a bit more difficult but still doable, and a lot of advantages Jul 01 05:34:22 Without obfuscating, anyone can easily crack your app. Jul 01 05:34:36 it has few advantages over normal proguard optimization Jul 01 05:35:08 barq, with obfuscation, anyone can easily crack your app Jul 01 05:35:17 Yes, but takes a bit longer. Jul 01 05:35:25 not much longer at all Jul 01 05:35:46 It's quite a bit more tricky to disassemble Jul 01 05:35:55 but the main advantage is really apk size Jul 01 05:36:03 cuts the size of the apk down too Jul 01 05:36:03 not really, it decompiles smoothly Jul 01 05:36:15 don't need obfuscation to cut down size Jul 01 05:36:16 the obfuscation feature comes in handy to get around that dumb samsung classpath bug Jul 01 05:36:20 Optimization and obfuscation are not linked, though. Jul 01 05:36:27 simple optimization does that already Jul 01 05:36:31 Classpath bug? Jul 01 05:36:35 no one wants to crack your app Jul 01 05:36:37 * pfn uses proguard in every single build Jul 01 05:36:47 it never has obfuscation enabled Jul 01 05:36:49 period Jul 01 05:37:01 obfuscation does not further reduce bytecode size Jul 01 05:37:05 pfn: Even your employer doesn't require obvuscation? Jul 01 05:37:20 pfn: Obfuscation certainly reduces apk size Jul 01 05:37:21 except for 1 letter to name symbol table crap Jul 01 05:37:23 oh i thought the ofbuscation renames the appcompat stuff so it doesn't collide with samsung Jul 01 05:37:38 JakeWharton: Really? How come you see some Apps cracked from the Play Store and uploaded in the Amazon Store then by the pirates? Jul 01 05:37:40 pfn: Not just that, moving everything to default package is a pretty big gain too, if you enable it Jul 01 05:37:48 cbeust, not really, just symbol table size from the miniscule reduction in name Jul 01 05:37:57 barq: i can do that without changing a single bytecode or even looking at it Jul 01 05:38:15 JakeWharton: How? Jul 01 05:38:21 see also: "your app" Jul 01 05:38:23 no one cares Jul 01 05:38:27 barq, shit, can copy from play store as is and upload it unchanged Jul 01 05:38:58 How do you protect from that happening then? Jul 01 05:39:07 you file dmca take down Jul 01 05:39:16 you don't prevent it Jul 01 05:39:32 just make sure yours doesn't get taken down by mistake :) Jul 01 05:39:35 cbeust, and yeah $work can't be bothered with obfuscation Jul 01 05:39:45 cbeust, just proguard to fix method limit Jul 01 05:40:39 pfn: so you weren't kidding when you said you proguard every build? Jul 01 05:41:01 proguarding every build seems a bit overkill,what's the point of proguarding debug builds? Jul 01 05:41:26 "to fix method limit"? Jul 01 05:41:30 method limit Jul 01 05:41:44 oh my Jul 01 05:41:45 I tend to think the 65k limit is kind of a healthy remember to keep you honest Jul 01 05:41:50 reminder* Jul 01 05:42:03 If you hit it, look harder at your dependencies and see if you can do better Jul 01 05:42:05 eh, multidex, doesn't matter Jul 01 05:42:09 that sucks. I feel bad for you.. all that time building :P Jul 01 05:42:40 takes 5 seconds Jul 01 05:42:44 for my builds Jul 01 05:43:20 dexing takes the longest time Jul 01 05:43:36 but with the v21 optimizations, it's like 2 seconds again Jul 01 05:43:57 slowest part of my build is deploying to device Jul 01 05:44:09 art sucks for installation turnaround Jul 01 05:44:51 I think Gradle is the main bottleneck these days Jul 01 05:45:12 whatever dexDebug is doing Jul 01 05:45:43 I would guess dexDebug is probably written in C or C++ so probably not the least optimized piece Jul 01 05:47:17 dex is java Jul 01 05:47:23 ah Jul 01 05:47:32 Well at least it's not Groovy Jul 01 05:47:39 amen Jul 01 05:48:00 dex is java source code that uses gradle to compile itself every time it runs Jul 01 05:48:07 inception slowdown Jul 01 05:48:14 ugh Jul 01 05:48:22 i mean groovy source code Jul 01 05:48:25 that uses gradle Jul 01 05:50:30 xD Jul 01 06:00:58 cbeust, do it in ant or maven, both no faster Jul 01 06:01:17 cbeust, dex is the bottleneck Jul 01 06:01:23 mmh Jul 01 06:01:39 sbt is faster, though Jul 01 06:01:41 ahem Jul 01 06:01:44 I didn't actually measure that but deployment times sure felt much faster with Eclipse Jul 01 06:02:08 In the Google Maps API I am showing my location on the map. Right now it only shows the dot. How can I set the direction the phone is facing to show as an arrow? I haven't found anything in the docs about this. Jul 01 06:02:18 builds were less complex prior to aar Jul 01 06:03:14 could be Jul 01 06:03:20 people mostly avoided library projects like the plague Jul 01 06:04:42 I guess there were some exceptions when people were motivated enough to care, like for abs Jul 01 06:08:52 cbeust this is pretty cool http://www.gizmag.com/mit-automated-software-bug-fix/38236/ Jul 01 06:09:27 eh where is canadiancow , "Computer system identifies cows by their muzzle prints" Jul 01 06:44:59 I want to show the orientation of my device in maps. I found that you can use bearing, but that only works if you are moving. How can I get an arrow to show the direction of my orientation (using compass) if I am standing still? Jul 01 06:46:38 I dont think that is possible how should the software know how you are holding the phone, if you dont move a little it cant know for sure Jul 01 06:46:44 just walk a few meters Jul 01 06:47:44 barq, maps will automatically show bearing if enable compass when available Jul 01 06:49:52 Hmm, on my N5 it is only a dot. Jul 01 06:56:18 Mavrik: In Google Maps app I have the arrow, but not in my app when I use the API. Jul 01 06:56:24 hmm Jul 01 07:00:59 whe would setContentView(R.layout.main) suddenly give an error that R is not found? Jul 01 07:01:11 why* Jul 01 07:01:28 Try a clean Jul 01 07:08:55 NateRiver: R is generated and it might have failed, so indeed clean and rebuild Jul 01 07:13:23 Guys it should not be hard to convert a project from an Eclipse project to a Android Studio project should it? Jul 01 07:13:42 How should I build architecture specific files to build in Android.mk for android-4.2? LOCAL_SRC_FILES are common to all arch and in lollipop LOCAL_SRC_FILES_{arm,x86,...} is the way to add architecture specific files but it doesn't work for jelly bean. Jul 01 07:14:11 cart_man some instructions here http://android-developers.blogspot.com/ Jul 01 07:14:19 osxorgate yeah the clean fixed it Jul 01 07:14:28 more specificallt http://android-developers.blogspot.com/2015/06/an-update-on-eclipse-android-developer.html Jul 01 07:19:03 g00s: Can be tricky, though, if you have a complicated project with lots of maven dependencies Jul 01 07:26:17 Why Theme.AppCompat.Light.Dialog showing the title twice? Jul 01 07:26:54 barq, hmm? Maven dependencies map 1-1 to gradle depenencies Jul 01 07:27:02 They're pulled from same artifacts/repos Jul 01 07:27:36 And also the build would take forever Jul 01 07:27:41 why does my logcat just constantly run? it just goes and goes, nothings building, lots of D/ and E/ Jul 01 07:27:59 I've been using android:windowNoTitle not windowNoTitle :/ Jul 01 07:28:04 I think porting this project to AS would take weeks. Jul 01 07:28:10 O.o Jul 01 07:28:14 You mean "1 day" :P Jul 01 07:28:32 Mavrik did you also make music before? Jul 01 07:28:39 NO Jul 01 07:28:41 O.o Jul 01 07:28:56 NateRiver: Just close the logcat view Jul 01 07:29:06 there should be a way to disable auto show logcat view on running Jul 01 07:29:06 Oh, theres just a person on youtube named Mavrik Jul 01 07:29:08 I hate it. Jul 01 07:29:20 so its normal for it to run forever? Jul 01 07:29:43 NateRiver: The OS logging when the device is run, so yes. Jul 01 07:30:01 For example LG seem to log every touch event Jul 01 07:30:29 Mavrik: And also native stuff, right now AS does not support that well, does it? Jul 01 07:30:44 NDK components build just fine for us. Jul 01 07:31:17 But then again, Maven works too so you can stick with it forever I guess. Jul 01 07:31:24 Well, would be worth a try I guess. Jul 01 07:31:33 But ADT is terrible. Jul 01 07:31:38 AS with maven would be nice Jul 01 07:32:05 Anyone who could help with building android source for multiplatform in android-4.x? Jul 01 07:32:18 barq: NDK support will be added soon to AS Jul 01 07:32:20 And I'm worried about build times. Jul 01 07:32:28 barq, AS with maven works out of the box Jul 01 07:32:40 Right now it takes 15 minutes to build with maven Jul 01 07:32:42 why use maven when you have gradle? Jul 01 07:32:54 With gradle probaby 1-2h Jul 01 07:32:55 yoavst, why not? Jul 01 07:32:58 barq, ? Jul 01 07:33:05 barq, Gradle and Maven performance are about the same. Jul 01 07:33:15 Mavrik: maven is xml... :/ Jul 01 07:33:16 Not with the projects I have migrated Jul 01 07:33:21 yoavst, and? Jul 01 07:33:27 XML sucks :) Jul 01 07:33:29 Before, a few seoncds, now more like 30 seconds for small apps. Jul 01 07:33:41 barq: Do you use modules? Jul 01 07:33:45 or dependenices? Jul 01 07:33:50 Both. Jul 01 07:34:06 barq, hmm, that's strange. When we migrated there wasn't a huge speed penalty Jul 01 07:34:23 most of slow builds come from the fact that AS invokes an external builder (Gradle) instead of using an internal one Jul 01 07:34:35 but we had to have external maven builder configured before as ewll Jul 01 07:34:41 Use modules only for your code / libraries you changed. If there is something that doesn't change consider pre-compiling it to aar/jar Jul 01 07:35:06 Good point. Jul 01 07:36:01 barq: It can really speed up the building time Jul 01 07:37:02 yoavst: I problems with some libraries that don't have a repo, though. Jul 01 07:37:16 You don't have an internal repo? Jul 01 07:37:18 barq: so add them as module, compile it, and remove the module Jul 01 07:37:45 or use jitpack if they got a release on github Jul 01 07:37:45 guys anyone knows a good example about viewpager in listview row ? Jul 01 07:38:14 i tried a lot of things but i have too many bugs so i think i'm doing something wrong Jul 01 07:38:28 sci-fic: Listview and viewpager both depend on touch input Jul 01 07:38:39 so they probably doesn't work well together Jul 01 07:38:49 don't work* Jul 01 07:39:12 yoavst: For example https://github.com/the4thfloor/volley I have the code as a module right now. Jul 01 07:39:29 barq, we got around that by having an internal sonatype company maven which cached all dependencies locally and allowed us to deploy .JARs that weren't in Maven central Jul 01 07:39:36 barq: it is on maven Jul 01 07:39:49 also builds were significantly faster since you just pinged the server on local network instead of external one Jul 01 07:40:36 barq: also they got github release, you can use jitpack to fetch it. the first build time will be slower. jitpack.io Jul 01 07:40:42 yoavst: In this project I don't use maven, though. AS didn't find it as grade depenency when migrating. Jul 01 07:41:09 http://mvnrepository.com/artifact/eu.the4thfloor.volley/com.android.volley/2015.05.28 Jul 01 07:41:13 here is the maven release of it Jul 01 07:41:21 compile 'eu.the4thfloor.volley:com.android.volley:2015.05.28' Jul 01 07:42:17 In this project I use gradle, so that doesn't help, does it? Jul 01 07:42:37 instead of compile project(':modulename') Jul 01 07:42:37 yoavst: let me show you what i need.http://postimg.org/image/mwe579ioz/ Jul 01 07:42:38 use compile 'eu.the4thfloor.volley:com.android.volley:2015.05.28' Jul 01 07:42:55 sci-fic: never tried it, sorry. Jul 01 07:43:04 yoavst: So I don't need jitpack? Jul 01 07:43:16 barq: in this case not, because it is on maven. Jul 01 07:43:24 Awesome, thanks. Jul 01 07:43:59 check in the github pages of your modules, maybe you can find other libraries that support maven. Jul 01 07:46:59 Mavrik: Btw, I found this regarind the arrow on maps: http://stackoverflow.com/questions/18858720/google-map-heading-marker-or-indicator/20173310#20173310 Jul 01 07:48:10 Not sure if that works with v1, though. Jul 01 07:48:30 omg "Unfortunately, that object database not only included wild animals but also conflated them with humans—specifically, on Monday, when an African-American man looked in his Google Photos collection and discovered an automatically generated album of him and his black female friend labeled "gorillas." Jul 01 07:49:25 :)) Jul 01 07:49:30 Yeah, that happens in CV all the time. Jul 01 07:49:46 People don't really get just how shit the image recognition algorithms really are :P Jul 01 07:50:37 oh, i'm sure google's algorithms fuck people over all the time Jul 01 07:50:54 Not sure where you found "Google" anywhere :) Jul 01 07:51:55 Mavrik http://arstechnica.com/business/2015/06/google-dev-apologizes-after-photos-app-tags-black-people-as-gorillas/ Jul 01 07:52:34 The point was, it's really nothing Google specific Jul 01 07:53:31 yeah .. its SF specific Jul 01 07:53:49 * g00s reading 'the internet is not the answer' Jul 01 07:56:13 ppl use cocos2d-x, unity3d and so on for deveoping games.. what do they use for application? Jul 01 07:56:21 for ios and android Jul 01 07:56:47 i guess the closest would be xamarin Jul 01 07:56:49 Xamarin Jul 01 08:10:56 hahahahah Jul 01 08:11:01 gorilla fail :D Jul 01 08:43:11 Hello. Does restarting iptables service change the public ip? Jul 01 08:43:25 interesting, carmack using scheme https://news.ycombinator.com/item?id=9810342 Jul 01 08:43:53 asimas, it certanly shouldn't. Jul 01 08:44:31 Mavrik, wrong channel but thanks :) Jul 01 08:56:06 Does someone here use NotificationListenerService? Whatsapp post multiple notifications and I don't know how to show them. Jul 01 08:58:34 g00s, scheme is a variant of CLisp if i recall well :) Jul 01 08:59:00 car(cdr(g00s)) ;-) Jul 01 08:59:06 (should be empty) Jul 01 08:59:41 yoavst, you cant Jul 01 08:59:49 ? Jul 01 09:00:07 Xamarin is the only option that i can use for cross-platform application development? Jul 01 09:00:45 yoavst, nvm i misread. your "show" looked like "stop" to me :p Jul 01 09:03:48 "Java or C# would have been more familiar to a broader base of game industry developers, but I really didn't want to drag in all the bulk of a JVM / .NET system..." Jul 01 09:03:54 somebody understands :D Jul 01 09:04:49 Yes, funny how all really successful platforms for games are VM based :P Jul 01 09:04:51 Including Carmacks ;) Jul 01 09:05:24 Better brush up on those LISP skills g00s, NOW is the YearOfLisp(tm) Jul 01 09:05:48 yoavst, whats your question about the listener? Jul 01 09:06:08 Mavrik lol, i did some list after C in highschool Jul 01 09:06:11 *lisp Jul 01 09:06:28 fiddled with it a little for genetic programming Jul 01 09:07:06 i always thought it was an interesting language; i would use it these days if it was practical Jul 01 09:07:07 in recyclerview.adapter we have onBindViewHolder to fill the viewholder with data, is there also a way to know a viewholder is getting unbound? Jul 01 09:07:31 osxorgate look for the recycler listener Jul 01 09:07:36 maybe he implicitly talks about developers Jul 01 09:07:46 because Lisp dev != Java dev lol Jul 01 09:07:55 g00s you mean onViewRecycled ? Jul 01 09:07:55 imagine this channel, if it was Lisp-dev ;) Jul 01 09:07:56 danijoo: whatsapp post multiple notifications Jul 01 09:08:01 I need to show it like a one Jul 01 09:08:06 Wonder if he'll have a beard now Jul 01 09:08:08 osxorgate yeah something like that Jul 01 09:08:10 I have an Activity with several Spinners. The Spinners' contents depend on each other, for example Country must be selected before City is selected before Street is selected etc. Now when I navigate away from this Activity I persist the data. When I navigate back I load the data from an Object. However, I get ArrayIndexOutOfBoundsExceptions, because the listeners of the spinners try accessing the Spinners before all of them have lo Jul 01 09:08:12 lol Jul 01 09:08:17 Seems like a requirement for all LISP proponents Jul 01 09:08:23 i mean, the difficulty of Lisp is a natural filter Jul 01 09:08:28 I used hacks with postDelayed to get it work, but what would be a better approach to get this clean? Rx? Jul 01 09:08:43 representing code as data is fucking amazing Jul 01 09:08:57 barq, you got cut off Jul 01 09:09:06 try accessing the spinners before what? Jul 01 09:09:49 yoavst, and?> Jul 01 09:10:28 Mavrik: However, I get ArrayIndexOutOfBoundsExceptions, because the listeners of the spinners try accessing the Spinners before all of them have loaded properly. Jul 01 09:10:46 barq, how could that happen? Are you setting the value before setting the adapter? Jul 01 09:11:08 hard to explain to someone didn't see before the problem Mavrik Jul 01 09:11:42 O.o Jul 01 09:14:33 Mavrik: No, I am setting the adapter and then the position. But when I am in the Activity the second time the adapter is already set. Jul 01 09:16:18 Mavrik: Actually, I also have a method that loads the last selection, so that happens without navigating back to the activity, and there I also get this problem of timing. Jul 01 09:16:36 hmm Jul 01 09:16:50 That makes little sense Jul 01 09:16:59 Since when the adapter is set, there's nothing to load data-wise Jul 01 09:17:20 So if you're having arrayoutofbounds problems, that means that adapter hasn't been set yet or you're doing some kind of wierd async stuff in it Jul 01 09:17:21 Mavrik: The adapter is set again when the data changes. Jul 01 09:17:35 Yes, and also these things run in AsyncTask Jul 01 09:19:15 So when I refresh a view I do adapter.clear(); adapter.addAll(list); adapter.notifyDataSetChanged(); spinner.setAdapter(adapter); Jul 01 09:19:26 But before that the adapter has already been set. Jul 01 09:20:51 I.e. this refresh can happen multiple times. Jul 01 09:21:53 And I have nasty stuff like runOnUiThread as well Jul 01 09:28:16 I think the problem is that the listeners are running the background while the other spinners are being set and then those spinners are reset and the newly selected positions are lost, Mavrik Jul 01 09:28:28 Hello. How do you guys track campaigns for app installs? Like using a URL shortner and google analytics? Jul 01 09:29:11 Would be good to deactivate the listeners when doing setSelection Jul 01 09:31:52 Could do something like http://stackoverflow.com/questions/21747917/undesired-onitemselected-calls/21751327#21751327 Jul 01 09:33:16 barq, honestly you should just make sure to not touch view-based logic outside the main thread Jul 01 09:33:21 and keep your order straight Jul 01 09:33:47 The listeners will still run when setting position then, though. Jul 01 09:34:01 I don't see how that problem will be solved. Jul 01 09:34:31 Because the listeners run only after all the setting has been done which leads to resetting. Jul 01 09:37:32 Mavrik: So you would not use AsyncTask when loading the UI? Jul 01 09:37:55 That's a too general question. Jul 01 09:39:39 Also, I don't know if this getTag logic will work when navigating back and forth between activities. Jul 01 09:41:27 I hope I am asking the question in the right channel. Could someone please suggest how should I build architecture specific files to be built for android-4.2? LOCAL_SRC_FILES are common to all arch and in lollipop LOCAL_SRC_FILES_{arm,x86,...} is the way to add architecture specific files but it doesn't work for jelly bean. Jul 01 09:42:19 Uh, why would that be OS specific? Jul 01 09:43:35 Mavrik: Is that a question for me? Jul 01 09:43:55 Indeed, what does ndk-build scripting parameter have to do with OS version? Jul 01 09:46:20 may be the build system changed between jb and lollipop as in lollipop, I see that architecture specific files are specified with LOCAL_SRC_FILES_${TARGET_ARCH} which gets appended to LOCAL_SRC_FILES but I don't see that happening with jellybean. Jul 01 09:46:55 infact the build __has__ changed. Jul 01 09:47:16 if I look at the differences in android master/lollipop vs jellybean Jul 01 09:47:27 uh Jul 01 09:47:32 are you compiling your own app Jul 01 09:47:37 or the Android AOSP? Jul 01 09:47:59 I am sort of backporting an existing library libavc from lollipop to jellybean. Jul 01 09:48:28 #android-root Jul 01 09:48:44 hmm Jul 01 09:49:01 sorry for the noise if the question was not for the right forum. Jul 01 09:49:46 Hmm. Jul 01 09:50:03 Can't help you with that then, I don't think AOSP uses exactly standard toolchain Jul 01 09:51:26 well the issue is not because of toolchain but I guess I am just missing some make variable which the android build system utilizes to specify files belonging to a specific architecture. Jul 01 09:51:41 Can't seem to figure out for jelly bean, Jul 01 09:53:47 hello Jul 01 09:53:50 I have an issue Jul 01 09:53:57 http://pastebin.com/6gFpW1Cv Jul 01 09:54:04 Could you guys have a look? :) Jul 01 09:54:33 willyham: seriously, you just did it again? Jul 01 09:55:04 Its all in the pastebin Jul 01 09:55:26 ask your question in the fscking channel, don't just paste a link and expect people to follow it without the slightest bit of context Jul 01 09:56:05 I am trying to call the TextView test = (TextView)rootView.findViewById(R.id.textView); Jul 01 09:56:18 and it is give me a nullPointerException Jul 01 09:56:32 i believe it is an issue with rootView Jul 01 09:56:42 there is a error inside the pastebin Jul 01 09:56:59 if someone could look I would be grateful :) Jul 01 10:01:25 you probably should pastebin your actual code, rather than a random snippet of it Jul 01 10:04:09 Do you dev leeds? Jul 01 10:04:19 on occasion, yes Jul 01 10:05:44 any good? Jul 01 10:05:55 excellent Jul 01 10:06:13 so can you see an issue? Jul 01 10:06:19 you probably should pastebin your actual code, rather than a random snippet of it Jul 01 10:06:40 they are the only two relavent parts Jul 01 10:06:43 you should know this Jul 01 10:07:14 ok then Jul 01 10:07:17 The document explains it well Jul 01 10:07:37 I'm going to stop wasting my time trying to teach you how to ask a question now, and go do something less like banging my head against a wall Jul 01 10:09:07 but, what about all the poor children !? Jul 01 10:11:05 how do I control the z-order for widgets in a relativelayout? Jul 01 10:11:16 is it the order that they are in, in the xml file Jul 01 10:11:18 ? Jul 01 10:16:03 hi Jul 01 10:36:38 moin Jul 01 10:44:57 ? Jul 01 10:54:14 johnflux: should be Jul 01 11:31:15 If I use a getter several times within a method, is it better to store that value as a local variable instead of calling the getter several times? Jul 01 11:35:28 barq: worry about it when you find out it's a problem Jul 01 11:37:23 osxorgate: Is it faster? Jul 01 11:37:42 barq: let me rephrase: who cares Jul 01 11:38:12 I do. Jul 01 11:38:26 ok, well i don't :) Jul 01 11:38:42 the compiler is probably smarter than you in this instance Jul 01 11:39:42 I thought this was something you should know as an effective Android programmer. Jul 01 11:40:03 it would be much more effective to know things about android, i think Jul 01 11:45:07 I set the position in my spinner using spinner.setSelection(10), after that the onItemClicklistener runs and it has the position set to 0. How is this possible? Jul 01 11:45:25 When debugging in the UI I can see that it is not 0 Jul 01 11:55:03 Maybe the listeners should not be set in onResume Jul 01 12:08:18 How do i get North from Azimuth ? Jul 01 12:09:40 hello Jul 01 12:09:49 I have a question about W7 and android studio Jul 01 12:09:52 ctrlshftn, when azimuth is 0° Jul 01 12:09:57 would you guys consider a nexus 5 (used) to be a good development handset ? Jul 01 12:10:05 adg its never 0 Jul 01 12:10:23 don't you get azimuth is the angle between north and other direction? Jul 01 12:10:30 I am using emulator and it's window is out of the screen Jul 01 12:10:38 I can't change it's size Jul 01 12:10:52 or move it Jul 01 12:11:19 if you never get 0°, take an error delta, so when azimuth is +-delta Jul 01 12:11:21 adq when i point the phone to north, its show 3.14 Jul 01 12:11:28 same for south Jul 01 12:12:50 ctrlshftn, there are zillion of examples on the web Jul 01 12:13:06 Is something wrong with my sensors? Jul 01 12:13:14 3.14 is pi Jul 01 12:13:20 How do i calibrate it? Jul 01 12:13:26 you probably misunderstood the values Jul 01 12:13:43 pi is in radian, not in degree Jul 01 12:13:52 which is exactly the correct value for north in radian Jul 01 12:13:59 I get that. But why is it never 0? Jul 01 12:14:34 it's the same Jul 01 12:14:37 modulo pi Jul 01 12:14:54 0° or 360° is also pi Jul 01 12:14:59 oh okay ! Jul 01 12:15:18 aaalk, the emulator suffers of many issues Jul 01 12:15:29 try to recreate an avd maybe, or use a real device Jul 01 12:15:38 there is also genymotion (x86) Jul 01 12:19:00 hmm I use original android-studio default preset for nexus 5 and it's quite big, non-scalable and I can't rescale or move it anywhere. Jul 01 12:25:30 hi Jul 01 12:31:41 ci sono italiani in questo canale??? Jul 01 12:39:30 JakeWharton: here? can I ask you something about the slides "eliminating code overhead"? Jul 01 12:41:03 Is there some way to hide the background activity while a progressdialog is loading ? Jul 01 12:43:00 wviana: how do you mean? Jul 01 12:43:37 thepoosh: the first thing that I do after setContent in my activity is open a ProgressDialog. Jul 01 12:43:47 after loading all data i dispose it. Jul 01 12:43:54 ok Jul 01 12:44:04 and what are you asking? Jul 01 12:44:25 is there some way to hide this activity until the loading is done ? Jul 01 12:45:01 just play with visibility Jul 01 12:48:48 Has someone worked with Polar devices (maybe even a Polar Loop)? I can't get it to pair and starting a scan each time I want to talk to it is a bit annoying Jul 01 12:55:23 Kryil-: is that bluetooth? Jul 01 12:56:03 SpaghettiCat: yes. Jul 01 12:56:44 Kryil-: you should analyse the bluetooth communication happening, because without a log I don't know how you can be helped Jul 01 13:01:19 is there a difference between writing cursor.moveToFirst() and cursor.moveToPosition(-1)? Jul 01 13:02:53 wow, webscraping got more difficult :( Jul 01 13:02:55 SpaghettiCat: is a logcat log with a "bluetooth" filter enough? Not entirely sure what you exactly need Jul 01 13:05:57 I have an Activity where I load a lot of data than put it into the Activity view. I'm doing all this in onCreate. The problem is that the views get it's sizes before I populate all the data. So, when I do set a the height to constant, everything works great. When wrap_content. Nothing inside the views that I do inflate shows up. Jul 01 13:13:39 Kryil-: when I was troubleshooting problems with the Linux bluetooth stack, bluez-utils would give me the annotated communication that was happening, like so: http://pastie.org/10268112 Jul 01 13:13:53 Then you can tell what's happening and where's it all going wrong Jul 01 13:19:54 thepoosh: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/database/AbstractCursor.java Jul 01 13:20:28 thanks Jul 01 13:20:29 looking Jul 01 13:20:47 thepoosh: as you can see, moveToFirst simply proxies to moveToPosition passing in the value of 0 Jul 01 13:21:44 this means the moveToPosition(-1) might be better than this Jul 01 13:22:08 thepoosh: why would it make it better? Jul 01 13:22:54 my coleague claimed that it skips the first item if you use moveToFirst Jul 01 13:23:07 i cannot disprove this but it sounds like bullshit Jul 01 13:23:52 thepoosh: of course you can disprove it. simply write a sample app. i think he might be thinking of moveToNext, starting at position 0. Jul 01 13:24:09 in that case, it would probably skip the first item Jul 01 13:24:26 will give it a try! Jul 01 13:24:30 firing up the old AS Jul 01 13:29:10 i just switched to android studio from eclipse and migrated my project. Copying of ic_launcher-web.png icon was ignored. Where should i copy it to? Jul 01 13:30:37 adkins: I think res/drawable Jul 01 13:31:05 who knows for sure? ;) Jul 01 13:31:41 I'm reading about Table layouts here: https://developer.android.com/guide/topics/ui/layout/grid.html What does it mean by "cells cannot span columns, as they can in HTML"? Jul 01 13:44:32 can someone please tell me what makes a java file get executed first? Jul 01 13:44:44 how does android studio know what file is the MAIN Jul 01 13:44:45 ? Jul 01 13:47:11 learn java Jul 01 13:47:50 pfn: I have ... roughly 4 years ago : / Jul 01 13:48:06 cart_man: Look in your Manifest file, the "main" activity is indicated in the Jul 01 13:48:33 SpaghettiCat: Ahh ok thanks ! Jul 01 13:48:35 I mean it's "indicated with the.." Jul 01 13:48:39 np Jul 01 13:50:57 so... android default implementation for contentvalues is null for testing?? Jul 01 13:51:50 cart_man, then you don't Jul 01 13:51:53 alexfu, huh Jul 01 13:52:42 pfn: writing a unit test that writes values to ContentValue, and debugging it I found that calling `new ContentValue()` returns null Jul 01 13:54:02 well.. not null but just does nothing i guess Jul 01 13:55:05 alexfu: doesn't that constructor return an empty set? Jul 01 13:55:33 ctor can never return null Jul 01 13:56:11 also, android.jar is without implementation Jul 01 13:57:11 i dont understand why ContentValues needs to be mocked at all.. It's simply a wrapper around a Map implementation. Jul 01 13:57:56 oh god Jul 01 13:58:01 the leap-second is striking the internet Jul 01 13:58:15 eeyup Jul 01 13:58:40 which directory does the web launcher icon go in AS? Jul 01 13:59:50 what's a web launcher? Jul 01 14:00:04 play store icon 512x512 Jul 01 14:00:17 it goes to play store publish console. Jul 01 14:01:03 ok never done publishing yet....so you give it to play store somehow manually? Jul 01 14:11:37 ehi guy, somebody are using NAS? Jul 01 14:35:27 Is there a way to pass authentication credentials to VpnBuilder? Jul 01 14:49:48 is there a way to populate models in android with the xml files? Jul 01 14:51:23 ow wow, nvm Jul 01 14:51:27 gonna just write it in code Jul 01 15:19:43 is this room for assisting in android development, or is it more of just a hangout spot for devs? Jul 01 15:20:10 JasLap whatever you want Jul 01 15:21:33 hey guys, any help with this problem: https://stackoverflow.com/questions/31152402/android-kitkat-cant-get-accessibility-service-to-show-on-services-list ? Jul 01 15:23:30 any tips/clues/ideas/advices are appreciated. that problem is driving me mad. Jul 01 15:35:03 Crashlytics is working great in Genymotion, but causes a java.util.concurrent.TimeoutException on any actual device. Has anyone using Crashlytics noticed anything like this? Jul 01 15:44:04 works fine for me Jul 01 15:44:09 accessibility service Jul 01 15:44:15 check your network theblang Jul 01 15:44:41 adq: Network connectivity is fine Jul 01 15:44:52 adq: Have tried on multiple hard devices, does the same thing on all. Jul 01 15:46:02 So I have a "VpnActivity" class that I used a VpnBuilder to construct, for the most part. When I click the button, the key icon pops up for half a second in the notification bar, but then it drops. The log says something about authentication, but I didn't think it would really get that far. So, the question, how would I pass the username and password to the Vpn class? Does anybody know where it looks for that kind of thing? I don't think Jul 01 15:46:02 there's anything in VpnBuilder to do this. Jul 01 15:46:19 if i have something like class numpad extends GridLayout ... can I set the its attributes in XML somehow? Jul 01 15:46:21 now I have a merge tag and set the attributes in the constructor.. Jul 01 15:47:19 if Numpad extends Gridlayout, you can use all xml attributes that would work on Gridlayout too Jul 01 15:47:23 and define your custom ones Jul 01 15:47:24 Even if I had a popup that took it from the user, where would I put it in the Vpn class? Jul 01 15:48:33 Android studio tells me that my min sdk is too low. Is there a function i can use to find out which code snippets are effected by it? Jul 01 15:48:47 (i am new to AS) Jul 01 15:49:31 danijoo to clarify, now i have in numpad constructor this.setColumnCount(3). instead i'd want to define it in the layout xml file Jul 01 15:50:04 just do it :p Jul 01 15:50:40 how is what i want to know ;) Jul 01 15:50:59 the layout is instead of so i can't set it as is Jul 01 15:51:03 look in the docs for the correct xml attribute Jul 01 15:51:44 Zalabinsky, you set it in the tag Jul 01 15:51:49 not in merge Jul 01 15:52:18 pfn, i would rather not have each user of have to do it.. Jul 01 15:52:27 then setColumnCount Jul 01 15:52:36 no reason to set it in xml Jul 01 15:52:55 thanks Jul 01 15:53:13 man, this brian gladman implementation of aes is fast Jul 01 15:53:15 I'm looking to push as much of our stuff to xml as we generate stuff from them Jul 01 15:55:21 too bad rewriting it in renderscript is too big to deal with Jul 01 15:55:25 I'd rather not have to ndkbuild... Jul 01 15:57:59 pfn, also not sure AES can benefit a lot from parallelism, since sbox n+1 depends on sbox n, and even inside the encrypt function there are many dependent computation of a previous one Jul 01 15:58:17 you can't parallelize dependencies like that Jul 01 15:58:25 this is what i am saying Jul 01 15:58:28 oh, misread what you said Jul 01 15:58:32 there are few op which can be done in parallel though Jul 01 15:58:49 I don't want it done in parallel, only reason why I want to use renderscript is for near-native performance Jul 01 15:58:58 yeah but then you have NDK Jul 01 15:59:01 without having to compile an ndk shim for every single platform Jul 01 15:59:08 but for sure renderscript provides you the jni glue Jul 01 15:59:10 yeah, but then I have to build a library for every single ABI Jul 01 15:59:15 which sucks Jul 01 15:59:20 and some optimization because it compiles on the fly the bytecode with llvm Jul 01 15:59:21 pfn wouldn't you rule out hardware-assisted AES in the future then? Jul 01 15:59:22 that's the selling point of RS for me Jul 01 15:59:40 Chainfire, pretty much, although, the briangladman AES does make use of via ace instructions Jul 01 15:59:43 on intel Jul 01 15:59:45 * pfn shrugs Jul 01 15:59:46 there is a major issue with RS, some device does not ship the drivers :x Jul 01 15:59:49 and appears I got it for free Jul 01 16:00:03 sometimes, some function fails (like pow, forced me to use native_pow) depending on the device too Jul 01 16:00:09 Chainfire, also, I don't necessarily care about native aes instructions Jul 01 16:00:13 it's horrible because impossible to know without hitting the bug Jul 01 16:00:19 adq, kind of a bummer Jul 01 16:00:26 on the contrary, you don't have this issue with NDK Jul 01 16:00:35 yeah but this is how it is Jul 01 16:00:39 adq, indeed, my build is already setup with ndk Jul 01 16:00:41 I just don't like it Jul 01 16:01:10 pfn not talking about the instructions per se, though I thought the Java ciphers were supposed to be able to have HWA providers for these things, that connect to the kernel's crypto API if available (though I don't think this is implemented in Android right now) Jul 01 16:01:31 Chainfire, they don't at the moment, and the framework ciphers are godawful slow Jul 01 16:01:41 lol, 2015 Jul 01 16:03:31 by the way the RS jni glue suffer from major issue, it creates a new each time an invoke_function is used, it could have been reused Jul 01 16:03:46 adq, I kind of like that it creates anew Jul 01 16:03:50 i tried to alterate myself the generated code to avoid these useless alloc when you call many times the same invoke Jul 01 16:03:53 but it's too much of a hassle Jul 01 16:03:57 adq, because otherwise previous state will fuck up your kernel runs Jul 01 16:04:02 nonon Jul 01 16:04:06 i talk about the new in java Jul 01 16:04:10 not inside RS Jul 01 16:04:14 ok Jul 01 16:04:20 just look at the generated java side Jul 01 16:05:15 by the way, invoke does not concern the kernel functions Jul 01 16:05:27 indeed Jul 01 16:05:47 anyway, i really like RS :) Jul 01 16:05:56 i'm just afraid a day they decide to drop it Jul 01 16:05:59 I haven't found a compelling usecase for it yet Jul 01 16:06:05 it's like ndk-lite Jul 01 16:06:08 yep Jul 01 16:06:25 but there are some benchmark showing you depending on the scenario the benefits Jul 01 16:06:35 parallelism over kernels is pretty slick, but I don't do anything that can take advantage of that Jul 01 16:06:40 and indeed, for me, lazy as i am, it just prevents me to spawn the whole NDK stuff Jul 01 16:06:49 Is RS more likely to be compatible than NDK? Jul 01 16:06:54 no Jul 01 16:06:54 ndk stuff isn't even that hard... Jul 01 16:07:04 i'm using it for audio DSP Jul 01 16:07:05 I find it easier to work with ndk than rs... Jul 01 16:07:16 but i haven't benchmarked anything, it's just zillion faster than java of course Jul 01 16:07:27 But Java works on more devices in my testing Jul 01 16:07:29 even with the overhead to transfer data more than 48000 times per second Jul 01 16:07:34 between both sides Jul 01 16:07:46 err a bit less than the sample rate in fact, since i'm buffering Jul 01 16:07:53 "many times" we will say Jul 01 16:07:59 dm88, totally Jul 01 16:08:10 but you cannot use RS without java dm88 Jul 01 16:08:19 huh? what does java have to do with this Jul 01 16:08:35 the debate is rs vs. ndk, not rs vs. java Jul 01 16:08:43 eheh Jul 01 16:08:45 if you need performance, your 2 options are to do it in rs or ndk Jul 01 16:09:03 or in lisp? :troll face: Jul 01 16:09:07 now, between those two, there are different problems, rs has the benefit of parallelism Jul 01 16:09:19 adq :D Jul 01 16:09:41 hello Jul 01 16:09:43 Question: I'm new to android and am using retrofit / gson / okhttp stack for api client. just wondering if it is possible to do something like @GET(getString(R.string.some_api_path)) for my interface declaration? Jul 01 16:09:48 ugh, is bintray slow as shit right now or something... Jul 01 16:09:51 or does it even make any sense..? Jul 01 16:10:04 leap second bug Jul 01 16:10:24 they seem to be pretty quiet about it, but seriously many services were problematic (last one for me was simply soundcloud) Jul 01 16:10:47 pushing to github is biting my ass, too Jul 01 16:11:56 that is why we use bitbucket Jul 01 16:12:06 well, not really but we still use it Jul 01 16:15:37 well, it went, finally Jul 01 16:15:38 https://github.com/pfn/keepshare/commit/b048334ccbaf4229c30974d103fedda733de7004 Jul 01 16:15:38 heh Jul 01 16:16:13 only thing I needed to accelerate was the aes key transformation Jul 01 16:16:27 https://github.com/pfn/keepshare/blob/b048334ccbaf4229c30974d103fedda733de7004/src/main/jni/ndk/jni.c Jul 01 16:16:39 framework aes: 9500000 transformations = 120 seconds Jul 01 16:16:50 brian gladman aes: 9500000 transformations = 6 seconds Jul 01 16:24:55 Anyone know about in app subscription payloads now missing orderId in INAPP_PURCHASE_DATA? I see this bug for beta/alpha, but I have no idea what happened to it after it was marked for "wrong forum" https://code.google.com/p/android/issues/detail?id=170114 Jul 01 16:48:37 Where should I begin from to start with android Animation? Jul 01 16:49:54 wviana: youtube channel for dev bytes Jul 01 16:49:56 wviana: http://developer.android.com/training/animation/index.html :) Jul 01 16:50:04 look for chat hesse Jul 01 16:50:14 like this - https://www.youtube.com/watch?v=YCHNAi9kJI4 Jul 01 16:56:05 Anyone know where I can sample photo library to test out Google Photos? It would be a great ohave access to sample photos like the ones that they show in demos for Android GOogle PHotos Jul 01 17:04:29 Hello everyone. I've got a very annoying issue. I got 4GB of internal storage and only 53MB of installed apps. When i try to install an app it says insuficient space. What could be going on? Jul 01 17:05:55 fabio_: #android Jul 01 17:05:59 not here Jul 01 17:07:09 I was able to move emulator's window around. The workaround solution is to temporarly change PC's screen resolution while emu is running... Jul 01 17:07:23 ugh, wtf are uploads everywhere slow today Jul 01 17:09:27 uploading to play dev console taking forever Jul 01 17:09:34 I have 6mbps upload, so not my bandwidth... Jul 01 17:09:40 github was slow as shit, too, and so was bintray Jul 01 17:10:21 tubes must be clogged Jul 01 17:13:11 seriously, uploading my new apks is taking forever... Jul 01 17:13:15 maybe it's chrome eating shit... Jul 01 17:13:19 but speedtest ran fine in chrome... Jul 01 17:13:31 uploading apks does always seem to be super slow. dunno why Jul 01 17:13:35 then again, git pushes and bintray publishes ran from cli Jul 01 17:13:56 not like today slow, though Jul 01 17:14:52 getting like 30kbps to google... Jul 01 17:22:04 Can anyone vouch osmdroid for mbtile data? Jul 01 17:24:13 lasserix: yesterday you said if I use POI I have lamedata, did you mean data which can't be rwritten to? Jul 01 17:24:28 lasserix: sorry, if I add the POI info in my apk Jul 01 17:26:03 4all : how to get update OS KITKAT in eclipse ADT ?? Jul 01 17:30:33 mattias_Q, you cannot. You are the wrong channel too, try #android-root Jul 01 17:30:40 on* Jul 01 17:31:50 this is update for IDE not for device Jul 01 17:32:02 oh, then open your sdk manager Jul 01 17:32:11 select the version you need in it Jul 01 17:33:09 mattias_Q, http://developer.android.com/tools/help/sdk-manager.html Jul 01 17:33:14 i get update kitkat but can not be used..... Jul 01 17:34:35 you need to come with a more precise description of your issue if you want someone to be able to help you Jul 01 17:37:42 it seems like nobody really knows much about the vpn side of Android. Jul 01 17:37:58 vpn apps? Jul 01 17:39:19 no. Making it happen from the coding side. Jul 01 17:39:56 gavit: umm Jul 01 17:40:13 JasLap, doesnt the system handle that. in the settings? Jul 01 17:40:27 i think he has to implement it Jul 01 17:40:38 (if the issue is passing login + passwd) Jul 01 17:41:03 Well sure, but I'm building something that needs settings hard-coded. I have a class that seems to be working, but I can't figure out how to pass that class the username and password. Jul 01 17:41:03 gavit: oh, what i meant was, you have to copy mydatabase.db to either assests or /res/raw, then copy it into your /databases/ folder (with code). problem here is, you will always be stuck with that .db file in assests or res/raw, that will never be touched except that first time Jul 01 17:41:30 adq: you're psychic haha Jul 01 17:41:38 no i just backlogged ;) Jul 01 17:42:06 oh. MIne doesn't go back that far. Jul 01 17:42:16 lasserix: it's either as a db or as code. has to be 'somewhere' Jul 01 17:42:19 JasLap, take a look at https://android.googlesource.com/platform/frameworks/base/+/a8529f68671a8a118751cb6ad577f44eaf076b96/packages/VpnServices/src/com/android/server/vpn/VpnServiceBinder.java Jul 01 17:42:24 but it's "private" Jul 01 17:42:53 and this is part of AOSP, not the regular api Jul 01 17:43:14 JasLap, what do you mean by you have a class? Jul 01 17:43:19 Did you build a VpnService? Jul 01 17:43:25 What kind of VPN is it? Jul 01 17:43:40 gavit: you can put it on a server and push it Jul 01 17:43:51 gavit: i was just mentioning it so you knew Jul 01 17:43:58 Anyone have expireince with osmdroid or mapbox sdk? Jul 01 17:47:25 Mavrik: I used a VpnBuilder to take care of most of it. When I click the button I assigned to it, the key pops up in the notification bar for half a second and disappears. THe log talks about authentication beffore it quits. So I'm just trying to figure out how I would pass that to the class in a way that it will put it where it needs to go. Jul 01 17:48:26 adq: I'm gonna play around with what I can from that. I'm relatively new to the world of Android, but I'm assuming that AOSP is something that doesn't come stock with studio? Jul 01 17:48:33 JasLap, I don't see a VpnBuilder anywhere in the API Jul 01 17:48:44 Are you talking about VpnService.Builder? Jul 01 17:48:52 JasLap, AOSP = Android open source project Jul 01 17:48:59 its the source files for the android system Jul 01 17:49:08 JasLap, AOSP is the platform code, part of the OS. Some stuff used in it are not available for developing a regular app Jul 01 17:49:09 ohhhhhh Jul 01 17:49:28 but sometimes, you will find interesting snippet in it Jul 01 17:49:29 gotcha. well in that case, that may just tell me what I need to know to make this happen Jul 01 17:49:48 You can still use the methods via reflection, can't you? Jul 01 17:49:53 NO. Jul 01 17:49:55 er, no Jul 01 17:50:06 becuase the OS won't let you just inject auth data :D Jul 01 17:50:10 How can you use them then? Jul 01 17:50:28 Yeah, I'm wondering what adq means by that also :) Jul 01 17:50:40 You can use private APIs Jul 01 17:50:41 You do have VpnService which is meant to let you add your own VPN implementation Jul 01 17:50:48 Just no guarantee they won't break when updating Jul 01 17:50:59 barq, not for APIs protected with security Jul 01 17:51:02 i never talked about reflection, don't be confused Jul 01 17:51:45 Mavrik: http://developer.android.com/reference/android/net/VpnService.Builder.html Jul 01 17:51:52 Mavrik: that's what I used. Jul 01 17:51:56 Ah. Jul 01 17:52:05 What is this called then used in the first answer? http://stackoverflow.com/questions/867518/how-to-make-an-android-spinner-with-initial-text-select-one Jul 01 17:52:07 JasLap, that's to provide your own VPN implementation Jul 01 17:52:30 that means that YOU need to provide the full VPN protocol handling Jul 01 17:52:31 i think he has to implement it Jul 01 17:52:32 Mavrik: right. I got it going for the most part. Just this last hurdle to get over. Jul 01 17:52:33 :)) Jul 01 17:52:39 which includes authentication and everything. Jul 01 17:53:01 Oh. so there isn't really a standard way of making this happen? Jul 01 17:53:03 Android will set up your interface, but then you need to handle authentication and communication and everything connected to that with remote server Jul 01 17:53:12 JasLap, I don't know what "this" is Jul 01 17:53:30 Mavrik: Sorry. The authentication portion of things. Jul 01 17:53:30 login + pwd auth to the server Jul 01 17:53:34 VpnService interface is meant for apps like OpenVPN, Cisco etc. that want to add their own VPN protocols to builtins Jul 01 17:53:49 JasLap, and you haven't answered when I asked which VPN protocol do you use :) Jul 01 17:55:33 Mavrik: PPTP. I'm terrible with networking, so I couldn't tell you what that means haha. But that's what tthe guys here tell me. Jul 01 17:55:40 Ah. Jul 01 17:55:58 VpnService is a bit too low level for you then. Jul 01 17:56:37 Mavrik: NOOO!! Don't tell me I have to start over with something new!!!! Jul 01 17:57:30 I think I'm a bit too low level for this VPN crap haha Jul 01 17:58:38 I need to go to a bootcamp or something so I can understand all this jargon. The people here don't undderstand, I just write code!!!! Jul 01 18:00:05 i thought some of the vpn clients just bundle their own OpenVpn Jul 01 18:10:36 I'm having a particularly weirld android.content.res.Resources$NotFoundException Jul 01 18:10:58 It comes from the constructor of an EditText Jul 01 18:11:12 Hey all, having an issue rooting a non-traditional device. I've got a Freescale i.MX6 SabreSD board for which I've built my own system image with root access. I've installed the supersu su binary in system/xbin, chown'ed and chmod'ed it, and copied it over to /system/bin. running su -v gives me "2.45:SUPERSU", but SuperSU can't seem to find the binary and therefore gives me an error. Can anyone help with this? Jul 01 18:11:21 Hyello: Show your code Jul 01 18:12:10 pjry, read channel topic Jul 01 18:12:59 There's a lot of irrelevant stuff and it's spread across several classes, but I'll give what I can. Jul 01 18:13:46 I can rephrase my question to something like "in my code, "Process su = Runtime.getRuntime().exec("su"); is throwing an exception" if you'd like. I am getting no answers from any other channels so I took a shot here. Jul 01 18:14:12 pjry: we’re not experts in rooting here Jul 01 18:14:18 I can rephrase my anwer to "wrong channel" :P Jul 01 18:15:18 Starting from the activitiy it gives passes 'this' as context to a method which constructs an custom view inside of which I pass that context to an EditText to construct it: Jul 01 18:15:45 Hyello, nobody can help you debugging if you dont show your code Jul 01 18:15:47 EditText tb = new EditText(c); Jul 01 18:15:48 and a stacktrace Jul 01 18:15:54 http://imgur.com/jacoj Jul 01 18:16:07 Where c is the context Jul 01 18:16:18 seriously, there is a whole lot of stuff that could cause your problem. We’re not going to guess and stab at everything it could be Jul 01 18:16:35 android.content.res.Resources$NotFoundException: File res/drawable/tw_edit_text_holo_dark.xml from drawable resource ID #0x10806dc at android.content.res.Resources.loadDrawable(Resources.java:2974) at android.content.res.TypedArray.getDrawable(TypedArray.java:602) at android.view.View.(View.java:3564) at android.widget.TextView.(TextView.java:878) at android. Jul 01 18:16:45 Pastebin then? Jul 01 18:16:46 ._. Jul 01 18:16:50 yes Jul 01 18:17:09 are you sure that’s the right drawable file? Jul 01 18:17:22 http://pastebin.ca/3042635 Jul 01 18:17:40 I'm not sure where that drawable is coming from. Jul 01 18:18:19 I tried replacing the EditText with a TextView and the exception went away Jul 01 18:18:45 weird error message. seems like it cant find a resource that android should provide Jul 01 18:18:51 But as far as I can tell, the TextView(Context) constructor should go to the same code as the EditText(Context) constructor Jul 01 18:18:52 are you using support library? Jul 01 18:18:57 Nope. Jul 01 18:19:20 JakeWharton: If I am setting an interceptor on the okhttpclient that is trying to clone the stream (to archive) and the response body becomes null as a result, I screwed up the copying of the stream? Jul 01 18:19:29 JakeWharton: *while using Retrofit Jul 01 18:19:49 The error only seems to happen when I construct EditTexts inside of custom components. Jul 01 18:20:03 Specifically, in the custom component's constructor Jul 01 18:20:26 Hyello: have you got the style set somewhere in your themes pointing to holo? Jul 01 18:20:50 MyWay, Show the whole custom constructor please Jul 01 18:21:11 hmm Jul 01 18:21:11 https://github.com/pilgr/Paper Jul 01 18:21:17 Anyone played with that yet? Jul 01 18:22:10 I do use a custom style for the app. Jul 01 18:22:28 Mavrik, the most interesting part in the benchmark is missing :/ Jul 01 18:22:32 comparision to sqlite Jul 01 18:22:38 Jul 01 18:22:48 Hyello, use pastebin Jul 01 18:22:53 this is way to hard to read Jul 01 18:22:59 Hmm, I'm seeing this as something you use when you don't wanna deal with sqlite Jul 01 18:23:08 yeah Jul 01 18:23:16 looks really flexible Jul 01 18:23:23 http://www.pastebin.ca/3042641 Jul 01 18:24:01 MyWay, Show the whole custom constructor please Jul 01 18:24:14 that was for you Hyello . wrong highlight :p Jul 01 18:24:38 Ok, I'll show up to the error in the constructor (it's pretty big) Jul 01 18:25:17 isnt there a good useful container for an exapndableListAdapter :S Jul 01 18:25:52 SortedMap> seems so odd Jul 01 18:26:26 http://www.pastebin.ca/3042646 Jul 01 18:26:38 and even that has no get(int pos) Jul 01 18:28:39 Also, I should mention that this error doesn't hhappen when I run it on a different device running API 19 instead of 18. Jul 01 18:29:22 I don't know if it's a device-specific problem or API-specific. Jul 01 18:30:06 Mavrik do you know what it uses for its low level storage? generally i wouldn't touch these newfangled persistance libraries with 10 foot pole; seeing the h2 guys struggle to get their stuff working on android without corrupting the datastore has been enlightening Jul 01 18:30:28 with processes being killable at any moment, etc. sqlite is just damn robust Jul 01 18:30:44 you pretty much need something as robust as sqlite on android Jul 01 18:32:05 g00s, just checked Jul 01 18:32:28 seems like they just write to files. Jul 01 18:32:44 https://github.com/pilgr/Paper/blob/master/paperdb/src/main/java/io/paperdb/DbStoragePlainFile.java Jul 01 18:34:04 ever write of a new obj creates a new temprary backup file >.< Jul 01 18:34:08 every* Jul 01 18:34:53 * g00s sticks to sqlite ... and some h2 mvstore as ongoing experiment ;) Jul 01 18:35:35 if this thing is just a k/v store using kryo ... you can use mvstore with a little kryo adapter and probably get far better mileage out of it Jul 01 18:36:15 danijoo somebody needs to ask if this is web scale :D Jul 01 18:36:21 haha Jul 01 18:36:38 Any clue here? This error actually makes zero sense to me. I know how I can get rid of the error, but I'd like to know why constructing an EditText in the constructor of a custom-component causes this error but a TextView doesn't. Jul 01 18:39:23 Hyello, i dont :/ Jul 01 18:41:08 I'm thinking it's either an API thing or something specific to this device (i.e. Samsung Galaxy Note SM-P605V) Jul 01 18:42:14 g00s realm.io looks really good Jul 01 18:42:51 Hyello, no idea but tw_edit_text_holo_dark.xml does not seem standard Jul 01 18:43:04 edit_text_holo_dark.xml on the contrary is Jul 01 18:43:34 so you should check your sdk source for the resources you target, it's probably not present in the api where you can reproduce the issue Jul 01 18:43:42 the error message is pretty clear about not find the resource Jul 01 18:43:50 lasserix hmm. i was looking at storIO .. which just uses plain sqlite https://github.com/pushtorefresh/storio Jul 01 18:44:03 and samsung could also have broken something or changed a name, they are famous for that Jul 01 18:44:17 I believe I'm compiling targeting API 14, if that affects anything. Jul 01 18:44:38 g00s, realm is really fast it looks like Jul 01 18:44:47 any in API14 should be supported above, even if deprecated Jul 01 18:44:53 Let's say I have a Activity which shows you a certain location. If I want to start that Intent with a Model of the Location, Icon, Address, GeoLocation, etc. How do I parse the model to my Intent? Jul 01 18:44:57 otherwise this would break retro-compatibility Jul 01 18:45:30 what you can do is provide the same xml resource inside your res/ folder Jul 01 18:45:54 so you don't depend on the availability (or not) of the resource in the device running your code Jul 01 18:45:58 and you get no surprise too Jul 01 18:46:43 But why don't I get the same error when I do the same thing direct inside my activity? Jul 01 18:46:50 *directly Jul 01 18:47:04 that i have no idea Jul 01 18:47:21 debug, breakpoint, step-into Jul 01 18:47:26 compare the working and the non working case Jul 01 18:48:26 also in your pastebien, if you use a custom style Hyello, you did not provide the style in your edittext constructor Jul 01 18:48:46 Has anyone used Android's Alpha/Beta backend? Can you tell me if my users are supposed to be able to actually search for an unreleased product in the Play Store or do they have to follow the link provided? Jul 01 18:48:54 I just set the custom style in the xml for my Activities. Jul 01 18:49:34 I don't use the style for components. Jul 01 18:49:39 ok Jul 01 18:49:57 i don't know more anyway, Jul 01 18:50:35 android-dev040, you're supposed to provide them a link to a google groups or g+ community Jul 01 18:50:49 they will not find your apps until they are registered as "testers" Jul 01 18:51:08 Alright, well, I guess I'll keep looking. Thanks guys. Jul 01 18:51:56 how would you implement a favorite star in a ListView such that it recycled correctly Jul 01 18:52:05 adq: That's what I mean...they're already members of the google group as testers. Should they find the app in the market or do they have to follow the http://play.android.com/apps/testing/com.example.app link? I have tried it myself and while the link works, searching for it in the market doesn't seem to. Jul 01 18:52:32 then, follow the the http://play.android.com/apps/testing/com.example.app link Jul 01 18:53:36 searching even for a regular app give non pertinent result, how ironic it is Jul 01 18:53:54 adq: Alright thanks Jul 01 18:55:56 anyone read this? not really android, looks interesting http://shop.oreilly.com/product/9781118714706.do Jul 01 18:56:31 "Patterns, Principles, and Practices of Domain-Driven Design" Jul 01 19:00:54 i think there is a copy at work here Jul 01 19:12:53 lasserix they must read good stuff there Jul 01 19:16:59 Qt 5.5 has bluetooth low energy support O.o Jul 01 19:18:45 http://blog.jetbrains.com/idea/2015/07/intellij-idea-15-eap-kotlin-love/ Jul 01 19:19:40 g00s, the regex thing is nice Jul 01 19:25:16 hey, anybody know how i could execute a binary from within an android app? http://stackoverflow.com/questions/31168680/elevate-application-rights-to-execute-binary Jul 01 19:30:15 x29a, Runtime.exec() Jul 01 19:30:36 x29a, you can execute anything you have privileges to execute. Not knowing what you want to do I have no idea if it'll actually work for you Jul 01 19:31:28 I have a SparseBooleanArray, should I .put(pos, false) or .delete(pos)? Jul 01 19:32:43 moogoo: depends on what you want. if you put(pos, false), collection.contains(pos) will return true. Jul 01 19:35:39 I think I'm just using get(), but later I'll need a list of all true values from the array and their position, so maybe it would be easier if I just deleted false values Jul 01 19:36:38 moogoo, if you dont need that value anymore, use delete Jul 01 19:37:16 its a list of boolean values. put() adds/changes the value, delete removes it Jul 01 19:38:01 but calling get() on a position that is not in the list returns false by default, so what's the point of using put to set a value to false Jul 01 19:38:01 Depends if you need to distinguish the case “not present” and “is false” Jul 01 19:38:43 If the two cases are equivalent, then your datastructure is overkill: just use a Set Jul 01 19:38:55 x29a this can actually be a tricky subject, which device are you testing it on ? Jul 01 19:41:00 dragorn: i used Runtime.getRuntime().exec() which fails for me Jul 01 19:41:06 Chainfire: nec terrain Jul 01 19:41:29 usually putting it in your app's files dir, chmod 0755 works Jul 01 19:41:30 i assume it has to do with their kernel Jul 01 19:41:42 x29a, well, that's how you do it. Without having any idea what your failure error is, I've got nothing. Jul 01 19:41:46 alternatively, try including it as libBLABLA.so and run that Jul 01 19:42:00 HIghly doubtful they're blocking forkexec in the kernel. That wouldn't be very functional. Jul 01 19:42:16 maybe for certain paths Jul 01 19:42:42 they tinkered with seek() as some sort of security mechanism Jul 01 19:42:56 ill try again and see if i can get more than the EPERM or whatever it was Jul 01 19:43:02 Highly doubtful; but since I have no idea what you're trying to exec or what the error was Jul 01 19:43:11 Well for starters, see if it's in a directory you can even read Jul 01 19:43:22 and if it's globally executeable Jul 01 19:43:31 as adb, i cant read, as app i can Jul 01 19:43:39 ill execute an ls -la next Jul 01 19:43:47 there's plenty of ways that system binaries are locked down because apps have no need to access them that have nothing to do with the kernel Jul 01 19:43:56 what im trying todo: root that thing Jul 01 19:44:20 x29a, where you should head: #android-root Jul 01 19:44:27 let me set it up and try again, then i can provide the exact error/exception Jul 01 19:44:33 danijoo: thanks! Jul 01 19:45:05 got the procedure figured out (i think), just want to pack it all up as an app Jul 01 19:58:15 Has anyone developed on RFID phones like Zebra/Symbol/Motorola TC75? Jul 01 20:11:10 such a nice feeling when you optimize something that noticably improves responsiveness of app Jul 01 20:15:15 I want a module containing my unit-tests that depends on my :app, in my module :unittests i have a dependency "compile project(':app')" but I get a warning: Warning:Dependency bar:app:unspecified on project unittests resolves to an APK archive which is not supported as a compilation dependency. File: /Users/foo/src/android/bar/app/build/outputs/apk/app-release-unsigned.apk Jul 01 20:16:05 crised: RFID phones? You mean phones with NFC? Jul 01 20:17:56 It looks like my "UnitTest" library can really only depend on another library, I need to pull out business logic into yet another module in order to test it Jul 01 20:20:18 explodes: if you're doing different modules, you might need to use a library module / a pure java module for things you want to unit test. otherwise you usually use the unit test subfolder in your app module. Jul 01 20:20:59 groxx: can you put plain old boring junit **unit** tests in that folder? Jul 01 20:22:42 Thorbear: not really, motorola enterprise has some of them Jul 01 20:23:16 Thorbear: https://www.zebra.com/gb/en/products/mobile-computers/rfid-handhelds.html Jul 01 20:27:03 explodes: yep. that's what the unit test support in Android studio gives you. otherwise / before you'd have to make pure java module and test those, and use the module in your app Jul 01 20:27:48 crised: Well, I've only developed for phones, and only tried my hands at the various Mifare protocols, but what is your question about RFID? Jul 01 20:27:50 explodes: ah, it's just src/test/ Jul 01 20:28:21 explodes: there are also "android unit tests" that run on a device, instrumentation tests, etc. they all go in your main app module now, in different src/ folders. Jul 01 20:28:37 right right Jul 01 20:28:53 Can I run my *unit* tests with a GUI in AS? Jul 01 20:29:51 yes Jul 01 20:29:53 right click -> run Jul 01 20:30:21 That would do it :P Jul 01 20:31:19 I really have to manually select a build variant to switch between Android tests and Unit tests? Jul 01 20:32:10 nfc is a subset of rfid by the way, and use more or less the same standard Jul 01 20:32:15 it's just one freq, and it's passive Jul 01 20:32:18 so shoot crised Jul 01 20:32:27 (shoot your question) Jul 01 20:33:01 adq: not a precise question, I just wanteed to know if those devices are popular Jul 01 20:33:11 between developers Jul 01 20:33:23 here? not at all Jul 01 20:33:27 not the NFC, the one from Motorola/Zebra Jul 01 20:33:33 yes i get that Jul 01 20:34:07 this company made a great idea, you can plug with USB/Bluetooth a RFID reader http://www.tsl.uk.com/products/1166-bluetooth-rugged-uhf-rfid-reader/ Jul 01 20:34:08 and about rfid reader, brand like HID, precise, and omnikey are more famous Jul 01 20:34:52 Which android 5.0 phones are out there with changeable battery? Jul 01 20:35:00 many Jul 01 20:35:21 adq: ok, any rugged one? Jul 01 20:36:08 adq: is developing a usb app easier on android 5 than older versions? Jul 01 20:36:33 What is a usb app? Jul 01 20:36:36 developing a usb app sucks on all versions of android Jul 01 20:36:47 an app that picks USB data Jul 01 20:36:54 ugh, this PLA list view thing is fml... Jul 01 20:36:56 communicates with USB port Jul 01 20:37:08 pfn: what? Jul 01 20:37:15 crised, i have no idea, assume it's the same or easier Jul 01 20:37:37 adq: about protocols, which protocol does android likes better, usb or bluetooth? Jul 01 20:37:42 with usb host mode, it should be better Jul 01 20:37:52 since you can ship your own driver without being root Jul 01 20:37:59 (e.g. with audio MIDI) Jul 01 20:38:02 adq: I will own the device Jul 01 20:38:05 Does an AndroidTestCase need to run on an android device? Jul 01 20:38:19 no Jul 01 20:38:21 adq: to be root on stock android, do I need to use cyanogenmod? Jul 01 20:38:24 same i have no idea, it's hard to compare Jul 01 20:38:28 crised: no Jul 01 20:38:30 omg Jul 01 20:38:37 do you have a long list of question lol?. Jul 01 20:38:40 adq: just asking :) Jul 01 20:38:44 yes :) Jul 01 20:38:44 crised: root and stock are two different things Jul 01 20:38:51 barq: got it Jul 01 20:38:56 crised: #android-root Jul 01 20:38:56 #android-root for root question Jul 01 20:39:00 this is an app developer chan Jul 01 20:39:26 adq: ok Jul 01 20:39:30 looks like you need these info for your job crised Jul 01 20:40:20 adq: yes Jul 01 20:40:54 have you ever developed on Android platform? because this will probably the most difficult part, to be familiar with the platform itself Jul 01 20:40:59 than what you specifically ask Jul 01 20:41:01 adq: yes Jul 01 20:41:08 k Jul 01 20:41:24 adq: only simple stuff though Jul 01 20:41:32 still better than nothing Jul 01 20:41:45 ;-) Jul 01 20:45:35 Hello everyone! So I added the v4 support library to my dependencies which results in an aar on the classpath. Apparently IDEA/Android Studio doesn't know how to handle it though because I can't use its classes in my code, but google search results say IDEA supports the aar format. Does it really? Jul 01 20:46:54 dermetfan: add compile 'com.android.support:support-v4:22.2.0' to your dependencies Jul 01 20:48:00 explodes: AndroidTestCase: yes, on a device. and yeah, the switching between "test artifacts" is really weird and annoying imo. Jul 01 20:48:38 barq: I did. The problem is that Android Studio/IDEA doesn't know how to handle the aar. Jul 01 20:50:35 Is there a good document explaining older android build systems out there? I am trying to build a project which does not have build.xml nor build.gradle but googling around I am having trouble finding what has existed besides ant gradle and maven. Jul 01 20:51:02 can you just import it into Studio? Jul 01 20:51:02 dermetfan: by "doesn't know how to handle", what exactly do you mean? and are you using the "compile 'com.etc'" line, or did you e.g. put an .aar in your libs folder? Jul 01 20:51:27 dermetfan: Show your gradle file Jul 01 20:52:38 barq: http://pastebin.com/St0rknZw Jul 01 20:53:10 dermetfan: I don't see any compile android support Jul 01 20:53:20 oh, now I do Jul 01 20:53:42 don't put it in the android bit though Jul 01 20:54:20 lol too tired, talking bs Jul 01 20:54:23 groxx: I can compile my app using gradle, but IDEA thinks the classes are not on the classpath, so it reports errors (marks classes red when I type them out etc, "symbol not found", ...) Jul 01 20:54:39 s73v3r: thanks, I think that would work but I run into this a lot building various projects and was hoping there was just some easy build tool I was missing :-/ Jul 01 20:55:29 dermetfan: Do you have other dependencies? Jul 01 20:55:30 The problem is not how to add the library to my project, the problem is how to make IDEA understand that I added it Jul 01 20:55:32 compile fileTree(dir: 'libs', include: '*.jar') ? Jul 01 20:55:48 dermetfan: You don't, you only add dependency in the gradle Jul 01 20:55:49 barq: Nope, I just put that there in case I'll have some in the future Jul 01 20:56:03 comment that out then Jul 01 20:57:26 barq: doesn't make a difference Jul 01 20:57:53 dermetfan: How many modules do you have Jul 01 20:58:19 dermetfan: hm. dunno how "compileSdkVersion 'android-22'" works, but you probably just want a literal "22" there, no quotes. and does it work if you remove the "idea { }" block? and in general a good chunk of your file seems unnecessary and possibly causing other problems. Jul 01 20:58:49 Even AS compiled from sauce doesn't have the C++ stuff yet. I am dissappoint. Jul 01 20:58:54 I have compileSdkVersion 'Google Inc.:Google APIs:22' Jul 01 20:59:15 Chainfire: I'm under the impression that the C++ stuff isn't going to be open sourced? Jul 01 20:59:45 dermetfan: Do you have errors in your gradle? Jul 01 20:59:48 groxx: I tried a literal 22 first, but then assembleDebug complained: "failed to find target 22 : /opt/android-sdk-update-manager". The folder is called "android-22" so I tried that and it works Jul 01 20:59:53 groxx that is unfortunate Jul 01 21:00:11 I'd just start playing with CLion if it wasn't based on CMake Jul 01 21:00:40 Chainfire: my impression is pretty vague, fwiw :) but the C++ support is based on CLion, which is a non-free IDE Jul 01 21:00:40 groxx: No, how am I supposed to generate the idea project files without the idea {} block? Jul 01 21:01:20 still waiting for _just_ the editor to support C99 files :x Jul 01 21:01:43 I don't mind paying for stuff, I just like stuff to work easily and well integrated. Currently that is a nightmare for C++ it seems Jul 01 21:01:43 dermetfan: launch AS -> quick start on the right: import Project (Eclipse ADT, Gradle, etc) -> pick the opt-level build.gradle file, and it'll auto-configure everything Jul 01 21:02:17 s/opt/top/ how did I type it that out of order, wow Jul 01 21:04:14 groxx: Hm, indeed it works with the gradle integration enabled. Blargh. I want to use gradle myself, not have my IDE do it. Jul 01 21:04:47 dermetfan: android studio is configured _by_ gradle, it doesn't know what your project looks like without that Jul 01 21:04:51 that’s the whole point of gradle, though: The IDE does it for you Jul 01 21:05:23 s73v3r: in my understanding the point of gradle is to automate builds and be independent of the IDE Jul 01 21:05:34 dermetfan: and you can still ./gradlew from the command line and it'll be outside the IDE entirely Jul 01 21:07:48 groxx: So AS only knows how to handle .aar files with the gradle integration enabled. That's unfortunate, but I guess I have no other choice. I'd like it most if the IDE didn't care if there were gradle files at all. But that's the way Google chose it to work... Jul 01 21:08:36 Thanks for the help guys! Jul 01 21:18:14 i created a heap dump in AndroidStudio and wanted to open that dump with MAT like this (in debian): $ ./ParseHeapDump.sh ../com.example.XXXXXX.hprof and get this error: http://pastebin.com/mzZJFPtP Jul 01 21:18:22 any help? Jul 01 21:23:55 fix the error Jul 01 21:24:27 pfn: did i launch it correctly? Jul 01 21:24:39 dunno what parseheapdump is, but I guess Jul 01 21:25:30 pfn: there is a file MemoryAnalyzer and ParseHeapDump.sh. if i run ./MemoryAnalyzer i see a tab but no window Jul 01 21:25:41 * pfn shrugs Jul 01 21:25:42 hprof-conv Jul 01 21:25:43 use it Jul 01 21:25:46 so i`m not sure if above is correct Jul 01 21:26:11 hprof-conv ? Jul 01 21:26:19 what/where is that? Jul 01 21:27:09 in sdk Jul 01 21:27:39 hmm, where is it, should be... Jul 01 21:27:53 ah, platform-tools Jul 01 21:28:34 ok thank you. after that: starting like ./MemoryAnalyzer? Jul 01 21:28:49 I guess Jul 01 21:29:07 ok maybe i took the wrong GTK for mat Jul 01 21:38:27 ok i cannot start mat like $./MemoryAnalyzer a tab opens and if i maximize that i get a white window with nothing in it Jul 01 21:40:59 does anyone know how to get the values from "adb wm size" in native code (C or C++)? Jul 01 21:41:24 I've dug through the wm source and it's so abstracted I can't pinpoint where it touches native code :\ Jul 01 21:42:00 hello Jul 01 21:42:34 * kenalex realises the android emulator is slow as molases Jul 01 21:43:19 hey, at least it's not as slow as pitch Jul 01 21:43:22 (https://en.wikipedia.org/wiki/Pitch_drop_experiment) Jul 01 21:45:56 i am looking for a phone to buy for development purposes Jul 01 21:46:03 any recommendations ? Jul 01 21:46:13 zj99f, not really, what are you trying to do? Jul 01 21:46:26 kenalex, 1.) Get genymotion emulator 2.) Get a Nexus Jul 01 21:47:43 is a nexus 4 good enough ? Jul 01 21:49:05 O.o Jul 01 21:49:12 pretty much any phone is going to be good enough Jul 01 21:49:23 and realistically, you should probably have more than one Jul 01 21:49:42 If you actually want to test Android 5.0 APIs, buying samsung shit stuck on 4.2 won't do.. Jul 01 21:50:05 nexus 4 is LG at 5.1.1 Jul 01 21:50:20 yes, but if you’re targeting wider swaths of users, having phones on older versions helps out a lot Jul 01 21:50:50 esp old hand me down phones -- great for performance testing ;) Jul 01 21:50:59 kenalex, Nexus 4 is now rather oldish and it's questionable if it'll receive Android M update (the preview images aren't available) Jul 01 21:51:16 Is it better to cache in sqlite or file system (if using gson/json) Jul 01 21:51:23 s73v3r, totally true... except that I doubt the person asking already has 10 other phones. Jul 01 21:51:25 that’s not a huge deal; odds are most people won’t have M for a while Jul 01 21:51:27 or any other phone. Jul 01 21:51:34 *sigh* Jul 01 21:51:36 ok. Jul 01 21:51:37 Buy shit. Jul 01 21:51:53 lol what Jul 01 21:52:05 lasserix, depends really on the amount of data Jul 01 21:52:21 entries of 32 kilobytes Jul 01 21:52:24 lasserix, and the type of access... sqlite saves you from management of files Jul 01 21:52:37 i was thinking of getting a used Nexus 4 and Nexus 5 Jul 01 21:52:44 maybe ten sets of ten elements each @ 32 kb Jul 01 21:52:47 should be fine Jul 01 21:53:12 @Mavrik yeah i am using fs now, but exactly for that reason i was thinking of dumping it into tables instead Jul 01 21:53:23 kenalex, get a Samsung Galaxy (S4 or S3) for the second phone, those are pretty much the most popular and have Samsung branded firmware which sometimes shows interesting quirks Jul 01 21:53:31 pricewise they should be around N4 mark Jul 01 21:53:33 hopefully you can keep both on different versions of Android. preferably one on a version 4, the other on a version 5 Jul 01 21:54:01 Getting two Nexuses for testing purposes usually isn't all that useful. Jul 01 21:54:16 yeah, samsung is the one that’s going to give you the most headache Jul 01 21:56:18 so a neuxus 4 and a samsung galaxy s3 or s4 Jul 01 21:56:51 *sigh* Jul 01 21:57:05 Nexus One will be even cheaper! Jul 01 21:58:13 btw it's easy to put on Nexus 4 a multirom which support something like 4.2, 4.4 and 5.1. Don't know how useful it is though (switching version) there is an emulator for that Jul 01 21:58:51 It's not all that useful, since most of the problematic issues come from 3rd party ROMs Jul 01 21:59:08 The API differences are caught by linter / emulator well enough. Jul 01 21:59:17 does anyone know of any good sources of example progams for writing an Android app to utilize a mobile card reader specifically a idtech UniMag or Shuttle ? Jul 01 21:59:21 Finding those 4.3 TouchWiz bugs is the painful part. Jul 01 22:00:13 i am going to try genymotion Jul 01 22:00:26 and see how things go and then move on from there Jul 01 22:04:08 Hi, i am using a support lib called the MaterialViewPager, and it's using Recycler View to display layouts inside each fragment. Jul 01 22:04:29 Huh. Why is there an "assembleRelease" and "assembleStaging" task, but no "installRelease" or "installStaging" task? :\ Jul 01 22:04:51 https://github.com/nightwalkerkg/MaterialViewPager This is the lib. I am trying to figure out, how to display 5 different layouts per fragment. Jul 01 22:05:04 But still keep the cardUI thing from the lib. Jul 01 22:05:59 Omg, i read the code better now. I am an idiot. Got it. xD Jul 01 22:08:44 Has anyone used osmidroid? Jul 01 22:08:54 Hello there! Jul 01 22:08:57 I have a class RssItem. I have a ListView and an ArrayAdapter adapter. I have a ArrayList rssItem as data source for the adapter. If I fill the adapter manually (creating the RssItems one by one and adding it to the source rssItem) then I see the listView populated. If I fill the rssItems automatically from my parser class, I can see the rssItems object filled, but the listView is empty. Jul 01 22:08:58 Particularly, what's the difference between the android mapbox sdk and osmidroid? Jul 01 22:09:24 lucha you need to set some flag on the arrayadapter Jul 01 22:09:28 but you should be using a baseadapter Jul 01 22:09:53 a flag? Jul 01 22:10:25 umm Jul 01 22:10:26 what Jul 01 22:10:31 s the code you use in your parser class? Jul 01 22:10:37 is this executed on the main thread (must be) Jul 01 22:10:56 basically, arrayadapter.clear(); arrayadapter.addall(rssitems); arrayadapter.notifyDatasetChanged(); Jul 01 22:11:15 So... addall... Jul 01 22:11:18 I'll check taht Jul 01 22:11:23 how are you doing it otherwise? Jul 01 22:11:29 *make sure its running on the main thread Jul 01 22:13:11 I'm using a class that extends asyncTask Jul 01 22:13:45 Then a callback that executes code in the main thread when the results are returned (parsed) Jul 01 22:13:56 does anyboy know of example programs or more documentation for IDTech Shuttle card reader ? what is available from IDTech is very minimal and confusing. Jul 01 22:14:07 I can see the results returned correctly in the callback function. Jul 01 22:14:38 And I call notifyDatasetChanged, but I can't see the changed made in the listView Jul 01 22:15:50 dragorn, Chainfire: i got it to work. i am now calling a script within the appdata folder which uses an exploit to gain root, with that i deploy the binaries and call my other scripts. no clue why it didnt want to execute directly Jul 01 22:17:07 lucha: use a baseadapter Jul 01 22:17:14 I'll try Jul 01 22:17:15 or use insert Jul 01 22:17:21 and iterate instead of add all Jul 01 22:17:32 or poste your code that operates on the array adapter in your parser class Jul 01 22:29:34 Let's see: http://pastebin.com/TfnJrWsS Jul 01 22:29:48 With that code, I can see the values in the ListView Jul 01 22:30:34 But not with this: http://pastebin.com/7mL45fsX Jul 01 22:30:56 With the last one, I get no listView population Jul 01 22:33:09 ..................................................................................................................................................................................... Jul 01 22:35:50 * kenalex is in love with geny Jul 01 22:40:41 how can I generate a unique hash code for a set of unique ints? Jul 01 22:41:28 lucha, you cant just rssList = response Jul 01 22:41:38 is it possible to animate LayoutParams change from match_parent to wrap_content and vice versa, and if so, how? Jul 01 22:41:38 ! Jul 01 22:41:51 So, what is the correct way to do it? Jul 01 22:41:56 you are not using baseadapter, so that won't work since you are not overriding methods like getItem(int position) which would do rssList.get(positoon) Jul 01 22:42:22 clear + addAll + notifyDatasetChanged or clear for (RssItem rss : rsslist) insert(rss) Jul 01 22:42:27 or use base adapter Jul 01 22:42:46 which is the best way imho because once you are used to it its nothing and arrayadapter is really for only REALLY simple displays Jul 01 22:43:01 ok, I'll try that Jul 01 22:43:48 The thing I don't understand is... why do it work when I add manually the RssItem objects to the List source? Jul 01 22:44:19 because the manual add method sets that flag i was talking about Jul 01 22:44:25 which causes the listview to invalidate Jul 01 23:03:15 lasserix: unique hash code for a set of unique ints: add the ints to an array and .hashcode() it? otherwise, I would expect that XOR-ing each int's hashcode with the next would produce hashcode-friendly results Jul 01 23:04:31 hmm Jul 01 23:04:37 does anyone use MAT standalone under linux or maybe even debian? Jul 01 23:04:38 that first sounds like it'd work well Jul 01 23:05:22 adkins: just OSX. having problems, or wondering if you're alone in the world? Jul 01 23:05:33 problems Jul 01 23:05:50 and you've run hprofconv on the dumps? Jul 01 23:06:20 well i cant even run $./MemoryAnalyzer it just opens a tab and if i maximze it i got an empty window Jul 01 23:07:25 adkins: did you try reading a tutorial? Jul 01 23:07:33 i just switched to androidStudio from eclipse and cant use MAT now, sucks Jul 01 23:07:53 i googled a lot, are you talking about a certain tutorial? Jul 01 23:08:40 adkins: did you convert it? Jul 01 23:08:47 adkins: http://wiki.eclipse.org/MemoryAnalyzer/FAQ ? Jul 01 23:09:20 i`ve read the FAQ Jul 01 23:09:25 convert what? Jul 01 23:09:33 adkins: a certain tutorial how to analyze heap on Android with MAT Jul 01 23:09:56 adkins: you convert it with hprof-conv or by right-clicking in AS, you open MAT. you open file and open perspective Jul 01 23:10:10 i`ve used MAT in eclipse already,....its not about that, its only about starting MAT Jul 01 23:10:28 adkins: worst-case scenario is probably: install the MAT plugin in whatever version of Eclipse works on your machine, and use it there :| Jul 01 23:10:31 you open MAT. ....can not! Jul 01 23:10:40 adkins: run in console, see what it says Jul 01 23:10:45 shows us a log, a screenshot Jul 01 23:10:47 says nothing Jul 01 23:11:01 no log Jul 01 23:12:04 groxx: that first method definatly doesn't work ;p Jul 01 23:12:27 adkins: can't say nothing and show nothing and happen nothing Jul 01 23:12:29 if i do: $ ./MemoryAnalyzer -vm /usr/lib/jvm/java-1.6.0-openjdk-amd64/bin i get: http://pastebin.com/addEuL5b Jul 01 23:12:45 that's the opposite of nothing, fwiw Jul 01 23:12:53 also, try a java 1.5 vm, like the FAQ mentions Jul 01 23:12:55 but $ ./MemoryAnalyzer gives nothing ;) Jul 01 23:13:27 your memoryanalyzer copy is incomplete Jul 01 23:13:30 since it can't find dependencies Jul 01 23:13:31 I've downloaded stand alone MAT package and using java 1.7 Jul 01 23:13:46 it says 1.5.0 or greater. should i try 1.5.0 anyway? Jul 01 23:13:49 yeah, i would think newer ones would work. hard to say for sure though. Jul 01 23:14:20 icedp: what OS? Jul 01 23:14:31 bluh. weird FAQ. maybe that's just ancient. Jul 01 23:14:53 adkins: ubuntu Jul 01 23:17:59 oh yeah, with googl stopping work on ADT/eclipse - what will replace MAT ? Jul 01 23:18:32 is all that stuff being rebuilt in AS ? Jul 01 23:22:25 Does anyone know a simple way to take ordered set of unique integers and produce a unique String? Jul 01 23:24:12 g00s: mat is available standalone Jul 01 23:28:45 why would google replace MAT Jul 01 23:28:56 google never did anything with MAT in any way, shape or form Jul 01 23:29:04 you can use any memory analysis tool of your choice Jul 01 23:29:14 jvisualvm, jhat, mat, heapanalyzer, yourkit, etc. Jul 01 23:31:05 pfn does AS have a way of reading the dumps natively? i haven't been paying attention Jul 01 23:31:17 no, neither does eclipse, mat is an addon Jul 01 23:31:47 you launch jvisualvm Jul 01 23:32:13 which tool is as good as MAT? Jul 01 23:32:21 with gc-roots etc Jul 01 23:32:49 ^path to Jul 01 23:34:52 jvisualvm Jul 01 23:34:55 .. Jul 01 23:35:04 comes with the jdk Jul 01 23:37:28 leakcanary is nice https://github.com/square/leakcanary Jul 01 23:37:46 although I guess jvisualvm doesn't make seeing the dominator tree easy Jul 01 23:37:54 you could write it in oql Jul 01 23:47:21 AS is getting a heap dump viewer, yeah. less sophisticated / I think it's just a dominator tree and paths to GC roots, but that's 99% of my needs. Jul 01 23:52:23 thank you, i give up for today. good night Jul 01 23:52:33 hmm, given a listview, how can I make a swipe (side-to-side) animate like a viewpager while replacing its adapter? Jul 01 23:55:45 groxx did they demo that in i/o tool session ? Jul 01 23:57:23 g00s: in one of them, yeah. I'm not sure if it's in the preview release yet or not though Jul 01 23:57:26 I suppose I can try it Jul 01 23:59:58 yep, it's in there. dominator + references, relatively simple: http://cl.ly/image/1e42102D2O3C Jul 02 00:00:58 nice groxx , thanks Jul 02 00:40:37 groxx, where'd you get that from, anyway? Jul 02 00:40:46 Canary build or something? Jul 02 00:40:54 15eap? Jul 02 00:41:05 hey guys, did you know about this? https://oneplus.net/ Jul 02 00:41:20 never see this comming, selling custom ROM .-. Jul 02 00:47:33 pfn: yeah, canary build Jul 02 00:48:16 the tools site implies it has been in there since preview 1, I forget what we're on now. 5? Jul 02 00:49:05 abara: the brand / the phone: yeah, it was pretty big for a while. or do you mean something else? Jul 02 00:58:46 groxx i think 1.3 beta 1 Jul 02 01:00:09 g00s: ah, it did just escape to beta, didn't it? Jul 02 01:00:21 not quite sure, i use stable Jul 02 01:00:37 I like a bit of excitement in my life Jul 02 01:01:30 i like working tools in my life :D Jul 02 01:02:04 bah! Jul 02 01:06:15 bam! I'm back Jul 02 01:06:55 hey guys, I was watching a presentation on youtube from someone in the dropbox android team Jul 02 01:08:09 and he talked about how they load multiple resolutions of an image in order to achieve uber-performant list scrolling Jul 02 01:08:54 JFlash cool story bro Jul 02 01:09:03 beat me to it :( Jul 02 01:09:09 basically while the user is scrolling, they only load and decompress low res images, (75px) and when the user stops at a given point of the list they... Jul 02 01:09:34 ... dequeue de loading of the low res and load the high res images only for that particular point of the list Jul 02 01:10:16 so my question is: do any off the top image libs can help me to implement this feature? Jul 02 01:10:29 do you have performance problems with scrolling? Jul 02 01:10:53 I dont expect them to have this advanced feature built-in, just want to know which would would make it easier for me to code this on top of the lib Jul 02 01:11:59 bankai_, it's not performance problems, it's just if you scroll an infinity image grid really fast the CPU and gpu cannot cope with image decompression if the images are larger than 70px Jul 02 01:12:20 because of the time it takes to decompress and uppload to the GPU Jul 02 01:12:29 so you do have a performance problem? Jul 02 01:12:45 so this is the only way ( that I know of ) that you can achieve scrolling without shoing gray tiles Jul 02 01:14:00 ugh. why aren't the @LayoutRes / @WhateverRes annotations transitive? or is that a PITA to build? Jul 02 01:14:57 JFlash: you can get 99% of the way by loading things before they come into view Jul 02 01:16:51 groxx, we are talking hundreds of images here. it's not even a good thing to have all of that loaded on memory at once Jul 02 01:17:22 JFlash: that's fine. a) you can reuse the memory, and b) it's just a little more than is on screen. most devices (even tiny ones!) handle a couple screens of images, no problem. Jul 02 01:18:18 groxx, I'm taking about fast scrolling an infinite gallery, like a personal photo stream Jul 02 01:18:30 but I would imagine the best™ approach for avoiding empty views would be to build thumbnail-atlases, so you don't hit the disk with a bunch of activity. the gallery provider essentially does this for the smallest thumbnail size - the image ID is just an offset into a huge file that contains thumbnails. it mmaps nicely. Jul 02 01:18:45 JFlash: yeah. I don't see the problem. Jul 02 01:18:49 groxx, user can scroll past 10 screens worth of data a a fraction of a second Jul 02 01:19:19 then prioritize. no matter what, you'll encounter cases where they out-scroll your loading, or you're forced to stop them while you catch up. Jul 02 01:19:43 device / disk activity lags at times, gc happens, you're _guaranteed_ to never achieve actual perfection. Jul 02 01:20:16 i take the lasy way out, and just stop intensive things when user flings Jul 02 01:20:21 *lazy Jul 02 01:20:31 groxx, I'm not after perfection. I'm after maximization Jul 02 01:20:54 JFlash: then it's probably what the photo gallery does. it's pretty efficient in lots of ways. Jul 02 01:21:02 groxx, the bottle neck is image sizes, anyone that is used to working with GPU code would tell you that Jul 02 01:21:21 heck, it even makes the thumbnail-blob world-readable so callers don't even hit the content provider Jul 02 01:22:22 JFlash: I would be _extremely_ surprised if your bottleneck wasn't disk activity. Jul 02 01:22:22 JFlash: probably you can load lowres versions by default, then listen in onScrollStateChanged when SCROLL_STATE_SETTLING happens and load larger images Jul 02 01:22:30 groxx, btw, I doubt the photo gallery has to deal with cg, I would be quite surprised to learn that they use managed memory at all Jul 02 01:23:19 JFlash: cg? Jul 02 01:23:37 gc, sorry Jul 02 01:24:28 icedp, thanks for letting me know aou scroll_state_sellting Jul 02 01:24:55 JFlash: the case when user just drags the list should be accounted also Jul 02 01:25:18 icedp, I know I have to do some work. I wonder which image loading lib would make it easier for me to implement this sort of queueing/ un-queueing / switching Jul 02 01:25:31 JFlash: you must not have browsed much of the AOSP :) nearly everything apps can interact with is java. (the exceptions being things that need to be hardware accelerated, like video playing / camera / etc) Jul 02 01:25:45 JFlash: and yes, the gallery stuff is all java. Jul 02 01:25:55 I would link to it, but androidxref.com is down or something :/ Jul 02 01:26:54 groxx, I actually have not browsed **any** AOSP :( Jul 02 01:27:54 do so! it's useful, fun, and often terrifying! Jul 02 01:28:03 lots of good stuff in there though Jul 02 01:28:24 groxx, I don't understand what you are talking about. My friend uses NDK for this apps and he doesnt even use managed memory. Also there is JNI for java apps Jul 02 01:28:55 groxx, and even libs like facebooks Fresco lets you store images outside of the java heap. Jul 02 01:29:01 sure, you can build apps that are native code. but the services you can access are overwhelmingly just java code (well, plus/minus an SQLite database) Jul 02 01:29:11 without you have ing to using JNI Jul 02 01:29:32 which, like everything clever from facebook, has some caveats. but yes. Jul 02 01:32:00 facebook has a large team to do clever things Jul 02 01:32:09 lol, I was not even taking about moving things outside of the heap. this was not my original question Jul 02 01:32:36 JFlash: maybe you'll find this useful http://stackoverflow.com/questions/25747696/implementing-withdelay-in-picasso-android-for-skimming Jul 02 01:32:44 JFlash: as far as the ashmem stuff goes: you can do that yourself, set inInputShareable and inPurgeable in your bitmapfactory options. it's really really useful on low memory devices. and it has performance caveats. Jul 02 01:32:55 my question is which image loading lib would help me in queueing and dequeueing image loading request plus switchin resolutions on the fly Jul 02 01:33:18 icedp, thank you for the link! Jul 02 01:33:57 groxx, thanks for educating me on ashmen Jul 02 01:35:50 I don't know of any libraries that build up thumbnail assets. Glide can pretty easily store thumbnails on disk though, which will probably make a visible difference. but really - try preloading. toss bitmaps in an appropriate cache, load slightly ahead, you may be surprised by how well it works. Jul 02 01:36:13 "thumbnail assets" -> large blobs of multiple thumbnails Jul 02 01:37:21 actually the idea is not to cook up thumbnails client side Jul 02 01:37:43 the idea is , if the user is scrolling you request low res versions from the server Jul 02 01:37:56 (the server already stores low res versions) Jul 02 01:38:29 and if the user stops at some point you dequeue the low res requests for that point and request high res versions from the server Jul 02 01:38:43 groxx: aren't those options are about reusing bitmaps not about using ashmem? Jul 02 01:38:57 ah. then you'll definitely need to generate large chunks of images in a single file (or use exclusively http2, dunno how feasible that is) Jul 02 01:39:16 icedp: those are (mostly) ashmem. you're thinking of inBitmap Jul 02 01:40:08 so let me be more clear Jul 02 01:41:10 the server keeps 70px thumbs of the images but these would look blurring in any device which has > 4 inch screen Jul 02 01:42:02 so while scrolling you keep requesting those low res images from the server, because while scrolling the user cannot notice the blurriness (your brain factors it out) Jul 02 01:42:55 once the user stops at a point in the list, you request high res (200px) images from the server only for those images that the user is currently seeing on the screen Jul 02 01:43:01 Is the low-res image really that bad? Jul 02 01:43:10 so this is the strategy dropbox used for their app Jul 02 01:43:58 The ultimate performance solution would be to forget about high-res images in this AdapterView/whatever. Jul 02 01:44:02 Though maybe that's infeasible. Jul 02 01:44:09 TacticalJoke: it can be visible. and for e.g. dropbox or Photos I think you're talking the equivalent of a 70px image in a 200 _dp_ view, which is 700px on my phone. Jul 02 01:44:57 dropbox's scroll is... pretty good. biggest thing they do right is serve really small images when they're showing a lot. but I've seen way better. Jul 02 01:47:10 dunno what carousel is doing. probably sends you thumbnails for everything - it takes up quite a lot of data on my phone, and of course it's all in _data_, not cache :( Jul 02 01:47:47 groxx, can you educate me on the diff of data and cache? Jul 02 01:48:10 cache can be cleared easily. data can't. Jul 02 01:48:26 the vast majority of apps _should_ be using cache way more than they are, but it seems few do :( Jul 02 01:48:34 as in cleared by the user? Jul 02 01:49:05 JFlash: http://developer.android.com/guide/topics/data/data-storage.html Jul 02 01:49:06 yep Jul 02 01:49:30 if you go into the "storage" section of settings, and tap the cache section, it even gives you the option of clearing them all _at once_. Jul 02 01:49:30 tks Jul 02 01:50:18 omg, giving the user control seems frightening Jul 02 01:50:20 non-cache storage is useful for stuff you can't recreate, like what account the user is logged into. nearly everything else you could put in cache, which would let them delete it without logging out. Jul 02 01:50:38 * JFlash rather hijack the user's phone Jul 02 01:51:23 ah, also: Carousel (and thus probably Dropbox) has all my thumbnails (low and high res) stored on the device. i can fling to anything _while in airplane mode_, and it still shows previews. Jul 02 01:51:32 groxx, my boss asked me to store login data on a sqlite db. is that bad? Jul 02 01:51:48 nah. just make sure it's not in an external folder. Jul 02 01:51:59 ok Jul 02 01:52:28 sqlite is probably overkill if that's all you're using it for (shared prefs are fine, for instance), but if you're already in sqlite-land and comfortable with it, there's nothing wrong with it Jul 02 01:53:23 groxx, I'm using the cupcake lib as a wrapper around SQLiteOpenHelper, I really like it's minimalism Jul 02 01:53:54 groxx, but I got bit when I tried to save anything other than simple types like strings and ints Jul 02 01:54:05 have a link? I don't think I've seen that one (and that's a horrible name, since "cupcake" is also a release of android D: ) Jul 02 01:54:09 groxx, very few examples around on how to do that Jul 02 01:54:23 sorry, cupboard Jul 02 01:54:26 aah Jul 02 01:54:27 haah Jul 02 01:55:42 https://bitbucket.org/qbusict/cupboard/wiki/CustomConverters Jul 02 01:57:44 yeah. I don't think I'll ever use it, but it does seem like they did a good job making it simple to use Jul 02 01:58:06 what do you use? Jul 02 01:58:20 vannila SQLOpenHelper? Jul 02 01:58:37 greendao and/or vanilla Jul 02 01:58:58 greendao has quirks, but it's reasonably efficient Jul 02 01:59:34 since I'm storing ~ a million or so records, and may be dealing with a few thousand at a time, efficiency is handy. Jul 02 02:02:07 a million?? Jul 02 02:02:16 eyup Jul 02 02:02:19 do you work at ebay or what? Jul 02 02:02:26 nah. that's for comicchameleon.com Jul 02 02:02:57 do you have a million webcomics in your catalog? Jul 02 02:03:26 metadata + I think somewhere around 100,000+ comics total Jul 02 02:03:42 where "comic" = "one image" Jul 02 02:03:43 impressive Jul 02 02:04:08 most people probably won't hit more than ~10k records, but if you read a lot, it'll grow a lot. and the library keeps growing. Jul 02 02:04:28 why did the ios app was crashing? Jul 02 02:04:31 sqlite is great for stuff like this. throw a few hundred million records at it, with a decent structure, and it's just fine. Jul 02 02:04:34 typo? Jul 02 02:04:52 I don't really know :| I don't work on the ios app. I gather it was something that changed in 8.3 though Jul 02 02:05:09 ah i see Jul 02 02:05:17 which is a super weird place for things to break, but that's iOS programming for ya Jul 02 02:05:50 my boss is the ios programmer Jul 02 02:06:15 20% of his day is spent dissing android Jul 02 02:06:35 and prasing apple stuff Jul 02 02:06:41 praising Jul 02 02:07:37 parsing apple stuff Jul 02 02:07:54 lol Jul 02 02:08:40 seriously, I'm really tired of listening to that nonsense Jul 02 02:09:02 but he is the boss, so.. Jul 02 02:09:28 fanboys are fanboys. there's no point in arguing.. Jul 02 02:11:12 every side has its fanboys JFlash Jul 02 02:12:33 yes, but only one side has its fanboy up on my ear all day long ;-) Jul 02 02:13:00 groxx: Millions, are you talking backend or Android? Jul 02 02:13:57 CedricBeust: Android Jul 02 02:14:09 Seriously? You're storing millions of rows in your sqlite db? Jul 02 02:14:15 sure, why not? Jul 02 02:14:24 works great Jul 02 02:14:28 How big is that .db? Jul 02 02:14:56 i have installs with ~1 million rows, its ok Jul 02 02:15:07 But how big is the file? Jul 02 02:15:39 dunno, never loaded everything at once. on my personal install, ~10mb, and I keep my rows very small Jul 02 02:15:48 mostly integers Jul 02 02:15:54 CedricBeust btw, that was back in Froyo days :D Jul 02 02:17:37 maybe I should clarify: I'm not proactively loading a million rows. that would (usually) be silly. but it can grow to about that big, if the user spends enough time to load everything Jul 02 02:19:01 SQLite is more than happy to handle a lot more than I throw at it though. Jul 02 02:20:04 I'm not worried about SQLite handling this, more about how it taxes the phone's file system and CPU when you query Jul 02 02:20:16 my only gripe about sqlite on android, is not having user defined functions Jul 02 02:20:20 very little. indexes are fat Jul 02 02:20:22 fast Jul 02 02:20:40 (and also users getting pissed because of the size of your app) Jul 02 02:21:49 eh. by the time you hit that, you'll have loaded gigabytes of images. Jul 02 02:22:59 I load gigabytes of images, I just don't expect these to somehow remain on my file system Jul 02 02:23:09 (especially some of those) Jul 02 02:24:54 how to solve this out �� ? Jul 02 02:25:13 You can solve this by being better at keyboard typing Jul 02 02:25:15 out in string Jul 02 02:25:41 How could I go about creating a toolbar at the bottom of the screen, like instagram has it. Jul 02 02:25:59 hmm... according to material design metrics & keylines the ActionBar title should be 72dp from the edge of the screen but on my S6 it is around 55dp or so. https://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-baseline-grids :( Jul 02 02:26:23 it is not keyboard problem Jul 02 02:27:05 eh. like 99% of users won't see the db get any bigger than if I had e.g. added appcompat. I'm very much unconcerned, and I have plans to handle even the crazy cases. Jul 02 02:27:25 Still, it's safe to keep your db trimmed Jul 02 02:27:30 Cap the row count or something Jul 02 02:27:34 ACzChef: I don't know the Instagram app, but it's easy to put Toolbars at the bottom of the screen. You can use alignParentBottom or similar. Jul 02 02:43:50 hm. does anyone know if Android allows you to hardlink files? Jul 02 02:51:58 how do I predict device pixel scaling? I just a 100 pixel wide element rendered with a width of 77 pixels, and I'm wondering why that happened. Jul 02 02:55:22 are you trying to implement that in an app, or just to run some commands for yourself? Jul 02 02:55:32 @groxx Jul 02 02:58:46 snowkidind: I'm wondering if I can hardlink a cached file so it exists in multiple cache folders, because copying the file would be wasteful, but lots of libs assume complete control over their cache folders. Jul 02 02:59:08 it's fairly idle curiosity, I don't have a need for it yet. Jul 02 02:59:33 have you tried the command in a terminal app? Jul 02 02:59:57 https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference **** ENDING LOGGING AT Thu Jul 02 02:59:59 2015