**** BEGIN LOGGING AT Sat Mar 26 02:59:58 2016 Mar 26 03:06:25 I can't for the life of me figure out how to launch an activity Mar 26 03:06:30 my normal launching code does not work Mar 26 03:07:21 I am trying to launch this activity: http://pastebin.com/0zNpuC6r Mar 26 03:08:01 but this does not work: Intent intent = new Intent(this, VideoActivity.class); Mar 26 03:08:07 it's complaining that it can't resolve the constructor Mar 26 03:08:55 what is this Mar 26 03:10:06 I'm trying to start an activity that plays a video file from the Assets Mar 26 03:10:49 'this' show your code where you are startActivity Mar 26 03:12:29 canvs2321: http://pastebin.com/S9s316GQ Mar 26 03:13:23 your 'this' is referencing the anonymous class you created Mar 26 03:13:49 without this it also doesn't work Mar 26 03:14:16 you need to give it a context Mar 26 03:14:58 I have no idea how Mar 26 03:16:00 http://stackoverflow.com/questions/20729234/how-am-i-accessing-my-main-class-from-an-anonymous-class Mar 26 03:16:01 Like, if you click on one of the images in the grid, it should jjust launch a new activity with a full screen video playing Mar 26 03:16:37 cpt-oblivious, alternatively just have your activity class implement OnClickListener, and dont use the AIC Mar 26 03:16:51 just add the activity as the listener Mar 26 03:17:16 what is AIC? Mar 26 03:18:18 Anonymous inner class. Mar 26 03:18:20 (where you call new on line 44) Mar 26 03:18:24 canvs2321: so then: Intent intent = new Intent(MainActivity.class, VideoActivity); ? Mar 26 03:18:45 read that thread i just posted, the answer explains what you need Mar 26 03:20:00 I have, so the MainActivity.class makes sense vs just a this Mar 26 03:20:12 but I still don't get why the second part of the VideoActivity is wrong Mar 26 03:20:21 I get "expression expected" Mar 26 03:20:23 because you failed at reading Mar 26 03:21:54 not really, I've read it. I just don't understand it. Mar 26 03:22:39 no where on that page does it mention new Intent(MainActivity.class,XXX);, i see many places new Intent(MainActivity.this,NextActivity.class); Mar 26 03:23:03 that second part also doesn't work Mar 26 03:23:15 Post your updated code Mar 26 03:23:21 Intent intent = new Intent(MainActivity.this, VideoActivity.class); Mar 26 03:23:24 rest is identical Mar 26 03:23:56 you don't have MainActivity class Mar 26 03:24:02 ModuleActivity Mar 26 03:24:12 oh Mar 26 03:24:31 now I get it Mar 26 03:24:47 Yea I also have a MainActivity, which is why I was using that. Mar 26 03:24:51 But that obviously makes no sense Mar 26 03:25:05 since if you go out of that anonymous onclick class, you get into the moduleactivity class Mar 26 03:25:17 * cpt-oblivious facepalms Mar 26 03:25:19 thanks canvs2321 Mar 26 03:25:36 yep Mar 26 03:59:00 I have this in an Activity... private LeDeviceListAdapter mLeDeviceListAdapter; but I am getting a red error... Cannot resolve LeDeviceListAdapter. I think it is because I tried to auto import a library.. and I must have turned it into a symbol... so how do I fix this so I can import it Mar 26 04:14:04 IrishGringo: still having issues? Mar 26 04:14:18 yes... racking my brain... Mar 26 04:14:33 I'm starting a new project hoping that fixes it... Mar 26 04:14:45 could you give me a hint please Mar 26 04:14:46 want me to take a look? Mar 26 04:15:31 sure... Mar 26 04:15:58 IrishGringo: see PM Mar 26 04:16:22 skype... Mar 26 04:22:45 If my Android app crashes on my phone, but it does not crash in the emulator, what are my options? Mar 26 04:22:53 It does not show any error in logcat. Mar 26 04:23:11 The recent addition since which it crashes is a video playing in an activity Mar 26 04:23:17 Napalm AppCompatDelegate.setDefaultNightMode() doesn't cause a configuration change. do you think thats a bug ? Mar 26 04:37:55 this is what the emu is doing when you are waiting for it to start http://i.imgur.com/q8HUOnu.gifv Mar 26 04:46:52 https://www.reddit.com/r/ProgrammerHumor/comments/3fizjs/jit/ Mar 26 05:38:09 hello Mar 26 05:39:30 so I am working with basic ServerSocket's and Socket's I have kind of two issues which I can get around sort of but I would love to see if anyone can enlighten me Mar 26 05:41:58 when I use my lte connection I can't get a connection from my desktop I can really only think it is because either I cant seem to get my actual IP or the port isn't forwarded and I'm not really sure how to check which is happening Mar 26 05:47:39 <__ls> So, I'm new to Android development, though not to coding in general. I would like to use Dagger in my app. I've set up my module, and my component as part of the app. Now, I'd like to add the first unit test. To do so, I want to swap out the return value of a provideX method. The only resources I've found on how to do so were targeted at integration testing and suggested creating a separate test app, with its own component, its own Mar 26 05:48:54 <__ls> While that probably makes sense for an integration test, I don't see how that overhead can be justified for a unit test. I really don't want to create a separate app for each unit test, that seems ridiculous. So surely there must be some other way to just swap out a single provider? Mar 26 05:50:57 <__ls> Or perhaps my basic problem is that I'm confusing what I'm testing. I want to use Espresso to perform a validation of an onClick method that's part of a fragment. That fragment gets instantiated by an activity where I inject a field. That field is what I want to inject with something different for the test. I'm somewhat at a loss on how to do that without going full blown test-app mode. Mar 26 05:54:44 <__ls> I think module overrides is what I need to be looking at ... (towards the end of http://square.github.io/dagger/) Mar 26 06:03:17 does anyone know if you can modify and activities colors before rendering or adding the views? kind of how the new ios has the color changing functionality based on the hour of the day? Mar 26 06:20:22 Bear10, http://stackoverflow.com/questions/18001551/day-night-theme-for-android-app Mar 26 06:20:59 rowan7: so the best options we've got are themes/ Mar 26 06:21:15 not complaining just wondering Mar 26 06:30:11 no, you could certainly write some custom logic, I just think custom themes are probably easiest Mar 26 06:31:10 Though I have not done much at all with time based themeing, so others may know better than me Mar 26 06:31:39 rowan7: well in my mind (i could be wrong) i was thinking "it would be cool if i could simply get access to the gpu right before rendering and apply filters) Mar 26 06:31:57 and maybe the easiest if it had some built in callback for such things Mar 26 06:32:33 but the only place i see opengl available in is on a GLSurfaceView and my guess is the activity doesn't do much there, it's all the view itself Mar 26 06:37:10 ah, yeah, this is not an area I could advise on. I've never worked with opengl and graphics rendering that closely. Mar 26 07:44:04 what about a kanban style todo list for android? Mar 26 07:55:53 trello? Mar 26 08:19:08 cool I don't have to code it myself Mar 26 08:27:14 nice, I killed 3 days on this Mar 26 08:27:28 couldn't figure out why these classes were not found by the compiler Mar 26 08:27:55 turns out that I wrote testCompile instead of androidTestCompile Mar 26 08:51:17 hello, is it possible to add navigationdrawer to a specific intents, for example I want ND to be excluded from signup and login activities..? Mar 26 09:11:49 StephenS: yes Mar 26 09:12:36 can you tell me how? Napalm Mar 26 09:12:59 yea, well your NavigationDrawer is in your layout at the moment right? Mar 26 09:13:15 also I inherit my package name and not a whole layout when adding new nav drawer, is that fine? because if I put layout, I get undefined style issue in android studio, and thats the only way I could add this Mar 26 09:13:57 what? Mar 26 09:14:00 lol Mar 26 09:14:16 new -> activity -> navigation drawer activity Mar 26 09:14:27 erm Mar 26 09:14:29 sure Mar 26 09:14:33 whatver Mar 26 09:14:42 package name by default is set to layout, but I had to change it to my package name since it wont work if I leave it by default :P Mar 26 09:14:52 I'm just saying whats logical by now :D Mar 26 09:15:05 not really Mar 26 09:15:11 whats the package name got to do with any of this Mar 26 09:15:23 right.. so your layout has a NavigationDrawer view in it? Mar 26 09:15:34 you need to move that out into its own layout Mar 26 09:15:49 then you add a ViewStub Mar 26 09:16:09 in your main layout that will inflate the layout file with the NavigationView in it Mar 26 09:16:40 you would want to set a onInflate listener to the viewStub.. so once its inflated you can setup your listeners and adapter on your NavigationDrawer Mar 26 09:16:54 then in your onCreate() you can use getIntent() Mar 26 09:17:06 if your intent includes the action or extras you want. Mar 26 09:17:12 you can then call viewStub.inflate(); Mar 26 09:17:25 for it to then inflate the NavigationDrawer into your layout Mar 26 09:17:42 thereby only including your NavigationDrawer when the intent includes what you want Mar 26 09:17:44 got it? Mar 26 09:17:50 yes Mar 26 09:17:55 good Mar 26 09:18:29 im going to take a lesson from this myself.. and use ViewStub more Mar 26 09:40:38 hey all is it possible if you have an apk to kind of reverse engineer it so to speak and access the source code via android studio Mar 26 09:42:48 yeah Mar 26 09:42:53 you should use proguard Mar 26 09:45:58 Hey all, anyone know how/why the android device only presents the capabilities it does when the phone is connected via USB? Mar 26 09:46:32 What would it take to get the webcam (or both front/rear) to be presented to the PC like they were actual webcams Mar 26 09:48:16 I know about faking it by transmitting the webcam data over bluetooth, wifi, or adb based ip port forwarding; but I'd really like to be able to plug in an android device and have it present devices to the host controller (as if it had its own internal usb hub) Mar 26 09:49:02 thoughts appreciated, thanks Mar 26 09:52:58 StephenS: ? what do you mean Mar 26 09:53:28 StephenS: this is a custom app a 3rd party developed for us and our needs so its not on the app store if that is what you mean Mar 26 09:54:13 StephenS: thanks for that link btw :) i was actually looking at rewriting the app as it was done using phone gap and is rather buggy Mar 26 09:57:47 Asked anohter way; aside from adb port forwarding which requires the user to enable debugging mode (and likely have the adb tools installed) -- is there any other ways to communicate directly with an android device over USB? Mar 26 10:00:14 Ideally I wanted to provide some kind of daemon / app /background service to the phone so that when you attached via USB it would just register as the new USB device (like a webcam) attached to the Android's USB hub; this would also help for using phones/tablets as fancy/extended input devices for the laptops and computers without using the wireless; but I'm open to other suggestions. Mar 26 10:28:07 Hey. Is it possible to invoke android's APK installer through a shell command on the device? I've been trying various methods such as this one: Mar 26 10:28:17 am start -a android.intent.action.VIEW -t application/vnd.android.package-archive -d /sdcard/apkname.apk Mar 26 10:33:36 I imagine it has to be somehow; not that I have any idea what it is Mar 26 12:11:38 Any idea why this happend with Dagger? Error:(12, 17) Unresolved reference: DaggerApplicationComponent There's a Github issue that says it's fixed, but it doesn't look like it Mar 26 12:12:30 any help with custom gradle plugin? trying to figure out how to hook on 'android' plugin and get all flavors names Mar 26 12:12:37 baash05: stop quitting and rejoining please Mar 26 15:20:05 I have "testCompile 'org.mockito:mockito-core:2.0.42-beta'" on my build.gradle but I get "Unresolved reference: mockito" when building. I only use Mockito in androidTest files. Any idea what's going on? Mar 26 15:23:10 <_Atom_> anyone have experience with Algolia for android? Mar 26 15:37:25 <_Atom_> so i'm using gradle and i seem to be missing some methods from a package Mar 26 15:37:33 <_Atom_> any common problems i should investigate? Mar 26 15:39:51 <_Atom_> hm Mar 26 15:40:05 <_Atom_> Well I just checked the source code for the package and the method is definitely there Mar 26 15:40:11 <_Atom_> not sure why it isn't resolving Mar 26 15:40:14 <_Atom_> android studio issue? Mar 26 15:43:39 _Atom_: hey Mar 26 15:43:41 _Atom_ Mar 26 15:43:45 close AS Mar 26 15:44:05 delete the build directory in your root project directory and then go into each of your modules and remove the build direcotry Mar 26 15:44:19 normally you have one default module called "app" Mar 26 15:44:35 then start up AS and load the project again Mar 26 15:45:31 This is puzzling because AS has autocompletion of all of the mockito stuff Mar 26 15:46:46 <_Atom_> thanks Mar 26 15:55:24 this looks pretty cool https://github.com/GIGAMOLE/ArcProgressStackView Mar 26 15:55:47 I have this in the android monitor when running my unit tests Mar 26 15:55:49 I/MonitoringInstrumentation: No JSBridge. Mar 26 15:56:00 problem is though, there is almost no good reason to use radial guages in data visualization.. looks nice but isn't good Mar 26 15:56:11 even if I comment out the espresso line in my build.gradle Mar 26 15:56:26 java.lang.ClassNotFoundException: android.support.test.espresso.web.bridge.JavaScriptBridge Mar 26 16:06:17 RustyShackleford, clean your build Mar 26 16:06:30 treid a clean and invalidated Mar 26 16:06:36 I suppose I can try again Mar 26 16:12:00 Oooooh, testCompile is just for unit tests? Mar 26 16:12:18 yeah Mar 26 16:12:28 and androidTestCompile for instrumentation tests Mar 26 16:12:35 Oh, that's what causes it Mar 26 16:12:40 Thank you! Mar 26 16:12:54 lol had an error for like 3 days that was due to writing testCompile when I meant androidTestCompile haha Mar 26 16:17:06 I don't get this. I'm not using espresso Mar 26 16:17:23 java.lang.ClassNotFoundException: android.support.test.espresso.web.bridge.JavaScriptBridge Mar 26 16:17:32 can't find anything on google either Mar 26 16:42:58 hey Mar 26 16:43:31 I was wondering if it is a good idea to use application context instead of acivity context Mar 26 16:43:37 in cursor adapter Mar 26 16:43:51 or every other place which doesn't depend on activity life cycle Mar 26 16:44:14 or doesn't depend on activities Mar 26 16:48:00 paresh your cursor is usually bound to the lifecycle of the UI anyhow ... Mar 26 16:49:17 yes Mar 26 16:50:29 Is Mockito broken on Kotlin or something? Mar 26 16:53:55 is there a dif between an action bar and a tool bar? Mar 26 16:53:59 which should I use? Mar 26 16:55:51 tool bar Mar 26 16:55:55 IrishGringo there are really 3; App Bar, Action Bar, and Toolbar Mar 26 16:56:08 AppBar is the concept, which can be either actionBar or toolbar Mar 26 16:56:29 so which should I be using? Mar 26 16:56:33 most often, you will probably use Toolbar and then use setSupportActionBar() or something Mar 26 16:56:57 that makes sure your fragment options menu show up Mar 26 16:57:15 looks like AppBar is the newest stuff Mar 26 16:58:05 yes app bar Mar 26 16:58:10 the newest Mar 26 16:58:29 App Bar is just term in the material design language Mar 26 16:58:34 there is no class for it Mar 26 17:00:09 Hey people is it possible to add GridLayout in RelativeLayout? Mar 26 17:00:28 Now i don't want gridlayout to be in the whole screen. only small part. because i want to add 2 things in one row Mar 26 17:00:50 g00s yeah but you still need to include Toolbar in your layouts :P Mar 26 17:01:31 I should read before posting Mar 26 17:02:36 2 things in one row.. use linear layout - horizontal Mar 26 17:03:54 muthu, The thing is other stuff may arranged in different way. Does it matter? or should i grap layout inside layout etc.. Mar 26 17:03:54 ? Mar 26 17:04:25 ya.. nest them Mar 26 17:07:00 I guess I'll make my own mocks! Mar 26 17:08:24 Another question, I'm creating a Spinner with "Months" items, by default it will be "January" as first item. Now when user client any another item. an image will be edited (month text image). This i know how to do. But how about default value? Mar 26 17:08:42 for January will be default, Should i set image source on onCreate() ? Mar 26 17:09:26 or in activity_main.xml ? set the default src there and change it via code later? Mar 26 17:09:48 yea Mar 26 17:16:23 multi-user question: is there a way to check whether the current user is in the background? Mar 26 17:18:25 Another question, how to limit "ListView" height? Mar 26 17:27:30 What's up all I need some guidance I don't think I"m doing something in the right way. Mar 26 17:27:43 I need 2 string pairs that I'm requesting through volley. Mar 26 17:27:52 via volley Mar 26 17:28:35 but the response is not coming in when i need it so the variable that holds the response is null Mar 26 17:28:44 huh Mar 26 17:29:30 How do you prevent double clicking on a button but enable the button to be clicked after x amount of time? Mar 26 17:29:39 http://pastebin.com/xBtUFC2u Mar 26 17:29:43 look at line 62 Mar 26 17:29:46 I'm not using an onClickListener, I'm just calling a method after a button is clicked Mar 26 17:29:58 That is the variable I'm trying to request from volley Mar 26 17:30:52 nvm I think i figured it out. Mar 26 17:31:07 glad to be helpful Mar 26 17:35:38 Nevermind, figured out the best way to do it lol Mar 26 17:35:47 Pretty simple and annoyed it took me so long Mar 26 17:35:58 hm? Mar 26 17:36:08 rubber duck debugging as its finest Mar 26 17:38:24 Any idea why this doesn't find the snackbar? https://gist.github.com/autrilla/e8c32d4cca74f51039c3#file-foo-kt-L15-L17 Mar 26 17:49:47 Guys i've problem setting "EditText" with "GridView" in same line in LInearLayout Mar 26 17:50:05 http://pastebin.com/FHd1pTa4 Mar 26 17:50:46 oh my bad Mar 26 17:50:50 so what the problem Mar 26 17:50:55 it's set to vertial it should be hori Mar 26 17:51:14 so problem solved? Mar 26 17:51:18 yes Mar 26 17:51:26 wee im so helpful today Mar 26 17:51:34 haha Mar 26 17:51:35 lol Mar 26 17:51:36 Rubber duck again Mar 26 17:51:53 My problems rarely get solved by doing that, I just find an alternative :( Mar 26 17:52:27 Mockito broken? -> Let's make our own mocks, manually. Espresso can't find the snackbar? -> let's not check that at all! Mar 26 18:04:35 Wondering i've ArrayAdapter if i set the array items like this new String[] {"one", "Two"}; it works but if i get this array from function it's cause the application error Mar 26 18:06:39 Solved :P Mar 26 18:14:40 Any Realm users here? Mar 26 18:17:34 I'v used it on iOS. Mar 26 18:30:35 guys if i want update listView items. Should i attach new adapter? like listview.setAdapter() ? and that will change them Mar 26 18:30:42 consdering new adapter created Mar 26 18:30:55 You should modify the items and notify that the dataset has changed Mar 26 18:34:33 pfff i hate execptions Mar 26 18:36:06 then handle all exceptional conditions and you won't get exceptions Mar 26 18:36:22 I have java 7 on my system... but someone sent me test code that i think wants JAVA 8... I'm on a MAC el capitan... so should I install java 8? Mar 26 18:37:58 how is this android Mar 26 18:40:57 how is not? Mar 26 18:41:23 it plain isn't Mar 26 18:41:26 i'm a iPHONE developer... just trying to learn some new tricks... Mar 26 18:41:58 I cant get some sample code to compile... and I think it is becuase of the above... just asking for advice Mar 26 18:42:51 you won't find it here, unless you ask an android question Mar 26 18:45:32 typically for signing into app with GoogleApiClient - people make a SignInButton people press and then choose account to login Mar 26 18:45:39 is there anyway to skip the button press requirement? Mar 26 18:46:04 not really, for security reasons Mar 26 18:46:06 and just pop open the "choose account for [app]" box automatically when user launches for first time? Mar 26 18:46:09 ahh Mar 26 18:46:09 ok Mar 26 18:47:00 Kinda stuck with an issue I'm having with one particular network request. Using OkHttp the request takes like 5 seconds, making the request on desktop or on iOS via AF networking the request is completed in like 200ms. My OkHttp LoggingInterceptor tells me the request is only taking ~150ms, but something else beforehand must be slowing it down. Mar 26 18:47:50 So, when I try to complie.. I get an error... Unable to find a JDK 8 - Lambdas, type annotation etc. installed. After configuring a suitable JDK in the Project Structure" dialog ... not sure what they are asking of me... Should I install Java 8, or can I adjust something? Mar 26 18:48:07 IrishGringo: seriously, that does not belong here. Ask in ##java or whatever Mar 26 18:51:09 eghdk, what does traceview show? Mar 26 18:52:21 Mavrik: Any preference between the traceview in ADM or the one method profiler in AS? Mar 26 18:52:53 Use both. Mar 26 18:52:58 They don't show the same thing. Mar 26 18:56:16 Anybody know why I would get an IO Error -> http://pastebin.com/Pv79cKnS Mar 26 18:56:46 Mavrik: So I just used the one in AS. Navigated to the thread that does the work. Anything specific that I'm looking for? Am I looking something that goes far down? Mar 26 18:57:23 Well in this case you used the wrong one ;) Mar 26 18:57:34 You're trying to track what's going on through your request remember? :P Mar 26 18:57:43 So bring up traceview which shows all the treads in sequence Mar 26 18:57:52 And find what's going on as your request is triggered. Mar 26 18:58:24 Okay, let me use the one in ADM really quick and let you know what looks like it's taking long. Mar 26 19:01:33 DLSteve, You familiar on iOS? Might be a similar use-case Mar 26 19:01:40 DLSteve, With Realm that is Mar 26 19:02:05 NoirAvlaa, Yah Mar 26 19:02:33 Wondering if it's possible to create from json with onetomany Mar 26 19:03:42 NoirAvlaa, It's possible. You would need to write something that would map the JSON to the entities. Mar 26 19:03:43 I have nested json and currently realm is only taking the top object, none of the nested objects Mar 26 19:03:48 Right Mar 26 19:06:16 NoirAvlaa, Let me look someing up real quick Mar 26 19:06:16 Mavrik: This stuff is hard to parse. hahaha. I'll keep pushing my way through it though. Hope it doesn't lead me down the wrong path. Mar 26 19:11:59 NoirAvlaa, It's kinda hard to explain how to do it. Can you read objective C code? Mar 26 19:12:10 I can try :p Mar 26 19:12:43 Mavrik: I have a 300ms OpenSSLSocketImplSSLInputStream.read, but everything else that's taking like 3 seconds seem to be SQLIteStatement.execute calls. Mar 26 19:14:24 NoirAvlaa, I used this to seed my db for testing but it should be similar to mapping JSON https://gist.github.com/DLSteve/812ebb274b99f1ada471 Mar 26 19:15:25 Looks like you went up the tree and went through a for loop at each array?> Mar 26 19:15:37 yah Mar 26 19:16:02 Fair, was hoping I wouldn't have to do that really but oh well, needs must Mar 26 19:16:15 Anybody know why I would get an IO Error -> http://pastebin.com/Pv79cKnS Mar 26 19:16:39 Yah i'm not sure if that is the best way to do it but it was just for seeding the DB. Mar 26 19:17:07 It's not a massive DB so it shouldn't be an issue Mar 26 19:17:23 Will just call it async on a loading screen instead I guess, app is fully offline and it's loading from a file Mar 26 19:18:24 NoirAvlaa, Actually look at this https://github.com/realm/realm-java/pull/489 Mar 26 19:19:35 yeah that's what I'm using atm Mar 26 19:20:22 Are you using Realm.createAllFromJson()? Mar 26 19:20:32 sigh... could anyone please check my error.. The googles do not seem to come up with anything usefull and I have used that piece of code before -> http://pastebin.com/Pv79cKnS Mar 26 19:21:13 DLSteve, Realm.createObjectFromJson Mar 26 19:21:37 The problem I'm having is the json is just 1 object which contains arrays inside it Mar 26 19:21:45 NoirAvlaa, CreateAll is probably the one you want https://realm.io/docs/java/latest/api/io/realm/Realm.html#createAllFromJson-java.lang.Class-java.lang.String- Mar 26 19:22:10 DLSteve, So I can't use create all as that requires a jsonarray, which I don't have Mar 26 19:23:10 Ah ok :( Mar 26 19:23:35 Thanks though, I may be able to find a way around it Mar 26 19:23:53 Like, pull the arrays out of the file seperately into other input streams and then save them Mar 26 19:24:02 You might have to manually map it then. Mar 26 19:24:07 Yeah looks like Mar 26 19:24:18 Thanks though, got me thinking of another way Mar 26 19:24:38 np :) Mar 26 19:26:20 Is this application only development? I am just trying to get some help with compiling android Mar 26 19:26:58 Yes, just application development Mar 26 19:27:16 Damn Mar 26 19:27:22 compiing android? Mar 26 19:27:25 like rom? Mar 26 19:27:36 look for #android-root Mar 26 19:27:41 Pretty much. More like fixing issues Mar 26 19:27:52 I did Ashiren, not many people are active in there Mar 26 19:27:58 aww Mar 26 19:28:20 Its alright Mar 26 19:28:37 I am a noob. Just looking for help. Mar 26 19:28:51 what can they do for you Mar 26 19:29:20 hello Mar 26 19:29:54 happy Caturday Mar 26 19:33:08 guys, http://pastebin.com/6kZcedW5 Toast shows "Female" but if i uncomment "setImageResource" that cause an error ! Mar 26 19:33:10 any ideas ?! Mar 26 19:33:24 hello Mar 26 19:34:02 I've got a .smali file (from SystemUI) Mar 26 19:34:51 This file contains two .imolements line in place of one Mar 26 19:35:44 I don't understand how this is possible in java programming language Mar 26 19:35:57 I mean, declaring a class Mar 26 19:36:02 Any ideas? Mar 26 19:37:02 xdevnull: what kind of error Mar 26 19:37:27 java.lang.RuntimeException: Unable to start activity ComponentInfo, I've changed the line to gen.setImageDrawable(getResources().getDrawable(R.drawable.male)); Mar 26 19:37:44 is gen null Mar 26 19:39:07 xD Mar 26 19:39:11 Ashiren, <3 Mar 26 19:39:41 Reading the full stacktrace would have told you that.. A protip is to not stop after the first line Mar 26 19:40:03 eeyup Mar 26 19:40:26 cristian_c: Try #smali if you need help with the smali format.. Other than that, this channel is not for decompiling the system Mar 26 19:46:15 someone mind checking this out: http://stackoverflow.com/questions/36191636/play-looping-audio-using-audiotrack Mar 26 19:46:53 Ashiren, I'm newibe in android, I have watched some videos. They use "Eclipse" but i'm wondering some functions doesn't have the same headers as the videos Mar 26 19:46:59 is it cuz of JDK ? Mar 26 19:50:21 hm? Mar 26 19:51:07 what do you mean Mar 26 19:51:17 also eclipse is so last week Mar 26 19:55:07 Can you make a layout element take as much space as it can, without stepping over other elements? Mar 26 19:56:01 yes Mar 26 19:56:07 look for linearlayout and weight Mar 26 19:57:37 i have an app/test app version conflict Mar 26 19:57:57 with android-support-annotations Mar 26 20:19:26 anyone have good examples of a card-style UI? Mar 26 20:19:39 all the blogs + google examples have been extremely confusing Mar 26 20:20:07 for this: https://developer.android.com/training/material/lists-cards.html Mar 26 20:20:12 they say "creating lists and cards" Mar 26 20:20:18 are cards supposed to be in a list? Mar 26 20:20:31 sometimes Mar 26 20:21:05 you can put them wherever you want though Mar 26 20:22:34 recyclerview plx Mar 26 20:23:00 Can someone help me with GSON? I am having trouble parsing Date Mar 26 20:25:01 Here's how I am doing it [http://dpaste.com/1MFYA6K] Mar 26 20:27:26 Should I register a custom deserializer for Date type objects? Mar 26 20:28:30 You got the "here's what I'm doing" part covered, should probably add the "here's what happens" part Mar 26 20:31:32 Error: Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatButton cannot be cast to com.google.android.gms.common.SignInButton Mar 26 20:31:33 * triggered by: SignInButton signInButton = (SignInButton) findViewById(R.id.sign_in_button); Mar 26 20:31:33 * but the R.id.sign_in_button is of type "com.google.android.gms.common.SignInButton" Mar 26 20:33:05 hmm - no more error after I pressed "compile" a few more t imes Mar 26 20:33:13 or rather "run app" Mar 26 20:34:04 this is so frustrating. I cannot solve this error after 3 days Mar 26 20:34:06 Build > Clean project solves issues like that Mar 26 20:34:20 ava.lang.ClassNotFoundException: android.support.test.espresso.web.bridge.JavaScriptBridge Mar 26 20:34:48 happens whether or not I include espresso in build.gradle Mar 26 20:34:51 thx SimonVT Mar 26 20:34:53 sometimes it's the contrary (lol), errors shown after pressing run -__-' Mar 26 20:34:58 some transitive depency must be screwed up Mar 26 20:35:14 idk why they change the build process to do 3/4 of the job before run, and remaining 1/4 when you press run Mar 26 20:35:28 gradle warns me of a app/test-app version conflict unless I include Mar 26 20:35:30 ndroidTestCompile 'com.android.support:support-annotations:23.1.1' Mar 26 20:36:51 one of the cool things about jigsaw is letting you use different versions of the same library - no conflicts needed Mar 26 20:37:06 SimonVT: I don't know whats happening, GSON just gives me a null date object, how do I figure out whats happening? Mar 26 20:37:16 Maybe Android will see that by 2025 Mar 26 20:37:46 Even that is relevant information for whoever can help you, astroduck Mar 26 20:38:08 You can't just paste some code and ask why it doesn't work without telling in what way it doesn't work Mar 26 20:38:23 if i show a floating activity, is there any way to give it elevation / shadow ? it dims the background but kinda looks like poop Mar 26 20:38:31 SimonVT: Oh, oops, sorry Mar 26 20:39:19 i'm doing the store listing and forgot to spoof the avd name (sdk_google_aw_x86) into something better: https://imgur.com/a/7dM9X an Mar 26 20:40:06 astroduck: lemme see the response your getting in your network call Mar 26 20:40:16 hm looks like i can set window elevation Mar 26 20:40:43 that or you could use a dialogfragment Mar 26 20:42:22 orbyt_: Here's the json: http://dpaste.com/398J8TC and here's my model http://dpaste.com/1BNH3MJ Mar 26 20:43:45 astroduck: are the other values with underscores in their name null as well Mar 26 20:44:55 grr I hate configuring builds Mar 26 20:45:27 orbyt_: No, only releaseDate is null Mar 26 20:45:40 no idea why this class isn't being found. No compile errors/warnings just a runtime ClassNotFoundException that may or may not matter Mar 26 20:46:14 adq do dialog fragments behave with setRetainInstance(true) ? Mar 26 20:46:27 dialogs always seems like such hacky crap Mar 26 20:50:53 g00s, i think they should but I rarely used them so not sure Mar 26 20:51:11 there's a long running bug from like 15 years ago ... Mar 26 20:51:19 _a_? :) Mar 26 20:52:18 ok just implemented auto night mode in my app, will be awaiting sunset with great anticipation Mar 26 20:52:40 you could also change the time and not wait! Mar 26 20:52:49 will appcompat succeed? stay tuned ! Mar 26 20:52:50 but I guess that breaks the suspense Mar 26 20:52:53 autrilla_ :D Mar 26 20:52:59 probably break the whole tablet Mar 26 20:54:06 `date' Mar 26 20:54:10 it should not break anything Mar 26 20:54:28 except the suspense as said autrilla_ :) Mar 26 20:54:35 careful man, we just had daylight saving time ... Mar 26 20:54:40 g00s: Are you using the new day/night thing? Mar 26 20:54:45 orbyt_ yeah Mar 26 20:55:02 g00s: Cool, was going to implement that in one of my apps soon, let me know how it goes. Mar 26 20:55:07 i filed a bug, that when you set the mode it doesn't cause a configuration change Mar 26 20:55:12 thats like, the WHOLE POINT Mar 26 20:55:22 should be fixed in next release Mar 26 20:55:39 I filed one for it as well, something small but they fixed it in like a day Mar 26 20:59:51 i don't understand how to read gradle's dependency graph Mar 26 20:59:52 \--- junit:junit:4.11 -> 4.12 (*) Mar 26 21:00:20 i'm guessing it means it depends on junit > 4.11, and we have 4.12 Mar 26 21:00:50 yes Mar 26 21:01:06 asked for -> resolved to Mar 26 21:01:24 is there like a cheat sheet? Mar 26 21:01:44 lines start with +, \, and | Mar 26 21:01:51 must mean something as well Mar 26 21:02:02 it draws a tree Mar 26 21:02:04 lol Mar 26 21:04:12 http://pastebin.com/znYykD5v Mar 26 21:04:34 does anything jump out as being incorrect? I can sync with no errors Mar 26 21:04:39 compile with no errors or warnings Mar 26 21:05:43 I/MonitoringInstrumentation: No JSBridge. java.lang.ClassNotFoundException: android.support.test.espresso.web.bridge.JavaScriptBridge Mar 26 21:06:01 google is not really helping here Mar 26 21:08:37 Are you trying to use espresso web? Mar 26 21:08:45 Because otherwise that error isn't a problem. Mar 26 21:09:53 nope Mar 26 21:10:00 okay then I won't worry about it Mar 26 21:10:31 I would only need that for ui testing on WebViews? Mar 26 21:19:48 whoever recommended trello yesterday, thanks Mar 26 21:19:54 :D Mar 26 21:20:03 can't integrate it with my git repo for free unfortunately Mar 26 21:20:08 but it will be replacing google keep for me Mar 26 21:20:19 lol google keep is a toy Mar 26 21:20:33 it works okay. But I have wayyy to many items Mar 26 21:21:04 I had tried evernote in the past and didn't really like it Mar 26 21:21:17 I'm going to be organized as fuck now Mar 26 21:21:18 oh yeah, that unicorn ... Mar 26 21:21:32 didn't try evernote because they required an account Mar 26 21:21:50 even if you had no plans of syncing anything Mar 26 21:21:55 or using any cloud stuff Mar 26 21:23:02 I just signed up with trello through gmail Mar 26 21:23:34 I don't see the point of a todo list that doesn't sync to the cloud Mar 26 21:24:31 for me, it had to do with putting all my stuff in some proprietary thing Mar 26 21:24:51 I pick my battles Mar 26 21:24:52 and given how evernote is doing atm, it was a prescient decision Mar 26 21:25:05 I'm find with todo lists being in the cloud Mar 26 21:25:11 and lots of my documents Mar 26 21:25:16 no facebook for me though Mar 26 21:25:40 social media in general. I don't want people snooping around my profile and photos, watching who I talk to Mar 26 21:26:25 i wish it were that easy ... Mar 26 21:26:49 but pretty much everyone is asking themselves how they can be like google, collecting information form every area of your life Mar 26 21:26:57 whether car insurance or whatever Mar 26 21:27:24 I think I'll need one more todo list that doesn't sync to the cloud Mar 26 21:27:34 probably don't want my List of People to Kill in Trello Mar 26 21:28:42 Tbh Trello + Keep is enough for pretty much anyone Mar 26 21:28:57 Keep for small personal lists, trello for everything else Mar 26 21:29:13 If you're looking for something more, you need to rethink your lists :P Mar 26 21:29:21 RustyShackleford there is also a book on personal kanban - i haven't read it Mar 26 21:29:34 kanban is awesome Mar 26 21:29:42 Anyone having issues with stacktraces pointing to wrong lines in android studio? Mar 26 21:29:58 Using 2.1 preview 4 Mar 26 21:30:08 I really like being able to prioritize tasks Mar 26 21:30:09 Seems flaky as hell, might go back a few builds Mar 26 21:30:23 * g00s still using 1.5 Mar 26 21:31:16 Yeah, might go back to 1.5, or see if I can roll back to 2.0 Mar 26 21:31:47 2 has some nice things over 1.5, but when the line number in stacktrace is wrong it's not exactly ideal. Mar 26 21:35:56 Normal AS channel is "Stable" right? Mar 26 21:36:55 "Stable" Mar 26 21:37:13 "..." Mar 26 21:38:17 Lol Mar 26 21:38:32 Fair Mar 26 21:38:33 :p Mar 26 21:43:57 huh, there's no reason line numbers wouldn't match in 2 Mar 26 21:44:50 a Mar 26 21:45:05 Is there something I should know about runOnUIThread from inside another Thread? Mar 26 21:46:38 pfn, I've had it a few times Mar 26 21:47:02 pfn, As far as I can tell, the build isn't being cleaned and is the logcat is referencing a previous build of the app Mar 26 21:47:08 No idea why Mar 26 21:47:25 * pfn shrugs crappy instant run Mar 26 21:47:47 Yeah Mar 26 21:48:00 Basically Mar 26 21:48:02 Haha Mar 26 21:48:13 it's sad that the normal javac to dex toolchain is not getting the love Mar 26 21:48:31 jack/Jill are a terrible solution Mar 26 21:50:10 the only good thing about it is being able to obviate the proguard step Mar 26 21:50:36 but that win is far outweighed by the loss of flexibility Mar 26 21:50:52 eg, instant run isn't even possible on it at the moment Mar 26 21:51:00 there have to be multiple important reasons why google went that way though Mar 26 21:51:06 maybe not even technical Mar 26 21:51:36 yes, perhaps related to ditching javac and the jvm class format as much as possible Mar 26 21:53:08 pfn, to hell with instantrun, bytecode and source processors don't work :) Mar 26 21:53:08 For some reason my SwipeRefreshLayout looks... weird when refreshing Mar 26 21:53:28 It's like, very laggy. The wheel doesn't even show up most of the time Mar 26 21:58:15 autrilla_ dunno, mine looks fine :D Mar 26 21:59:03 I have no idea what I could be doing wrong, I set isRefreshing to false when my RxJava observable is done Mar 26 21:59:30 profile then i guess Mar 26 21:59:40 autrilla_, you're blocking the main thread with something it seems Mar 26 21:59:42 How can I give something to runOnUiThread from this -> http://pastebin.com/Ez75X1cV Mar 26 22:00:02 Mavrik: well I'm observing on the main thread Mar 26 22:00:16 I have to, considering I make changes to the UI? Mar 26 22:00:29 make sure you subscribe on a non ui thread Mar 26 22:00:46 I'm subscribed on Schedulers.newThread(), so.. Mar 26 22:00:53 i haven't touched my rx stuff in months, starting to forget how it worked :P Mar 26 22:01:15 hey guys, anyone ever have an issue where their datagramsocket has port -1? Mar 26 22:01:17 https://gist.github.com/autrilla/83f2a9af4b9c1c88fc79 this probably helps Mar 26 22:01:24 autrilla_, run the profiler. Mar 26 22:01:29 See what's going on on main thread. Mar 26 22:01:33 Do. Not. Guess. Mar 26 22:02:07 who? Mar 26 22:02:14 if i call DatagramSocket socket = new DatagramSocket(); and using the debugger i see that it has port -1 Mar 26 22:02:16 any thoughts? Mar 26 22:02:26 Mavrik do you use any rx wrapper for sqlite, like rxloader, etc ? Mar 26 22:02:43 g00s, not at this time Mar 26 22:02:46 or the other ones, sqlbrite Mar 26 22:02:47 Mavrik: what am I looking for Mar 26 22:02:48 ok thx Mar 26 22:02:55 Mavrik what do you mean the profiler? Mar 26 22:03:03 I've got the profiler trace Mar 26 22:03:14 nvm... Mar 26 22:03:23 indicates its not connected... Mar 26 22:03:54 Nottapesahc, what's the confusion? Mar 26 22:03:59 -1 is a placeholder. Mar 26 22:04:17 no, it indicates its not connected. Mar 26 22:04:20 markyosullivan, CPU profiler (there's 3 different available, any will show the issue) Mar 26 22:04:27 Nottapesahc, what do you mean connected? Mar 26 22:04:29 It's UDP. Mar 26 22:04:30 http://developer.android.com/reference/java/net/DatagramSocket.html Mar 26 22:04:49 It looks like the RxJava stuff is being executed on other treads, not the UI thread Mar 26 22:05:06 okay, so how do i send a listener a message if i dont have a specific port to send it to? Mar 26 22:05:20 autrilla_ there is a little rx library that decorates the rx pipeline with logging stuff Mar 26 22:05:24 Mavrik: Are you talking about the tool to track CPU performance within AS? Mar 26 22:06:16 autrilla_, so what's blocking the main thread? Mar 26 22:06:44 Mavrik: android.os.MessageQueue.next is taking 1.5s Mar 26 22:06:46 Nottapesahc, what does getLocalPort() say? Your datagramsocket should be bound on a port selected by network stack Mar 26 22:07:05 (including subcalls) Mar 26 22:07:10 autrilla_, hmmm, is that a Kotlin construct? Mar 26 22:07:20 main thread should have draw spikes every 16ms Mar 26 22:08:37 pfn do you know how to give a floating activity a shadow? i tried getWIndow().setElevation() but that didn't do anything Mar 26 22:09:06 Mavrik: trying now Mar 26 22:09:14 Mavrik: possibly. The spikes you're talking about stop for a while Mar 26 22:09:31 yp, that means Android stopped rendering and you dropped frames Mar 26 22:09:41 Figure out what's running in between that blocked it. Mar 26 22:10:13 so if you want to display a list of cards is the following good in terms of nesting?: Mar 26 22:10:13 * LinearLayout => RecyclerView => {CardView1, CardView2, ... CardViewX} Mar 26 22:10:30 Hey! I'm sure this question comes up a lot but how do I use a ListView with simple_list_item_2 and an ArrayAdapter? Mar 26 22:10:31 the google samples they're putting cardview in LinearLayouts Mar 26 22:10:42 autrilla_, also it looks like you call observeOn too early. Mar 26 22:10:59 No need to run flatMaps on main thread. Mar 26 22:11:03 invapid, doesn't matter mate tbh Mar 26 22:11:24 invapid, just depends on how you want to position the recyclerview Mar 26 22:11:36 NoirAvlaa: so If I was dynamically generating Cards I could just add to a recylerview? Mar 26 22:11:49 I have an ArrayAdapter with the getView method overridden as described here; http://stackoverflow.com/questions/11256563/how-to-set-both-lines-of-a-listview-using-simple-list-item-2 but I get a nullpointerexception.. Mar 26 22:12:07 i = findViewById(RecyclerView), and then use i to add CardViews Mar 26 22:12:07 marvrik: thanks a lot! i got the port... not sure why its showing up as -1 in the debugger. Mar 26 22:12:14 invapid, Yeah, just define the layoutmanager correctly and create the adapter properly and the parent layout of the recyclerview doesn't make a different Mar 26 22:12:19 Mavrik do you have any recommendations a guide which describes how to use the profiler and what to look out for? Mar 26 22:12:32 ahh, thx NoirAvlaa Mar 26 22:12:41 Nottapesahc, because it's not selected (or held) by Java. It's chosen by the underlying networking stack and it's not kept as a variable :) Mar 26 22:12:45 Just got another message about too much on main thread skipping frames or something Mar 26 22:12:50 Mavrik: aha! Mar 26 22:12:57 invapid, RecyclerView is similar to a ListView, in that it's just a container for an array of objects Mar 26 22:13:01 wait, no, false hope Mar 26 22:13:17 autrilla_, remember that observeOn switches threads from that point onward :) Mar 26 22:13:25 You supply a LayoutManager to it, then create an adapter and a holder for each item you want in it Mar 26 22:13:31 markyosullivan, this helps a bit Mar 26 22:13:32 https://developer.android.com/tools/performance/index.html Mar 26 22:13:43 markyosullivan, http://www.curious-creature.com/docs/android-performance-case-study-1.html Mar 26 22:13:49 Mavrik many thanks! Mar 26 22:13:50 and http://www.curious-creature.com/2015/03/25/android-performance-case-study-follow-up/ Mar 26 22:14:08 traceview is the most useful for these things in my experience Mar 26 22:14:12 You the man! :D Mar 26 22:14:26 development is fun Mar 26 22:14:38 I like personal projects, I call all the shots Mar 26 22:19:05 g00s, nope, elevation confuses me, there might be a view bounds you need to set Mar 26 22:19:33 Mavrik, works with protify :p Mar 26 22:19:46 Mavrik, bytecode and source processors Mar 26 22:19:58 M? Mar 26 22:20:02 I was talking about jack/jill Mar 26 22:20:16 Not instant run, that's a minor annoyance. Mar 26 22:20:22 Not being able to compile tests is a bit bigger :P Mar 26 22:25:44 Mavrik: I simplified it to https://gist.github.com/autrilla/de88bde5fe84f18a5767, which still seems to block the main thread Mar 26 22:26:03 Did you look at what is blocking the main thread? Mar 26 22:26:41 android.os.Handler.dispatchMessage :/ Mar 26 22:27:52 and did you follow the stack? Mar 26 22:27:59 Woah, now it's showing properly. Mar 26 22:28:06 Sometimes it does that Mar 26 22:28:10 So it's racy somehow Mar 26 22:30:18 Mavrik: I don't think anything is blocking the main thread, tbh Mar 26 22:30:26 That's not true. Mar 26 22:30:31 I can still switch input fields and so on while it's supposedly blocked Mar 26 22:30:33 Otherwise you'd get UI rendered. Mar 26 22:31:22 and it is rendered Mar 26 22:34:14 Working on my own tool to receive, process and analyse crash reports now. Mar 26 22:34:39 Cause acralyzer is comically bad, and all others are either closed source or hard to extend with the functionality needed. Mar 26 22:36:10 Being able to say "show me all lines of code with bugs that have more than 5 reports from different people each" is pretty awesome Mar 26 22:36:48 Or seeing "all users who reported this bug were using a Samsung Galaxy S7" Mar 26 22:37:39 hm, Netty in Action is 50% from manning today Mar 26 22:38:44 Mavrik: okay this was dumb Mar 26 22:38:51 Mavrik: indeed, I was not blocking on the main thread Mar 26 22:39:09 Mavrik: SwipeRefreshLayout expects its child to be scrollable Mar 26 22:39:10 yay :) Mar 26 22:39:39 autrilla_ strict mode didn't give any hints ? Mar 26 22:39:51 what's strict mode? Mar 26 22:40:30 I was confused because usually when frames are dropped it shows up in logcat Mar 26 22:52:28 "A demolition company has leveled the wrong housing duplex after one of its employees was misled by a Google Maps error." Mar 26 22:52:30 :O Mar 26 22:56:20 is it possible to invoke APK install intent via shell command on device? Mar 26 22:56:20 do you dev on a laptop or a desktop? Mar 26 22:56:32 i've been experimenting with various commands such as: am start -a android.intent.action.VIEW -t application/vnd.android.package-archive -d /sdcard/apkname.apk Mar 26 22:56:36 there are times where I would like to have two instanses of AS Open Mar 26 22:56:43 well, two projects I guess Mar 26 22:56:52 anyway my laptop cannot always handle it Mar 26 22:56:58 g00s, link? Mar 26 22:57:07 ^ http://news.softpedia.com/news/company-demolishes-wrong-housing-duplex-after-google-maps-error-502188.shtml Mar 26 22:57:40 korst3n, let me check some source, i made (unreleased) an app called apkdawg Mar 26 22:57:58 and i managed to install an apk from an apk in apk Mar 26 22:58:10 iirc there was a confirmation for the user to validate though Mar 26 22:58:11 adq: i know it's possible through an APK, but I only have access to shell commands unfortunately Mar 26 22:58:20 ahh then "pm install" Mar 26 22:58:54 adq: that results in "Error: java.lang.SecurityException: Neither user 10153 nor current process has android.permission.INSTALL_PACKAGES." Mar 26 23:00:26 well, if you launnch pm via adb "on the other side", you should be granted modulo some device where you need to enable the developer option to allow unsecure source Mar 26 23:00:28 which is weird, i'm not attempting to install apk silently, nothing shady going on :) Mar 26 23:00:58 adb install yourapkpath from your computer linked to your android device Mar 26 23:01:35 but this will be on the device itself Mar 26 23:02:02 i doubt it's possible without priviledge or via a crafted intent which is not commandline Mar 26 23:02:42 though you can run intent via commandline but i don't remember exactly how, i used something like that in my intent: intent.setDataAndType(Uri.fromFile(new File(path)), "application/vnd.android.package-archive"); Mar 26 23:02:52 but the user has to touch the screen to accept Mar 26 23:03:54 exactly - i'm trying to find a way to invoke that intent from shell Mar 26 23:04:51 maybe install an intent sniffer, see what is going on and try to fill the fields of am according to what you saw Mar 26 23:05:06 this is a bit beyond android development tbh Mar 26 23:05:13 why do you even need to do that? :) Mar 26 23:06:16 that sounds like a great idea, thanks! Mar 26 23:06:37 i've never looked AIDE, so idk if they are able to do it, but i would assume if they allow you to develop on android device for android Mar 26 23:06:49 they might have one or two tricks to launch an apk built on the same device too Mar 26 23:06:53 i'm not sure how i'd explain that without breaking NDA Mar 26 23:06:56 so that's another way to dig maybe Mar 26 23:08:01 ok nevermind then, just ping me in case you manage to do it with `am' itself, always curious :) Mar 26 23:09:27 adq: sure thing! :) Mar 26 23:09:49 RustyShackleford: both Mar 26 23:09:54 On my laptop, it's unbearable Mar 26 23:10:47 But it seems like the latest versions of android studio have made the build process much faster Mar 26 23:12:20 I just need to watch how many chrome tabs I open Mar 26 23:12:32 its plenty responsive for now. Mar 26 23:12:42 I could probably upgrade the ram and be good for a while Mar 26 23:13:00 2 year old cheap dell with an SSD I installed myself Mar 26 23:59:30 anyone use MockWebServer? Mar 26 23:59:58 the lack of info online makes me feel like I might be implementing test cases incorrectly Mar 27 00:20:16 hrm. appcompat night mode auto doesn't seem to work for me Mar 27 00:36:04 hey guys, i have a thread that needs to accept udp replies from two different ports on a server. Is this possible? Mar 27 00:38:01 I receive the first packet just fine when it is listening on the first port but when i set the packet to the second port i never see replies. Mar 27 00:42:45 damn g00s Mar 27 00:43:10 i removed the auto option until thats fixed too :D Mar 27 00:45:34 Why can't I instantiate the TextToSpeech like this: http://pastebin.com/2VcX3cwR Mar 27 00:45:53 I get, OnInitListener is abstract and cannot be instantiated Mar 27 00:46:18 fuck I'm an idiot, one parenthesis too many at the end of that Mar 27 00:46:23 * cpt-oblivious facepalms Mar 27 00:46:38 why the hell do I spot that 3 seconds after I request help after being stuck on it for 15 minutes >.> Mar 27 00:47:45 bad IDE Mar 27 00:48:22 Android Studio Mar 27 00:51:08 can I have resources that are only part of the test app? Mar 27 00:51:32 not a debug build, but the instrumentation tests Mar 27 01:03:05 anyone know why an exception at line 102 is not being caught? http://pastebin.com/Q8XMSHgR Mar 27 01:05:09 because it's not an IOException? Mar 27 01:05:14 You're only catching IOExceptions Mar 27 01:05:30 no, i changed it to Exception like line 120 Mar 27 01:05:39 and it doesnt hit the Log.d at line 111 Mar 27 01:06:04 you would think that would be it...but even with generic exception it still doesnt catch it. very strange behavior. Mar 27 01:10:55 ideas- http://stackoverflow.com/questions/36191636/play-looping-audio-using-audiotrack Mar 27 01:31:00 friggin crap genymotion is nice! Mar 27 01:36:48 Ping_2_Ur_Pong: right? Mar 27 01:37:05 I never dev on a physical device anymore Mar 27 01:37:21 all the normal headache of waiting for the emulator to start running and the pixel perfect nature of it. Mar 27 01:37:28 * Ping_2_Ur_Pong humps genymotion. Mar 27 01:37:36 orbyt_, don't do it like that with loop points, instead continously feed the audiotrack buffer with bytes you control Mar 27 01:37:41 I use the stock emulator all day long at work. Its honestly unusable Mar 27 01:37:53 I'm trying to get some genymotion licenses Mar 27 01:40:19 can I have resources that are only part of the instrumentation test app? Mar 27 01:41:15 orbyt_, you have to write the correct bytes sequence in the buffer each time you pass it to audiotrack, seeing you are at 44kHz in stereo, imagine you want to loop a sound every seconds, that means you have to write every 88200 samples the bytes from whitenoise_wav, and if whitenoise_wav is shorter than a second, instead you write silence to continue to feed audiotrackbuffer Mar 27 01:41:46 if longer, you deal with it, cut it, crossfade it, whatever Mar 27 01:42:56 adq: the track is ~1:00 long. The 44kHz was simply used in every example i've look at, whether it is correct for my use case, im not sure. Mar 27 01:43:19 you should use the same samplerate and the same number of channels your wav file is Mar 27 01:44:01 otherwise you will hear pitch up or pitch down if samplerate mismatch, and bad crackling issue if the wav is mono (and will be played twice faster too) Mar 27 01:44:19 adq: yea im not generating the audio files, would have to check i guess. Mar 27 01:45:24 adq: is it simpler using a differing file type? I can use any of ogg, mp3, wav, etc.. Mar 27 01:45:45 nope and audiotrack only accept wav pcm data in few formats anyway Mar 27 01:47:15 so in summation, in my run() after calling play(), I just repeately call audioTrack.write()? Mar 27 01:47:45 yes but it's more tricky than that Mar 27 01:48:06 do the audiotrack play + looping audiotrack write in one thread Mar 27 01:48:17 and write inside the buffer you give to audiotrack in another Mar 27 01:48:41 imagine you have a buffer called "produced" that you continously give to audiotrack like [abcdefgh] [abdedfgh] [abcdefgh] ... Mar 27 01:49:16 now imagine the sound you want to loop is in a buffer like [xyz] Mar 27 01:50:06 you would write the buffer you give to audiotrack to make it like [xyzxyzxy][zxyzxyzx]etc.. this example was when your sound is shorter than the current buffer but you get the idea Mar 27 01:50:45 also take in account in stereo, samples are interleaved Mar 27 01:50:55 the example i gave above was for mono Mar 27 01:51:58 in stereo you would have [xL,xR,yL,yR,zL,zR,xL,xR] [yL,yR,zL,zR... Mar 27 01:52:12 (i kept the same buffer size, which was 8 bytes in the example) Mar 27 01:53:27 hope this will help you, you have to control what to put and where and always give something to audiotrack to eat before he finishes to consume what you gave previously Mar 27 01:53:38 right Mar 27 01:53:46 will look into trying that Mar 27 01:54:06 start with a mono sample, it will be easier for you to debug at first Mar 27 01:54:15 (and put audiotrack in mono if so) Mar 27 01:54:39 also keep in mind in 16bits, you should pass short (which are 2 bytes) Mar 27 01:55:09 Well end result i need 2 tracks playing simultaneously so mono would work fine regardless. Mar 27 01:55:14 so make sure you either pass short with 16 bits, or pass bytes if 8bits, this hasalso to match your wav file Mar 27 01:55:42 for mixing 2 tracks, it's the easiest thing to do Mar 27 01:55:51 you just use "+" on both sample values Mar 27 01:55:57 assuming you don't have to deal with clipping Mar 27 01:56:10 well i also need volume control on both streams so... Mar 27 01:56:17 this is what happens in real life too, sounds are summed together Mar 27 01:57:25 if you plan to do lot of operation on the sound, you will need to convert your shorts to floats, do your operations, and then convert it back from floats to shorts Mar 27 01:57:57 but then it's not anymore android dev, it's dsp :p Mar 27 01:58:15 well i was thinking just have 2 seperate audio tracks in different threads so i can just .setVolume() on each seperately Mar 27 01:58:18 would that not work? Mar 27 01:58:40 it should work, but you are limited in amount of audiotracks per device Mar 27 01:58:52 and this varies a lot across brands and models Mar 27 01:59:18 tried it with 2 AudioTrack instances in the same thread and got some weird results, even though started play on them both and wrote to both, 1 would only play after the other had finished Mar 27 01:59:28 also you will have sync issue Mar 27 01:59:47 you had this issue because write is a blocking operation (except in higher api) Mar 27 01:59:56 so in the same thread, this is expected Mar 27 02:00:00 which api? Mar 27 02:00:06 21+ iirc Mar 27 02:00:14 pretty sure im 21+, weird Mar 27 02:00:14 but again you will have hardtime to sync it properly Mar 27 02:00:22 yea so i've heard Mar 27 02:00:25 there is a flag to pass for non blocking op Mar 27 02:00:36 but you should not do that if you don't know what you are doing Mar 27 02:01:01 not do what, have it run in a seperate thread? Mar 27 02:01:05 http://developer.android.com/intl/es/reference/android/media/AudioTrack.html#WRITE_NON_BLOCKING Mar 27 02:01:11 21+ indeed Mar 27 02:01:16 has anyone used a recyclerview inside a nestedscrollview? Mar 27 02:01:22 don't use non blocking Mar 27 02:35:52 so, the usual pattern in fragments, to communicate back to whatever, is onAttach() casts either parent activity or parent fragment to some interface; this is old stuff ... Mar 27 02:36:25 problem though, is if you have an activity with lots of fragments, it gets crazy because the activity has to implement lots of listeners Mar 27 02:37:16 so i was wondering, if anyone had device some kind of 'service locater' or maybe using reflection, traverse some path up the hierarchy to find an annotation marking a method to be used for the listener or something Mar 27 02:37:24 *devise Mar 27 02:38:10 g00s: Sounds like a ServiceLoader? (which I'm not sure are supported on Android) Mar 27 02:38:23 * g00s googles Mar 27 02:39:29 CedricBeust \o/ http://developer.android.com/reference/java/util/ServiceLoader.html Mar 27 02:39:34 thanks i will check that out Mar 27 02:39:49 I don't think it exactly matches what you described though, but same general idea Mar 27 02:39:54 things on the classpath get magically picked up Mar 27 02:40:10 I don't like being picked up Mar 27 02:40:35 Didn't mean to offend you Mar 27 02:40:41 CedricBeust even if not exact match, maybe feeds some useful idea into something i can implement Mar 27 02:40:45 I know xD I'm joking ;) Mar 27 02:40:52 and I was playing along Mar 27 02:40:57 :) Mar 27 02:42:10 FINALLY figured out how to use a custom Interceptor to mock out the server Mar 27 02:42:32 this is pretty neat Mar 27 02:43:00 they're going to have to give me a raise when I implement this at work Mar 27 02:43:29 Nice :) What's an Interceptor? Mar 27 02:43:54 okhttp3.Interceptor Mar 27 02:44:09 you can optionally pass one to your retrofit classes Mar 27 02:44:48 I use it to intercept my network calls. Based on the url, I can respond to a request with a saved file Mar 27 02:45:24 i'm using it for test cases right now. Theoretically we could use it for when our servers go down (all the time) and we can still work **** ENDING LOGGING AT Sun Mar 27 02:59:57 2016