**** BEGIN LOGGING AT Sun Aug 28 02:59:58 2016 Aug 28 03:38:13 g00s: 24.2 or 24.0.2 ? Aug 28 03:38:27 24.2.0 Aug 28 03:38:31 no problem so far with 24.0.2, finger crossed Aug 28 03:39:00 I do have some warning with recycleradapter though Aug 28 03:39:24 about super method not existing or something but it seems to come from lib Aug 28 03:45:22 what phone has the best gps precision and out to how many decimal places my is around 4 after the decimal which is around 33ft ish +- Aug 28 03:46:06 which is kind of crappy still for geocaching Aug 28 03:55:05 i'd think most phones should get to ~ 15 ft Aug 28 03:55:11 <_genuser_> hello people Aug 28 03:55:45 Hi. hoping i could get some assistance. I have a method showMap() in mainactivity.java, which reads the value from Location preference in settings, and opens google maps with this location. That's all fine Aug 28 03:56:16 showMap() is called when I open the menu bar and press the "Open in Map" option - I also have this menu inflated with this "Open in Map" on another activity, DetailActivity.java Aug 28 03:56:58 Because the method showMap() is in MainActivitiy, and it isn't static, to access it in DetailActivity i'd have to do new MainActivity().showMap() which is wrong. How should I share this method across both activities? Aug 28 03:58:17 man this is so bizarre - with support 24.2 , using CoordinatorLayout + AppBarLayout , everything looks fine initially ... but if i pull down ~ 8dp gap opens up between the status bar and my root layout and doesn't go away Aug 28 04:01:06 g00s ya on a good day i get around 16 ft +- but curious what the best gps equipment can get can the do 8 decimal places or 7 or 6 Aug 28 04:02:20 like that the military of navy or scientists have available for practical uses ... and what the consumer electronics has out Aug 28 04:02:55 If I have different option menus for different activities, and want to share some options, is it better to inflate multiple menus for each activity? Aug 28 04:03:08 or just add the same listing in my menu.xml file with same id? Aug 28 04:03:22 <_genuser_> hey g00s Aug 28 04:03:32 hi _genuser_ Aug 28 04:03:59 <_genuser_> hey, you ever had to write a user management api? user registration, user acct mgmt, user data upload/download, login (token handling). Aug 28 04:04:03 <_genuser_> for your android applications. Aug 28 04:04:37 Guest32489 even garmin GPS handhelds with WAAS get best 3m Aug 28 04:05:16 but , you could buy some industrial external gps, like they use for agriculture Aug 28 04:05:18 :) Aug 28 04:05:26 probably not what you are thinking though Aug 28 04:06:49 O so not really much better then what the smartphones have available Aug 28 04:07:53 <_genuser_> g00s: so nothing? just curious because I'm having to deal with that for my app. and thinking of solutions (quick ones). Aug 28 04:08:13 _genuser_ sorry Aug 28 04:08:45 ok, so looks like syncadapter just kills the process randomly Aug 28 04:09:01 I think I need to run a background service from onPerformSync and let that live on to tell the tale Aug 28 04:09:51 Ugh I have no idea whats the best way to share multiple option items between different activities Aug 28 04:10:27 fengshaun sync adapter doing rsync ? lol thats just weird :) Aug 28 04:10:38 i doubt it would work Aug 28 04:11:10 <_genuser_> g00s: heh, ok, no worries, just wanted to ask before I start googling like crazy. Aug 28 04:11:22 google away ! Aug 28 04:11:34 <_genuser_> I did think of writing all that with c# backend and using membership api, but writing the entire framework is lot of time. Aug 28 04:11:54 <_genuser_> and when I'm learning so much on android, multidexing (yay) and all that, I'd rather not divide attentions! :) Aug 28 04:15:36 so anyone? If i have a few activities each with different menu items, but I want a "Settings" option in each one, whats the best way to do this? Aug 28 04:15:43 don't divide your attentions, multiply them ! Aug 28 04:16:02 Faizan just do it? lol Aug 28 04:16:05 should i create a menu that has just "settings" in it, and then inflate that and whatever other menu in activity? Aug 28 04:16:19 or should I just add settings to each activities menu layout? Aug 28 04:16:31 with the same android:id value Aug 28 04:16:58 you could just have menu.xml with settings by itself, and assign order to be 99 or something so its always last Aug 28 04:17:16 so that the other menu.xml that get added are ordered right Aug 28 04:17:33 right okay Aug 28 04:17:49 so using your solution i would inflate 2 menus in onCreateOptions Aug 28 04:17:58 oh ... Aug 28 04:18:05 no don't do that Aug 28 04:18:24 oh Aug 28 04:18:29 that's what i've been doing Aug 28 04:18:41 the other options is say I have MaiNActivity and DetailActivity Aug 28 04:18:57 the way i had it , was activity added settings menu, the fragments added theirs Aug 28 04:19:01 and mainmenu.xml detailmenu.xml, mainmenu has "Open on Map", "Settings" Aug 28 04:19:12 i think this is splitting hairs Aug 28 04:19:22 detailmenu has "Share", "Settings", but both "Settings" have the same ID android:id="@+id/action_settings" Aug 28 04:19:51 what do you mean Aug 28 04:20:02 can't say i've heard that expression before Aug 28 04:21:48 g00s: what if I have no fragments though? Aug 28 04:22:05 g00s: any other solutions for api >=15? Aug 28 04:52:41 Hi, which environment variable(s) should I check for the location of the NDK in a Makefile? Aug 28 04:53:15 I thought the NDK would continue to use Gradle? Aug 28 04:53:27 I'm using make in this case. Aug 28 04:53:48 I know of at least NDK_HOME and ANDROID_NDK, but I don't know what if anything is considered canonical. Aug 28 04:53:50 fair enough, it wouldnt be ANDROID_HOME would it?> Aug 28 04:54:02 Isn't that the SDK? Aug 28 04:54:38 You would be right on that :whoops: Aug 28 05:01:43 I've also seen NDK_ROOT, NDKROOT, and NDK. Aug 28 05:03:51 There's a gist that exports ANDROID_NDK_ROOT but adds $ANDROID_NDK to PATH, so I won't count that one. Aug 28 05:12:15 <[Saint]> your forgot $ANDROID_NDK_PATH Aug 28 05:12:35 <[Saint]> *you Aug 28 05:16:43 I'm going with ANDROID_NDK. Aug 28 05:18:40 "home" is wrong to use here, "root" is implied, and "NDK" is a variant of "SDK", which isn't Android-specific. Aug 28 05:20:50 speaking of the NDK, is there much of a benefit for non-games? I'm guessing it isn't as easy to extend components Aug 28 05:21:43 The NDK is terribly useful for porting Unix programs. Aug 28 05:25:26 I'm very new to Android development. Currently I've been using my phone for debugging but should I be using an Emulator? Aug 28 05:25:44 <[Saint]> Yes. Aug 28 05:26:33 <[Saint]> not only saves fluffing around on hardware but allows you to test cases you don't own. Aug 28 05:26:41 LordWindy_: I haven't tried it in a few years, but my experience is that the emulator is slow as hell. Aug 28 05:26:47 <[Saint]> like specific screen densities and sizes. Aug 28 05:27:07 <[Saint]> and, it can be slow, but it is still valuable. Aug 28 05:27:12 So yeah, it's good for testing different configurations, especially if you can automate it. Aug 28 05:27:38 But for the edit/compile/run/debug cycle, I'd use an actual device. Aug 28 05:30:32 <[Saint]> surely you included edit and compile there by accident. Aug 28 05:30:51 <[Saint]> I should sure as shit hope no one is doing that on-hardware. Aug 28 05:30:59 Why not? Aug 28 05:31:36 <[Saint]> More to the point, why? Aug 28 05:32:06 <[Saint]> Why not is clear for a number of reasons. Why however isn't. Aug 28 05:32:32 How long till Firebase responds to a ticket that I've submitted? Idiot-me posted it ~12h ago and labeled it as "low" severity when it's actually something like high. Aug 28 05:34:33 <[Saint]> There isn't seriously people out there doing application development for Android _on Android_ and _on the device they're targeting_, surely? Aug 28 05:37:57 there's exactly three people Aug 28 05:41:04 Nevermind, seems like the issue fixed itself this morning. What a miracle! Aug 28 05:42:26 <_genuser_> userapp.io, anybody use that before Aug 28 06:34:46 I have an app idea I want to explore, but before I really get into it I do want to know something - How good is extending components like the Spinner? Like can I completely transform how it looks and functions or would I be better off trying to do something else? I hope that isn't too vague Aug 28 06:45:45 you mean the style and/or appearance Aug 28 06:46:36 well i think you can neatly customize its looks by styles and layout, without needing to extend the component Aug 28 06:52:29 Yes, I think it's mostly style I want to change actually Aug 28 06:52:58 Ok cool, I went looking and I might be able to do what I want with intents as well Aug 28 06:53:14 huh Aug 28 06:54:41 I'm trying to make an editor for programming where instead of writing 'IF' you just select it out of the list. I want to use my phone to code when I'm on the train or whatever but I have atrocious accuracy when it comes to that keyboard Aug 28 06:55:19 I mostly do C and whatnot, and Android is different to how I've done UIs in the past Aug 28 06:55:38 ah ok Aug 28 06:55:55 Intent in android is something you use to run another activity/service or app Aug 28 06:56:22 Ohhh Aug 28 06:58:44 I was trying to work out how I would handle the times I actually need to type something in with the spinner, so a popup or another view would suit me Aug 28 07:00:32 maybe do some research if there are already some IDEs or programming editor for android in android Aug 28 07:02:51 I did do some, most are based on typing still. Lots of helpers like intellisense but I'm all thumbs Aug 28 08:23:33 hello, I am using a colorstatelist for my drawer item colors. how can I modify the colors based on what theme the app has? Aug 28 08:23:45 (theme = an entry in styles.xml) Aug 28 09:36:50 I have a tablet that apparently has 170 pixel density, but a resolution of 600x1024. Do Android apps check for this when they resolve what resources to use, or do they use something higher for higher resolutions? Aug 28 09:41:19 anyone know a (working) fast scroll for recyclerview? Aug 28 09:41:34 all of the tutorials i've been able to find are very broken Aug 28 10:38:26 Do you guys think that ~20mb for a game app is too much? Aug 28 10:39:14 I think it depends Aug 28 10:39:23 but generally, I'd say no Aug 28 10:39:51 happy android development ! Aug 28 10:40:36 android development can't be happy Aug 28 10:42:06 haha Aug 28 10:43:04 so uh i got a fragment that calls getActivity to finish the activity and restart it. when it calls getActivity a second time though it returns null. Why could that be? I'm creating a new instance of the fragment every time. Aug 28 10:58:34 lol Aug 28 11:16:29 Hi. When using sendTextMessage(...) with sentIntent and deliveryIntent, how can I identify *which* message was sent/was not sent, not just *a* message? Aug 28 11:17:00 In case a send two messages quite quickly, for instance Aug 28 11:17:15 In case I* Aug 28 11:30:37 uh, oh, channel is dead Aug 28 12:26:07 raoul11: I decided to localize my app to English Aug 28 12:26:33 Even though the trivia market is hella competitive Aug 28 12:26:36 *English Aug 28 12:27:39 (: Aug 28 12:27:45 did you deploy already? Aug 28 12:28:22 raoul11: yep Aug 28 12:28:38 raoul11: haven't marketed it yet, so no users right now Aug 28 12:28:47 rgr tht Aug 28 12:29:27 how long till the international version VerbalKint ? Aug 28 12:29:35 raoul11: could do it in a day :D Aug 28 12:29:54 goodluck (: Aug 28 12:30:08 link me when its up Aug 28 12:30:11 raoul11: the descriptions that I talked to you about are only ~5% done right now Aug 28 12:30:13 if you dont mind Aug 28 12:30:36 well, you can always update those Aug 28 12:53:39 VerbalKint: why are you so quick in developing your app and I'm so slow? Aug 28 12:54:02 arancio: it took me 2 months to get to this point Aug 28 12:54:24 arancio: so how long have you been working on it? Aug 28 12:57:17 if i use support v7 and compile for api 24 , then my app will work just as well on devices with api 7 as it works on devices with api 24 ? Aug 28 12:57:50 or how can i predict what will be the difference? Aug 28 13:00:06 a month and a half. I just have a mock of my main activities. And I'm currently studying web API. I'm just starting to have a superficial understanding of all technologies involved: smartphones (I didn't have one before I started development), HTML5/CSS/Javascript/AJAX/Angular.js/Bootstrap.js/Microsoft SQLServer/Microsoft ASP.NET MVC and Web API/Android Studio/Java/Android platform/OAuth/WebSockets Aug 28 13:00:12 My head spins Aug 28 13:01:55 anyone here ? Aug 28 13:01:56 arancio: well, I've been coding almost all daylong for most of the days in those 2 months Aug 28 13:02:37 inbetween 1 hour sessions of wastetime on imgur/reddit Aug 28 13:02:43 I checked few VPN clients for android and their size ranges from 5MB to 20MB, why is so difference, all they should do is to establish VPN connection, I mean what else could there be in another 15MB of binary ? Aug 28 13:03:16 JustinHitla, libraries, graphical resources Aug 28 13:03:22 VerbalKint, what are you building? Aug 28 13:03:57 iprime: trivia app :D Aug 28 13:04:06 iprime: exactly what the play store needs! Aug 28 13:04:21 VerbalKint: well, I wish I could just write the code. It's the boring book that I have to read. Actually I didn't even have SQL and database design in my skill set so I had to read about them too Aug 28 13:04:48 openvpn vpn apk is about 2.2 Aug 28 13:04:49 mb Aug 28 13:05:18 arancio: didn't read a single book Aug 28 13:05:29 iprime: it's not a trivial trivia app, though. It's the ultimate trivia app, coming in two languages: romanian and now english! Aug 28 13:05:30 VerbalKint, hehe, neat, when are you publishing? Aug 28 13:05:49 arancio: if I encountered a problem, most of the time I would find the answer on stackoverflow Aug 28 13:06:10 iprime: it's already published, but I haven't marketed yet and it's not really polished enough Aug 28 13:06:18 VerbalKint, do show Aug 28 13:06:39 iprime: my real name shows up as the developer Aug 28 13:07:03 this is a family friendly irc VerbalKint /: Aug 28 13:07:13 what's that mean? you don't wanna folks to know your real name or you think I know it so I can look it up? )D Aug 28 13:07:14 raoul11: ? Aug 28 13:08:01 meaning no harm if people know yer real identity (though i can relate to some of your concerns) Aug 28 13:17:52 arancio, how about you? what are you building? you're taking up on lots of technologies Aug 28 13:23:56 it's a sophisticated (compared to what I saw around) app for training assistance in physical activities. It's mainly a project to bring me up to date with web and mobile development, though. Aug 28 13:24:37 cool Aug 28 13:24:44 in what way is it sophisticated Aug 28 13:24:50 you read about the new nike app design? Aug 28 13:30:52 iprime: it attempts to get in depth in how training is done. I coach myself mostly (non exclusively) and train alone. I wanted to try and make an app that can follow what I do and not something rigid. Aug 28 13:31:19 hi, is task locking supposed to work on devices with hardware buttons? Aug 28 13:31:31 If I fail is not a problem. As I said, it's primarily a way to learn about this kind of technologies. Aug 28 13:32:12 I can always exit the pinned app even when it's set as device owner Aug 28 13:33:18 iprime: what Nike app are you referring to? Aug 28 13:33:35 the running app Aug 28 13:33:40 http://www.theverge.com/2016/8/27/12670716/nike-running-app-bad-redesign Aug 28 13:36:13 iprime: no, I'll read that article. Thanks. Aug 28 13:52:51 so when there is "ARM7" in programm name, what is it here ? like that one "Proxy_vARM7A_1.15.507_apkpure.com.apk", that mean it should run on ARM7, but all other software also run on ARM7, why point it ? or its optimised specifically for ARM7 and there are phones that can have ARM6 or ARM8 ? and it will not run or run slow on them ? Aug 28 13:55:58 JustinHitla, because there are armv5 and armv6 devices out there Aug 28 13:56:08 arm7 won't run on them Aug 28 13:57:18 i have a FragmentActivity with a listview fragment containing an async task. When I launch the fragment, a crash occurs, but instead of the phone freezing with a pop up "the app has crashed", a new instance of the app is created and the log is flooded out. Anyone have any tips to mitigate this so I may properly debug? Aug 28 13:58:02 what's the stack trace say? Aug 28 13:58:23 i cant read it Aug 28 13:58:26 it gets flooded out Aug 28 13:58:38 thats the current problem im trying to fix. then ill worry about the crash Aug 28 13:59:01 Jesperhead: dirty solution, at startup make your code have a 50% chance to finish() Aug 28 13:59:15 wat Aug 28 13:59:35 if your program have 50% chance to exit at start, then you can read the stacktrace Aug 28 14:00:18 Jesperhead, filter by your app id or for errors only Aug 28 14:00:21 no if im not mistaken the actual cause of this dilemma is the re-launching of the app, which wipes clean the current log and starts fresh Aug 28 14:00:40 yeah I know that's why it's a dirty solution, but still would allow you to read the log Aug 28 14:00:50 i've searched/scrolled to the top, no stack trace is there iprime Aug 28 14:01:57 also you could have an "adb logcat > somefile" on a console and interrupt that when you need to read the log Aug 28 14:05:02 i will try that after i find my adp Aug 28 14:05:04 adb* Aug 28 14:07:16 it's in your android sdk, in the platform-tools folder Aug 28 14:08:37 btw, there's a less dirty way to stop the loop: have your app create a file on startup, and delete it on clean exit; if the file exists at startup, you know the app didn't exit cleanly and can react accordingly Aug 28 14:10:58 i will add that to my notes for future additions. could be useful, especially if i set up a server location the log could be sent to Aug 28 14:11:12 Hey guys, is there a way to simulate really high ram useage to see how your app/service handles being killed to free some RAM? Are there any RAM waster apps? Aug 28 14:11:18 outputting adb to a text file works like a charm, thank you bluk Aug 28 14:13:52 Jesperhead: glad it solved your issue; happy coding! Aug 28 14:17:38 does this line look correct for base64 encoding? Aug 28 14:17:47 String auth = "Basic " + Base64.encodeToString((username + ":" + password).getBytes(), Base64.NO_WRAP); Aug 28 14:17:56 heoy: dunno about ram waster apps, however I suppose you could List.add() 1k- long strings until the app crashes Aug 28 14:18:03 because the stack trace is saying that's where the crash is occurring Aug 28 14:19:43 hey guys is there any android studio project seed to jumpstart app development like there is for nodejs/angular with yeoman https://github.com/angular-fullstack/generator-angular-fullstack ? Aug 28 14:20:38 NYTimes: what's wrong with one of the project templates? Aug 28 14:20:57 If you release a game with only singleplayer as v1.0.0 and then add multiplayer but the game is still backwards compatible, would you call the version v1.1.0 or v2.0.0? Aug 28 14:21:18 Jesperhead: what exception you got? Aug 28 14:21:38 (is it NullPointerException or something else?) Aug 28 14:21:39 I'd like somethimg I can read to learn arancia Aug 28 14:21:51 the uname/pword are in an array. getting array out of bounds. I printed to log and it looks like they're there.... trying something Aug 28 14:23:33 ok i got it Aug 28 14:24:11 i messed up on the array init Aug 28 14:24:16 [[uname, pw-hash]] Aug 28 14:24:18 meinteil: it's really up to you. I'd call it v1.1.0 if the game is still the same. The game mechanics, graphics, content are more important in a game. You can call it "YourGame Multi (v1.1.0)" if you want to make this improvement to the public Aug 28 14:25:11 meinteil: or add a "Multiplayer!" tag somewhere Aug 28 14:25:24 Jesperhead: glad you solved it Aug 28 14:26:17 NYTimes: then look for tutorials. They will make you create a standard template, add meat and explain what you are doing. Aug 28 14:27:05 NYTimes: https://developer.android.com/training/index.html or read a book like "Android Programming. The Big Nerd Ranch guide" Aug 28 14:27:34 android docs are great.. when they're up to date Aug 28 14:28:27 thank you arancio Aug 28 14:28:56 there is that programm and in description it says: "The app provides 20 days trial", do you think is it possible to reset trial by reinstalling that programm or even doing factory reset on a phone ? Aug 28 14:29:05 NYTimes: you're welcome Aug 28 14:29:43 so that programm sends information about my phone to their servers and that is how they know I allready used that programm ? what parameters of the phone I can change to trick that programm that it wasn't previously installed on that phone ? so, say someone were writing trial version of programm what information you would use to check if phone is Aug 28 14:29:48 the same ? Aug 28 14:30:33 are you asking how to pirate an app? Aug 28 14:30:48 you are seeing things Aug 28 14:31:01 im seeing words Aug 28 14:31:10 most of them check the android id and sync it to their servers... Aug 28 14:31:28 what is android id ? and how to change it ? Aug 28 14:31:50 arancia do you have any heavier up ur sleeve ? Aug 28 14:32:02 there are root apps that do that, or you reflash your rom Aug 28 14:32:14 JustinHitla: by paying the app :P Aug 28 14:32:20 NYTimes: what do you mean? Aug 28 14:32:35 *for the app Aug 28 14:34:01 VerbalKint: I wonder how they think we could become millionaires if they don't pay for the apps... Aug 28 14:34:27 I mean is there any open-source projects that I can learn from Aug 28 14:34:31 I think that was not right channel to ask that question Aug 28 14:34:56 NYTimes: don't know about that, sorry Aug 28 14:35:08 ok Aug 28 14:36:20 JustinHitla: this is the channel with the people that make the apps you like to pirate (or use indefinitely... however you rationalize it) Aug 28 14:36:58 dont expect much help :D Aug 28 14:37:13 I kinda disagree on that Aug 28 14:37:28 cuz finding solutions to overcome security also allows us developpers to reinforce it Aug 28 14:38:07 but would you help them do it? Aug 28 14:38:37 as a hacker/developper, probably Aug 28 14:38:38 Right, he's an ethical hacker. Aug 28 14:38:47 ^ Aug 28 14:38:53 i could see devs offering assistance to pen testers (especially those they are affiliated with) Aug 28 14:39:23 but not to the every day yahoo looking for free apps Aug 28 14:41:24 nah, the goal is to go towards mostly-perfect security, not to rob other devs for sure Aug 28 14:42:37 I feel like offering time-based trials is already a poor practice to start with anyway Aug 28 14:43:12 as you can create any number of virtual instances and indefinitely run apps on these Aug 28 14:44:27 sure i'd agree with those statements. Aug 28 14:45:16 right, stop making trial versions Aug 28 14:45:45 or poor people will abuse factory reset and kill their phones Aug 28 14:46:14 a service of my app has a strong reference to a singleton that provides connection data for the service, after a while the service fails because the singleton is recreated and has no connection data. Why doesnt the service get killed first? Aug 28 14:46:44 services have more lifetime that apps Aug 28 14:46:57 android is less likely to kill them when resources run low Aug 28 14:47:24 bulk, sure but can it just kill some objects that are needed by the service? Aug 28 14:47:30 what do you think of https://www.udacity.com/course/developing-android-apps--ud853 ? Aug 28 14:47:32 I don't understand, why doesn't my 6p work in Canada or Mexico... Aug 28 14:47:39 or is my Sim busted... Aug 28 14:47:54 it won't roam Aug 28 14:48:05 is there better ? Aug 28 14:48:08 if the objects were not created in the service code, seems like you know the naswer already Aug 28 14:48:45 my 5x will roam just fine though Aug 28 14:48:57 bulk, thank you i did not know that, any way to prevent that? Aug 28 14:49:05 pfn, data or general roaming? Aug 28 14:49:28 Mavrik, general, it won't see any networks Aug 28 14:49:34 hmm Aug 28 14:49:46 vz has a $2/day roaming plan Aug 28 14:49:50 Even if the SIM is busted you still see networks, just can't join / authenticate :/ Aug 28 14:50:03 Afaik 6P doesn't have a separate CDMA version right? Aug 28 14:50:11 yeah, it's weird, nope, single sku Aug 28 14:50:54 heoy: either move the code to the service, or have the service be wary that the app closed? there are probably many other ways to handle it but that's what first comes to mind Aug 28 14:52:41 Strange, never had issues with phone not finding networks. Just having problems connecting / working :/ Aug 28 14:53:00 bulk, the service does not have to be active if the app is not started (but in the background it needs to be active) Aug 28 14:53:33 heoy: I feel like the reference should be in the service, not the app then Aug 28 14:53:41 heoy, where exactly do you keep the singleton reference? Aug 28 14:54:05 i keep it in the main Activity and in the service Aug 28 14:54:30 but it's created in the activity first, then only referred to in the service right? Aug 28 14:54:30 That doesn't sound right. Aug 28 14:54:39 heoy, are you sure you don't have two separate references? :) Aug 28 14:54:55 Or that you don't clear the internal state anywhere? Aug 28 14:54:57 ah, weird, if I switch roaming mode from global to lte/gsm/umts then networks do show up but can't register Aug 28 14:55:01 bulk, right Aug 28 14:55:03 guess I need a new sim Aug 28 14:55:10 then you should probably switch that Aug 28 14:55:30 Mavrik, can references be seperate? oO Aug 28 14:55:48 Well, you can create two objects accidentally and think it's the same thing :P Aug 28 14:55:55 Or do bunch of funny stuff with internal state. Aug 28 14:56:38 hmm I just call synchronized getInstance (doubleLocked) in the service and the activity Aug 28 14:56:47 on the Singleton Aug 28 14:57:24 So your singleton should stay the same until your activity process dies. Aug 28 14:57:36 *application process Aug 28 14:57:59 Mavrik, excactly Aug 28 14:58:09 At what point do you lose state? Aug 28 14:58:16 When your process is killed and service restarted? Aug 28 14:58:38 How to check that? Aug 28 14:59:10 Well, look at your code. Aug 28 14:59:58 I mean, I don't understand your architecture or how recreating the singleton could cause you issues. Aug 28 15:00:25 The service does not restart, but the Activities are killed (including the Singleton) Aug 28 15:02:10 I'd say, create the singleton in the service, and make it offer access to your app, so the app can only request it from service but doesn't do anything with creating/maintaining Aug 28 15:04:48 bulk, i will try that: create Singleton in service, send broadcast to request ui input, get the singleton reference in the main activity, set the values in the singleton, broadcast a information change Aug 28 15:05:49 the safer approach would be that the app also request changes, but the service would actually do them Aug 28 15:06:13 so that the app contains no reference to it Aug 28 15:06:29 but then i dont even need a singleton Aug 28 15:07:32 well I'm not sure what you're trying to do, but if the app contains direct references, and those are destroyed when the app finishes, there's always a risk if those were shared Aug 28 15:09:23 so you would send data from the service (Lists of custom objects in my case) just over Intents? Whats the biggest size you should send over Broadcasts / Intents? Aug 28 15:10:51 well if the object size is huge that may be a problem; depends on the available RAM Aug 28 15:11:22 "Verizon Conceals DT Ignite in HTC 10 Update" .. these guys Aug 28 15:11:32 Are there any good references to read on that topic? Aug 28 15:11:44 I actually moved away from DPC because of stack overflow problems with huge data Aug 28 15:12:13 I solved it by using static references Aug 28 15:12:19 bluk DPC ? Aug 28 15:12:27 direct process communication Aug 28 15:12:43 i am followin a tutorial and It said add > (onClick="scanOnClick") <-- on top of a method but hte ADT is complaining that its not defined Aug 28 15:12:47 like activities talking to each other, transmitting large data blocks Aug 28 15:13:21 you gotta define a method such as: void scanOnClick(View v) {...} Aug 28 15:13:31 in the code associated to this layout Aug 28 15:14:04 i think it has to be public too Aug 28 15:14:37 heoy, can you describe what's the problem you're solving really? Aug 28 15:14:38 nope, it can be private because it's used by the activity layout Aug 28 15:14:38 bulk, where do you keep these static references? Aug 28 15:14:59 in the service, then access it from your app Aug 28 15:15:04 It's really hard to give you good advice when we don't know what your exact (high-level) goal is. Aug 28 15:15:15 bluk, what would that change? Aug 28 15:15:29 It's a singleton. If it's done by standard pattern it'll live until end of process no matter where it is. Aug 28 15:15:47 it's memory efficient (no dpc), fast, and the reference would be stored in the service, so the app destroy wouldnt affect it Aug 28 15:16:17 but his problem was that when the app closes, the singleton gets destroyed Aug 28 15:16:29 probably because the app has a reference to it Aug 28 15:16:33 No. Aug 28 15:16:36 That's not how that works. Aug 28 15:16:40 That's not how any of that works :P Aug 28 15:16:54 however he's singleton gets destroyed Aug 28 15:17:00 When app is destroyed the OS kills your process. Aug 28 15:17:06 Everything is gone, including all services. Aug 28 15:17:32 When an activity is destroyed it doesn't matter, because it's just an that gets garbage collected. Aug 28 15:17:34 in his case, only the activity is destroyed Aug 28 15:17:47 the service remains with a broken singleton ref Aug 28 15:17:51 No. Aug 28 15:17:57 There's no such thing in Java. Aug 28 15:18:01 If you have a static singleton, it lives. Aug 28 15:18:08 at least that's what I understood from his question Aug 28 15:18:22 Again, activities, services, etc. are all just objects. Aug 28 15:18:35 Them being "destroyed" means that OS calls onDestroy() and then unreferences it for GC to cleanup. Aug 28 15:18:40 java basics... essential for understanding android Aug 28 15:18:42 If you have static fields, data stays. Aug 28 15:18:43 -_- Aug 28 15:18:55 Mavrik, ok: Login Activity with input for server ip and port --login--> Main activity displays data from server in a ListView (stored in singleton created by main activity) --> service is started and reads connection data from singleton and receives data from server that are saved in the List in the Singleton, then the service broadcasts that a change was made to the list and the UI updates the ListView Aug 28 15:19:42 heoy, ah, and of course if OS kills your process, your login data is gone :) Aug 28 15:20:02 Service gets restarted (do you use sticky?) and it has no data available because the UI wasn't shown on that instance. Aug 28 15:20:31 heoy, don't use singletons to store credentials, persist them on the flash/disk Aug 28 15:20:53 Since Android can kill your process at any time making all transitent state and singletons go poof Aug 28 15:21:04 so local storage or cache dir? Aug 28 15:21:32 Whatever, shared preferences, database, file on disk, something that can be read again when your activity or service is fully restarted. Aug 28 15:21:57 So its a bad idea to use Singletons with any service in general? Aug 28 15:22:22 can i use the same fragment manager/transaction in an activity to add/remove multiple fragments? or are they one per frag? Aug 28 15:23:09 heoy, it's a bad idea to use singletons if you can't handle them being recreated whenever. Aug 28 15:24:08 ok thank you all for your help :D Aug 28 15:27:04 thanks Mavrik for shedding some light on service being restarted Aug 28 15:27:47 I was under the impression that destroying activity didn't touch services (until system goes lower on resource) Aug 28 15:36:07 bluk, it doesn't. Aug 28 15:36:24 bluk, but when resources are low, you're not only getting activities destroyed, but OS will kill your whole JVM process. Aug 28 15:36:41 (This is why you sometimes don't get onDestroyed() called - Android essentially did kill -9) Aug 28 15:36:53 And then everything that's in that process (all objects, static stuff, etc.) is gone. Aug 28 15:36:54 mkaes sense Aug 28 15:37:28 somehow I thought android selectively destroyed objects and not the whole process Aug 28 15:38:24 also seemed to make sense that in his case service was "still" running, but not the activity Aug 28 15:38:30 It does that as well, but due to how JVM works it can't interrupt code in threads Aug 28 15:38:35 Or services etc. Aug 28 15:39:07 it can just call onDestroy and derefence the Activity object and hope you're not holding the reference somewhere else to keep it from being GCed :) Aug 28 15:39:50 I am getting cann't resolve symbom when using : BLEDeviceListAdapter Aug 28 15:40:10 can someone help please. Aug 28 15:40:39 fels, it's what it says - that class is missing. Aug 28 15:40:41 Did you create it? Aug 28 15:41:26 Mavrik: no - I'm trying to follow the tutorial http://www.instructables.com/id/How-to-create-Android-BLE-application-faster-and-e/?ALLSTEPS stuck on step 6 Aug 28 15:42:15 Possible to write android apps in C? Aug 28 15:42:39 Tims_Tech, it's possible to write components and use libraries, but not really full apps. Aug 28 15:42:54 Mavrik, sad :P Aug 28 15:43:06 Life is too short to use C for GUI :P Aug 28 15:43:15 fels: looks like you're missing an import Aug 28 15:45:17 bluk: how do i import stuff ? Aug 28 15:45:48 import some.package; Aug 28 15:45:59 lol Aug 28 15:46:15 in your case you probably need to put a lib into /libs tho Aug 28 15:46:16 fels, did you ever programmed in any program language? Aug 28 15:46:58 Tims_Tech: yes but not too experienced in android Aug 28 15:47:01 (your project /libs, not the system one ofc) Aug 28 15:47:19 bluk: thanks Aug 28 15:48:14 that reminds me that I came here with a question but ended up trying to help others Aug 28 15:48:48 anyone experienced in task locking? I can't seem to prevent unlocking (unpinning) app despite it's a device owner (device has hardware buttons) Aug 28 15:50:09 hi guys, i'm learning using a react-native project, someone has started a project and i'm trying to run it through the sdk/avd manager/emulator, i startup my image, it appears in the adb devices list, i run the react-native run-android command and it fails, Aug 28 15:57:26 hmm, seems i was missing he correct build-tools for that version Aug 28 15:59:01 ok,, other problems. Aug 28 16:30:06 I have a list of cards in a recyclerview, each card has a horizontal list. I want that inner list to wrap its contents instead of scrolling horizontally. Everything is displaying correctly right now, except the inner list scrolls instead of wrapping Aug 28 16:30:17 is there an example somewhere where I can check my work? Aug 28 16:51:58 ok.. i have a fragment activity with 2 fragments. the first is called on activity init, the 2nd is called when a button is pressed in the activity (replacing the first fragment (moved to backstack)). In this second activity i have an asynctask. when it completes, I wish to return to the first fragment. Can I do this in onPostExecute()? What do I call? Would I need to create a new transaction... Aug 28 16:52:00 ...so the fragment can remove itself? Aug 28 16:52:43 or would i need to call the async task from the fragment object in my activity? Aug 28 16:59:05 or did that just make no sense Aug 28 17:07:09 Jesperhead: doing it in post execute sounds good Aug 28 17:07:27 fire a callback to your activity, then have it put the first fragment back Aug 28 17:07:38 having trouble with other things atm. Trying to access UI elements in the activity from the fragment, getting NullPointerExceptions Aug 28 17:07:55 am using getActivity().findViewById() Aug 28 17:08:31 tho I'm not sure if there could be a problem doing it directly in the activity callback function, as the fragment would still "lives" while trying to destroy it; I'd say try and see if you need to delay the transaction Aug 28 17:10:17 I think fragments were designed to be reusablke for different activities, so accessing activity *from* fragment probably goes agaisnt design Aug 28 17:10:46 nah its in docs Aug 28 17:11:13 https://developer.android.com/guide/components/fragments.html#CommunicatingWithActivity Aug 28 17:12:47 uhm, is this systematic (all references are nulls), or just one isolated case? Aug 28 17:14:26 well im dragging in 2 buttons from the activity UI, and am trying to disable clicking/setAlpha (0.5f). The NPE comes when I try to set the first of the modifying instructions (whether its disabling the click or setting alpha) Aug 28 17:17:32 Hey what is better to use for JSON manipulation... JSONObject , JSONArray ? Aug 28 17:17:33 i might be a damned dirty liar, it might only be NPEing on the setAlpha method Aug 28 17:18:13 well hard to say where the error is coming from at this point; I'd try to split the code as much as possible, and log everything; the getActivity() first (makes sure it gets the right value), then the findById() Aug 28 17:18:51 oh, then it should come from the argument you pass, but if it's hardcoded as 0.5f it doesn't make much sense Aug 28 17:19:04 cart_man: both are needed in a general JSON sense. are you expecting a JSONObject or JSONArray from the server? (or vice versa if you are submitting to a server) Aug 28 17:19:26 Jesperhead: Well I am starting out with Firebase ...soo Aug 28 17:19:29 Button.setAlpha(0.5f); Aug 28 17:19:35 i dont know what firebase is Aug 28 17:19:39 uh, "Button" ? Aug 28 17:19:49 replace with foo Aug 28 17:19:51 that's the class name Aug 28 17:19:54 ok :) Aug 28 17:19:55 its not BUtton Aug 28 17:20:07 Jesperhead: Its googles backend but it works with JSON objects Aug 28 17:20:29 Jesperhead: In the server your entire database looks like 1 JSON string/object Aug 28 17:20:38 Jesperhead: Its a bit scary actually Aug 28 17:21:02 if commenting setAlpha's doesn't trigger NPE, you got your guilty code Aug 28 17:21:29 i commented out setalpha, then setClickable started delivering the same error Aug 28 17:21:54 can you log "foo" and see what you get? Aug 28 17:21:56 cart_man: doesnt sound too bad. some simple python apps/scripts use Dictionaries as minor databases. Dictionaries are basically JSONObjects Aug 28 17:21:58 probably a null Aug 28 17:22:09 yeah im working on that now Aug 28 17:25:03 Jesperhead, if you want to manipulate some stuff on the activity from the fragment, you can do: ((activityname)getActivity()).somemethodtomanipulate Aug 28 17:25:05 Hi, I am looking for a SDK/API to manage my database with POJO objects throught JSON in PHP Aug 28 17:26:03 raoul11: I am being told from docs to assign a variable from the activity ui by using getActivity().findViewById(R.id.foobar) is this incorrect? Aug 28 17:27:07 bluk: I moved the variable declaration to be universal, now the NPE is occuring on declaration Aug 28 17:27:52 yeah, you can't findViewById when layout hasn't been loaded Aug 28 17:28:56 doesnt the fragment layout inflate at the very end of onCreateView? Aug 28 17:29:08 because that would explain the error... Aug 28 17:29:47 well not sure what you mean by "universal" I thought you were declaring it on activity scope Aug 28 17:30:03 no in the fragment class Aug 28 17:30:11 but universal in that scope Aug 28 17:30:27 activity elements are surely already loaded at this point Aug 28 17:30:34 does the button belong to the activity hierarchy or the fragment? Aug 28 17:30:40 activity Aug 28 17:30:49 i think logging the result of getActivity() could help Aug 28 17:31:04 Jesperhead: I cant seem to even put a string inside a JSONObject :( ... There is NO JSONObject.putString() function Aug 28 17:31:21 not sure it's getting the right one Aug 28 17:32:35 might as well Aug 28 17:34:27 cart_man: isnt there a "put" function? Aug 28 17:34:55 cart_man: http://www.oracle.com/technetwork/articles/java/json-1973242.html Aug 28 17:36:18 and https://developer.android.com/reference/org/json/JSONObject.html Aug 28 17:36:28 Jesperhead: Cant put a string in it Aug 28 17:37:01 append()? Aug 28 17:37:55 or is it accumulate Aug 28 17:39:21 Jesperhead: according to SO, getActivity results null until onAttach() Aug 28 17:39:25 maybe move the code there Aug 28 17:39:48 accumelate is there Aug 28 17:39:51 Not sure what to do Aug 28 17:40:06 https://developer.android.com/reference/org/json/JSONObject.html#accumulate(java.lang.String,%20java.lang.Object) Aug 28 17:40:12 Jesperhead: ...Wht the fk man...why cant they just leave it to the normal standard like all the other datatypes... Aug 28 17:40:22 dude Aug 28 17:40:25 its google Aug 28 17:40:42 they re-invent the wheel because they can afford to Aug 28 17:41:14 but im not 100% accumulate is what you want, im just googling. Aug 28 17:41:21 bluk: that's interesting, im reading into it Aug 28 18:06:58 Anyone here has built AOSP 7.0 for falcon or know how to build one ? I have several problems with my build (I don't need drivers, just to make it compile) Aug 28 18:10:16 Eurofighter_Ty: what's AOSP 7.0? And falcon? Aug 28 18:11:02 ah, you are building nougat from the sources Aug 28 18:11:06 Eurofighter_Ty: Root/custom ROMs, head to #android-root Aug 28 18:13:02 Eurofighter_Ty: we don't build operative system in this channel. Here people talk about how to make millions with Android apps. Aug 28 18:13:23 ok, thanks for the info Aug 28 18:13:31 You're welcome Aug 28 18:30:41 hi Aug 28 18:30:51 someone experienced in android volley? Aug 28 18:31:02 I try storing cookies with it Aug 28 18:31:59 I read that volley could do that automatically but if I send my login post, it seems the cookie is not stored on the device automatically Aug 28 18:32:57 (the posts response should contain a cookie in its header) Aug 28 18:55:40 ChampS_: what's the difference between Vollet and Retrofit? Aug 28 18:56:18 Volley Aug 28 18:56:38 I don't know, I found more information about volley so I used it Aug 28 18:56:46 Cool Aug 28 18:56:49 it's working without problems except the cookie management Aug 28 18:57:04 Thanks Aug 28 18:57:25 As you can infer from my question, I can't help. Sorry Aug 28 18:58:17 np :) Aug 28 18:58:19 has anyone used webP for image compression ? Aug 28 19:00:21 krippykripkrip: this guy did: https://github.com/EverythingMe/webp-android Aug 28 19:03:30 can i split a string in android? Aug 28 19:04:18 purplex88: no, splitting string in Android cause a system crash and subsequent reboot Aug 28 19:04:31 "strings" and "causes" Aug 28 19:04:55 i don't remember well how i just to split in C++, maybe i used to extract characters from stream Aug 28 19:05:02 ok thx arancio, is there like a norm for image compression when uploading images? Aug 28 19:05:29 is there something like a stringstream? Aug 28 19:05:54 purplex88: splitting strings is considered bad software design anyway. You should rewrite your software without using goto and splitting strings Aug 28 19:06:37 purplex88: https://www.google.it/#q=Java+split+string Aug 28 19:06:42 what if.. you need to e.g. you get data from server in string. Aug 28 19:07:25 which language of google it is? Aug 28 19:07:42 sorry, replace "it" with "come" Aug 28 19:07:44 "com" Aug 28 19:07:55 italian? Aug 28 19:08:03 most of the results are in english anyway Aug 28 19:08:18 yes, that's the italian google Aug 28 19:09:12 why theres split method if its bad practice? Aug 28 19:09:51 first i thought it wasn't possible because you cannot modify the string Aug 28 19:09:55 purplex88: I was joking. It's not bad practice. It's a basic feature of every language library Aug 28 19:10:09 really? haha Aug 28 19:10:22 you get an array of new strings as result Aug 28 19:10:40 i think most of you said was maybe right Aug 28 19:11:13 since you cannot do string[0] = 'a'; Aug 28 19:11:54 yeah, as I said you just get an array of new string as a result. So string being immutable is not an issue Aug 28 19:12:31 i see, so its not really "splitting" i guess Aug 28 19:12:44 more like extracting? Aug 28 19:14:32 it's like extracting except that you are splitting. So they named the function "split". Otherwise you could call it "extract", except for the fact that it would be a wrong name. But hey who am I to tell you can't do something wrong? Aug 28 19:15:50 so what is the best way for uploading large images okHTTP or retrofit2, or is it just down to preference? Aug 28 19:16:14 well yeah only behaves like a splitting method but in background it extracts/reads Aug 28 19:16:20 if i were to split something i'd cut the original in half Aug 28 19:17:54 krippykripkrip: retrofit is more for consuming non-trivial Web API's. Depending on what you are doing you may be happy with OkHttp Aug 28 19:18:26 purplex88: ok, you cut the original in half and then... how you do access the to halves? Aug 28 19:19:20 Retrofit is perfectly capable of uploading large images Aug 28 19:20:08 JakeWharton: I didn't say Retrofit is not able to do that. Aug 28 19:20:41 arancio: thats a good point.. i like the split already, it returns the array Aug 28 19:21:17 purplex88: good. now shut up and code Aug 28 19:22:11 its compling :p Aug 28 19:22:21 Retrofit is also for consuming trivial APIs Aug 28 19:24:12 JakeWharton: do you know the word "overkill"? What I said is that if you just have to upload an image Retrofit may be an overkill. Is it that complicated? Aug 28 19:26:08 That seems entirely subjective based on the APIs requirements (which you don't know) and the technologies already in use (which you don't know) Aug 28 19:28:26 JakeWharton: since the person who asked is choosing between Retrofit and OkHttp (which is used by Retrofit), one can make a guess. If the person was already consuming an API more complicated than POSTing an image, he probably would have been using Retrofit already Aug 28 19:29:24 krippykripkrip: JakeWharton wants you to use Retrofit. Be kind and make him happy. Aug 28 19:29:32 Not sure from where your correlation to complicated comes Aug 28 19:29:58 I don't care what you use Aug 28 19:30:13 I'm not the person who asked. Aug 28 19:30:29 I'm aware of that Aug 28 19:30:33 ok, cheers Aug 28 19:30:40 You are the person putting words in my mouth though Aug 28 19:31:01 Ok. Right. Aug 28 19:31:03 is retrofit2 only for images, does it also do videos? Aug 28 19:31:13 It doesn't care about content Aug 28 19:31:37 Images and videos are just bytes Aug 28 19:31:57 does it just convert it to a base64 string? Aug 28 19:32:05 No Aug 28 19:33:02 It does whatever you tell it to, which is likely just sending the bytes Aug 28 19:36:57 krippykripkrip: https://developer.android.com/reference/android/util/Base64.html Aug 28 19:37:26 Sending an image or video as base 64 would be one of the worst things you could do Aug 28 19:37:44 then krippykripkrip should not do it Aug 28 19:37:49 It's 4x the amount of bytes Aug 28 19:38:11 Your server will accept raw image or video bytes Aug 28 19:38:50 ok, so sorry last question, say i want to add some metadata to an image, so say can i pass the image and say a json object in my request, is that possible, i’m a bit lost as to what retrofit and to be honest okHTTP are actually doing, the filepath thingy Aug 28 19:39:57 yeah i know Aug 28 19:41:04 That sounds like a multiparty request Aug 28 19:41:10 Multipart Aug 28 19:45:47 krippykripkrip: https://futurestud.io/blog/retrofit-how-to-upload-files Aug 28 19:46:19 krippykripkrip: https://futurestud.io/blog/retrofit-2-how-to-upload-files-to-server Aug 28 19:46:45 krippykripkrip: http://stackoverflow.com/questions/33482385/how-to-upload-a-photo-using-retrofit Aug 28 19:49:01 thx guys Aug 28 19:49:43 this is the most helpful this room has ever been Aug 28 19:52:13 appreciate your help Aug 28 19:52:29 so do you guys use any of these libraries? Aug 28 19:52:42 you're welcome. Sorry I couldn't help more Aug 28 19:53:18 no its fine, theres times i’ve been in this room and people have just been so rude as if i’m an idiot so i’m glad of any help Aug 28 19:53:34 I will use retrofit soon. I guess JakeWharton is a retrofit expert. He's the man Aug 28 19:54:31 I use Retrofit Aug 28 19:54:55 😁 Aug 28 19:55:44 so i thought of another question, sorry, questions questions, i have REST gateway so can i use this to upload my images too? Aug 28 20:16:19 anyone here use MIT App Inventor? Aug 28 20:18:25 nmz787_: no but these girls do: http://vancouversun.com/news/local-news/grade-six-girls-from-north-vancouver-create-hike-safe-app Aug 28 20:19:46 hrmm, it seems you can't use C++ libs with App Inventor :/ Aug 28 20:19:55 I want to use openCV and the HTC Dual Lens SDK Aug 28 20:20:26 nmz787_: what grade are you? Aug 28 20:21:38 Anybody use Python for testing? What framework do you use? Recommend? Aug 28 20:21:57 arancio: umm, pre-PhD ? Aug 28 20:22:11 arancio: Android Studio is nothing but headaches for me though Aug 28 20:22:53 I am actually on the verge of just looking for someone online to pay for cheap to set up a few projects for me so I don't have to mess with configuring the build env... so I can dive right into coding the business logic Aug 28 20:23:09 nmz787_: do you work on linux? Aug 28 20:23:18 yep Aug 28 20:24:13 nmz787_: On Windows Android Studio is a pretty linear experience. Don't know why people have problems on Linux Aug 28 20:25:30 arancio: what kind of problems though? Android Studio opens and downloads SDK packs, etc... can compile and build an APK... but then I get link errors, .so files not found... or for another app it just crashes before the app even opens fuly Aug 28 20:25:34 fully* Aug 28 20:26:04 did you try with empty project at first Aug 28 20:26:12 also for c++ you need ndk installed Aug 28 20:26:21 (the .so error is a run-time error though, which is odd... seeing as I assumed having a .so dependency would mean there would be compile-time errors Aug 28 20:26:39 Ashiren: nah, I have some SDK examples and a github project that I wanted to start with Aug 28 20:26:44 you mean UnsatisfiedLinkError? Aug 28 20:26:51 nmz787_: why don't you use Windows? Learning Android is already a job. I hate that kind of problems Aug 28 20:27:02 Hi, I've got some display issues with my quick/power widget fpr the app I'm developing. I've placed a file called widget.xml into res/layout directory. This file has a relative layout parent, if ypu want I could paste it on a pastebin service. I'm trying to figure out why the widget is bad displayed (I mean size and items). Aug 28 20:27:03 Ashiren: yep! https://github.com/lnanek/AutoChatSticker/issues/1 Aug 28 20:27:18 arancio: hmm, I can try, I dual-boot Aug 28 20:27:48 nmz787_: it's worth trying. I never had problems with Android Studio, fortunately Aug 28 20:28:11 first try some simpliest project with NDK and see if it runs, then examine its gradle and configuration Aug 28 20:28:29 Ashiren: that specific error was solved by moving the .so files in the github repo to jniLibs, instead of libs (which leads to me internally riduculing Google for not being smart enough to do this for me) Aug 28 20:28:58 Ashiren: I'd rather just skip all the build setup and get to coding image-processing Aug 28 20:29:08 they still have tutorial for (only?) when eclipse was the thing Aug 28 20:30:22 looking into if Kivy can support NDK stuff Aug 28 20:30:30 that way I can just stick with Python Aug 28 20:51:35 this is widget.xml: http://pastebin.com/dRZfUwyi, and this the screen with my widget: http://m.imgur.com/QtmHmX4 Aug 28 20:54:30 How could I fix the xml in order to get the widget like the top widget either the bottom widgets? (as size and content size/position and visibility) Aug 28 20:54:44 Any ideas? Aug 28 20:55:19 cristian_c: syntax error, please rephrase your question and press [Enter] Aug 28 20:55:39 arancio: ? Aug 28 20:56:20 cristian_c: I could not understand your question Aug 28 20:59:07 I've got some display issues with my quick/power widget fpr the app I'm developing. I've placed a file called widget.xml into res/layout directory. This file has a relative layout parent, if ypu want I could paste it on a pastebin service. I'm trying to figure out why the widget is bad displayed (I mean size and items). Aug 28 20:59:17 Any ideas? Aug 28 21:06:05 Where / how can I learn about using NEON instructions to speed up my native code? Aug 28 21:08:21 liquidmetal, I'd look for books on Amazon, official documentation from ARM is kinda sparse Aug 28 21:10:27 liquidmetal: 'in-line ASM' might be good keywords Aug 28 21:12:27 Mavrik, nmz787_ thanks - do you know if android studio supports working on such things? Aug 28 21:14:58 What do you mean by "supports"? Aug 28 21:20:16 liquidmetal: no idea how C/C++ code is compiled, but if it uses gcc, then it should support gcc in-line ASM Aug 28 21:21:04 nmz787_, I think they recently switched to clang in the r12 ndk Aug 28 21:21:29 Mavrik, for example android studio doesn't have stepping through native code just yet. Aug 28 21:21:35 liquidmetal: idk if this would help http://stackoverflow.com/questions/13547082/understanding-basic-inline-neon-assembly Aug 28 21:22:30 liquidmetal: https://developer.qualcomm.com/forum/qdn-forums/increase-app-performance/snapdragon-llvm-compiler-android/27391 Aug 28 21:22:33 liquidmetal: http://www.crickettechnology.com/blog/?p=691 Aug 28 21:22:45 liquidmetal: haven't read them, just link dropping Aug 28 21:22:55 liquidmetal, NDK support in AS is very flaky Aug 28 21:22:57 nmz787_, didn't see the cricket tech link - will check it out Aug 28 21:23:06 it'll compile fine tho. Aug 28 21:26:40 beware of cristian_c Aug 28 21:26:50 please, hear me. Aug 28 21:37:26 krabador: what's wrong with cristian_c? Aug 28 21:37:48 arancio, a legentary nerd Aug 28 21:37:53 *legendary Aug 28 21:38:13 well, it's not necessarily a bad thing Aug 28 21:38:44 I thought this channel was all about nerds making millions with their apps Aug 28 21:40:45 krabador: aren't you a nerd? Aug 28 22:08:33 arancio, in a way, yes.. Aug 28 22:10:02 then you just have to become millionaire and you can call this channel your home Aug 28 22:10:38 cristian_c o hai there Aug 28 22:11:29 If you release a game with only singleplayer as v1.0.0 and then add multiplayer but the game is still backwards compatible, would you call the version v1.1.0 or v2.0.0? Aug 28 22:12:03 sounds like a major increase, not minor, go for 2 Aug 28 22:13:32 meinteil: I answered to your question this morning Aug 28 22:13:41 liquidmetal: hello Aug 28 22:14:16 meinteil: did you read my answer? Aug 28 22:14:57 I guess you don't care Aug 28 22:18:18 thank arancio, i missed it Aug 28 22:21:43 meinteil: my opinion is that it's subjective. You can do as you wish. I would increase the minor version number, resulting in v.1.1.0. My rationale is that the game is just the same. Game kind, rules, interaction, etc. - the more important factors in identifying a game - are the same. If you don't multiplay you don't even notice the upgrade. If you want people to notice that you can always call the version "1.1.0 Multiplayer" or add a Aug 28 22:21:43 "Multiplayer!" tag here and there in web pages and graphics Aug 28 22:31:08 Hi guys. A bit offtopic but why my Nexus 5x might not get Android N update? It's been a week since it's available but my 5x keeps silence :( Aug 28 22:33:18 activate your phone for the public beta, download and install the update, deactive from the beta program Aug 28 22:34:34 Is there a GPL-compatible Google Cloud Messaging client library? Aug 28 22:35:07 bankai_ ok thx Aug 28 22:35:20 because the one that’s in the android maven repo is under an exclusive license that even forbids you from bundling it with your app if your app will be released on the Amazon store Aug 28 22:36:05 if I read this correctly, I can’t even use Android Studio to develop apps released on the Amazon Store? Aug 28 22:37:16 > You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) Aug 28 22:37:37 hm Aug 28 22:37:47 if you can just stuff an APK on it, it’s not a non-compatible implementation of Android Aug 28 22:38:12 I assume they mean non-Android OSes, and Android forks that won’t even run stock Android binaries Aug 28 22:38:18 Yes, they do. Aug 28 22:38:21 oh? Aug 28 22:38:29 Amazon Kindle, a noncompatible fork, runs normal APKS Aug 28 22:38:31 that’s the issue Aug 28 22:38:44 and any app put on the Amazon Store will be available on Kindles if compatible Aug 28 22:38:54 that’s an interesting issue Aug 28 22:39:27 https://developer.amazon.com/appsandservices/resources/development-tools/ide-tools/tech-docs/01-setting-up-your-development-environment Aug 28 22:39:36 Amazon even recommends Android Studio Aug 28 22:47:08 kode54: likely because Amazon knows that clause is illegal and unenforcable. Aug 28 22:47:25 Amazon has gone to court over it already Aug 28 22:57:53 justJanne: how is your app development going? Aug 28 22:59:02 arancio: well, quite well, except that there seems to be no simple "just drop in" cloud messaging library on android that’s also floss Aug 28 23:00:41 "cloud messaging", another unknown concept Aug 28 23:00:47 If I'm usng the android experimental gradle plugin, do I still need Android.mk for NDK stuff? Aug 28 23:15:24 is there a way to know when an android app goes to the background or user quits thats not onPause / onDestroy per activity? A library I'm writing has sessions and when the user exits the app I need to end the session. Aug 28 23:16:47 nownot: the activity state engine (onCreate -> onStart -> onResume -> onPause -> onStop -> onDestroy) is exactly what you want Aug 28 23:18:33 justJanne : yes, Im aware of that. the issue is calling it in the onPause or onStop of an activity doesn't seem to work. these are called when a user goes to a new activity, mean actvitiy a->b a will call onPause. So if I end the session there it doesn't make sense, the user is still in the app just a different activity Aug 28 23:19:02 nownot: the application object also has a lifecycle Aug 28 23:19:54 justJanne : unfamiliar with the application object. can you explain more? Aug 28 23:20:16 Turns out, the application lifecycle in recent versions is a bit different... Aug 28 23:20:26 it now just does onCreate -> onLowMemory -> ? Aug 28 23:27:55 nownot, Have you considered using fragments? It essentially allows you to show different "views" within a single activity. So moving from one view to the other would still keep you in the same activity. Aug 28 23:28:27 Not sure that really addresses his issue. Aug 28 23:28:42 it doesnt :/ Aug 28 23:30:36 Well, everything is inside a single activity - onPause and onResume will only be called when the user leaves that particular activity. You'd have to collect all the different pieces of interaction into a single activity using multiple fragments. Aug 28 23:30:56 Thats not true. Aug 28 23:30:58 So the session would only exist inside that particular activity. Aug 28 23:30:59 Oh? Aug 28 23:31:05 onPause can get called during screen rotation. Aug 28 23:31:12 as can onResume Aug 28 23:31:21 which is why you should use the saved state bundle. Aug 28 23:31:49 Also, what he wants to know is is there a way to detect when the application has been actually closed/minimised so as to end a user's session. Aug 28 23:31:59 Im not entirely sure there is, without having system access... Aug 28 23:32:02 Anthaas, sure - this means you'd have some kind of a session ID. And the session ID can be timed out. Aug 28 23:32:07 (Which may be what banks like Barclays do) Aug 28 23:32:08 we'll I can't tell my client, who I'm writing the library for, to tell who ever uses the library to change their app to use only fragments instead of actvivies. that goes against every android design principal there is. Aug 28 23:32:22 liquidmetal, wut? Aug 28 23:32:32 nvm - was thinking a bit too abstract Aug 28 23:32:40 Im not even sure you were doing that... Aug 28 23:32:42 Interesting problem though - I hadn't thought about it Aug 28 23:33:08 nownot, If you don't mind me asking, what kind of library/app would it be used in? Aug 28 23:33:24 nownot, Im assuming security of the application is an issue, so must the user be in constant interaction with it? Aug 28 23:33:41 Most apps just login and let it be Aug 28 23:33:48 liquidmetal, Also not true. Aug 28 23:33:54 :'( Aug 28 23:33:58 this is something that iOS gives out of box with the app delegate, only makes sense that the app knows when it goes into the background. insane to me that you can't do this on android Aug 28 23:34:05 liquidmetal, If you are a Barclays banker, and have their application, you'd experience this. Aug 28 23:34:28 Anthaas, oh yeah yeah - I meant apps like gmail, calendar, sound cloud, pocket, medium, slack, etc Aug 28 23:34:35 so many apps where you just stay signed in Aug 28 23:34:52 nownot: are you criticizing Android? Aug 28 23:35:02 Anthaas : its event logging for applications that will feed user interaction to a backend to run metrics on Aug 28 23:35:18 nownot, of course it's easily achievable Aug 28 23:35:26 pfn : yeah? Aug 28 23:38:10 Theres a hack that could be done. Aug 28 23:39:20 it's no hack Aug 28 23:39:20 Lemme see if I can find an example online. Aug 28 23:39:29 Oh, pfn might know more than :P (He does) Aug 28 23:39:32 Its been a long while for me haha Aug 28 23:39:42 I was thinking about measuring time between activity lifecycle callbacks. Aug 28 23:39:59 im definitely interested to see what pfn has Aug 28 23:41:24 I was thinking something along the lines of this: http://stackoverflow.com/questions/29924488/detect-when-app-is-opened-resumed Aug 28 23:44:22 Anthaas : looking at that now Aug 28 23:44:27 thanks for the link Aug 28 23:48:51 @pfn : did you have another way? Aug 28 23:51:25 "reference counting" active activities is the general approach Aug 28 23:52:03 thats what I was going to try, know the numbers of on creates vs the number of on destroys. if its a on destroy without a onCreate before then its exiting hte app Aug 28 23:52:10 pfn : is that the general idea ? ^^ Aug 29 00:05:41 <_ADAM> How can the system ssl certificates be extracted? Aug 29 00:06:07 <_ADAM> For install on another Android? Aug 29 00:09:14 _ADAM: #android-root ? Aug 29 00:24:37 nownot, you can't depend on destroy, only stop and start Aug 29 00:40:17 wtf is it raining damnit... Aug 29 00:41:19 keep calm and fetch the umbrella Aug 29 00:42:14 They only work for a little while upside down tho Aug 29 00:42:54 Kinda like any game from EA Aug 29 00:43:17 stupid pnw Aug 29 00:47:46 hi guys Aug 29 00:47:50 anyone online ? Aug 29 00:47:57 Z_meee: hi! How are you? Aug 29 00:48:07 Z_meee: wanna party= Aug 29 00:48:08 ? Aug 29 00:48:31 my hobby: overdoing theming of debug and beta versions: http://imgur.com/a/MC7Z9 Aug 29 00:50:12 justJanne: what's a core? Aug 29 00:51:11 I'm clicking but nothing happens Aug 29 00:55:31 basically, it’s a bouncer, but with awesome extra features, and with custom protocol support. Aug 29 00:55:54 there’s even a hacky patch for quassel cores to directly support XMPP instead of working through bitlbee Aug 29 00:56:33 hi Aug 29 00:56:45 as IRC apps on mobile are shit, the solution is to use a hosted bouncer with custom protocol that the client connects to Aug 29 00:56:52 I am trying to install GPlay services on emulator Aug 29 00:57:21 other such examples would include IRCCloud, they offer a similar product, but ours is mostly aimed at people trying to self-host (and we’re a community of people, not a faceless corporation) Aug 29 00:58:16 but its not working Aug 29 00:58:47 got into different issues using different posts Aug 29 00:58:59 1. Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] 2. Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] 3. No space left on /system Aug 29 00:59:32 anyone got steps or some help in installing GPlay over marshmallow or noughat Aug 29 01:04:51 justJanne: cool. I had to look for "IRC bouncer" on wikipedia. Aug 29 01:05:21 Z_meee: use one of the premade emulator images with GPlay in them Aug 29 01:05:25 ZNC Aug 29 01:07:52 except classical bouncers are horrible on mobile – if you lose connection, you don’t get notifications, you can’t easily "just scroll up" to load logs, log in with multiple clients, etc Aug 29 01:08:05 that’s why things like irccloud and quassel gained popularity in the first place Aug 29 01:10:22 or even glowing bear Aug 29 01:23:19 I see. Never used IRC on mobile, so far. Aug 29 01:23:51 Actually I didn't use my smartphone much so far. I just run few test applications Aug 29 01:24:30 I have yet to subscribe a connectivity service and a telecom service! Aug 29 01:25:11 Everybody from irccloud.com is reconnecting Aug 29 01:25:12 arancio best way to do it :) (stay unplugged) Aug 29 01:25:17 :D Aug 29 01:25:29 hey justJanne , solve the huge list of things in db problem ? Aug 29 01:26:06 or was it recyclerview Aug 29 01:26:22 Ologn https://techcrunch.com/2016/08/28/how-connected-cars-are-turning-into-revenue-generating-machines Aug 29 01:26:25 arancio: because IRCCloud has server issues again Aug 29 01:26:31 g00s: actually, kinda? Aug 29 01:26:36 \o/ Aug 29 01:26:47 My solution is simply loading the current channel completely into ram, Aug 29 01:26:53 and keeping the others only in db Aug 29 01:27:02 hm Aug 29 01:27:07 btw, g00s, do you know of a lib to integrate google cloud messaging into your app, Aug 29 01:27:08 on or off heap ? Aug 29 01:27:16 which is also GPL-compatible? Aug 29 01:27:21 justJanne no i don't .. sorry Aug 29 01:27:21 (meaning GPL or more free) Aug 29 01:27:28 eh, it’s java Aug 29 01:27:30 so ofc heap Aug 29 01:27:38 there’s pretty much nothing off heap in java Aug 29 01:27:42 justJanne nio bytebuffers can alloc off heap Aug 29 01:27:53 yeah no thanks Aug 29 01:28:04 that’d make everything even slower Aug 29 01:28:06 i keep my ring buffers there Aug 29 01:28:17 I do use NIO ByteBuffers to serialize/deserialize messages, Aug 29 01:28:21 but not for this stuff Aug 29 01:28:36 btw, are there dynamic bytebuffers, where I can append a bytebuffer? Aug 29 01:28:49 hm, i think you need to specify the size upfron Aug 29 01:28:53 for deserializing I use a single bytebuffer and traverse it, Aug 29 01:28:57 *upfront, i haven't looked at the code in a few months Aug 29 01:29:05 but for serializing that is obviously not possible Aug 29 01:29:29 justJanne you may be anle to do that with 'compund' netty bytebufs Aug 29 01:29:36 lol anle -> able Aug 29 01:29:42 I’ll look into that someday Aug 29 01:29:44 but thanks Aug 29 01:30:18 netty is great stuff Aug 29 01:30:27 well, not usable for me, sadly. Aug 29 01:30:31 I tried it before Aug 29 01:30:42 it’s just not possible with the way the quassel protocol is designed Aug 29 01:30:44 ok. yeah, they have a standalone library thats just the basic things Aug 29 01:30:51 you first send some raw bytes, Aug 29 01:31:22 to negotiate things, then, depending on that, use either parser A or B, after a specific time, switch to parser C or D Aug 29 01:31:47 on top of A or B or C or D is another level of parsing, which always switches sometimes, too Aug 29 01:31:57 netty really hates switching out the entire parsing pipeline Aug 29 01:32:28 i dont recall the limitations of the Codecs Aug 29 01:32:35 bummer :( Aug 29 01:34:00 anyway, the GCM thing is really annoying Aug 29 01:34:23 I mean, I’m able to use the exceptions in the european copyright directive that allow me to reverse engineer it, Aug 29 01:34:45 but Google is known for prosecuting people even if the law says otherwise just because you won’t sue Aug 29 01:36:53 yeah that whole thing with GCM is kinda bs Aug 29 01:38:39 justJanne are you using protobufs or flatbuffers in any projects ? Aug 29 01:40:06 justJanne btw ragel could do those dynamic conditions to switch parsing strategies, but its kinda going closed source Aug 29 01:40:27 Nope, neither protobufs nor flatbuffers yet Aug 29 01:40:43 we have the issue that we use a custom protocol, with lots and lots of objects Aug 29 01:40:55 a standard RPC call would be deserialized as Aug 29 01:42:43 I've been using msgpack for my cross-codebase serialization which protobufs didn't fit Aug 29 01:42:44 QtObject(List(QtObject(2 : Int), QtObject("displayMsg"), QtObject(List(QtObject("#android-dev" : String), QtObject(Message(sender: "g00s", content: "yeah that whole thing with GCM is kinda bs", time: ...)))))) Aug 29 01:43:15 msgpack plugs fairly nicely into c/c++/python/ruby/js/etc Aug 29 01:43:18 as you can imagine, g00s, that’s a bit painful to work with in protobufs Aug 29 01:43:34 as almost all objects are generic, and can contain variable generic objects again Aug 29 01:45:20 dragorn are the objects deserialized from msgpack strongly typed, or a bunch of lists, maps, and obkects ? Aug 29 01:45:54 it's strongly typed in as much as it knows if it's a string, different sized ints, and other primitives. It can contain vectors and dictionaries, which is pretty much all you need Aug 29 01:46:14 and it can be configured for max recursion depth, etc Aug 29 01:49:31 dragorn have you looked at bson ? Aug 29 01:49:53 there are so many of these things, cap'n proto didn't have as many language bindings Aug 29 01:51:53 i have not, i ended up writing a big introspectable backend lib in c++ and then serializers for whatever i need. Right now I'm doing it with msgpack and json Aug 29 01:58:27 dragorn have you used mmap'd files on android (from java) ? Aug 29 01:59:00 g00s, i have not Aug 29 02:43:11 Come on guys, let's live up the channel! **** ENDING LOGGING AT Mon Aug 29 02:59:58 2016