**** BEGIN LOGGING AT Wed Apr 27 02:59:58 2016 Apr 27 03:53:08 hey guys,I has some trouble,I get all video using this String[] projection = { MediaStore.Video.Media._ID}; Apr 27 03:53:08 Cursor cursor = new CursorLoader(contexts, MediaStore.Video.Media.EXTERNAL_CONTENT_URI, projection,null,null, null).loadInBackground(); Apr 27 03:53:29 but how can I play it in videoview Apr 27 03:59:46 What's a practical way to capture text outputted by a command such as ping? If I send a ping, how can I capture whether it's successful and/or the speed it was at? Apr 27 04:06:43 I want to make a todo list app that stores data in the cloud without having to write my own rest api Apr 27 04:07:19 it seems like google cloud services or aws has something I can use Apr 27 04:07:27 but I'm not sure which service does what I need Apr 27 04:07:30 BigZ: look this http://stackoverflow.com/questions/3905358/how-to-ping-external-ip-from-java-android Apr 27 04:09:12 thanks PC2K Apr 27 04:11:44 RustyShackleford: I dont know what your kinda data you store in the server,but you can give this https://www.firebase.com/ a try Apr 27 04:12:36 BigZ: yw Apr 27 04:16:33 also saw firebase Apr 27 04:17:13 I mean this is just a toy project. I'd like a service that handles accounts/authentication and database-like storage Apr 27 04:17:35 oh also, I want to implement auto sync Apr 27 04:18:02 for example if I add a google now card on my tablet, it shows up on my handset in a second or so Apr 27 04:22:24 firebase does seem like exactly what I want Apr 27 05:02:14 for some reason i can't compile my project on android studio 2 Apr 27 05:03:54 my condolences Apr 27 05:05:19 Error:Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information. Apr 27 05:06:32 does this make any sense? Apr 27 05:08:10 Nick-S using proguard ? Apr 27 05:08:21 i guess Apr 27 05:08:53 howdy Apr 27 05:09:49 is that bad? Apr 27 05:17:50 probably you should add some options to it Apr 27 05:26:21 gladly i will which ones Apr 27 05:28:36 the thing is that it was not needed on previous 1.x android studio Apr 27 05:29:30 so turn off proguard too see if its the culprit Apr 27 05:32:07 my project consists of an android library and an app, should i do it for both or app only? Apr 27 05:33:29 actually how do i turn off proguard Apr 27 05:45:51 the 2.0 emulator is awesome Apr 27 05:46:09 its about time we had a good emulator Apr 27 05:47:42 the new AS anygood? Apr 27 05:47:44 stable? Apr 27 05:48:57 it broke my project Apr 27 05:49:15 i can't find on google how to turn off proguard, does minifyEnabled turn off proguard? Apr 27 05:49:41 alex_PP: use it Apr 27 05:50:29 I've been using it 40+ hours per week, its definitely stable Apr 27 05:51:45 cool Apr 27 05:51:57 I'll sort that out this afternoon then Apr 27 05:52:15 haven't been able to get the old emulator working recently Apr 27 05:52:33 you will need to install a recent version of haxm Apr 27 05:53:00 the new emulator takes literally all of the frustration away from using the emulator Apr 27 06:05:33 is the minifyEnabled false is turning off proguard? Apr 27 06:05:41 if so then my problem persists Apr 27 06:16:44 how 2.0 emulator vs genymotion ? Apr 27 06:21:00 ayyy Apr 27 06:21:24 https://corner.squareup.com/2016/03/certificate-pinner-vulnerability.html Apr 27 06:21:30 dubya tee eff m8? Apr 27 06:23:52 I am trying to use a third party module in my android studio project (https://github.com/iPaulPro/aFileChooser), but I'm having trouble importing, by hand or through android studio. I have tried putting it in the project directory, and adding 'include ":aFileChooser"' but i'm still not able to import (symbol can't be resolved). Can anyone help? Apr 27 06:24:23 post the link in a clickable way Apr 27 06:25:31 aaron are u defining the activity in ur manifest Apr 27 06:25:37 aarondabomb: build gradle again Apr 27 06:26:22 no you need to do this https://www.dropbox.com/developers/chooser#android Apr 27 06:26:32 see the steps done there for importing dropbox chooser, do the same Apr 27 06:27:29 you need to use import com.ipaulpro.afilechooser.FileChooserActivity Apr 27 06:27:44 and define in manifest Apr 27 06:27:56 that's not going to work if the project isn't included correctly as a dependency Apr 27 06:28:09 correctically Apr 27 06:28:23 aarondabomb: that's not a gradle project yet Apr 27 06:28:45 it only has a .project file, which is the old eclipse project file Apr 27 06:30:31 Odaym he said he put in the project directory, which im assuming is src? idk Apr 27 06:31:04 I'd just start over, remove any mention of it anywhere and do like you do with Dropbox Chooser Apr 27 06:31:16 adding it a new module, you can specify if it's an Eclipse project too Apr 27 06:32:30 it really doesn't need a library though, the code for it is really simple Apr 27 06:32:35 Sorry guys, been trying to figure this out. So, starting over, I have their module copied into my project directory (with the name of the application, and which contains the src, gradle, build directories, etc) Apr 27 06:33:20 Odaym: I assumed it would not be difficult, but my expectations have been thwarted so far :) I am not super experienced with android studio or android development, which may be the problem Apr 27 06:33:33 thanks all for replies so far Apr 27 06:33:35 the answers are above, try Apr 27 06:35:34 well to me it's easy i guess, maybe not to you Apr 27 06:35:44 I've been copy/pasting it since I heard of it :P Apr 27 06:35:59 google "how to open file chooser android", copy, paste, make millions Apr 27 06:38:28 I really feel like I've followed these steps of importing module, adding dependencies, and then watching gradle fail to build (or even sync properly, with seemingly simple solutions that I can't get to work). So, for now, I'm pivoting to using a simple activity rather than an external dependency. Will need to figure that out at somepoint though Apr 27 06:38:53 ive used the same lib Apr 27 06:38:53 you tried the steps in the Dropbox link? Apr 27 06:38:59 it's impossible not to work Apr 27 06:40:53 aarondabomb: use this one, its easier to implement Apr 27 06:40:55 code.google.com/p/android-file-chooser Apr 27 06:43:08 lsass: appreciate the recommendation. Currently trying this one: http://stackoverflow.com/a/13986063 Apr 27 06:43:45 looks good Apr 27 06:51:34 Alright, so this should be super simple, and I'm still having issues. I have created a new file called FileDialog.java and included in my src directory with my MyAppActivity. However, when I try to do import com.MyApp.FileDialog; I get "error: cannot find symbol class FileDialog". Any clue? Apr 27 06:51:55 just kidding, I messed up :) Apr 27 06:54:59 keep trying man Apr 27 07:17:16 man, Android Studio STILL takes you to the erroneous generated XML file whenever you encounter an XML error Apr 27 07:19:05 someone be good citizen and submit as bug :P Apr 27 07:20:00 nvm Apr 27 07:45:38 I'll tell you a bug Apr 27 07:45:58 On emulators/AVDs with 512MB RAM Apr 27 07:46:28 When you go into live wallpapers in settings, if there are dozens of live wallpapers you're scrolling through... Apr 27 07:46:33 You get an ANR Apr 27 07:46:45 Hello, can anyone help me with a problem initiliazing google play services save game functionality in unity. We already using realtime multiplayer and it works. We also enabled save games in developer console 24+ hours ago, but we get an error when calling SavedGame.OpenWithAutomaticConflictResolution. It says we need to enable saved games (which we have enabled) Apr 27 07:46:52 They didn't scrap and recycle the views that went off-screen Apr 27 08:15:07 i reverted to 1.5.1 Apr 27 08:15:09 it works Apr 27 08:16:30 Ologn hahahaha thats awesome ! Apr 27 08:19:19 in Google Fit even, there's a major bug where you try to refresh the data a lot Apr 27 08:19:45 no actually when you swipe between the metrics circles very quickly Apr 27 08:20:18 maybe fixed now, was 3 weeks ago Apr 27 08:28:00 I am planing on building a settings profile system. i thought about using SharedPreferences and a different "name" for each profile. Is there a way to enumerate all names used for saving SharedPreferences? Apr 27 08:28:17 is 2.1 usable ? Apr 27 08:31:43 anybody else have problems with emulators (or physically connected devices) just disconnecting randomly in DDMS (Android Studio)? Apr 27 08:36:50 last_staff, yes Apr 27 08:37:02 it's probably because of adb Apr 27 08:37:40 or a combination of adb and the avd, I gather Apr 27 08:38:09 since, so far, the only workaround I have is to hard reboot the emulator Apr 27 08:38:38 that is, shutting down -> close emulator window -> close DDMS -> start emulator -> start DDMS Apr 27 08:39:30 which, I think, takes around two-three minutes altogether. Granted, it's not that long, but considering it happening within 5 minutes, for 8 hours, that becomes..... Apr 27 08:41:54 ...3.2 hours Apr 27 08:43:40 did anybody in there use videoview Apr 27 08:43:53 they bugs as hell Apr 27 08:44:28 if videoview has an alternative Apr 27 08:44:32 ? Apr 27 08:46:01 wehell....according to my presumably wrong calculations (I can never remember the right formulae), that's 40% of a single day lost, on just reconnecting the emulator to ddms Apr 27 08:46:30 and that's not including the time used to try to figure out other possible solutions in there Apr 27 08:46:32 why dont u use genymotion,it's lot of faster Apr 27 08:47:10 it's also further away from stock hardware Apr 27 08:47:41 and there are no images for 4.0.3/4.0.4 Apr 27 08:48:05 not sure about play services; can't remember Apr 27 08:48:42 last time I use genymotion they has 4.0.4 Apr 27 08:49:06 I actually do have genymotion installed. It's pretty much VirtualBox with a different skin Apr 27 08:49:07 now I connect direct to my phone not with emu anymore Apr 27 08:49:13 from what I can see Apr 27 08:49:33 PC2K: cheah, that's often the better choice anyway Apr 27 08:49:47 yep ^^ Apr 27 08:50:08 it's not without reason I haven't upgraded phone_1 from jelly, and phone_2 from kitkat Apr 27 08:50:15 and I don't have a phone_3 Apr 27 08:51:53 my main problem, though, is that both those phones are rooted (and subsequently pretty heavily modified), and present a lot of corner cases because of root - when all I want, and need, is to test near-stock functionality Apr 27 08:53:39 well, not that heavily, actually - but there is functionality needed which I've turned off, and I know more than the main devs as to why this happens, which I find funny Apr 27 08:54:03 maybe the better word actually is 'ironic', in this case Apr 27 08:54:15 if you work for a company they can give you some phone you can test with Apr 27 08:54:23 not need buy for your own Apr 27 09:01:16 Their response: "Don't need physical phones. That's why we use emulators" Apr 27 09:01:16 Response in my head: /facepalm Apr 27 09:01:53 Maybe they'll come around once I present numbers. Management seems to love numbers Apr 27 09:04:40 should I use this https://github.com/lipangit/jiecaovideoplayer instead of videoview Apr 27 09:09:11 well, I just crunched some numbers.... Apr 27 09:11:13 given what I believe is a standard yearly developer salary of US $85k, together with that 40% of lost time because of emulator issues + rooted phone problems, buying a phone has a return of investment of 1.5 weeks Apr 27 09:12:34 for a team of 5, and 5 phones, still at 1.5 weeks....yeah. Apr 27 09:15:09 ...I made a mistake. A salary of 85k has a return on investment on 1 week and 1 day Apr 27 09:16:19 sparse array is so cool Apr 27 09:16:28 that said, it seems the US median of a software developer salary is 68k, which coincidentally enough, actually gives me 1.5 weeks (1 week and 3 days) for the return on investment Apr 27 09:16:53 I don't see any bugs in video view, I've used it Apr 27 09:18:44 Odaym: I still prefer hashmaps, despite the lack of gaps in indices and lower memory efficiency Apr 27 09:18:54 neh Apr 27 09:19:03 neva Apr 27 09:19:10 heh Apr 27 09:19:18 *hehe Apr 27 09:27:23 so last_staff living in US ? that my dream salary hehe Apr 27 09:27:35 its not net Apr 27 09:27:49 there's taxes and shit Apr 27 09:29:09 25% Apr 27 09:30:08 according to this at least, https://en.wikipedia.org/wiki/Income_tax_in_the_United_States Apr 27 09:31:36 gradle just told me this "For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB." Apr 27 09:31:42 seems excessive, no? Apr 27 09:31:57 gradle doesn't talk like that Apr 27 09:32:30 :P Apr 27 09:39:28 that AS 2.1 tho https://www.youtube.com/watch?v=ZOz_yr8Yxq8 Apr 27 09:41:50 alex_PP, depends on size of your project Apr 27 09:41:54 I just tried jack again, it's just broken Apr 27 09:41:55 for us it's 6GB Apr 27 09:43:01 I see, video explians Apr 27 09:47:53 Well, hopefully I/O means announcement of gradle-experimental -> Gradle so we finally get NDk Apr 27 09:51:52 hype Apr 27 09:59:48 speaking of genymotion... Apr 27 10:00:28 ...does anyone know how to create appliances in VBox, then 'copy'/'export' it to genymotion? Apr 27 10:01:09 could it be just as simple as installing android-x86 as usual, then basically copying the whole thing to the genymotion folder? Apr 27 10:01:23 provided it's been created as .ova, I assume Apr 27 10:01:35 the latest genymotion you can drag and drop into it, not sure if APK or other Apr 27 10:44:11 hey guys Apr 27 10:44:44 i upgraded to android studio 2.1 and my app can not be runned anymore Apr 27 10:44:56 someone else also having these kind of issues? Apr 27 10:45:41 do i need to use gradle 2.1 also then? Apr 27 10:48:19 sasos90: what's the error? Apr 27 10:52:31 Error:Error converting bytecode to dex: Apr 27 10:52:35 Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs; Apr 27 10:53:36 i cleaned the repo.. removed the content in build/ folder.. rebuild it.. but ther error is still there Apr 27 11:10:05 How can I save ViewPager's state, ie, if I create an adapter in onCreate of activity and attach it to ViewPager, it creates x fragments for x pages. Now when user rotates the screen, the adapter is created and so are the fragments, right? How do I avoid this? Apr 27 11:10:32 Or are they not recreated and FragmentManager still reuses them? Apr 27 11:16:14 I am planing on building a settings profile system. i thought about using SharedPreferences and a different "name" for each profile. Is there a way to enumerate all names used for saving SharedPreferences? Apr 27 11:16:33 Can I access the datadirectory for my application and enumerate the files myself? Apr 27 12:07:46 I want this animation http://pastebin.com/BMzP6Qt2 to "fade in" in addition to it's "fade out" behavior that it currently has. Any ideas? Apr 27 12:32:37 Can anybody here help me with proper use of DECLARE_META_INTERFACE? Apr 27 12:32:52 There must be something simple I'm missing. Apr 27 12:35:31 what is the event caused by sliding NavigationView Apr 27 12:36:05 I need to refresh the content before sliding it open Apr 27 13:28:54 https://code.google.com/p/android/issues/detail?id=208295 < for those that get an issue after updating AS to 2.1 and get a weird error "Invalid version: 12.0.2753695 beta 1" it relates to having the ndk-bundle installed. Apr 27 13:29:56 Hey is there any way to clone the audio input stream from tinyALSA (or whatever snddriver) to guarantee there is no preprocessing done to the sound? Apr 27 13:48:15 When I intentionally trigger an IOException from btConnect, that I get the stack trace from the Log.e call, but the error message Snackbar doesn't pop up. When I allow a connection to be established, the success message Snackbar shows just fine. What gives? Apr 27 13:48:18 https://paste.pound-python.org/show/seZMLvndwHechCPJKSXE/ Apr 27 13:48:30 s/that Apr 27 13:48:33 Ush Apr 27 13:48:39 s/that I/then I/ Apr 27 13:50:56 No .show() Apr 27 13:54:30 how is the performance of firebase? Apr 27 13:54:42 I feel like as your json database gets larger, it must slow down Apr 27 13:56:48 Hi, i'm looking for a way to continously pass audio data generated in a class to a playback class using AudioTrack. I 'm trying to use a LinkedBlockingQueue to achieve this, but the sound is nont continous and has a 'pulsating' quality to it. I suppose I have timing issues? Is there a better way to send m ydata? Apr 27 13:57:53 SimonVT: oh duh, thanks lol Apr 27 13:59:28 freiform, I use linkedblockingqueue for my audio output queue Apr 27 14:00:46 http://eclipser.xmms2.org/git/xmms2-android.git/tree/src/org/xmms2/server/plugins/Output.java it's a bit specific to xmms2 though but it should give you an idea, maybe Apr 27 14:01:56 Zharf: I use a loop to create white noise in blocks of fs samples and write a finished block to my queue. my playback class reads this and passes it to the AudioTrack. Maybe this is the wrong implementation. I'll have a look at your link. Apr 27 14:02:40 freiform, only real "trick" I have there is the pre-allocated byte buffers Apr 27 14:02:47 allocating them on the fly is a bad idea Apr 27 14:04:10 line 282 is the playback loop Apr 27 14:07:02 Zharf: I see, you're doing a lot in terms of timing and synchronization. I'm just throwing ByteArrays at my Queue and poll for them at the other end. Maybe that's the problem. Apr 27 14:07:34 freiform, if you don't recycle your buffers, you might run into issues with GC Apr 27 14:09:10 freiform, and I don't start playing before I have at least a few buffers available Apr 27 14:09:19 (line 223) Apr 27 14:10:02 Zharf: I only get one or two empty frames in the beginning, but i should probably catch that. What do you mean by recycling buffers? Apr 27 14:10:02 off to sauna now, I'll be back in about half an hour or so Apr 27 14:10:10 ah, have fun! Apr 27 14:10:29 freiform, check how the "free" field is used Apr 27 14:10:45 will do, thanks. Apr 27 14:23:12 firebase is kinda awesome Apr 27 14:23:24 I implemented storage in like 10 minutes Apr 27 14:33:27 freiform, I'm back Apr 27 14:35:31 Zharf: wb. Liek you assumed, the problem was that i allocated my bytebuffer outside my loop, overwriting it with each iteration. ;) Apr 27 14:35:51 \o/ Apr 27 14:36:37 I once read that an array in Java is alway call-by-reference.. I I just had remembered.. Apr 27 14:44:45 everything in Java is by reference Apr 27 14:45:00 rather reference value Apr 27 14:45:18 primitives aren't references, and thus exempt Apr 27 14:47:07 anyone have a contrary belief that displaying html with no images and basic tags is better with textview than webview? the views would be in a recycled list as well. Apr 27 14:48:02 TextView is far lighter than webview Apr 27 14:55:07 seems like TextView doesn't support li though...dang Apr 27 15:04:34 do you guys use a "Restore Purchases" button for iap products combined with SharedPreferences or just loop through users purchase history on startup? Apr 27 15:15:39 hey, what is up with byte[] data from onPreviewFrame, i try to do Bitmap bitmap = BitmapFactory.decodeByteArray(data , 0, data.length); Apr 27 15:15:49 and that bitmap is always null Apr 27 15:16:06 and it is really frustrating, any idea? :) Apr 27 15:18:46 Hello! Can you help me with a small problem? My app when started from launcher freezes the system for a 1.5 seconds on my phone and for 3 to 4 seconds on the other one Apr 27 15:19:30 And the activity being launched has nothing except an indeterminate ProgressBar in the middle Apr 27 15:19:55 mbarisa: because byte[] isnt in bitmap decodable format Apr 27 15:21:29 mbarisa: you can try something like http://pastebin.com/3BzQ9ffx Apr 27 15:24:16 loredan13: even when you launche your app from app list? Apr 27 15:25:01 "For faster builds, increase the maximum heap size for the Gradle daemon to more than 5120 MB" lol is that for real ? Apr 27 15:25:17 eeyup Apr 27 15:25:50 and you are sure you have nothing more than the progressBar :? Apr 27 15:26:51 loredan13: your onCreate is possibly taking too long. Apr 27 15:27:07 mbarisa: set your camera to capture as jpeg Apr 27 15:27:33 hmm? isnt onPreviewFrame always in YUV Apr 27 15:27:36 mbarisa: wait this is preview Apr 27 15:28:03 yes, layout has only LinearLayout containing ProgressBar, and onCreate just has super.onCreate(), setContentView() and new Handler.postDelayed() with startActivity() in it Apr 27 15:28:09 you can set the preview format Apr 27 15:28:10 Proguard seems to be stripping out some classes in my project. THe module "vlc-android" is having its org.videolan.libvlc.MediaPlayer$Title class stripped from the dexfile. Obv believed that it is proguard doing this, but -keep class org.videolanlibvlc.* doesn't have any effect Apr 27 15:28:11 according to the docs Apr 27 15:28:17 Oh my Apr 27 15:28:21 I found the typo Apr 27 15:29:36 loredan13: pastebin your layout and code Apr 27 15:30:07 mbarisa: https://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html Apr 27 15:30:30 Ashiren: it works fine :) Apr 27 15:30:31 says the default is YCbCr_420_SP (NV21) format. Apr 27 15:30:36 yeah, previewcallback is always YUV Apr 27 15:30:40 NV21 exactly Apr 27 15:30:43 mbarisa: you can set it though Apr 27 15:30:51 mbarisa: what are you doing with this? Apr 27 15:31:11 mbarisa: your going to decode and process each frame of the preview? at Apr 27 15:31:15 30/60 fps? Apr 27 15:31:21 this just sounds like a bad idea Apr 27 15:31:29 Napalm: i am working with opencv Apr 27 15:32:15 ok.. so opencv native libraries? Apr 27 15:32:59 Napalm: layout http://pastebin.com/sRRV4Hiz Apr 27 15:33:28 Napalm: this is just for debugging, i want to extract grayscale image right away without iteration Apr 27 15:33:41 and i think i can just take first part of byte[] that is grayscale Apr 27 15:33:44 for example Apr 27 15:33:48 640x480 image Apr 27 15:33:58 in yuv if i understood correctly i can get it Apr 27 15:34:19 first 640*480 bytes should be grayscale image Apr 27 15:34:22 if i am correct Apr 27 15:34:35 Napalm: activity http://pastebin.com/Bd32YGme Apr 27 15:34:49 mbarisa: no Apr 27 15:35:00 thats only if its 8 bits per component Apr 27 15:35:02 Napalm: i need to process each frame Apr 27 15:35:05 NV21 isnt Apr 27 15:35:31 Napalm: i currently do Apr 27 15:35:32 Mat mYuv = new Mat(480 + 480 / 2, 640, CvType.CV_8UC1); Apr 27 15:35:32 mYuv.put(0, 0, data); Apr 27 15:35:32 Imgproc.cvtColor(mYuv, mGray, Imgproc.COLOR_YUV2GRAY_NV21); Apr 27 15:35:35 Core.flip(mGray.t(), mGray, 1); Apr 27 15:35:37 Imgproc.resize(mGray, mGray, new Size(240, 320)); Apr 27 15:35:40 all this before processing the frame Apr 27 15:35:40 omg Apr 27 15:35:44 because i need it in grayscale Apr 27 15:35:48 dont paste code Apr 27 15:35:58 Napalm: sorry, thought 5 lines don't matter Apr 27 15:36:00 YUV 4:2:0 planar image, with 8 bit Y samples, followed by interleaved V/U plane with 8bit 2x2 subsampled chroma sample Apr 27 15:36:19 yup, so first plane is Y Apr 27 15:36:30 640*480 bytes = greyscale image Apr 27 15:36:39 g00s, I'm not surprised by it. Nowadays its still all about buying more and better hardware, when sometimes we could just fix performance problems :D Apr 27 15:38:06 Napalm: so what should I do exactly Apr 27 15:39:29 mbarisa: exactly what you were doing.. first widthXheight bytes from the byte array Apr 27 15:40:14 mbarisa: you might want to not process each frame Apr 27 15:40:31 if you want 320x240.. set that as your preview sizethe camera to record Apr 27 15:40:35 if you want 320x240.. set that as your preview size for the camera to record Apr 27 15:41:13 loredan13: thats not the way to do that.. plus .. PreSplash? Apr 27 15:41:14 wtf Apr 27 15:41:29 lol Apr 27 15:41:59 Napalm: i have whole implementation done Apr 27 15:42:01 it is just slow Apr 27 15:42:08 so i need to optimise this conversions Apr 27 15:42:23 Napalm: yeah, I know, we had just Splash, but it took 3 seconds to load, so we made another splash for this one Apr 27 15:42:23 yea, so dont convert it like this Apr 27 15:42:26 i want to display 640x480 Apr 27 15:42:39 Napalm: if i knew faster way i would do it already :) Apr 27 15:42:50 mbarisa: ok.. so producer-consumer Apr 27 15:42:53 first, try to avoid any alloc per frame Apr 27 15:42:55 look it up Apr 27 15:43:07 and any operation which can be done once and for all, like 480 + 480 / 2 Apr 27 15:43:13 processing in onPreviewFrame is not a good idea Apr 27 15:43:32 its done on the UI thread.. well the thread that called Camera.open Apr 27 15:43:40 *.* Apr 27 15:43:44 i dont display that image there Apr 27 15:43:48 i use shader to display camera image Apr 27 15:43:49 Napalm: and how should I do it? Apr 27 15:43:54 this is just callback where i process frame Apr 27 15:44:00 because i needed syncronisation Apr 27 15:44:22 if you want more speed, you might need to go renderscript of jni road too Apr 27 15:44:53 Napalm: also, probably there is some way to speed up the original splash, but it has a pretty heavy picture Apr 27 15:45:15 Napalm: or maybe I just have no idea how Apr 27 15:45:54 Napalm: yeah, I know, we had just Splash, but it took 3 seconds to load, so we made another splash for this one < that sounds crazy Apr 27 15:45:57 loredan13: ok.. but you miss the point.. why have a pre-splash when the splash has the image? Apr 27 15:46:06 this makes no-sense Apr 27 15:46:09 YO DAWG Apr 27 15:46:15 i heard u like splash Apr 27 15:46:19 lol Apr 27 15:46:24 pre-pre-splash Apr 27 15:46:26 :D Apr 27 15:47:14 Hello! Can you help me with a small problem? My app when started from launcher freezes the system for a 1.5 seconds on my phone and for 3 to 4 seconds on the other one << profile it Apr 27 15:47:23 looks like you do lot of a stuff in onCreate Apr 27 15:47:33 or setContent an enormous layout maybe Apr 27 15:47:53 if you have image, maybe you could put it as activity background in style Apr 27 15:48:06 adq: he also delays in his pre-splash for no good reason for 1 second Apr 27 15:48:57 the only one thing they should fix in N should be that there is another property that goes along with windowBackground that makes it centerCrop Apr 27 15:49:06 like windowBackgroundScaleType Apr 27 15:49:08 or something Apr 27 15:49:10 Napalm: that delay is not a problem here, freeze happens before the start of activity Apr 27 15:49:12 most annoying part of android Apr 27 15:49:23 loredan13, maybe you have lot of static stuff? Apr 27 15:49:32 loredan13: do you extend Application class? Apr 27 15:49:41 i backlogged and just saw you said that you haven't much thing in your layout Apr 27 15:49:47 loredan13: your onCreate in your application class will delay your first activity launch Apr 27 15:49:50 so there must be something else somewhere else Apr 27 15:50:10 adq: thats his pre-splash Apr 27 15:50:26 pre splash? Apr 27 15:50:31 lol Apr 27 15:50:31 exactly Apr 27 15:50:35 in before the splash Apr 27 15:50:35 adq: true Apr 27 15:50:45 and its a progressbar that waits for a second Apr 27 15:50:50 i mean.. wtf? Apr 27 15:50:51 lol Apr 27 15:51:10 loredan13, you need to profile your app anyway, so you will know where is/are the bottleneck(s) Apr 27 15:51:13 adq: there is a code in custom Application class Apr 27 15:51:28 loredan13's problem is that his Application class it taking too long.. so even his pre-splash pauses Apr 27 15:51:41 adq: is there a way to profile an app from the start? Apr 27 15:51:51 i know! lets make 2 apps Apr 27 15:52:00 1 with only splash and loading the intent of the other app Apr 27 15:52:06 just keep adding splash screens until its tolerable :) Apr 27 15:52:25 loredan13, sure, many, traceview with ddms, android monitor, some external libs, etc Apr 27 15:52:26 :D Apr 27 15:53:17 adq: no, I mean that Android Monitor requires to start profiling manually, when app already launched, as far as I know Apr 27 15:53:52 you can do it programmatically too Apr 27 15:54:03 http://developer.android.com/tools/debugging/debugging-tracing.html Apr 27 15:54:14 Debug.startMethodTracing("pre-splash"); Apr 27 15:55:36 adq: thanks! didn't know that! Apr 27 15:55:40 but maybe you can simply use Log. if you don't need precision since it takes few seconds Apr 27 15:55:51 and if you don't have lot of threading Apr 27 15:56:08 just look at the timestamp should be sufficient if you have delta like few seconds Apr 27 15:57:33 you could also cheat and delay the start with an ugly Thread.sleep to let you start the monitoring manually Apr 27 15:57:44 though i've never tried, it might be ugly or it might have some side effect Apr 27 15:58:23 try also nimble https://nimbledroid.com/ they got few tools Apr 27 16:12:07 Great, so 2 months after I needed to find a fix for an app dealing with that 505 install issue there are solutions everywhere haha Apr 27 16:13:13 Also, google should remove bad reviews for apps that were caused by bugs they added to the framework Apr 27 16:19:20 Hey, anyone know of apps on tablets with large dialogs with a bunch of options? Apr 27 16:19:29 I’m looking for some design inspiration Apr 27 16:20:04 Guys im getting a json response that looks like this: http://prntscr.com/axjh3d where the top level object (in this case named 69) changes depending on which id you call. Apr 27 16:20:15 How the hell do I model this for use with retrofit? Apr 27 16:20:56 is it a server that’s under your control? Apr 27 16:21:13 companies api Apr 27 16:21:18 so i dont control it personally no Apr 27 16:21:24 but your company does? Apr 27 16:21:31 mhm Apr 27 16:21:38 is it new? or is it widely in use? Apr 27 16:21:49 if it’s new, then get them to change it. That is a shitty, shitty schema Apr 27 16:22:11 haha tell me about it. Literally said that exact same thing to the ceo yesterday Apr 27 16:22:12 otherwise, you’re gonna have to write a bunch of custom deserializers Apr 27 16:22:20 or maybe not use Retrofit at all Apr 27 16:22:27 there using Volley atm Apr 27 16:22:33 its ugly af Apr 27 16:22:55 cause your API was made by incompetent assholes Apr 27 16:23:31 orbyt_ just noticed this book other day https://www.manning.com/books/irresistible-apis Apr 27 16:24:23 maybe ill buy it for the web dev. Shit maybe ill tell the ceo to let me write the api Apr 27 16:25:38 anyways, with an api like that, your Retrofit code would likely be ugly too Apr 27 16:25:50 (╯°□°)╯︵ ┻━┻ Apr 27 16:26:08 ┬──┬ ノ( ゜-゜ノ) Apr 27 16:26:25 The best thing you can do is hide the volley stuff (which is already written, it sounds like), behind a nice interface, and forget it exists Apr 27 16:26:33 orbyt_ an interesting trend or maybe just blip at the moment ... have read a few good things about GraphQL Apr 27 16:26:52 wonder if the trend will be away from rest to graphql over time Apr 27 16:29:43 orbyt_ https://medium.com/chute-engineering/graphql-in-the-age-of-rest-apis-b10f2bf09bba#.8aguuhw5o Apr 27 16:29:53 I'm generaly a big supporter of hiding network stuff (or any external library's interface) behind a nice local interface Apr 27 16:30:07 konk3r abstractions ftw :) Apr 27 16:30:18 evening Apr 27 16:30:23 hello Mavrik Apr 27 16:32:53 s73v3r: Well the thing is its currently using our old api which is returning xml, so I have to rewrite it to support json as thats what the new api returns. Apr 27 16:32:56 so meh Apr 27 16:33:07 i see Apr 27 16:33:22 why weren’t the consumers of the API involved in the design of it? Apr 27 16:33:27 is there a better alternative to Firebase? Apr 27 16:33:39 depends on your needs and what you’re doing Apr 27 16:33:52 s73v3r: beats me. Apr 27 16:33:55 RustyShackleford can you be more ambiguous ? :) Apr 27 16:34:10 user accounts, per user storage, syncronization across devices is what I need Apr 27 16:34:19 and I don't want to write my own rest api if I can avoid it Apr 27 16:34:29 orbyt_: Anyways, it doesn’t sound like Retrofit would be much better for you Apr 27 16:34:52 RustyShackleford: Firebase is good, but might be overkill. you could try self-hosted Parse Apr 27 16:35:40 the downside to Firebase is the pricing model. I like that AWS has a more on demand pricing model Apr 27 16:35:51 AWS is something completely different Apr 27 16:35:57 AWS and firebase are not at all alike Apr 27 16:35:59 more comparable to App Engine or Compute Engine Apr 27 16:36:25 there are a bunch of different aws services. Seems like you could get a very similar setup with AWS Apr 27 16:36:34 then mock it up and try it Apr 27 16:36:39 AWS is a IaaS, App engine is a PaaS, Firebase is a mBaaS. Apr 27 16:36:53 too many acronyms Apr 27 16:37:10 get used to it Apr 27 16:37:11 Infrastructure as a Service, Platform aaS, Backend aaS Apr 27 16:37:24 I guess what i'm looking for is a backend Apr 27 16:37:49 probably going to use Firebase, was just wondering if you guys had other suggestions Apr 27 16:37:51 Firebase is owned by Google and can be tied in with App Engine fairly easily if need be. Apr 27 16:37:59 its retardedly easy to configure Apr 27 16:38:10 self-hosted Parse would be the other choice Apr 27 16:38:11 orbyt_ yeh but then you have to deal with google :) Apr 27 16:38:26 or one of the dozens of services that have sprung up hosting parse instances Apr 27 16:38:55 Microsoft has something on Azure, too Apr 27 16:39:14 Hi, I am getting a "java.lang.ClassNotFoundException: Didn't find class "android.view.ScrollLayout" on path:", where do I even start? I took a basic activity template and changed the root content view to be a ScrollLayout in the XML Apr 27 16:39:33 g00s: abstract all the things! Honestly, extracting a data layer and hiding external APIs goes a long way to keeping clean controllers too. IMO a lot of apps do too much in their controllers when they should be extracting things into separater layers Apr 27 16:39:36 anyways, examples of dialogs on large devices, like a Nexus 9? Apr 27 16:39:39 I love that firebase will push new data to your device when its available Apr 27 16:40:02 I add an entry to the db in the firebase dashboard, boom it shows on my device Apr 27 16:40:41 Firebase’s main draw is the near instantaneous replication Apr 27 16:41:15 s73v3r i think calendar has some examples. they seem like big floating activities Apr 27 16:41:32 i use a new activity for small screen, floating for big screen Apr 27 16:42:15 i never did figure out how to get elevation . shadow to look nice on floating activity though Apr 27 16:42:25 well, we have these dialogs on smaller devices already. We’re just trying to make it look less like ass on large devices Apr 27 16:42:27 the most i could do is dim the background Apr 27 16:42:47 yeah, dunno much about dialogs, i hate their apis Apr 27 16:42:59 always such ghetto from day 1 Apr 27 16:43:35 i'd probably use a modal bottom sheet for most small dialogish things now, with floating activity for large screen Apr 27 16:44:14 Hello. Why is this dialog expanding width more in running app then in preview ? https://gist.github.com/wviana/ca83b6404f1957ba30947e0d47adf180 Apr 27 16:45:47 Here is the difference http://imgur.com/a/Oh3i4 Apr 27 16:46:31 does firebase slow down as your data set gets larger? Apr 27 16:46:56 lets say I have thousands of users each with hundreds of items being stored (I'm being optimisitic here lol) Apr 27 16:47:12 RustyShackleford: Twitch uses Firebase Apr 27 16:47:15 just fyi Apr 27 16:47:39 there's no concept of tables? Apr 27 16:47:53 all of your users' data is in the same json file? Apr 27 16:48:13 seems like it would choke on a humongous json file Apr 27 16:48:44 http://open.xamarin.com Apr 27 16:49:16 MIT license Apr 27 16:57:10 how can i find out what does what when i want to modify a Holo Theme Apr 27 16:57:27 for example, there are multiple settings with "background" in them, but i dont know which is which Apr 27 16:57:39 Why is this width different in running and preview ? https://gist.github.com/wviana/ca83b6404f1957ba30947e0d47adf180 http://imgur.com/a/Oh3i4 Apr 27 16:57:49 taub its not well documented - you'll have fun Apr 27 16:58:26 great Apr 27 17:00:19 How does the audio preproccessing work on android? Apr 27 17:00:26 is there a way to disable all the effects? Apr 27 17:00:46 good morning peeps Apr 27 17:00:54 /system/etc/audio_effects.conf seems to list all the effects and their library paths Apr 27 17:11:25 taub: its because your in a dialog Apr 27 17:12:23 taub: how are you setting your content in the dialog? Apr 27 17:13:14 wviana: sorry that was for you Apr 27 17:14:19 Napalm: View rootView = inflater.inflate(R.layout.dialog_month_period, null); than builder.setView(rootView); Apr 27 17:14:53 yea.. so its a AlertDialog? Apr 27 17:15:44 Napalm: Yes, but maybe it shouldn't Apr 27 17:15:49 correct Apr 27 17:16:40 wviana: create your own class that extends DialogFragment Apr 27 17:16:58 Napalm: I'm making it. check https://gist.github.com/wviana/ca83b6404f1957ba30947e0d47adf180 Apr 27 17:16:58 the one from the support library Apr 27 17:17:10 wviana: ? Apr 27 17:17:28 oh Apr 27 17:17:43 well dont do tyhat Apr 27 17:17:48 see your onCreateDialog Apr 27 17:17:56 you dont create your view in there Apr 27 17:18:04 leave onCreateDialog as it was Apr 27 17:18:34 and in onCreateView inflate your layout and in onViewCreated get your fragment arguments and set them Apr 27 17:19:23 Napalm: oh, thank you very much Apr 27 17:19:41 Napalm: I don't think it's really necessary Apr 27 17:19:57 well its lucky im not you Apr 27 17:20:05 :) Apr 27 17:21:03 I mean that in the background DialogFragment is doing something similar, takes result of onCreateView and puts it into dialog Apr 27 17:21:50 correct. but your subverting the fragment flow by doing it other ways.. its the whole reason you have onCreateView Apr 27 17:21:55 and its friends Apr 27 17:23:07 Napalm, loredan13: I did it based on http://developer.android.com/guide/topics/ui/dialogs.html#CustomLayout . Some other dialogs that I've done before worked just fine. This one is getting wider than I intent to. Apr 27 17:23:59 alert dialogs will not wrap with Apr 27 17:24:00 width Apr 27 17:24:04 they never have Apr 27 17:24:56 Napalm: Ok, I will try like this: http://developer.android.com/reference/android/app/DialogFragment.html Apr 27 17:25:03 https://developer.android.com/reference/android/R.attr.html#windowMinWidthMajor Apr 27 17:25:08 its what these are used for Apr 27 17:25:17 the minWidthMajor and minWidthMinor Apr 27 17:27:24 Napalm: does it mean that I'm doing it wrong when I use AlertDialog with custom View inside just because I want the standard buttons? Apr 27 17:28:04 Napalm: It worked. But now I'm getting a bar on top of it. http://imgur.com/ektat8j Apr 27 17:28:57 in onCreate() call setStyle(STYLE_NO_FRAME, 0); Apr 27 17:29:24 hm, "New Resource File" dialog doesn't autcomplete the root element name any more Apr 27 17:32:34 Napalm: thank you. STYLE_NO_FRAME had gone with background. Just set to STYLE_NO_TITLE, worked perfect. Apr 27 17:32:54 wviana: yea, sorry, my bad. Apr 27 17:32:57 np Apr 27 17:33:54 Napalm: no sorry. You helped me a lot. Thank you very much. Apr 27 17:34:39 sems like robolectric can't handle gradle resValue properties, https://github.com/robolectric/robolectric/issues/1329#issuecomment-215158741 Apr 27 17:34:48 anybody knows a workaround for it? Apr 27 18:06:23 <_xor> Hey guys, newbie to auth tokens here. I know JSON Web Tokens were originally designed for use across web apps, but are they used currently in mobile apps as well? Apr 27 18:08:25 _xor I've had to support them in a few apps Apr 27 18:11:51 What are options on a coloured nav bar? Apr 27 18:11:58 opinions* Apr 27 18:12:50 It looks kind of cool, makes the app seem more immersive Apr 27 18:12:57 But don't see many apps use it at all Apr 27 18:13:08 <_xor> w4ffles_: How was your experience with them? Did you look at alternatives, and if so, how were they? Apr 27 18:13:15 Except some apps which are focused around images Apr 27 18:13:16 AKK9 the lack of use is somewhat of an opinion, no ... ? Apr 27 18:13:23 Which look good when they are transparent Apr 27 18:13:36 the nav bars are kind of clugy IMO Apr 27 18:14:03 mrandroid: Well I dont' know if it was down to UI designers not really caring Apr 27 18:14:08 Rather than specifically avoiding them Apr 27 18:14:31 I think the nav bar started with a library called Shirlock Nav Bar (or something like that). Apr 27 18:15:19 There's not shadow on it which makes it looks strange Apr 27 18:15:42 Yeah I think I'll leave it, it looks strange Apr 27 18:16:12 I guess my biggest question always is: what is it about the design that makes you want to use a nav bar in the first place? Apr 27 18:16:19 *clutter* Apr 27 18:16:33 ^my code Apr 27 18:16:48 mrandroid: I dunno, why do I colour the toolbar? or the status bar? Apr 27 18:16:56 Just for the overall theme of the app Apr 27 18:17:10 it is weird that the other bars are colored, and not that one Apr 27 18:17:13 well that's just good visual design. Apr 27 18:17:14 It was in the material guide Apr 27 18:17:18 i dunno. Apr 27 18:17:20 So i tried it Apr 27 18:17:46 s73v3r: yeah its odd, google apps dont seem to use it either Apr 27 18:18:11 but that one also seems the weirdest when it is colored Apr 27 18:18:14 the transparent nav bar over an image is really nice though Apr 27 18:18:16 or a video Apr 27 18:18:24 yeah, its just really noticable Apr 27 18:18:28 you can definitely make the nav bar look great. Apr 27 18:19:34 Does anyone know if you can “permanently” pass parameters to adb in all gradle tasks, specifically the -H one? Apr 27 18:26:30 so If my retrofit response body is NOT null, but calling any .get* methods on the returned objects does return null, what should I be looking for Apr 27 18:30:28 hey folks Apr 27 18:31:37 never done android dev here.. how doable would it be to make a widget involving flashy animations? Apr 27 18:31:48 doable Apr 27 18:31:58 man im getting so frustrate with android studio Apr 27 18:32:04 i think im going to switch to microsoft xamrian junk Apr 27 18:32:12 would xamarin make a difference s73v3r ? Apr 27 18:32:15 no Apr 27 18:32:25 everything so so s l o w, and eats up so much memory Apr 27 18:32:29 it's driving me crazy Apr 27 18:32:31 w4ffles_: So you’re gonna trade one set of problems for another? Apr 27 18:32:37 haha ya Apr 27 18:32:55 VS takes gobs of memory too. And then you have the problem of Xamarin bugs, and waiting for Xamarin updates to Android stuff Apr 27 18:33:28 i've never had the kind of slowness i've been having recently with AS in visual studio Apr 27 18:33:36 s73v3r: im thinking custom widget that would replace folder containers for icons on home screen Apr 27 18:33:37 I have. Apr 27 18:33:45 could it be done in a few days of work? Apr 27 18:33:54 don’t know; haven’t done it. Apr 27 18:34:04 if it’s your first exposure to android, it’d probably take a little longer Apr 27 18:34:10 it's not Apr 27 18:35:34 never done android dev but i have programming experience Apr 27 18:35:39 but thanks Apr 27 18:35:47 guess ill give it a shot using Java Apr 27 18:36:43 it would be nice if google created a plugin for ST / Atom / or my new favorite VS Code. Somewhere between editor / IDE Apr 27 18:36:51 something much more lightweight Apr 27 18:37:19 yeah but you need a compiler no? Apr 27 18:37:24 i probably use 1% of AS features ... all i need is good autocomplete Apr 27 18:37:25 java isn’t really something you’d want to write without an IDE Apr 27 18:37:50 s73v3r: what about android markup? Apr 27 18:37:51 if they do jack correctly, it could feed information back to the IDE for autocompletion Apr 27 18:37:56 markup? Apr 27 18:38:06 well whatever its called, the ui layer Apr 27 18:38:12 what about it? Apr 27 18:38:30 I just want my build times to be under 15mins at this poont Apr 27 18:38:33 point Apr 27 18:38:41 you could skip an IDE for basic graphics, event handling? Apr 27 18:39:30 w4ffles_ 15 minutes sounds like you need to profile your build Apr 27 18:40:41 yeah, that sounds like something wrong with what you’re doing, not problems with Android Apr 27 18:41:06 unless you have only 2G of ram :D Apr 27 18:43:13 w4ffles using jack ? Apr 27 18:45:49 oh there an ide specifically for android dev, sweet Apr 27 18:49:43 any reason not to use Java SE Development Kit 8u92? Apr 27 18:50:54 nop Apr 27 18:51:47 ty Apr 27 18:53:26 Rookie__ you might try Emacs editor. It has LISP macros that are officially supported part of the Android platform now. Apr 27 18:54:00 why would i want LISP macros? Apr 27 18:54:07 do you guys know how to use mockito/robolectric to check if an activity launched from a static method in a separate object is visible? Apr 27 18:54:14 everyone writing android code uses LISP macros now. Apr 27 18:54:32 mrandroid officially supported ? Apr 27 18:54:40 lol i sense trolling Apr 27 18:54:42 i just want to make a fairly simple widget Apr 27 18:54:54 Rookie__ just kidding. Use Android Studio. Apr 27 18:55:01 Rookie__ rule #1 android dev, nothing is straightforward Apr 27 18:55:26 well im kind of used to obscure things Apr 27 18:55:28 ^^ Apr 27 18:57:28 btw how difficult is to host something on google store? Apr 27 18:58:19 harsukh : suggest looking at http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html Apr 27 19:02:31 Hi guys! I develop an app widget and I have a problem with the layout. I have a parent RelativeLayout with a semitransparent black background and a couple of child items in it. The problem is that widget only shows the parent layout but no children appear at all. Apr 27 19:03:10 Why it migth happen? I have never worked on widgets before so I believe I simply miss some really simple thing I just wonder what exactly... Apr 27 19:04:18 Is it just me, or is Google's OAuth documentation absolute confusing nonsense? Apr 27 19:04:43 I just want my server app to be able to hit analytics for storage (and later consumption by my android app) Apr 27 19:10:56 "Is it just me, or is over half of Google's Android documentation absolute confusing nonsense?" <-- fixed that for you AlexBerdnikov Apr 27 19:11:20 Okay, to be fair it's gotten a lot better over the past 4 years. Apr 27 19:12:05 They have a habit of releasing libraries with essentially no documentation though. Looking at you, Volley. Apr 27 19:15:27 it's so very frustrating Apr 27 19:20:24 konk3r they figure the smart people at the facebooks, etc will figure it out - the rest of you fuckers don't matter Apr 27 19:22:22 is there anyway to automatically make accessors for instance variables (in java)? Apr 27 19:22:50 make them public -> solved ;) Apr 27 19:23:32 yup that's what i'm doing now :P Apr 27 19:23:42 There's stuff like AutoValue, though. Apr 27 19:25:07 AutoValue? Apr 27 19:25:29 https://github.com/google/auto/ -- though I'd guess that gets more use in a non-Android context. Apr 27 19:29:04 g00s: to be fair, you can learn almost everything by tearing through the source code. You just really shouldn't have to do that as your first form of documentation Apr 27 19:29:42 konk3r life is too short to go on archaeology digs . didn't sign up to be indiane jones Apr 27 19:30:19 weird.. developer.android.com has started showing me russian.. so change url to correct "en" one and later on a few requests later it shows me spanish Apr 27 19:30:19 lol Apr 27 19:30:24 who knows whats going on there Apr 27 19:30:58 Exactly Apr 27 19:31:41 Napalm, happend for me too one day.. Apr 27 19:31:58 I moved to a new flat and its back to the normal :D Apr 27 19:32:03 (didnt move because of that) Apr 27 19:32:13 AlexBerdnikov: you probably have an issue with your RelativeLayout rules.. i suggest you try hosting the widget yourself and then you can see whats going on. Apr 27 19:32:36 i had a nexus 7 2013 but it died...any other tablets you guys recommend for dev work? Apr 27 19:33:05 konk3r i think it sets a bad precedent. no platform i used prior to android required to much reversing / digging through sources to figure things out. i think new generation of devs internalize this "look i did this for you ... docs? pfft , you figure it out - my work here is done" Apr 27 19:33:42 dpyro i have my n7 2013 still, imho one of the best nexus devices evar :( Apr 27 19:33:47 hopefully not the last of that kind Apr 27 19:33:53 looks like it Apr 27 19:33:58 i can't even get 1080p without $$$ Apr 27 19:34:19 i was thinking about a cheap fire tablet Apr 27 19:34:24 dpyro: yes you can Apr 27 19:34:28 https://pixel.google.com/developer-discount/ Apr 27 19:34:34 25% discount Apr 27 19:34:49 konk3r there was a article on HN the other day, about developers just giving up (in terms of quality, bugs etc). yeah - its not just docs. its everything; devs are just getting sloppy as hell Apr 27 19:35:02 eeee! Napalm, how much do they cost retail? Apr 27 19:35:16 g00s, "no platform" ? :) Apr 27 19:35:20 What platforms did you develop on? :P Apr 27 19:35:30 Mavrik vxworks Apr 27 19:35:35 Since pretty much anything older than 5 years out there is worse. Apr 27 19:35:39 (However sad that is.) Apr 27 19:35:43 dpyro: https://store.google.com/product/pixel_c Apr 27 19:35:45 dpyro https://news.ycombinator.com/item?id=11575155 Apr 27 19:36:38 ugh but i'm already on a macbook pro Apr 27 19:37:07 g00s: I agree, and not only that the lack of documentation ended up hurting the platform. Sync adapters were a great idea but there was no documentation around it, so no apps implemented them and now they're basically worthless. Apr 27 19:37:09 dpyro: not a bad price, especially if you take the 25% discount Apr 27 19:37:26 konk3r, meh, they were also way too much pain to use Apr 27 19:37:28 Are sync adapters what I'm thinking of? The thing that lets you manually turn off "background syncing" for apps Apr 27 19:37:29 and not flexible enough Apr 27 19:37:36 price is good, i'm just wondering if its worth it vs some $100 burner tablet Apr 27 19:37:38 JobScheduler does all that way better. Apr 27 19:37:39 The idea was great, the imlementation... Apr 27 19:37:55 And it also collects developer intent. Apr 27 19:38:02 So it's not so dumb when it comes to power saving. Apr 27 19:38:45 g00s, it's just so wierd to hear such complaints from younger devs Apr 27 19:39:05 When reading source code and using 3rd party libs is pretty much how most of Linux / Windows / OS X code is developed. Apr 27 19:39:13 Python, etc. as well :) Apr 27 19:39:26 its nice to read the source code .. i shouldn't have to though Apr 27 19:39:34 i usually do just out of curiosity Apr 27 19:39:47 * Mavrik 's company is paying IDA to reverse engineer iOS code to get proper documentation. Apr 27 19:39:49 *shrug* Apr 27 19:39:56 There's no implementation out there you don't have to. Apr 27 19:39:59 So it's a strange complaint. Apr 27 19:40:11 Documentation will get you just so far... after that you actually have to debug crap. Apr 27 19:40:20 Does job scheduler let users enable/disable tasks for individual devices? Apr 27 19:40:22 i have most of the gapps decompiled and open in my editor for round the clock consulting Apr 27 19:40:26 dpyro: did you look at the spec? Apr 27 19:40:41 konk3r, it has no GUI if that's what you're asking Apr 27 19:41:01 konk3r, but it listens to settings to restrict background data, power state, wifi and other stuff Apr 27 19:41:08 Okay, cool Apr 27 19:41:13 g00s, you're learning then ;) Apr 27 19:41:31 oh gosh that is a godly resolution Napalm Apr 27 19:41:38 exactly Apr 27 19:42:00 Pixel C is <3 Apr 27 19:42:07 Great screen, great device. Apr 27 19:42:12 Only annoyance is that it's heavier than N9 Apr 27 19:42:13 IMO reading source code should only be required if you're wanting to borrow functionality. "Google gives me a sliding drawer that does 90% of what I need, how can I make my own that gives me that final 10%" Apr 27 19:42:34 konk3r, huh Apr 27 19:42:35 Not that anyone should still be using code built around Google's sliding drawer haha Apr 27 19:42:42 Reading source code is the only way to get better at programming. Apr 27 19:42:53 It's one of a lot of ways to get better at programming Apr 27 19:43:07 Reading, doing, expirimenting, discussing Apr 27 19:43:14 more experimenting Apr 27 19:43:29 If you're afraid of looking into how things work then you're failing at the start :/ Apr 27 19:43:40 Yes, it would be perfect if everything would be documented everywhere. Apr 27 19:43:46 But such platform doesn't exist. Like unicorns. Apr 27 19:43:53 I'm not afraid of it, but like g00s said I didn't sign up to be an archeologist for the base framework. Apr 27 19:44:00 Mavrik well, what i was saying i smost of the platforms i used before android were documented Apr 27 19:44:04 As soon as you try to write better software you will have to dig into the dirty. Apr 27 19:44:17 i remember doing VMS, all those binders ... :D Apr 27 19:44:24 The base functionality Google provides for their platform should be well documented, this isn't some random 3rd party library being made public Apr 27 19:44:35 konk3r, and it is. Apr 27 19:45:01 g00s, *grumble* :P Apr 27 19:45:46 all i'm saying is ... providing sources isn't excuse to neglect docs ;) Apr 27 19:45:56 That I agree with :) Apr 27 19:46:13 I don't see much issue with most of AOSP docs (with exception of some corners that are really lacking). Apr 27 19:46:25 i feel like google is still playing catchup with apple Apr 27 19:46:26 But I do agree that Play Services and other closed sources Google stuff is badly documented. Apr 27 19:46:44 dpyro, depends where. Apr 27 19:46:46 and they've let things like documentation fall by the wayside in an effort to get to par Apr 27 19:47:20 g00s, honestly I just believe they need to stop hiring college grads with math puzzles Apr 27 19:47:22 i think the docs are suffering because they are derived from the sources; javadoc. i get impression javadoc fails at this scale Apr 27 19:47:26 where would you say google exceeds apple Mavrik (besides things like NFC :) Apr 27 19:47:37 javadocs is fine if the documentation is fine Apr 27 19:47:43 dpyro, dev tools, stability, build systems Apr 27 19:47:59 Some documentation is better, having source really helps. Apr 27 19:48:00 gradle plugin docs look like chicken scratches Apr 27 19:48:05 Not changing API every minor OS release. Apr 27 19:48:14 Napalm: Can you please explain what do you mean by "try hosting widget yourself"? Apr 27 19:48:26 Testing instrumentation is lightyears ahead of Apple's (and that's saying alot :P) Apr 27 19:48:36 oh that unequivocally Apr 27 19:48:44 AlexBerdnikov: https://developer.android.com/guide/topics/appwidgets/host.html Apr 27 19:48:49 you can release to market simple apps using just the emulator Apr 27 19:48:58 i would never dare try that with the ios simulator Apr 27 19:48:59 ViewGroup layouting system is also significantly better than AutoLayout (even though it's XML) Apr 27 19:49:19 Then again, I'd kill for working Instruments on Android Apr 27 19:49:31 instruments is pretty luxurious Apr 27 19:50:03 Also Google has this strange aversion of using hardware acceleration which is really damn annoying. Apr 27 19:50:26 Still no accelerated crypto, accelerated image operations, SIMD APIs, etc. Apr 27 19:51:02 Or support for TrustZone... evaluating what coprocessors the device has and using them is awfully terrible :/ Apr 27 19:51:48 Mavrik: what? Apr 27 19:51:52 Mavrik: it has those Apr 27 19:52:06 mm? :) Apr 27 19:52:59 Which ones via which APIs? Apr 27 19:53:01 all UI is now hardware accelerated by default since Android 3.0 Apr 27 19:53:15 Ah, I didn't mean it in GPU acceleration sense. Apr 27 19:53:16 Renderscript can be used to hardware accelerate any operations using the GPU Apr 27 19:53:27 RenderScript doesn't work. Apr 27 19:53:29 that is image processing or any general op Apr 27 19:53:34 Napalm Mavrik if a bug on b.android.com is still valid but marked obsolete, what do you do? star it and walk away, file a new bug, ? Apr 27 19:53:34 it doesnt work? Apr 27 19:53:39 On most device it'll run on CPU Apr 27 19:53:47 And on a lot of devices it'll run slower than NDK implementation. Apr 27 19:53:53 And there's NO WAY to evaluate that. Apr 27 19:54:03 There's even no way to query if you'll get GPU execution or not. Apr 27 19:54:10 It's just random magic making the API useless. Apr 27 19:54:23 yeah i remember romain talking about that Apr 27 19:54:23 yes and no Apr 27 19:54:28 Same with crypto acceleration. Apr 27 19:54:35 they didn't want to place restrictions on OEMs on what HW should be there Apr 27 19:54:40 Most devices have AES coprocessors. Pretty much none of them have kernel modules loaded. Apr 27 19:54:47 Making NDK OpenSSL orders of magnitude faster. Apr 27 19:54:58 with you Apr 27 19:55:02 There's also no way to evaluate if you're getting secure TrustZone storage or crappy software emulation :) Apr 27 19:55:06 Etc etc etc. :) Apr 27 19:55:21 Mavrik: yes, but that API is getting better in the next version. Apr 27 19:55:33 Mavrik: but agreed is not as good as it could be Apr 27 19:55:45 but theres a difference here in environment Apr 27 19:55:45 Yeah, I mean, the issue I have is that they have this abstraction fetish. Apr 27 19:56:02 Which makes their APIs impossible to use effectively because they refuse to tell you what hardware are you running on. Apr 27 19:56:13 You still can't tell Play Store that you NEED NEON for example. Apr 27 19:56:25 Apple control their entire eco-system. Google do not, and should not. Apr 27 19:56:40 Noone is saying they shouldn't. Apr 27 19:56:43 but i agree thats an area for improvement Apr 27 19:56:55 the H/W accell area Apr 27 19:56:57 I'm just saying that we need APIs to make awesome software for high-end devices. Apr 27 19:57:35 I think their drive for that is native-dev Apr 27 19:57:43 I mean, right now I can't even tell Play Store to deny installation of my app to all devices without pedometer. Apr 27 19:57:59 Causing a flood of 1* "OMG DRAINS BATTERY" ratings and similar crap. Apr 27 19:58:18 /endrant Apr 27 19:58:43 i think their problem is they need a firm way to take on-board developer suggestions Apr 27 19:59:05 And a good bug tracker they actually read Apr 27 19:59:07 like a post enhancement and then other devs can rate Apr 27 19:59:08 Napalm: thank you :) Apr 27 19:59:15 what's a good way to parse JSON in android? Apr 27 19:59:22 but yea, i think only the tools team use b.android.com Apr 27 19:59:30 I have a feeling Apple's Radar works way better than whatever they do Apr 27 19:59:39 dpyro, from network or local? Apr 27 19:59:41 dpyro: gson/jackson/moshi take your pic Apr 27 19:59:44 pick Apr 27 19:59:48 nothing native? Apr 27 19:59:51 dpyro, if from network use Retrofit Apr 27 19:59:55 nothing nice Apr 27 20:00:01 There's a native JSON parser that has horrible API Apr 27 20:00:03 ew, will look intro retrofit Apr 27 20:00:03 JSONObject will parse things fine Apr 27 20:00:05 Use Gson or Jackson :P Apr 27 20:00:09 but just ew'ness all the way Apr 27 20:00:17 yeah it looks like a token reader ;_; Apr 27 20:00:22 dpyro: JSON from json.org is native-ish, but it's not that great Apr 27 20:00:22 But Retrofit is just so much better than anything out there it's not even funny :P Apr 27 20:00:24 or you have to recurse yoruself Apr 27 20:00:31 Since it also gets rid of threading messups Apr 27 20:00:45 * I meant org.json package Apr 27 20:01:54 what a mess i've done. but now i can do something like rxservice.bind().doSomething().handleResult() Apr 27 20:03:32 dpyro: it recurses itself Apr 27 20:03:44 rx code looks nice in top layer but, at least mine, is horrible on lower ones Apr 27 20:03:45 dpyro: and you dont need to token parse.. it does that.. but its still horrible api Apr 27 20:04:05 well retrofit looks like it also handles the IO for me, so I'll try that Apr 27 20:05:50 dpyro: yea, and its good with it.. uses okio.. which is a brilliant library Apr 27 20:13:42 hello, is power saving mode the same as doze mode in terms of how an app would behave while being in one of these states? Apr 27 20:14:08 no. Apr 27 20:14:16 powersaving mode means cpu is throttled Apr 27 20:14:28 doze means your app wont run at all ;) Apr 27 20:16:15 Yep, those are two different things. Apr 27 20:16:58 Napalm are you using jack yet ? Apr 27 20:17:16 God no :P Apr 27 20:17:21 noope Apr 27 20:17:26 Mavrik talk Apr 27 20:17:45 not ready ? Apr 27 20:17:51 I see, thanks! Apr 27 20:17:55 Doesn't even support annotation processing :) Apr 27 20:18:04 i thought i would let Napalm dog food it first :D Apr 27 20:18:06 It's build software marked as "experimental" Apr 27 20:18:15 Now imagine state of "stable" Gradle plugin. Apr 27 20:18:22 And then think of how experimental looks like :P Apr 27 20:18:52 who cares about using jack, unless you want to use lambdas badly Apr 27 20:19:03 only semi-compelling reason Apr 27 20:19:10 (retrolambda is better than jack in all regards) Apr 27 20:19:25 well, unless you're targeting only android N and want to use java8 features Apr 27 20:19:44 so, in my music streaming app , in theory should being in power saving/battery saver mode not stop the stream? i.e when a song changes a request to the server side is made.. Apr 27 20:20:31 nothing should stop my music on my phone unless its the battery dying completly Apr 27 20:22:42 exactly, so battery saving mode doesn't or shouldn't block network requests to get the next song in my case Apr 27 20:22:53 it doesnt Apr 27 20:23:11 depending on phone and user settings it might throttle it though Apr 27 20:23:27 ie user could have chosen to disable data in powersave mode Apr 27 20:23:32 or disable wifi Apr 27 20:23:34 stuff like that Apr 27 20:48:44 how can i put a footer in a navdrawer? Apr 27 20:49:08 same way you’d put a footer on any other view Apr 27 20:49:29 anchor the view to the bottom of it’s parent Apr 27 20:50:43 ReScO: I used a FrameLayout inside the NavigationView with layout_gravity set to bottom Apr 27 20:50:47 worked fine for my case Apr 27 21:05:33 Im calling Call.cancel() on the main thread and getting a NetworkOnMainThreadException Apr 27 21:05:49 Cancelling a request has to be done on bg? Apr 27 21:06:47 sounds like it Apr 27 21:06:52 Hm, alright Apr 27 21:20:41 Whats the difference between AlertDialog#hide and AlertDialog#dismiss Apr 27 21:22:10 now on to finding out how fragments work :( Apr 27 21:22:18 hidden is not dismissed Apr 27 21:23:17 Resc0: mind if i tag along? Apr 27 21:23:26 Right but whats the idfference between hidden and dismissed danijoo__ Apr 27 21:23:44 I hacked it in ecliipse , it failed to import in new android studio so am restarting to get a better grasp Apr 27 21:23:45 a hidden dialog is still there Apr 27 21:23:59 just invisible Apr 27 21:24:09 Ok, thakns Apr 27 21:34:10 ugh, i don't grasp how i can link a navbar state (menu item clicked) to a fragment, where on app start it should have the first choice in the navbar highlighted and that fragment loaded... Apr 27 21:38:46 ReScO: They don't, case closed! Apr 27 21:39:19 it sure should be possible to set a menu item to active? Apr 27 21:41:20 omg, i feel so good right now Apr 27 21:41:30 found some really annoying bug.. and fixed it Apr 27 21:41:47 infact.. its a weird one.. believe its a bug in android .. just need a way to replicate it Apr 27 21:42:47 ReScO: I believe you can just do "setChecked" on the menu item you want to select Apr 27 21:43:09 and switching out fragments in a navdrawer? Apr 27 21:43:14 have a ScrollView with a TextView with isSelectable at the top (this makes it focusable) then scroll to the bottom and press a button say.. and the ScrollView scrolls up slightly, it comes down because of requestChildRectangleOnScreen Apr 27 21:43:27 tuts on d.android.com seem to be outdated Apr 27 21:44:08 are you using the navigation view? Apr 27 21:45:08 dsardari, i think so Apr 27 21:45:20 yup Apr 27 21:46:30 should be a listener for which MenuItem is selected. so however you're switching the fragment there, just call the same method when you startup with the choice you want Apr 27 21:47:19 so init transaction manager in onCreate, then switch 'em out in that menuItemSelected() thing? Apr 27 21:49:08 https://code.google.com/p/android/issues/detail?id=77529 < found the related bug Apr 27 21:49:10 probably fine. or just let your init method do it after you set the selection Apr 27 21:49:12 god damn it Apr 27 21:51:21 dsardari, too new to android to understand what you mean, could you explain it a bit more? Apr 27 21:52:18 Hi! If I want to develop a Bluetooth application, and have to choose between "BLE 4.0" and "BT classic". What would the percentage of device support be? I know that android version 4.3+ supports BLE but that doesn't mean that a device with 4.3+ has to support BLE (it is optional?). Are there any concrete numbers on BLE "market share" on the android platform? Is it viable to make an application that supports both stacks? Or is it better to provide a Apr 27 21:52:49 red-lichtie, your question is a bit strange, since BLE and standard BT aren't comparable technologies. Apr 27 21:52:59 The one you choose depends on what do you want to do, not device support. Apr 27 21:54:17 yup. it’s entirely dependent on what you’re trying to communicate with Apr 27 21:54:50 Mavrik: Most devices that support BLE also support classic. My question might be better qualified asking how many 4.3+ device can only support classic BT Apr 27 21:54:58 That's not true. Apr 27 21:55:20 While phones support both since 4.3 or so, client devices are either or. Apr 27 21:55:30 Which makes sense if you think for a bit what BT and BLE are built for. Apr 27 21:55:33 I'm making the HW on the other end, and there is a serious price difference between BLE or Classic only and a Dual mode device Apr 27 21:55:34 So again. Apr 27 21:55:38 What are you trying to do? Apr 27 21:56:03 The standards are built for very different use cases in mind. Apr 27 21:56:55 Not when you get in to it. Just different generations of the tech available. Apr 27 21:57:08 yeah, they are Apr 27 21:57:39 is it something that’s supposed to run on battery? Something that’s supposed to communitcate in real time, or only at fixed, sparse intervals? Apr 27 21:57:50 ReScO: You already have a the mechanism for switching between the fragments in your "NavigationView.OnNavigationItemSelectedListener", right? Apr 27 21:57:50 something that will be streaming data? Apr 27 21:58:05 red-lichtie, em, no. Apr 27 21:58:10 red-lichtie and 4.3 has a super shitty BLE implementation, if you don't want to kill yourself 4.4 is minimum Apr 27 21:58:14 Do read up on them, they're neither compatible, nor comparable. Apr 27 21:58:20 To put it simply, if I were to design a BLE only device, would that restrict my android customer base to 5% or 55% of the currently available handhelds? Apr 27 21:58:59 that shouldn’t be your only criterion Apr 27 21:59:16 remember, many people who don’t have 4.4+ devices aren’t people who care about buying stuff Apr 27 21:59:46 dsardari, let me check Apr 27 22:00:15 dsardari, it implements it Apr 27 22:00:50 s73v3r: My point is, 4.3+ doesn't guarantee BLE capability. I am wondering if there is a BLE market share for android (IoT, etc.) Apr 27 22:00:52 ReScO: When you get the callback for that listener, it gives you a MenuItem then you probably have a switch on the MenuItem's Id to determine which fragment to show. If that switch code isn't in it's own method I'd move it into a separate method so that you can call it whenever. Apr 27 22:01:33 i would do minSdk=21 for BLE now Apr 27 22:02:02 I can easily see the percentage of BLE apple devices as they are the devices themselves. I was wondering if there was such a measure for Android? Apr 27 22:02:29 red-lichtie: I wouldn’t worry too much on people who are on 4.3 and below Apr 27 22:02:56 i hate these effing errors "Caused by: android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class fragment" Apr 27 22:02:59 red-lichtie, most of 4.3+ stuff supports BLE. Apr 27 22:03:00 s73v3r: It is the 4.3+ that don't have BLE that I am wondering about Apr 27 22:03:06 4.4 pretty much guaranteed. Apr 27 22:03:27 why can't they tell me which file it was ... Apr 27 22:03:35 ReScO: Then you could call your method that handles the navigation item selection with your first choice by retrieving the MenuItem: mNavigationView.getMenu().findItem(R.id.menuFirstChoice)) Apr 27 22:03:38 there might be some negletable shitphones but all major ones support it Apr 27 22:03:49 Sounds like a plan then, forget BT classic and concentrate on BLE compatibility Apr 27 22:03:51 BLE is probably going to limit you to 4.4+. Apr 27 22:04:06 however, pick the version that works best for the hardware Apr 27 22:04:24 if you are running on battery, and are not streaming data to the phone, then BLE is probably your best bet Apr 27 22:05:03 red-lichtie, remember that BLE has pretty much no bandwidth Apr 27 22:05:08 as opposed to EDR BT Apr 27 22:05:23 dsardari, a switch/case does that already Apr 27 22:05:25 s73v3r: There seems to be an incredible amount of early jelly bean still on the go Apr 27 22:05:49 depends on the country. Apr 27 22:05:51 dsardari, eh, if/else-es Apr 27 22:06:03 and I can’t imagine they’re buying much in the way of hardware perhipherals Apr 27 22:06:09 Ignore it. Apr 27 22:06:14 but where would i put the code to init the fragment? Apr 27 22:06:34 s73v3r: I have 3 BT modules to chose from, classic only, BLE and dual mode. I want to maximize the potential users Apr 27 22:06:52 RescO, you might need to post some code. you should be able just call that method in onCreate Apr 27 22:07:03 users or income ? Apr 27 22:07:09 I still don't get what kind of magic device are you building where both BT and BLE make sense. Apr 27 22:07:37 like I said, choose the BT module based on what your perhipheral needs. Don’t shoehorn one or the other to appease a group of people who aren’t going to buy your product anyway Apr 27 22:07:58 red-lichtie dual mode can be a problem . lots of reports android connects in the incorrect mode Apr 27 22:08:14 like, you ask for BLE connection and get br/edr connection haha Apr 27 22:08:23 don't be retarded, use BLE Apr 27 22:08:52 BT modules are cheaper Apr 27 22:08:53 dsardari, https://gitlab.brainblendr.com/iSDP/IJmondBereikbaar/blob/development/app/src/main/java/com/brainblendr/foss/ijmondbereikbaarcams/CameraActivity.java#L82 Apr 27 22:09:44 g00s_: That was where I was leaning towards, but I was wondering what the general consensus was. Apr 27 22:10:15 consensus is, BLE on android is very PITA Apr 27 22:10:35 don't make life harder for yourself Apr 27 22:10:38 red-lichtie: What does your thingy do? Apr 27 22:10:41 g00s_: I've noticed :-D Apr 27 22:11:01 *sigh* Apr 27 22:11:10 * Mavrik slaps g00s_. Apr 27 22:11:42 red-lichtie also android 5.0 improved a lot of the ble apis Apr 27 22:11:55 some stuff even works :) Apr 27 22:12:15 So there aren't numbers for "BLE" capable Android devices, although there are numbers about the version. :-/ Apr 27 22:12:59 It is painful, I know. Getting a dual mode module to work has been doing my head in already Apr 27 22:13:04 red-lichtie assume most devices are BLE Apr 27 22:13:09 4.4+ is supposed to have support for it. Unfortunately that doesn’t mean that every 4.4 device has it. Apr 27 22:13:12 Just. Apr 27 22:13:16 red-lichtie, go buy BT 3.0 Apr 27 22:13:17 C'mon Apr 27 22:13:19 It's cheaper! Apr 27 22:13:32 You'll fail sooner and then you can start thinking about what you're doing. Apr 27 22:13:35 red-lichtie: Aren’t dual mode chips more expensive? Apr 27 22:14:10 red-lichtie, BT3.0 is supported on Andorid 2.2 Apr 27 22:14:16 Which covers 100% of devices. Apr 27 22:14:26 No bugs! Apr 27 22:14:30 Mavrik: It *HAS* to be certified and be capable of being built in to a product, not just a cheap no name model for experiments. Apr 27 22:14:44 There you go then. Apr 27 22:14:52 ReScO, you can just call "onNavigationItemSelected" with the MenuItem that you first want shown. Apr 27 22:15:16 how? Apr 27 22:15:19 s73v3r: Yes, they are, seriously mere expensive and causing me more headaches than they are worth Apr 27 22:15:28 then don’t bother with them Apr 27 22:15:35 red-lichtie, why are you ignoring what everyone is saying sind 15 minutes? Apr 27 22:15:45 they’ll just drive up the cost of your product, and the cost of your development Apr 27 22:15:46 since Apr 27 22:15:54 just put onNavigationItemSelected(R.id.nav_item) in onCreate? Apr 27 22:16:27 ReScO, onNavigationItemSelected(navigationView.getMenu().findItem(R.id.nav_beverwijk_a9)); something like that Apr 27 22:16:49 in your onCreate Apr 27 22:16:56 danijoo__: ? "(23:08:23) g00s_: don't be retarded, use BLE" "(23:13:16) Mavrik: red-lichtie, go buy BT 3.0" Apr 27 22:17:11 But g00s_ just told you it's broken and doesn't work. Apr 27 22:17:16 Right g00s_? BROKEN! Apr 27 22:17:17 Mavrik was trolling you Apr 27 22:17:19 red-lichtie, one of the 2 was sarcasm. guess which one ;) Apr 27 22:17:41 BT3.0 is meanwhile supported on all devices out there! Apr 27 22:18:15 I guess it is tome to source some BLE 4.0 modules then ;-) Apr 27 22:18:23 red-lichtie: Is your thing battery powered? Apr 27 22:18:33 OK, I get it, classic BT it is then :-) Apr 27 22:18:35 and is it going to be continuously streaming data? Apr 27 22:18:36 red-lichtie heads up : long writes can be a problem, just FYI Apr 27 22:19:19 s73v3r: Negative, it has an online power source, no low energy issues on the device, only on the phone Apr 27 22:19:26 Hi Apr 27 22:19:30 what kind of streaming ? audio stream or sensor, etc ? Apr 27 22:19:40 i just meant transmitting Apr 27 22:19:52 Android development withj netbeans anybody? Apr 27 22:19:55 red-lichtie: Use BT Classic. It’s cheaper, and a little less of a headache Apr 27 22:20:14 * g00s_ is now very confused Apr 27 22:20:26 good luck red-lichtie :D Apr 27 22:21:16 s73v3r: That is the conclusion I've come to after this little chat. I was undecided but it seems that BLE will take a fair few years before it has the majority of the market share and the stabilty Apr 27 22:21:18 is someone trying to use bluetooth LE for audio? Apr 27 22:21:34 dpyro: no Apr 27 22:21:53 dpyro: No Apr 27 22:22:04 red-lichtie what was your application ? Apr 27 22:22:10 oh, i just say streaming, and bluetooth LE, and freaked out :) Apr 27 22:22:13 *saw Apr 27 22:22:25 g00s_: Coming soon ;-) Apr 27 22:22:25 red-lichtie: BLE is kinda there. I mean, FitBits and such are BLE devices. But, if you don’t actually need the BLE advantages (battery), then it’s not worth the extra cost Apr 27 22:22:29 Does anyone here have much experience with collapsable toolbars? Apr 27 22:22:48 red-lichtie well if you don't say what kind of data you're transmitting, its harder to say what you should use Apr 27 22:22:54 Is there a way to not let them collapse unless a contained list is actually large enough to scroll? It just looks weird otherwise Apr 27 22:23:02 I was thinking of BT classic for android and BLE for, errr, apple Apr 27 22:23:11 that would be dumb Apr 27 22:23:22 no Apr 27 22:23:29 it really depends on the bandwidth you need Apr 27 22:23:38 BLE is pretty good on apple Apr 27 22:24:02 bluetooth, if you have to do something custom that the standard profiles dont support, requires that mfi program thing Apr 27 22:24:04 konk3r, never tried it but you could disable nested scrolling on the list Apr 27 22:24:13 red-lichtie: BT support is just as good on Apple. No need to give yourself added complexity and cost Apr 27 22:24:17 also on 4.3 and 4.4 you can't control the transmission rate Apr 27 22:24:28 iirc BLE has 3-4kb/s max bandwidth and that's pushing it Apr 27 22:24:33 konk3r, setNestedScrollingEnabled(false) Apr 27 22:24:35 and apple has no support for custom communication (SPP) Apr 27 22:24:56 red-lichtie well they do, you just need mFi Apr 27 22:24:59 but you need to check if the list is full yourself Apr 27 22:25:20 but you can do BLE on apple without mfi Apr 27 22:25:25 yes Apr 27 22:25:26 Awesome danijoo__, thanks Apr 27 22:25:26 s73v3r: If I went for simple SPP support on apple (i.e. data xfer) then I don't think that apple allows it Apr 27 22:25:34 dsardari, tried that, but it doesn't set the menuitem as active so to speak Apr 27 22:25:44 and BLE has a very good power consumption rate, so i'd use BLE unless you really need more bandwidth Apr 27 22:25:51 Exactly, mFi+BT or BLE Apr 27 22:26:03 A hardware designers nightmare Apr 27 22:26:03 even big manufacturers are sticking to BLE Apr 27 22:26:15 its not that bad Apr 27 22:26:30 red-lichtie still hasn't said what kind of data this is ... so its pretty hard to recommend Apr 27 22:26:34 yeah Apr 27 22:26:34 You still dont know how much bandwidth the guy needs and what other constraints he has. Apr 27 22:26:45 Without that it's just random bullshit. Apr 27 22:26:53 Like playing casino. Apr 27 22:27:00 * Mavrik puts chits on BT3. Apr 27 22:27:07 * dpyro puts it all on BLE Apr 27 22:27:08 he should use a wire.. Apr 27 22:27:10 Not high bsndwidth but it must be low latency, which also tends towards BLE if I'm not mistaken Apr 27 22:27:13 /dev/bullshit > IRC Apr 27 22:27:28 you're going to have to be more specific than that, red-lichtie Apr 27 22:27:30 Do you need the broadcast functionality of BLE? Apr 27 22:27:42 how low? Apr 27 22:27:45 Do you transfer more than 1KB or so of data? Apr 27 22:27:59 Is your device on battery for long periods of time? Apr 27 22:29:03 ]No, end to end communication, with paired devices only. It works fine on classic BT and I don't even have an Apple device, I'm jut trying to look into future development and investment Apr 27 22:29:29 red-lichtie, are you trolling by any chance? Apr 27 22:29:43 lol Apr 27 22:29:50 * g00s_ thinks AC/DC song "Who Trolls Who" Apr 27 22:30:02 whom will troll the trolls? Apr 27 22:30:14 *who Apr 27 22:30:17 ain't nobody told you .. Apr 27 22:30:21 all android devs troll. Apr 27 22:30:31 dpyro: red-lichtie also said that the device was plugged in, so I wouldn’t think power would be an issue Apr 27 22:30:38 that negates one of the main reasons to use BLE Apr 27 22:30:40 you don't even wanna know the comments in some apps, heh Apr 27 22:30:42 if it aint broke dont fix it Apr 27 22:31:06 ReScO: No, I've been working on a product for the past few months. I have reached a product design decision point and need some hardware support advice Apr 27 22:31:12 if it works on bluetooth classic i woudln't bother changing it up Apr 27 22:31:19 Power isn't an issue Apr 27 22:31:36 red-lichtie, aren't you better off asking in ##electronics then? Apr 27 22:31:38 unless you absolutely need custom support on apple devices and you dont want to do mfi Apr 27 22:31:40 I don't want to be beholding to Apple either (MFi etc) Apr 27 22:32:14 ReScO we were all gremlins at one time, but once exposed to android after midnight ... Apr 27 22:32:15 does the @SerializedName annotation not take affect unless the variable value is non-null? Apr 27 22:32:25 eemgr: yes Apr 27 22:32:29 well that sucks Apr 27 22:32:29 you know, i have yet to see an actual need for low-latency on bluetooth except for HID Apr 27 22:32:48 and headsets Apr 27 22:32:50 if there’s nothing to go into the thing, or come out of the thing, then there’s no reason to look at it Apr 27 22:33:38 As I understand it, I can do BLE communication without Apple approval on their devices, my question is what would be the impact for android support for dual mode support vs. BLE only or missing out the Apple device completely Apr 27 22:34:07 missing out on Apple completely would be a bigger blow than using BLE and cutting out older Android devices Apr 27 22:34:31 the older device owners aren’t likely to buy hardware perhipherals in the first place Apr 27 22:35:10 red-lichtie come back when you have more information (stop wasting our time) Apr 27 22:35:11 apple has BLE on all their current devices so its a big market segment Apr 27 22:35:18 ReScO, You need to provide the "itemIconTint" and "itemTextColor" with a "selector" of colors for when state_checked=true Apr 27 22:35:44 g00s_: He’s given enough information, I think Apr 27 22:36:16 not really s73v3r Apr 27 22:36:20 red-lichtie: I changed my mind. Go BLE, get the easy communication with Apple devices, and still get the high end of Android devices Apr 27 22:36:20 dsardari, "navigationView.getMenu().getItem(0).setChecked(true);" did the trick, some meticulous googling and frustration over the search terms did it's job, now on to fragments tho... Apr 27 22:36:22 just vague generalities Apr 27 22:37:00 BLE is like the one way you can make hardware that works on both android and ios Apr 27 22:37:03 dpyro: He’s told us his power requirements, how often he’s transmitting, and the part about Apple and mFI Apr 27 22:37:48 erm custom hardware Apr 27 22:38:40 if it wasn’t for the custom protocol, I’d say regular BT all the way. But since Apple doesn’t allow that with regular BT, but they do with BLE, I have to lean toward BLE. Apr 27 22:38:51 Unless you really wanna go through the certification process Apr 27 22:39:24 BLE implies a data model, its not just about the radio characteristics Apr 27 22:39:56 yes, I know Apr 27 22:40:45 I have been assessing modules like the RN4677 (Dual Mode), Zentri AMS002 (BLE only) and classic BT modules, the programming and HW support of potential phones IS an issue in HW design Apr 27 22:41:10 given the cost and added complexity, I would avoid dual mode Apr 27 22:41:43 picking one allows the firmware engineers to have one interface, rather than two different ones to keep in sync Apr 27 22:41:56 It isn't trolling, it is a serious question as to the BLE device support for Android. Not the API level (which is easily determined from the Android Dashboard) Apr 27 22:42:01 bluetooth and ble are really different tech Apr 27 22:42:06 it also allows your iOS and Android engineers to work together in how to use the device Apr 27 22:42:23 showerthought : i wonder if gradle is slow because it prints so much crap to console O.o Apr 27 22:42:33 red-lichtie: Use BLE, and don’t worry about lower API users Apr 27 22:43:17 "stop printing stuff to console and build damnit !" Apr 27 22:45:49 s73v3r: So far the RN4677 has been causing more problems than it has solved and I was undecided as to going full out BLE, BT classic only or 2 designs. But I guess that the BLE market share will only increase as the older devices die Apr 27 22:46:23 yupo Apr 27 22:47:48 Thanks for all if your input, you have helped me out a lot. Time for the full scale BLE direction and adding BLE as a requirement instead of "optional" to the manifest. :-) Apr 27 22:48:20 green-lictie ! Apr 27 22:48:28 Apr 27 22:48:31 :-D Apr 27 22:48:59 good luck! Apr 27 22:49:10 Thanks again & NN :-D Apr 27 22:53:15 WHOOO Apr 27 22:53:54 got fragments to work for the first time in my life Apr 27 22:54:00 -_- Apr 27 22:55:33 does a bound service work across multiple activities? Apr 27 22:59:18 how would i go about showing a list of images with a title, while following the Material guidelines? Apr 27 22:59:23 Tiles? Apr 27 22:59:40 And can i reload the image every second in every tile? Apr 27 23:03:11 if your image content is homogenous: http://www.google.com/design/spec/components/grid-lists.html#grid-lists-specs otherwise http://www.google.com/design/spec/components/cards.html#cards-usage Apr 27 23:03:34 homogenous? Apr 27 23:03:47 they're all camera feeds.. Apr 27 23:04:24 if they're all the same size just use a grid-list Apr 27 23:06:53 but wouldn't that be too condensed? Apr 27 23:07:10 http://www.vid.nl/ImageCamera/cam_38 here's a camera Apr 27 23:07:11 you get to decide the size of the items Apr 27 23:07:28 and the spacing in between them Apr 27 23:10:27 I’m trying to make a rectangle shape drawable with a radius, but it’s leaving a pixel of the background color in the corners, apart from the rounded edges Apr 27 23:10:32 Anynody seen this behavior? Apr 28 00:00:24 Hi, if ads are wanted to be sent to an individual phone what device information is needed by the advertising company to target the phone through a third party web site where the ads are run? Android ID is one item, what else is necessary? Apr 28 00:02:57 Digi-Foo: how do we extract the Android ID from a web visit? Apr 28 00:04:32 https://gitlab.brainblendr.com/iSDP/IJmondBereikbaar/tree/development/app/src/main/java/com/brainblendr/foss/ijmondbereikbaarcams/CameraImageAdapter.java any clue why the images are reaaaaaaly small? Apr 28 00:05:19 And I need to find a way to download the urls and titles of the images and stuff 'em in an array or something.. Apr 28 00:05:32 you extract the android id by querying the phone when it's on a wifi network. Apr 28 00:05:56 Well, I can provide a json file from my server with all the URLs Apr 28 00:06:32 Is this more web dev than android-dev? Apr 28 00:10:52 But how can I load all images in that json file into a gridview? Apr 28 00:11:54 Digi-Foo: send me a link Apr 28 00:13:02 A link for what? Apr 28 00:14:27 I should be able find the info with the ad distribution company that was used. Apr 28 00:19:34 Potus, Are you asking for the link to the harrassing ad that was used to target my phone? Who are you? Franco Christifori, Taylor Barrett? Apr 28 00:20:47 im asking for a link to learn how i can acquire ones android id from visiting a website. if i have to tunnel a script to ping it and add it to db.. or however needs to be done Apr 28 00:20:54 i dont care about the spam site Apr 28 00:21:01 but i did see that dude that answers all them emails Apr 28 00:21:08 speaking of which, this behavioral-ad targetting and seemingly strategic soft information aggregation methods is really starting to piss me off Apr 28 00:25:03 I imagine getting a record of the addresses attaching to a site is kept in a log on the web server. You need to know what type of webserver is used and how address logging is implemented Apr 28 00:27:46 https://gitlab.brainblendr.com/iSDP/IJmondBereikbaar/tree/development/app/src/main/java/com/brainblendr/foss/ijmondbereikbaarcams/CameraImageAdapter.java why are the images so small, and how can I download a array of title:URL items from a json file and load all of those? Apr 28 00:34:49 That was my next question. where does android id fall in the sequence for device identification? Ex. Computer name =>subnet+IP addy =>mac address. Apr 28 00:41:12 When websites give a approximate device location for a phone what is used to get that information? Apr 28 00:41:33 What is the website doing to get the info? Apr 28 00:42:14 Cell tower + WiFi Apr 28 00:53:22 Hi, what is a web site using to get location info from a local cell tower and wifi addressesing? Apr 28 00:55:01 When approximate locations for mobile devices are listed on a website? Apr 28 00:55:56 Digi-Foo: HTML5? Apr 28 00:56:14 Digi-Foo: http://www.w3schools.com/html/html5_geolocation.asp Apr 28 00:56:47 Digi-Foo: There are probably plugins / support for it in jquery and others by now too Apr 28 01:05:34 Ok, dumb question obviuosly, but I'm really confused... How can I reuse same layout not having duplicated ids for "cloned" elements? Apr 28 01:06:49 I have parent layout, where it might be one or two identical sub layouts, but if I include it twice I'll obviously have elements with repeated ids Apr 28 01:06:49 AlexBerdnikov: the object is different, meaning obj1 == obj1_cloned will be False Apr 28 01:07:03 AlexBerdnikov: ok wrong channel Apr 28 01:07:04 :) Apr 28 01:07:31 AlexBerdnikov: you can set the id when you include it Apr 28 01:07:38 which overrides it Apr 28 01:08:03 I can set id for include element AFAIK Apr 28 01:08:17 But not for the elements in the layout I include Apr 28 01:08:56 hmmmm, and you need to do that? Apr 28 01:10:45 Well, I have either one or two objects of same model, and I need to show either one or two rows or columns with same layout just with different text values. Apr 28 01:11:12 So I probably should just do it progammatically... Apr 28 01:15:26 ok how can I debug the android mail client? I cannot send out emails through my SMTP server as it can't negotiate a cipher to use. Apr 28 01:15:41 (and I wan't to use TLS) Apr 28 01:28:19 i was wondering. where do you guys find good designers (i.e app icon, ui) Apr 28 01:59:41 Hello people, Apr 28 02:31:48 <_xor> What's the best way to snoop network traffic from an app that I have installed on my phone? Apr 28 02:32:34 Charles Apr 28 02:33:09 <_xor> Hmm, going to be easier said than done. Apr 28 02:33:34 <_xor> I'm using a Galaxy S6 and it's not rooted. I can't set the http proxy settings for anything but the built-in browser. Apr 28 02:33:52 <_xor> Also, I can't tell if it's only for http or if that setting works for https as well. Apr 28 02:34:36 O.o how are you going to intercept https traffic Apr 28 02:34:44 <_xor> Mainly, what I need to do is figure out if this one app is making calls over HTTP or HTTPS to a remote server. If it's HTTP, then I can snoop that from my gateway/router. If it's HTTPS, then I'll have to setup the certs properly. Apr 28 02:35:28 <_xor> g00s: Charles can do that. I haven't used it yet, but I do know that it gives you a CA certificate to install on the device & then tell it to connect to Charles to use as a HTTP proxy. Apr 28 02:35:54 but if they pinned the cert ... Apr 28 02:35:58 <_xor> Charles inserts itself in the middle of that connection and snoops the unencrypted traffic (because it has the cert). Apr 28 02:36:08 <_xor> Yes, if that's the case, then it'll be harder. Apr 28 02:47:06 if i set a navigation click listener on a toolbar, but then call setSupportActionBar(toolbar) it won't fire Apr 28 02:47:12 lamesace Apr 28 02:47:18 *lamesauce Apr 28 02:49:38 you set proxy on your wifi connection Apr 28 02:49:57 standard feature of all android devices Apr 28 02:55:02 * mrandroid wishes everyone a good night Apr 28 02:56:21 <_xor> pfn: Yeah, I just realized that I might have misinterpreted the proxy setting in Android. It says that it's used by the stock browser, but MAY not be used by other apps. Apr 28 02:56:39 <_xor> I thought that meant, "This settings will ONLY affect the web browser." Apr 28 02:57:00 <_xor> As opposed to, "This setting MIGHT only affect the web browser, other apps aren't obligated to use this setting." **** ENDING LOGGING AT Thu Apr 28 02:59:58 2016