**** BEGIN LOGGING AT Thu Jul 28 02:59:58 2016 Jul 28 03:31:12 jython on android sucks Jul 28 03:31:17 scala works great Jul 28 03:31:30 the wire android app is partially written in Scala Jul 28 03:59:59 What about Kotlin? Language looks amazing on paper, how well does it work with Android? Jul 28 04:18:04 I sometimes get so paranoid that I think that the Android devs made the API so contrived so that the job market doesn't get flooded with run-of-the-mill devs and get only the ones crazy enough to actually learn it. Jul 28 04:18:17 kotlin works fine on android Jul 28 04:19:37 android api is very standard Jul 28 04:19:56 there's little that doesn't have an analog in other UI toolkits Jul 28 04:33:51 VerbalKint recent in the opposite direction http://www.bloomberg.com/news/articles/2016-07-11/google-to-train-2-million-indian-developers-on-android-platform Jul 28 04:33:57 *recent news Jul 28 04:34:51 g00s: what's that supposed to mean? You trying to say that Indians are less capable than Caucasians or something? I wasn't talking about races :P Jul 28 04:35:13 VerbalKint how could you possibly read that into it ? Jul 28 04:35:38 g00s: touche :P Jul 28 04:37:28 in any case, they wouldn't intentionally make things contrived and then spend to train 2 million people :) Jul 28 04:59:55 I'm surprised that rounded corners aren't API level 25 Jul 28 05:00:34 rounded corners... Jul 28 05:01:20 Actually, some time ago I complained about this and thought that they had that kind of requirement. I spoke in ignorance, but it's still a tedious way of getting them. :D Jul 28 05:03:35 what Jul 28 05:17:27 Trying to backup tablet with a dead screen - I was able to connect with adb shell earlier and backed up some files but now cannot see any devices Jul 28 05:17:32 I'm trying different orders of plugging in and restarting, killing the adb server, etc. Jul 28 05:17:40 Anyone know the magic incantation? Jul 28 05:17:50 On a Mac, if that matters Jul 28 05:35:46 What resources would you guys recommend for starting out with android dev? Jul 28 05:42:39 mr_yogurt: do you know Java? Jul 28 05:44:24 Leeds: yes Jul 28 05:46:01 then start with the tutorials at d.android.com :) Jul 28 05:48:06 Leeds: OK. I saw those, just wasn't sure if they were what was generally recommended. Jul 28 05:48:28 mr_yogurt are you greek ? Jul 28 05:49:29 g00s: should I be? Jul 28 05:49:39 I've not yet decided. Jul 28 05:49:48 greek yogurt is better ya ;) Jul 28 06:53:19 Is this a valid drawable for multiple states? http://pastie.org/private/53lgb6149o4yoasddgr4qq Jul 28 06:53:33 It seems to work, but the google results don't mention this method Jul 28 06:57:07 the drawable documentation says what the valid schema of drawable xml is Jul 28 06:57:13 why do you need google results for more? Jul 28 06:58:56 pfn: if there are no results, then I must be doing something wrong, I figure Jul 28 07:01:20 But Android Studio's not giving me any warnings or errors, so I must be doing it right :D Jul 28 08:20:25 Any way to store data in buttons, that is not shown? Jul 28 08:21:35 TextView not button Jul 28 08:22:00 yes, setTag Jul 28 08:24:35 I have listview that I'm using an ArrayAdapter to add textViews to. How can I set the tags for them? Jul 28 08:30:16 ah.. I see Jul 28 08:47:15 What is the purpose of onCreateView returning View? Jul 28 08:56:59 Hello, I am trying to compile an android project but I get this error: libexploit/mmap.c:55: undefined reference to `mmap2', collect2: error: ld returned 1 exit status. The file is taking from here https://github.com/android-rooting-tools/libexploit/blob/master/mmap.c Jul 28 08:57:33 How can I tell ld where to find the __mmap2 function ? Jul 28 09:17:23 Well I think the project doesnt support recent versions of ndk so I switched to an old one and it works great Jul 28 09:21:50 Hi all Jul 28 09:36:03 Is it possible to sign an .aar file the same way that one signs an .apk file in Android Studio? Jul 28 09:37:08 (If here is not the right place to ask this, apologies...) Jul 28 10:21:54 Does anyone have any tips on how to write a play store description? Jul 28 10:26:37 I can't mention in the description that the apk is available elsewhere too, can I? Jul 28 10:30:04 In the ndk, I can get an AAssetManager*, AAsset* for resource files and through AAsset_getBuffer a char* to the resource data Jul 28 10:30:42 who is responsible for deleting these objects, and can I safely store the array returned by getBuffer without copying it? Jul 28 11:28:44 ... no one? Jul 28 11:29:36 Hi Jul 28 11:30:41 I want to create a scrollable layout which contains three headings: 1>Upcoming tasks 2>Completed tasks 3>Overdue tasks Jul 28 11:30:53 I thought of creating three listviews inside a scrollview and then disabling the scoll of the listview. But then I read somewhere that this is a very bad thing to do. Jul 28 11:31:45 What should I use for this purpose? I don't want the items under individual headings to scroll. The whole view should scroll. On top is it possible to make the items under headings collapsible? Jul 28 11:35:05 Any suggestions? Jul 28 11:40:15 rudolf_: visualise it Jul 28 11:40:58 I need some help with the code. How can I visualize the code? Jul 28 11:41:05 oh Jul 28 11:41:13 I meant visualise what you are trying to do Jul 28 11:41:20 in terms of layout / screen design Jul 28 11:41:44 I have. I know how it should look. I am not able to understand what elements do I need. Jul 28 11:41:59 What I thought of using seems to be bad code. Jul 28 11:42:01 yeah, this is for ME (or anyone else) Jul 28 11:42:06 so try and make sense of what it looks like :P Jul 28 11:42:18 by scrollable do you mean Jul 28 11:42:21 Initially I thought of using 3 list views inside a scroll view. Jul 28 11:42:27 tabs? you swipe left and right to reveal 3 lists? Jul 28 11:42:54 nope....think of 3 list views inside 1 scroll view in the same fragment. Jul 28 11:43:01 right Jul 28 11:43:17 why do you want to disable the scrollability of it? Jul 28 11:43:25 if you don't want to make it scrollable Jul 28 11:43:30 just put them in a linearlayout Jul 28 11:43:43 So I don't want the individual lists to scroll. When the user scrolls, the whole scroll view should scroll. Jul 28 11:44:03 The problem is that the list items are dynamic. Jul 28 11:44:08 yeah Jul 28 11:44:46 And the items are coming from a server. As they come, they have to be sorted and put under their respective heading. Jul 28 11:45:03 do you want to also keep item selections working? Jul 28 11:46:23 I want onclick working Jul 28 11:46:42 OnClick item has to launch another activity. Jul 28 11:47:30 hmm yeah all of the suggestions are to intercept the touch events of the listview and prevent anything from happening Jul 28 11:47:48 an alternative would be to use listviews and then manually add the rows to each view as they come in (items) Jul 28 11:47:51 like an adapter Jul 28 11:48:09 er Jul 28 11:48:11 linearlayouts* Jul 28 11:48:15 not listviews Jul 28 11:48:21 I wonder if recyclerviews have something for this Jul 28 11:48:51 yeah I also saw those suggestions. To see when the last item is getting displayed and disable listview from doing anything. Jul 28 11:49:06 This is something I got: http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/ Jul 28 11:49:18 Trying it now. Jul 28 12:04:41 has anyone used itext? Jul 28 12:05:48 blade: yes, and it was a good experience all in all Jul 28 12:06:12 Did some nice PDF editing, although I have never used it under Android Jul 28 12:06:50 I have done also, though it was a while back and was a bit limited. Jul 28 12:07:03 ohh i am afraid my query is regarding Android. when i use itext in android, it shows me duplicatefileexception Jul 28 12:08:06 if i were to replace a UI of an app, would it require a whole re-write ? Jul 28 12:08:58 hypermist: Layouts (or the "UI") of an app are mostly done using layout / XML files. As long as you reference the same resource IDs for the different UI elements, and those widgets are of the same time, it will work without any changes to code. Jul 28 12:08:59 hypermist: depends Jul 28 12:09:13 tx, oh okay. Jul 28 12:09:32 hypermist: are you changing from Android standard layout to HTML5 or some other mobile framework? Jul 28 12:09:36 If you need to change how things behave it is likely that you do not need to make a lot of modifications to code. Obviously this depends on the app though. :) Jul 28 12:09:48 it'll hopefully be the same wyoung but just modified look,etc Jul 28 12:10:02 just colour changes (or similar) Jul 28 12:10:41 ah ok, well Android abstracts that with layouts, so you can change the layout while still having the core code the same, then again it all really depends what your app does too Jul 28 12:10:47 i want to generate a pdf in my app. i have written the code but when i compile it it shows me duplicatefileexception Jul 28 12:10:47 like say it has an old UI, and i want to clone it and modify the UI look to make it look like flat,etc Jul 28 12:11:48 blade: is anything else logged? Jul 28 12:12:16 i have a minor addiction to liking things with flat ui's wyoung Jul 28 12:12:17 itext does have debug logging you can enable Jul 28 12:12:44 yeah it says duplicate file exception : duplicate files are vopied in apk ant/site.xml Jul 28 12:12:52 hypermist: better in terms of accessibility, and it's in right now! ;) Jul 28 12:13:08 tx, ? what sorry Jul 28 12:13:34 blade: ant? as in the old school java build tool? Jul 28 12:13:49 hypermist: Flat / material design. Jul 28 12:14:26 i have no idea about ant Jul 28 12:14:41 bugger github's partially down Jul 28 12:14:42 xD Jul 28 12:14:46 can u help me with the error? Jul 28 12:15:30 blade: System.getProperties().setProperty("xr.util-logging.loggingEnabled", "true"); XRLog.setLoggingEnabled(true); // Although I am not sure how this will go under Android Jul 28 12:16:36 tx, https://play.google.com/store/apps/details?id=com.coinomi.wallet this is the app (i dont own) but i have my own version and i wanted to customize the ui to be a different type, github.com/coinomi/coinomi-android is the github ur l Jul 28 12:16:57 okay thanks Jul 28 12:17:01 ill try that Jul 28 12:29:01 hmm, changing themes on a layout seems to have no effect on my layout Jul 28 13:15:03 hi, why i dialog buttons seams transparent on android N Jul 28 13:15:16 it's very strange Jul 28 13:19:40 Hi, I am getting "Class not found on path: DexPathList.." error on my app, but sometimes, like 1 in 15 rebuilds from source (like after git clean -fdx) it works fine. How do i find out what's wrong Jul 28 13:22:44 i have a GameDraw class which is the main View, but I want a seperate class to load Bitmaps -it needs context, I should pass context from GameDraw? or what is correct way to pass context in this case? Jul 28 13:24:45 njcomsec: If GameDraw is the only class that will have a reference to the new class, then yes its safe to pass the context. Jul 28 13:26:14 i tried to pass context but i still get getResources() unable to resolve method Jul 28 13:26:53 context.getResources() doesn't work? Weird o_O Jul 28 13:27:55 Someone please help me (Notice me Sempai!) Jul 28 13:28:56 oh wait it does thanks Jul 28 13:29:52 public GameDraw(Context context) {super(context); bitmaps = new Bitmaps(context);} ... public Bitmaps(Context context){ this.context = context.getApplicationContext();} my constructors are correct? Jul 28 13:34:08 njcomsec: Yeah looks good Jul 28 13:34:15 hey. i'm hoping someone can help me figure out how this file is encrypted in this apk. it's accessed via pfileandroidasset://file.dat it seems. I know it's an SQLITE3 database. i did some digging and i have a key string of the form "aes128:" then 40 hex digits. i can't figure out what libraries were used. does this ring a bell for anybody? Jul 28 13:43:43 Just looking at optimizing my SDK manager installed packages. Which ones are REQUIRED and which are recommended? Currently, I have the SDK Plarform, and all System Images for each API version from API19+ Jul 28 13:43:50 Just feel like that's a lot of stuff that's not really required. Jul 28 13:44:33 Is there no way to detect when page has finished rendering in webview? Jul 28 13:44:48 i.e. includes all scripts finished executing Jul 28 14:00:12 In the ndk, I can get an AAssetManager*, AAsset* for resource files and through AAsset_getBuffer a char* to the resource data Jul 28 14:00:14 Who is responsible for deleting these objects, and can I safely store the array returned by getBuffer without copying it? Jul 28 14:17:49 are attribute name collisions a thing Jul 28 14:17:56 https://github.com/Philio/PinEntryView/issues/3 Jul 28 14:18:13 should I really prefix all my custom attributes to avoid collisions of common names Jul 28 14:18:24 like for example appcompat snagged "color" Jul 28 14:18:30 dude I wanted to use that Jul 28 14:18:39 why can't we share Jul 28 14:19:09 why should I even declare a styleable group if the groupname doesn't act as a namespace Jul 28 14:20:15 hi, what transmition protocol would you guys use for a video chat app? Jul 28 14:20:56 most video chat posts/projects I see mention webRTC, but is this any good/relevant for mobile first project? Jul 28 14:27:12 missingno: you can re-use attributes Jul 28 14:27:46 just dont specify a format Jul 28 14:36:08 Hi all i'm trying to implement a bottom sheet that has a play/pause button and shows the title/coverart of the currently playing song. i was wondering if is there any github example for this or any stockoverflow post that can point me in the right direction? Jul 28 14:40:36 hi all Jul 28 14:41:15 guys, is there anyone who have used bottomSheetBahaviour yet? Jul 28 14:41:41 I see a strange behaviour and I don't know how to solve it. Jul 28 14:45:28 hero_biz: just say what's wrong Jul 28 14:46:59 I have a FrameLayout within CoordinatorLayout with peekHeight=25dp Jul 28 14:47:05 this works correctly Jul 28 14:47:20 and I see 25dp from content of framelayout too Jul 28 14:47:45 but if I place this coorrdinatorlayot in another drawerlayout Jul 28 14:48:12 the peekheight of 25dp allows be to open and close bottom sheet Jul 28 14:48:24 but content of frame layout(as bottom sheet) will nto be shown Jul 28 14:48:52 it seems like that frae layout has a around 20-23dp top padding... Jul 28 14:48:56 <.< Jul 28 14:49:03 I don't know why it is like this. Jul 28 14:50:01 <.< Jul 28 14:50:18 * hero_biz thinks too many typos.... <.< Jul 28 14:51:57 If I have fragments in the back stack and I navigate to another activity and then come back how can I maintain the back stack ? Jul 28 14:57:17 csst0111: iirc, backstack should still remain in that case Jul 28 14:59:09 alexfu, what if activity gets destroyed ? Jul 28 14:59:36 csst0111: like in a config change? Jul 28 15:00:19 no, I mean the previous activity with the fragments gets destroyed by the system to free memory Jul 28 15:01:24 if your activity gets killed by the OS, there's really no way to save the fragment backstack to restore later Jul 28 15:01:49 oh I see! thanks a lot alexfu ! Jul 28 15:05:11 csst0111: there's nothing stopping you from rolling your own solution Jul 28 15:07:08 hey does anyone else use different OS's with droidStudio ? ( the key mappings seem similar but i keep finding ones on the osx that are different for no reason) Jul 28 15:07:52 droidStudio? Jul 28 15:07:52 like i like ^s for save all and to make mac users hit 'fn(command) s' seems weird of a combo Jul 28 15:07:59 androidStudio Jul 28 15:08:21 it's mac Jul 28 15:08:26 that's all Jul 28 15:08:39 I have one at work running windows and at home using mac . Jul 28 15:08:41 bit0ika: COMMAND on a mac is the same as CTRL on Linux/Windows Jul 28 15:08:59 yes Jul 28 15:09:06 bit0ika: of course, you can change the key mappings to your liking Jul 28 15:09:38 yeah seems like mac does that all the time and WOW Jul 28 15:10:03 command is the same as CTRL ... ha i've been using osx for years and never knew that Jul 28 15:10:08 it's the convetion for that OS Jul 28 15:11:54 Hello to everybody! Jul 28 15:18:43 Are user preferences wiped at app update? is that something I decide as a developer (like a setting in the manifest)? Jul 28 15:19:16 I would like to ask a question. I have created a navigation drawer to my application with top app toolbar, but the toolbar is appearing over the content, so it is hiding parts of the content. What can I do to change that? Jul 28 15:20:04 meinteil: no. shared preferences are untouched through app updates Jul 28 15:20:48 tothbalint: what does your layout file look like? Jul 28 15:21:43 has anyone used a bottomSheetBehavior in a corrdinatorLayout which itself is inside a DrawerLayout? Jul 28 15:22:52 alexfu, here you go, sorry I forgot to include the link :( Jul 28 15:22:55 alexfu, https://gist.github.com/tothbalint/2200fed58118caab1bc10779714cd6d0 Jul 28 15:26:10 tothbalint: you want your toolbar above the fragment container. so how do you make space for the toolbar? Jul 28 15:27:01 CoordinatorLayout doesnt lay things out for you so the way you have it, it's just putting things on top of each other Jul 28 15:27:22 I thought adding some margin or padding to the first element that would appear on the top, but I think it is a stupid solution, and not sure how would it work at different screen sizes Jul 28 15:28:01 tothbalint: thats one way Jul 28 15:28:08 and certaintly works Jul 28 15:28:24 better than wrapping the whole thing in another layout Jul 28 15:29:08 alexfu, that is the only solution, or there is something here I am missing? Jul 28 15:29:33 you'd want the fragment container to have a top margin to make room for the toolbar Jul 28 15:29:58 but dont make the top margin value a fixed value Jul 28 15:31:00 alexfu, okay, what do you mean not a fixed value? Jul 28 15:31:34 like. dont put android:layout_marginTop="48dp" Jul 28 15:33:04 use ?actionBarSize instead Jul 28 15:33:06 alexfu, then how would I do it? I know you are trying to make me find the idea, but I am lost here... Jul 28 15:37:09 alexfu, thank you very very much! It works like a charm! Jul 28 15:43:28 Which window on android studio displays information on app crash? Jul 28 15:43:58 i recall seeing it but i forgot where Jul 28 15:44:17 stack trace in red text.. Jul 28 15:44:38 purplex88, 6: Android monitor, logcat tab :) Jul 28 15:45:19 Hm, it doesn't say why it crashed.. Jul 28 15:45:30 purplex88, maybe you need to change the settings what kind of log messages does it show to you Jul 28 15:45:54 purplex88, or check if there are any filters turned on Jul 28 15:47:03 ah yes i changed it to "show only selected application" now i see Jul 28 15:47:26 it had an unnamed filter Jul 28 15:48:06 purplex88, :) Jul 28 15:49:39 is there a padding around bitmaps or something? they dont seem to be filling up the screen as they should Jul 28 15:51:43 what is the best standalone android (windows based) emulator? Jul 28 15:55:15 azv4: i would say Genymotion Jul 28 15:55:40 yeh theres a 1 or 2 px padding.. if i drawRect on same coordinate X/Y start it draws a pixel or 2 before Jul 28 15:56:10 njcomsec: are you sure there's no padding in the image itself? Jul 28 16:00:11 yes I drew a red background behind everything which is showing through...its more like 5px offset actually.... canvas.drawBitmap(bitmaps.bgAction, screen.menuWidth-5, 0, draw); canvas.drawRect(screen.menuWidth, screen.menuButtonHeight/2, x, y, paint ); draw from same place...but i shouldnt need to add -5 Jul 28 16:01:30 njcomsec: i meant, are you sure your image doesnt have transparent padding in it? Jul 28 16:01:34 Is there a way with gradle and gradle-mvn-plugin to emulate the autoReleaseAfterClose feature of the sonatype nexus-maven-plugins Jul 28 16:02:19 oh you are right there is a fkke up transparency on the image lol Jul 28 16:02:26 im so dumb Jul 28 16:06:50 what is fitSystemWidnow for? Jul 28 16:07:13 In the ndk, I can get an AAssetManager*, AAsset* for resource files and through AAsset_getBuffer a char* to the resource dataWho is responsible for deleting these objects, and can I safely store the array returned by getBuffer without copying it? Jul 28 16:07:58 hero_biz: https://developer.android.com/reference/android/R.attr.html#fitsSystemWindows Jul 28 16:10:03 it is somehow strange. Jul 28 16:10:18 my problem solved when I removed it from coordinatorview. Jul 28 16:11:18 Guys, what is best way to update UI from another thread. Cannot use Asyncthread, because I want to update UI from JNI. Jul 28 16:13:46 hero_biz: maybe you could create a new handler, pass in a main looper from Looper.getMainLooper and post a runnable Jul 28 16:17:31 alexfu: ty, I will try it. :) Jul 28 16:20:35 hi Jul 28 16:21:45 pyBlob: that's backed by https://googleplex-android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/Asset.cpp Jul 28 16:21:52 Looks like it retains ownership Jul 28 16:25:51 how can i use the debug in the browsers firefox and chrome directly from android Jul 28 16:26:06 for web stuff? Jul 28 16:26:13 that’s kinda outside the scope of this channel Jul 28 16:27:33 danalbert: sorry, I can't get access to that file. so that means, ownership stays with the assetmanager stuff, and what about data returned by getBuffer? Jul 28 16:27:39 where i can tell for this question? Jul 28 16:28:03 you might ask in the respective firefox and chrome channels Jul 28 16:30:21 pyBlob: https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/Asset.cpp Jul 28 16:30:31 Sorry, somehow ended up on the wrong page when getting that link Jul 28 16:31:08 Data returned by getBuffer looks to be owner by AAsset Jul 28 16:33:33 new book http://www.informit.com/store/android-database-best-practices-9780134438085 Jul 28 16:36:30 owned* Jul 28 16:37:40 Using AS how do you set a proxy for the simulator? I dont' see where I can specify emulator launch parameters. Jul 28 16:38:28 I'm not sure when this was introduced (I'm on Android Studio 2.2 Preview 6), but anyone know how to change the default debugger type when attaching to a running process? It's always set to "Auto" for me, which is extremely infuriating because it wants to start the native debugger (probably because I have native code) and has to rebuild the app to do that. I always forget to click into the menu to change it, and I can't find a Jul 28 16:38:28 setting for it. Jul 28 16:38:36 svm_invictvs: setting a proxy server happens in the device. not IDE Jul 28 16:39:06 alexfu I remember passing something like -http_proxy ... to the emulator when launching, is that no longer current? Jul 28 16:39:20 you can do it in AS Jul 28 16:39:30 you pass the command line parameter into the emulator Jul 28 16:39:37 s73v3r Where? Jul 28 16:39:48 i’m trying to look. I think it’s in Preferences somewhere Jul 28 16:39:59 s73v3r I dont' see it in the AVD Manager, or in the run configuration Jul 28 16:40:01 okay Jul 28 16:40:49 maybe it was in AVD manager, and went away? Jul 28 16:40:53 Yeah Jul 28 16:41:03 Can I just hack the .ini file or something? Jul 28 16:41:08 danalbert: fine, that was the information I searched for, the buffer exists until the asset gets closed, thanks =) Jul 28 16:41:08 in ~/.android/avd Jul 28 16:41:14 take a look Jul 28 16:43:09 i remember it being in the same area where you could say there was a default image you wanted to use, and you could set whether the run dialog would ask you every time you ran, or just use the last one Jul 28 16:47:14 hi Jul 28 16:50:10 i have a recyclerview and it's good. but when you drag up/down from the top/bottom i get this bubbly display that i want to get rid of in this case Jul 28 16:50:13 any tips? Jul 28 16:50:34 that display is the hint to the user that they’ve reached the top or bottom of the list Jul 28 16:50:52 bubbly display? Jul 28 16:51:16 you mean the edge effect Jul 28 16:51:47 guys,how to add a view to coordinatorlayout with height=75% screen? Jul 28 16:52:17 mathu: check the LayoutManagers. They might have a way to override that behavior Jul 28 16:52:23 cant really get rid of EdgeEffect Jul 28 16:52:26 s73v3r: alright, cool Jul 28 16:52:43 I want my bottom sheet to take up to 75% of screen. Jul 28 16:53:11 i think i need to redesign this screen, but i ask because in this view there are things above the recyclerview Jul 28 16:53:31 so the edge behavior at the top looks awkward. also the contents of the list won't always extend beyond the screen; it can be short Jul 28 16:53:42 but sometimes it will Jul 28 16:53:56 you really should have something there as a clue to the user that they’ve reached the end of the list Jul 28 16:54:18 especially because, by now, that is expected behavior Jul 28 16:54:34 another bummer is that if i set padding on a parent view, the edge behavior is cut off at the parent Jul 28 17:01:00 also in case anyone is wondering, i am pleasantly shocked to report that setting up an android dev environment on gentoo was completely painless Jul 28 17:01:28 mathu: when I use recyclerview,I don't set padding for parent, but for items's layout. Jul 28 17:01:45 I used it for creatign settings menu, it was great. Jul 28 17:02:02 specially if you have different types for items. Jul 28 17:02:06 hero_biz: in this case, the recyclerview isn't the only thing in the display, there's some stuff above it that i want to also have padding Jul 28 17:03:00 mathu: cannot place all other views in another layout and set paddign for that one? Jul 28 17:03:49 hero_biz: i can, but i actually want a universal padding across a few screens. i'd be great if i could set padding on the parent fragmentview of all of them, but alas Jul 28 17:04:03 er Jul 28 17:04:08 s/fragmentview/framelayout/ Jul 28 17:06:33 mine was similar too (or maybe more complex). but because I had different layout for each item, it really worth to use recyler and set padding for all other. Jul 28 17:07:03 it really depend on your work. Jul 28 17:20:59 nice, flexboxlayout has dividers now Jul 28 17:21:56 does android studio have a stack trace similar to xcode? http://2.bp.blogspot.com/-HBzqmMMSbU0/T1n36AlVo_I/AAAAAAAAAHw/EsD_vLYZO98/s1600/Screen+Shot+2012-03-09+at+15.13.53+.png Jul 28 17:33:16 what have I missed? Jul 28 17:36:09 trudev, i think so, in the debug window, i guess Jul 28 17:40:01 bitkiller: thanks i found it Jul 28 17:42:23 guys, any idea how to make a bottom sheet expands up to 75% of screen? Jul 28 17:42:52 not with a constraint layout Jul 28 17:43:44 s73v3r: isn't there some sort of percentlayout or something like that? Jul 28 17:43:59 https://developer.android.com/reference/android/support/percent/PercentRelativeLayout.html Jul 28 17:44:21 that’s what I was thinking, or the weighted linear layout Jul 28 17:45:40 the problem is that in both cases, I need use them in root. Jul 28 17:45:54 but for bottom sheet,root need to be coordinator layout Jul 28 17:47:00 hmmmm, you can have a percent layout and have in it a sub view Jul 28 17:47:36 why does it need to be specifically 75%, rather than just enough to fit the contents on screen? Jul 28 17:47:44 hmmm Jul 28 17:48:29 because content in recylcerview. Jul 28 17:49:30 is it like a share dialog? Jul 28 17:49:33 if no content is in recycler now, bottom shee height will be too low Jul 28 17:49:46 I wana use it for a system log. Jul 28 17:50:12 system log goes into recyler view which is hidden by default(bottom sheet) Jul 28 17:50:17 oh, no, don’t do that Jul 28 17:50:26 that’s not a good use of the bottom sheet Jul 28 17:50:31 g00s: just saw something that made me rather sad Jul 28 17:50:33 https://www.reddit.com/r/androiddev/comments/4v15zx/developing_android_apps_using_c_example/ Jul 28 17:50:37 why? Jul 28 17:51:07 that’s something that should be it’s own screen Jul 28 17:51:13 the log could be quite long Jul 28 17:51:44 yea,that's why I sent it too recyler, so it can scrolled. Jul 28 17:52:00 will eb messy if I add it too bottom sheet? Jul 28 17:52:01 same problem, though Jul 28 17:52:12 yeah, i would just switch screens Jul 28 17:52:34 start up a new activity, and display the log in there Jul 28 17:52:55 I normally use fragments. Jul 28 17:53:03 that works too Jul 28 17:53:20 hm... Jul 28 17:53:30 I wonder if it is good to use viewpager Jul 28 17:53:59 do you expect your users to constantly be switching between the system log and whatever else is displayed? Jul 28 17:54:02 add it too another pager so people can easily switch to it Jul 28 17:54:12 yea, somehow. Jul 28 17:54:15 i wouldn't Jul 28 17:55:05 it is log for connecting to a server, it shows errors if not connected,... Jul 28 17:55:23 you suggest to just notify in main screen Jul 28 17:55:38 i don’t think a viewpager would be appropriate Jul 28 17:55:47 hmmm.... Jul 28 17:55:57 ok, I try few thing to see what happens. :) Jul 28 17:56:10 although if you see a bunch of going back and forth to it in your analytics, you can always add it Jul 28 17:56:32 btw, what is best way to update UI from another thread rather than AsyncTask?I wana update UI from JNI. Jul 28 17:57:38 for example log that I told will be sent from JNI... <.< Jul 28 17:58:08 i might do a service? Jul 28 17:58:33 the service would connect to JNI, and then it would be bound to the activity Jul 28 17:59:45 I don't think it is good that much. Jul 28 18:00:15 My JNI can easily call a Java callback routine. Jul 28 18:00:16 yeah, I’ve never done something where I’m continuously getting data from JNI Jul 28 18:00:41 keep in mind, you probably only want to get log updates when the user is actually looking at the log Jul 28 18:00:57 Is getFragmentManager for API 11+ or 14+? some people are saying 14+ Jul 28 18:01:02 hm... Jul 28 18:01:09 yea,good idea. Jul 28 18:01:26 purplex88: API 11, but you probably want to use getSupportFragmentManager, cause you want to use support fragments Jul 28 18:01:30 consistent behavior and all Jul 28 18:01:33 can keep log in JNI, and then get them all wen showing to user. Jul 28 18:01:51 but cannot do everything like that. Jul 28 18:02:19 s73v3r: but i don't want to since i'm using API 23 Jul 28 18:02:35 yes, you do Jul 28 18:02:47 API 24 will come, and API 25, and so on Jul 28 18:03:07 support fragments will mean you always have consistent behavior among all uses of your app Jul 28 18:03:16 regardless of what the user is using Jul 28 18:03:30 Only problem for SUpportFragments was animations for me. Jul 28 18:03:40 rather than that,they are really OK. Jul 28 18:04:23 JNI is a disaster when you have user inetraction too.... Jul 28 18:05:17 s73v3r: so getFragmentManager is obsolete? Jul 28 18:05:37 it’s not obsolete, but you shouldn’t use it Jul 28 18:06:35 s73v3r: hm, but why not? i'm reading some book which uses it. Jul 28 18:06:45 like I said, consistent behavior Jul 28 18:07:19 Fragments have changed behavior several times since they’ve been added. Using support fragments means that you get the same behavior regardless of the API level your user is runnign Jul 28 18:07:20 purplex88: when api's change, they may not be backward compatible. Jul 28 18:07:34 but support library is designed for compatibility. Jul 28 18:08:09 all it says if you are using 11+ use getFragmentManager but nothing about consistency hm Jul 28 18:08:16 s73v3r: too bad animation support is not good in it. Jul 28 18:08:31 well, we’re saying something different Jul 28 18:09:42 oh ok i thought it was only to support > 11 API but didn't know it could cause other problems Jul 28 18:12:25 s73v3r: see this -> http://stackoverflow.com/questions/5080515/dialog-not-displaying-when-calling-from-jni Jul 28 18:12:35 good approach lol Jul 28 18:13:01 probably can be applied to other things too. Jul 28 18:14:44 Trying to apply a plugin in my root build.gradle and keep getting plugin not found on line 50 https://pastee.org/nfwxr Jul 28 18:15:24 even though it is defined in subprojects { buildscript { dependencies { Jul 28 18:16:27 What is the best option to store a user's login and password? Jul 28 18:16:47 casadogg: on a server Jul 28 18:16:49 salted Jul 28 18:16:51 :p Jul 28 18:16:55 thepoosh ! Jul 28 18:17:04 g00s: see my link! Jul 28 18:17:11 If only Mr. CTO would agree with you Jul 28 18:17:22 casadogg: than firebase auth Jul 28 18:17:27 The webservice returns an id which is expired hour after hour Jul 28 18:17:29 * g00s looking Jul 28 18:17:33 passwords are stupid for mobile Jul 28 18:17:35 And I have to login again to get another id... Jul 28 18:17:41 casadogg: what’s the greater context here? Jul 28 18:18:05 User got to have a valid id to execute some actions Jul 28 18:18:16 This id expires every hour Jul 28 18:18:22 thepoosh what about it ... seems pretty tame Jul 28 18:18:26 So I have to log in to get a new id Jul 28 18:18:35 I don't want to nag the user with log in dialogs every hour Jul 28 18:18:41 Or everytime he uses the app Jul 28 18:18:50 that seems like the entire purpose of that system, though Jul 28 18:18:52 seems stupid to code in cpp Jul 28 18:18:56 instead of java Jul 28 18:19:00 ohhh Jul 28 18:19:00 or c# Jul 28 18:19:09 refresh token Jul 28 18:19:10 well yeah, 2nd class Jul 28 18:19:15 g00s It seems but we all agree we shouldn't keep bothering the user with a login dialo Jul 28 18:19:18 thepoosh: some people like c++. and java does suck Jul 28 18:19:29 yes, but UI in c++! Jul 28 18:19:32 casadogg: is it a service that you have control over? Jul 28 18:19:50 No... I have to talk to the cto to change how this works Jul 28 18:19:59 So for the app we wouldn't use sessions Jul 28 18:20:03 Just for the website Jul 28 18:20:03 i guess your company has control over Jul 28 18:20:32 is it possible to get them to use some kind of oauth system, where you can get a refresh token? Jul 28 18:20:57 Yah well that'd be better... I'll ask around Jul 28 18:21:19 otherwise, it does sound like you’ve already been overruled by the web team, and they DO want your users to log in every hour Jul 28 18:21:43 I talked to them, they agreed the app shouldn't nag the users with login dialogs Jul 28 18:21:58 ¯\_(ツ)_/¯ Jul 28 18:22:01 casadogg: https://developers.google.com/identity/protocols/OAuth2 Jul 28 18:22:11 Just how safe is Firebase Auth? Jul 28 18:22:29 it’s your own service; you’re not going to want to involve Firebase Auth Jul 28 18:22:38 Okay Jul 28 18:22:49 you may be able to add the account to the Accounts Manager Jul 28 18:22:58 that might be able to handle the login stuff for you Jul 28 18:23:31 otherwise, see if the web team can get you a refresh token, and maybe increase the expiration time for you. maybe to a day or so? Jul 28 18:23:55 at least that last change should be pretty simple, and low risk, that they should be able to do it for you Jul 28 18:24:08 Thank you for the suggestions Jul 28 18:24:38 thepoosh it could be worse, maybe somebody wants to write GUI app in forth or something :) Jul 28 18:25:08 i think that not knowing java is not a good enough reason to write android code in cpp Jul 28 18:25:17 true indeed Jul 28 18:25:32 yeah, i’ll agree to that Jul 28 18:30:11 thepoosh what do you do for numberpickers, grab a library , ignore they look like shit on kitkat, etc ? Jul 28 18:30:31 we have to use themes Jul 28 18:30:54 but the default #picker can't be customized wrt accent colors, etc Jul 28 18:31:09 all that crap is hard coded Jul 28 18:31:15 so its holo blue regardless Jul 28 18:31:36 thought they would have put this in the support lib by now ... Jul 28 18:32:32 looks fine on 5.0 + of course Jul 28 18:32:48 maybe my new moto for 4.4 people is "deal with it" :P Jul 28 19:14:34 i've just seen this: https://software.intel.com/en-us/multi-os-engine Jul 28 19:20:03 why they chose java for that, I don’t know Jul 28 19:20:38 ^ Jul 28 19:29:27 i doubt thats going anywhere ... Jul 28 20:00:28 is there a simple way, to eliminate the padding around text in a Spinner ... for example, lets say its |..Foo.. V | Jul 28 20:00:40 how do i eliminate the preceding "..' Jul 28 20:00:54 i guess i have to make my own Spinner views ... Jul 28 20:01:45 just annoying because that text never aligns with text above or below the control, unless you fudge some padding in all the other widgets Jul 28 20:17:07 How can I specify the Android.mk file in my NDK project to compile a specific header? Jul 28 20:17:27 I do not want to simply point to its containing directory as there are other files I do not want to compile Jul 28 20:22:58 should be the same way you’d do it with any other makefile Jul 28 20:26:19 I am a web developer (Rails) who'd like to dip my toes in android dev. any ideas on good resources that can get me started without doing programming 101. Jul 28 20:26:43 S73v3r, How do I go about that? Jul 28 20:27:13 I tried and it complains that I didn't specify a directory Jul 28 20:27:24 i don’t know off the top of my head. Jul 28 20:27:37 it might not be possible Jul 28 20:29:02 S73v3r, ok thanks Jul 28 20:29:20 jetpackjoe did you check the topic ? Jul 28 20:34:18 g00s the official docs? Jul 28 20:34:54 yeah Jul 28 20:36:11 jetpackjoe: Just try to write something and google when you can't figure something out. Jul 28 20:38:49 Hey everyone... about that thing concerning storing user credentials in the device Jul 28 20:39:08 If a user logs in and I get a login token, and I save this exchange token in the device Jul 28 20:39:15 Would it be better to expire this token? Jul 28 20:39:41 After a while, or do you think there's no problem to let the token never expire? Jul 28 20:39:48 I mean, apps never make the user log out Jul 28 20:40:06 typically you have a refresh token and access token Jul 28 20:40:32 access token expire after some time (i.e. 24 hrs). refresh tokens never expire Jul 28 20:41:49 So the user logs in, I get a refresh token, use this refresh token to get an access token? Jul 28 20:42:25 usually you get the access token and refresh token at the same time, but yeah, same general idea Jul 28 20:43:08 then to get a new access token you use the refresh token Jul 28 20:43:21 What if the refresh token is leaked Jul 28 20:43:41 then thats a problem Jul 28 20:43:59 The refresh token would be different for every user, right? Jul 28 20:44:10 i would hope so Jul 28 20:44:28 Wouldn't this be a problem anyway? I mean, dude gets the refresh token and uses it to get an access token Jul 28 20:44:58 Isn't this just adding one more step for an attacker? Jul 28 20:46:43 the idea is that access tokens are used with every request. which is why they expire because if it was leaked, it would just become invalid after some time. refresh tokens should be kept a secret and are used sparingly which reduces the chances of it being leaked. Jul 28 20:48:17 I'm trying to copy an HTTP request that an iOS app makes and replicate it on Android (porting an iOS only app). I set all the headers to be the same thing, same cookies, everything, but the server still won't accept the request. Jul 28 20:48:45 I looked at it through charles and the only difference is that "Kept Alive" is yes for the working one and no for the broken one. Jul 28 20:49:03 alexfu Ok so the idea is, instead of storing the username and password in the device, I store the refresh token. If a username and password is leaked, then multiple accounts may be compromised. If a refresh token is leaked, then maybe only the account linked to my service is compromised. Jul 28 20:49:06 Is that right? Jul 28 20:49:41 the token can be revoked. and the token won’t leak the username/password Jul 28 20:49:48 why would multiple account be compromised if a username/password is leaked? Jul 28 20:50:09 Because a lot of users tend to repeat credentials in multiple services Jul 28 20:50:37 This isn't even android anymore, just how to user accounts 101 :P Jul 28 20:51:03 Fyber: you'll have to look at the server to see why it's failing Jul 28 20:51:21 Says something about thread failing Jul 28 20:51:35 I have a curl request that works, and the retrofit one doesn't Jul 28 20:51:45 They look identical to me Jul 28 20:52:55 Even the sent body looks the same, so I think I need to manually allow keepAlive somewhere Jul 28 20:53:10 Fyber I know but still... it's good to think about this kind of stuff. If someone finds out your service puts a user's multiple accounts in risk, then that's a problem. Jul 28 20:53:56 Fyber: i dont think keep alive is your problem Jul 28 20:54:54 Both phones are going through a web proxy (Charles) so I can inspect them, and the headers are identical. What could my problem be then? Jul 28 20:55:09 what's the best way to log HTTP requests from my app? Preferably something that can pretty-print json Jul 28 20:55:28 Charles Jul 28 20:55:42 oh, and free would be nice Jul 28 20:55:53 Nothing else compares, I looked Jul 28 20:56:00 I'm using the trial for longer than 30 days Jul 28 20:56:08 the popup is slightly annoying but whatever Jul 28 20:56:16 oh, so it's like winrar-paid? Jul 28 20:56:34 If you want free though, you can get Fiddler Jul 28 20:56:41 Fyber: depends on what the server accepts as a valid request. also, getting the exact error from the server would be helpful Jul 28 20:56:50 http://hastebin.com/olacixisiv.tex Jul 28 20:56:58 Error ^ Jul 28 20:57:04 trudev: I think so, yes Jul 28 20:57:47 thanks, i'll check it out Jul 28 20:58:07 I tried mitmproxt but had a hard time getting it set up Jul 28 20:58:12 *mitmproxy Jul 28 20:58:35 Main thing that sets charles apart from everything else is ease of use, and SSL proxy. Jul 28 20:58:52 Easy to install a cert on your phone that allows charles to spy on all traffic, even HTTPS Jul 28 21:00:12 alexfu: That json body the server returns is useless to me, I can't fix bugs on the server side. Jul 28 21:00:12 Fyber: what does your Retrofit request look like vs a good request? Jul 28 21:04:27 alexfu: http://hastebin.com/lebulopola.dos < Removed tokens from it, but they're identical Jul 28 21:04:45 I converted both of them to cURL requests rather than raw Jul 28 21:06:04 wait a second, the healthy curl request doesn't work anymore Jul 28 21:06:10 Let me check if endpoint is down Jul 28 21:06:22 I swear if that's the issue... Jul 28 21:09:45 gotta run Jul 28 21:10:17 Does anyone have an example of using SubsamplingScaleImageView with Picasso that supports cacheing and disk cache? I can't seem to get it to work offline. Jul 28 21:10:36 dammit it's my fault, endpoint works :( Jul 28 21:15:04 What about api keys? How do you guys store these? Jul 28 21:15:50 ideally, you should be storing them on the server, and the app should be retrieving them from there. In practice not many do this that I’m aware of Jul 28 21:18:50 s73v3r Ok, but how'd the app retrieve the api key? Jul 28 21:19:01 web request Jul 28 21:19:05 yehh Jul 28 21:19:12 but would it pass some other kind of key? Jul 28 21:19:21 maybe Jul 28 21:19:32 I mean, if someone decompiles the apk, then it doesn't matter as much, right? Jul 28 21:19:39 or, the app doesn’t retrieve the key at all, and the server makes the request Jul 28 21:20:13 Hm this sounds better.. Jul 28 21:20:37 so the refresh token and access token would be all an attacker would be able to get Jul 28 21:21:30 yeah. Jul 28 21:21:52 although this does increase the complexity of the app, so you have to weigh that against whether it’s worth the effort Jul 28 21:22:39 I guess I'll just let it blow... I raise the concern and no one seems worried around here -.- Jul 28 21:23:04 as is, not everyone here, including myself, is as security conscious as they should be Jul 28 21:25:12 Hmm well ok Jul 28 21:25:16 Thanks a lot for the help man Jul 28 21:25:43 I need to study more about networking... any book recommendations? Jul 28 21:26:00 not off the top of my head Jul 28 21:35:35 Is it possible on Google Play Game Services to have a highscore that can get worse? Like a leaderboard with highest percentage of wins. You might start off great with 80% wins but then it goes down to 60%... can you overwrite that old value? Jul 28 21:44:10 Is there a popup box type thing that I can call and have it return a value? Jul 28 21:44:24 Not yes/no, but a list of 3 or so things? Jul 28 21:45:16 Oh nevermind, I found it in the documentation. Didn't know that was part of the dialog class Jul 28 21:56:30 I want to read a JPG-file in my unit tests, however BitmapFactory fails to load the image as it is not mocked. Are there other ways to load an image from a file, or a way to make BitmapFactory work on host? Jul 28 22:07:16 i think you can add the file to your test directory’s resources Jul 28 22:09:45 s73v3r: Yeah, I'm using getClass().getClassLoader().getResourceAsStream("x.jpg") to get the InputStream object, but I need a way to load a Bitmap from the InputStream Jul 28 22:18:50 Does anyone know of any Android tutorial series' that aren't outdated by at least a year or two? The course I found at Udacity is outdated by almost a whole year, Android Studio is now 2.2 as opposed to 1.0. The series covers 1.0. It is the video series that redirects from: https://developer.android.com/training/index.html Jul 28 22:19:20 Or should I just avoid that video series altogether? Jul 28 22:19:43 I'm putting everything that needs to show up when the app starts in an onCreate() --> is there a better place I'm supposed to put this stuff? Jul 28 22:19:55 Anubitek: Do you know Java? Jul 28 22:20:48 Not much, but I know how to at least get main working with some classes. Barely scratched the surface on databases. Jul 28 22:21:01 I'm moving into Java from UnrealScript. Jul 28 22:21:15 Do that first, then worry about Android. Jul 28 22:21:17 So far, not entirely different. Jul 28 22:21:22 Or just jump in Jul 28 22:21:26 and read docs and such Jul 28 22:22:11 I was walked through a note taker and could at least get to the point where I could spitball my own code into the app. But the series I was following spent more time giving me code than explaining specifics. Jul 28 22:22:40 Trying to read docs, but everything I find as in one way or another outdated. I need something that is up to date. Jul 28 22:22:49 is in* Jul 28 22:22:50 the series should be fine for how to actually write Android code Jul 28 22:22:58 many of the docs are too Jul 28 22:23:28 Even if it is covering Android Studio 1.0? Or does that really effect the outcome of the tutorials? Jul 28 22:24:10 not really Jul 28 22:26:25 It does, I tried the udemy ones Jul 28 22:26:40 2.0+ is a lot lot lot lot better than 1.0 Jul 28 22:26:47 Is that the one with the sunshine weather app? Jul 28 22:27:00 not when it comes to how to use a fragment or write an adapter Jul 28 22:27:07 (I mean udacity) Jul 28 22:27:28 Those courses just hand you code Jul 28 22:36:45 (I was able to sort out BitmapFactory by using http://robolectric.org/ ) Jul 28 22:48:42 Strike that, roboeletric only returns dummy images Jul 28 23:04:39 Is it not possible to overwrite a Save with GOogle Play Game Services? I mean using the same save name the whole time? Jul 28 23:20:19 If I want to update the screen as often as possible (but the actual contents are very simple), should I use a custom View, SurfaceView, or something else? Jul 28 23:20:58 how often is “often as possible”? Jul 28 23:21:20 generally you use a SurfaceView if you have custom drawing, instead of just using regular widgets Jul 28 23:21:36 so it does depend on what you’re showing Jul 28 23:23:51 I just want to draw a circle in the middle of the screen with a color decided programatically, with a "progress" ring around it that updates smoothly. Jul 28 23:24:16 a regular custom view should be fine Jul 28 23:26:27 Now, what would be the procedure for animating that ring? Jul 28 23:27:27 I could call invalidate() at the end of onDraw() but that feels wrong Jul 28 23:27:53 is it something constantly going? Jul 28 23:28:04 yeah. Jul 28 23:28:21 maybe a surfaceview is something you’d want to look into Jul 28 23:58:32 Heyo! Anybody have tips about Android Socket performance? My streaming video app is plagued by occasional delays that I can't explain by any of my app's behavior atm Jul 28 23:58:34 e.g: http://i.imgur.com/1GVJh2or.png Jul 28 23:59:08 *delays receiving data from the Socket, e.g: in datagramSocket.receive(packet) Jul 28 23:59:57 I've tried experimenting with DatagramSocket's setReceiveBufferSize and setTrafficClass, but no dice so far Jul 29 00:30:28 do rx observables dump stack traces if they intercept an exception? or only if you doOnError? Jul 29 00:52:26 https://files.gitter.im/scala-android/sbt-android/blob good lord, the task graph is too complicated Jul 29 00:57:01 ouch! http://www.bloomberg.com/news/articles/2016-07-28/microsoft-to-cut-2-850-more-jobs-in-exit-from-phone-business Jul 29 02:03:07 ... and then there were two ... Jul 29 02:19:18 capella power concentrates :P Jul 29 02:40:01 ... and then, >disrupted< :D Jul 29 02:41:39 let it happen, managing markets corrupts them (mildly offtopic) ;) Jul 29 02:54:04 capella i think the data proves Schumpeter was wrong Jul 29 02:54:23 maybe in an ideal world though **** ENDING LOGGING AT Fri Jul 29 02:59:58 2016