**** BEGIN LOGGING AT Mon Apr 11 02:59:58 2016 Apr 11 03:02:25 Guys what's the most common way to show data in columns? Is it in a tableview? I need to have a dynamic amount of rows and columns. Apr 11 03:40:14 what should I do if I'm trying to clean the project and it runs in the background without ever finishing Apr 11 03:44:15 meoww: What is "it" referring to in that sentence? Apr 11 03:45:21 the background process that says "gradle build running" Apr 11 03:46:33 and when I cancel that background process, it starts another background process indicating the cancellation. And neither of them finish unless I kill android studio Apr 11 03:47:18 OK, so the "it" referred to Android studio. Apr 11 03:47:54 I do recall seeing this before. I think it went away after clearing the caches and restarting. Apr 11 03:48:08 clearing the caches! Okay I'll see to that Apr 11 03:48:15 thanks loke Apr 11 03:48:16 meoww: Yea i've never had a cancelation actually finish lol Apr 11 03:48:23 hmmm okay that's bad Apr 11 03:48:50 orbyt_: Yes. I _could_ be the case that the reason I never saw it again was that I never actually tried it :-) Apr 11 03:49:08 Hi! I need help. I'm using Android Studio, API 15. I want to "canvas.drawArc()". Studio tells me that I should use API 21. Any suggestions for API 15? Apr 11 03:49:27 weirdie: Do you _really_ need to target such an old version? Apr 11 03:50:07 yes, there are lots of old devices in Russia :) Apr 11 03:50:19 Theres 2 drawArc() methods Apr 11 03:50:21 use the older one Apr 11 03:51:50 do You mean drawArd(RectF...)? Apr 11 03:52:31 yes Apr 11 03:52:36 hey guys, any reason why I might be this when trying to refresh my token for access to google APIs? http://pastie.org/pastes/10793047/text Apr 11 03:52:58 I am calling "creds.refreshToken();" to produce this, where creds is a GoogleCredential object. Apr 11 03:56:32 orbyt_, Thanks! It works! Apr 11 03:56:53 Guys I'm trying to get the layoutparams of a ScrollView from the MainActivity's 'onCreate()' method but it says it cannot get the layout parameters from a null object. My code is here: http://imgur.com/0pvh4f7 . The error is: "Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference" Apr 11 03:57:47 Should I move my layout parameters call outside of onCreate? Apr 11 03:58:07 post the entire onCreate() Apr 11 03:59:16 problem is you need to call setContentView() first Apr 11 04:00:37 I am calling it first but I am setting it as the 'activity_main' -- should I switch it to the ScrollView? Apr 11 04:01:15 whole onCreate(): http://imgur.com/t9gZLsD Apr 11 04:11:57 Psychiatrist: your code is strange. for the nullpointer activity_main.xml does not have ScrollView with id hsvLayout Apr 11 04:12:33 Psychiatrist: setContentView twice is very strange. Apr 11 04:13:44 logcat,Yeah I know... I'm very new to this. I managed to get what I needed with this: ScrollView sv = (ScrollView) findViewById(R.id.hsvLayout); Apr 11 04:13:44 I didn't even need to specifically get the layout parameters. Thanks guys! Apr 11 04:40:55 hi guys is sha3 very heavy to implement in android apps? Apr 11 04:41:03 sha3 or keccak Apr 11 04:42:40 at first try to find java/android lib first Apr 11 05:13:15 not super proud of this lol Apr 11 05:13:30 how bad is using a parameter like this? Apr 11 05:13:32 @VisibleForTesting Context context Apr 11 05:13:43 Not. Apr 11 05:13:54 I use it so that I can mock out network requests in my mockData flavor Apr 11 05:14:02 in the realData flavor it's not used at all Apr 11 05:15:10 android is kinda hard to write tests for, don't you think? you really need to design for it Apr 11 05:18:43 You always need to design for testability, on any platform :) Apr 11 05:23:01 RustyShackleford: yeah. android wasn't designed with testing in mind. I have no idea how would I write unit tests. Integratoin tests are fine Apr 11 05:27:30 I have: int[] digits; digits = new int[10]; I try: Intent intent=new Intent(MainActivity.this, WheelActivity.class); intent.putExtra("digits",digits); startActivity(intent); Then in WheelActivity: int digits[] = getIntent().getIntArrayExtra("digits"); for(int i=0;i<8;i++){ recommendations = recommendations+String.valueOf(i+1)+" "+String.valueOf(sectors[i])+"\n"; } recom.setText(recommendations); And I catch java.lang.NullPointerException Apr 11 05:30:05 TextView recom; Apr 11 05:30:45 weirdie: I'd recommend you post your code to a pastebin and then show the full stack trace. Apr 11 05:31:29 loke: some platforms/frameworks are easier than others Apr 11 05:32:04 now I sorta see the appeal of dagger Apr 11 05:32:12 inject a context wherever you need it Apr 11 05:34:19 loke: ok, I'll do it later. Thanks. Apr 11 06:04:02 has anyone had a problem with hamcrest after upgrading to 2.0 Apr 11 06:04:08 Android Studio 2.0 Apr 11 06:33:17 Hi al, I'm looking for a solution to have a Fragment.IsVisible() method. It must work when a Fragment is used with a FragmentTransaction and also when it's inside a ViewPager. Currently, I have this, http://pastebin.com/9Aajzwhq which works good. Apr 11 06:34:48 But I don't want to use inheritance. Can i create something like Butterknife? Any advice? Apr 11 07:37:47 FrancescoV: You asked that question on Friday and received answers. Have you tried anything that was suggested? Apr 11 07:40:16 barq: yes I have but the answer wasn't working Apr 11 07:40:32 Your paste isn't working either. Apr 11 07:40:47 why not? Apr 11 07:40:53 Click on it. Apr 11 07:43:15 Sorry about that: http://pastebin.com/UQyd38sS Apr 11 07:45:38 Have you tried onHiddenChanged? Apr 11 07:46:15 Yes, isn't called when using a FragmentTransaction Apr 11 08:01:28 It is. Apr 11 08:39:33 Good morning developers :) Apr 11 08:42:04 now an app that could develop good mornings would be a win lol Apr 11 08:43:56 I have a question, I've never seriously looked at images for different screen resolutions, so my question is, how does the drawable folders look like for different screen resolutions. I know about mdpi, hdpi, xhdpi, ...etc. But I saw a project that has also the folders for certain screen dimensions. A nice link would be nice. Apr 11 08:46:14 The reason I ask this is, I have a compass fragment. But the compass feature doesn't work well because I mistakenly used an image that was way to big, like 1000x1000 px large. As a result, the compass was stuttering and also it did too much work on the UI thread. But as I resized the image, it the compass was working much better. Apr 11 08:46:50 http://developer.android.com/training/multiscreen/screensizes.html Apr 11 08:46:56 well there is something like 600dp Apr 11 08:47:48 http://developer.android.com/guide/practices/screens-distribution.html Apr 11 08:47:50 lol Apr 11 08:51:51 Thnx guys. Apr 11 08:56:09 Hello. Can I request permissions (non runtime) from manifest based on build version? Apr 11 09:31:54 hi guys... a question if i can. I had write an application that add a prefix to a called number that works with an intent-filter and a broadcastereceiver. Can i load an admob banner while the phone is calling the number? Apr 11 09:32:42 and also admob pay also for number of views right? Apr 11 10:11:50 Hi everyone Apr 11 10:11:58 I have a small issue I could use a hint on .. Apr 11 10:12:38 I have these asyncTasks that I need to keep track of, and all my activities extend the same class.. so I added a public List to the parent activity class Apr 11 10:12:55 now in the async task, I am trying to add an object to the property Apr 11 10:13:11 my issue is, I do not know what activity I am on, it can be several Apr 11 10:13:24 activity.ongoingUploads.add(new UploadInProgress()); Apr 11 10:13:37 and the application crashes when running this line of code Apr 11 10:13:51 I tried typecasting the activity to the parent class Apr 11 10:13:58 to no avail Apr 11 10:18:46 hi, simple question (I hope): I have a OnClickListener, it activates a method that runs for a while (freezes app, while reading big file). I want to hide the button before the method is run... .setVisibility(View.GONE); does not refresh view Apr 11 10:19:49 I think you need to call invalidate on the view, try googling for that Apr 11 10:20:11 ok, will try Apr 11 10:23:28 neither button.invalidate() nor((FrameLayout) button.getParent()).invalidate() forces a refresh of view before(or during) the method is run. Apr 11 10:24:59 code is still: button.setVisibility(View.Gone);longAssRead Apr 11 10:25:15 ();otherStuff(); Apr 11 10:31:06 ok found something I think will be a solution: http://android-developers.blogspot.fi/2009/05/painless-threading.html Apr 11 10:46:22 for the long running task, you can make an asynctask Apr 11 10:46:33 which will have its own thread Apr 11 10:53:20 Better to use a runnable for long running tasks than an async isn't it? Apr 11 11:10:58 Anyone know if there's a way of setting the max length of text input in an EditText to the width of the field itself? I want under no circumstances to have two rows or have the text expand beyond the width of the field. Apr 11 11:12:11 try singleLine="true" in xml Apr 11 11:12:15 as for the other, i dont know Apr 11 11:12:46 You'd have to measure it Apr 11 11:13:31 NoirAvlaa: with a Paint object? Apr 11 11:13:34 Would be easier to just stick a character limit on it and leave it at that Apr 11 11:14:16 Yeh Apr 11 11:14:51 NoirAvlaa: Thing is , if I set a character limit it get's messed up. If I continously type characters without spaces until I reach the max limit I get further than if you type with spaces. So I don't know how it's counting? Isn't space a character too? Apr 11 11:15:22 Hmm Apr 11 11:16:07 Something like this Apr 11 11:16:07 https://stackoverflow.com/questions/3630086/how-to-get-string-width-on-android Apr 11 11:16:14 Then add a textwatcher Apr 11 11:17:00 if (paint.width() >= editText.getMeasuredWidth()) Apr 11 11:17:09 Though that seems hacky as hell :P Apr 11 11:17:40 At that point I'd make a custom EditText class with that written into it so it's defined once Apr 11 11:20:10 NoirAvlaa: that looks good. Thanks Apr 11 11:21:15 :) Apr 11 11:26:00 I want to call a method from my Activity from a Handler-class. Is it OK to pass the Activity to the Handler in the constructor or will that cause problems such as leaks? Apr 11 11:27:27 What happens if the Activity is detroyed while the Handler class is still running? Apr 11 11:27:47 leak Apr 11 11:27:56 Answered your own question :) Apr 11 11:28:04 I can set the Handler null in onDestroy Apr 11 11:28:32 and removecallbacksandmessages Apr 11 11:29:31 How can I get the Handler to do some operations on the Activity then? Apr 11 11:33:03 Implement a listener/callback interface and use that to pass data back to the activity Apr 11 11:33:37 Process the task on handler thread, post message and handle it via interface Apr 11 11:33:38 Hi all Apr 11 11:33:43 Don't need an instance of the activity then Apr 11 11:33:57 Also, activity can be destroyed without any special handling Apr 11 11:34:51 And make class X extends Handler static to remove references to the Activity? Apr 11 11:35:10 Don't see why it needs to be static? Apr 11 11:36:03 The activity will implement the interface Apr 11 11:36:08 That's how data will be passed to it Apr 11 11:36:20 If I don't make it static I have an implicit reference from the Handler to the Activity. Apr 11 11:36:36 Post your code mate Apr 11 11:41:58 eh... gradle Apr 11 11:44:38 GRADLE!!! Apr 11 11:44:54 gordon_: please show some more enthusiasm Apr 11 11:45:29 I'm too old for this Apr 11 11:45:50 and why it wants to debug each build Apr 11 11:46:30 Because it cares mate Apr 11 11:46:51 Hey thepoosh Apr 11 11:48:22 How are you? Apr 11 11:51:07 gordon,Why you say your to old for this? Apr 11 11:52:11 Sorry i mean gordon_ Apr 11 11:53:43 NoirAvlaa: So when I then check if the length of the text is the same as the textfield, how do I stop the user from entering more characters in java? I have trouble finding such a method Apr 11 11:54:20 You just remove the last character Apr 11 11:56:08 NoirAvlaa: but they can still enter more text: http://pastebin.com/MkX2r8Y2 I simply print out a message when that happens , I could use an editText.cancel() or something. Apr 11 11:56:48 I suppose you could calculate the length of a character and the use that to calculate the max length allowed Apr 11 11:57:08 gordon_: try adding --configure-on-demand flag Apr 11 11:57:11 perlsyntax: HAI Apr 11 11:57:15 Sec Apr 11 11:57:23 doing shitty, thanks for asking Apr 11 11:58:43 perlsyntax: because I'm tired of boilerplate, bugs in libraries and long compilation ;) Apr 11 11:58:53 Bernzel_, Apr 11 11:58:55 str = descriptionTextEdit.getText().toString(); Apr 11 11:58:58 descriptionTextEdit.setText(str.replace(str.substring(str.length()-1), "")); Apr 11 11:58:59 gordon,i see what you mean. Apr 11 11:59:10 Removes last character Apr 11 11:59:12 gordon_,I see what you mean. Apr 11 11:59:40 thepoosh,np Apr 11 12:01:19 NoirAvlaa: https://gist.github.com/anonymous/7f7cc20ee8b9a3ad9d6d25f986f592e2 Apr 11 12:01:21 gordon_,I thought i fl old sometime to:) Apr 11 12:01:26 feel Apr 11 12:01:34 NoirAvlaa: ok hold on! Apr 11 12:02:31 barq, if the handler's declared inside of MainActivity then you can just manipulate objects directly from the @handleMessage method inside the handler Apr 11 12:03:19 https://gist.github.com/anonymous/cf250a962e9cc1e77828311f7a37ae90 Apr 11 12:03:21 Or the Activity you want to use I should say Apr 11 12:03:34 Then I get a memory leak, though Apr 11 12:03:45 NoirAvlaa: So that .setText method should go into the if statement? Apr 11 12:03:50 Yeah Apr 11 12:03:52 Bernzel_, Apr 11 12:04:02 I do methodCall(mMyProcessor); and mMyProcessor then leaks context Apr 11 12:04:19 barq, 1 sec Apr 11 12:04:33 Because mMyProcessor has an implicit reference to the Activity. Apr 11 12:06:12 NoirAvlaa: yeah it sort of works. But when I reach that last character it begins from the beginning again. Apr 11 12:07:28 1 sec, sorting this handler out :p Apr 11 12:07:37 https://gist.github.com/anonymous/8e9fe617313fa0469790b5d9dfe8f412 Apr 11 12:15:14 barq, something like this: Apr 11 12:15:16 Handler: http://pastebin.com/WaT6Uaev Apr 11 12:15:48 Interface: http://pastebin.com/vHVdSwbW Apr 11 12:16:42 Why not pass a HandlerInterface in the constructor? Apr 11 12:18:24 barq, code is fast just to show what I meant Apr 11 12:20:03 Thanks, will see if I can adopt that Apr 11 12:21:18 pduin, it amounts to the same really, activity implements HandlerInterface Apr 11 12:23:21 Though you could also do it with a runnable Apr 11 12:23:28 That way I can make the Handler class static Apr 11 12:23:36 And a new Thread(runnable).start(); Apr 11 12:24:10 Yes, I know. But the code will be cleaner by not having to depend of knowing what a Context object is. Apr 11 12:24:51 Hmm I guess :) Apr 11 12:24:58 Plus you can get rid of the instanceof call Apr 11 12:25:11 That's just habit from Fragments I think hahaha Apr 11 12:25:22 And oyu do not need to throw a runtime exception because the compile does the type checking Apr 11 12:25:31 compiler* Apr 11 12:27:26 The listener will still be initialised without the check but will crash the app if it's used (if the activity that's passed in does not implement the interface) Apr 11 12:29:22 I need to make MyProcessor class static somehow, because it leaks context Apr 11 12:29:32 NoirAvlaa: I might be able to get around my problem easier if I knew the keycode for the "return" key on the keyboard. The key that appears instead of "Done"/"Enter" when using multiline text Apr 11 12:30:03 Bernzel_, what's it doing atm? Apr 11 12:30:41 Because implementing the keycode value is the horrible line of : Apr 11 12:30:44 But if I make it static then I can't get a reference to MyHandler Apr 11 12:30:45 (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) Apr 11 12:30:54 Don't make it static Apr 11 12:30:59 NoirAvlaa: The app will simply not compile Apr 11 12:31:30 pduin, has AS stopped it compiling in this instance since last time I tried? Apr 11 12:31:30 How can I avoid the leak then? Apr 11 12:32:20 If you change the first parameter in the constructor to HandlerInterface, and you try to pass in a class that does not implement that interface, the app will not compile Apr 11 12:32:38 Ah, misunderstood you :p Apr 11 12:32:41 My bad Apr 11 12:32:49 barq, do what he just said :p Apr 11 12:33:53 Its always better to catch errors at compile time then in run time Apr 11 12:34:42 As I said, just a habit from default Fragment construction in the onAttach method Apr 11 12:34:43 I am passing "this" from the Activity to the Handler Apr 11 12:34:51 yes barq Apr 11 12:34:59 Activity implements the HandlerInterface Apr 11 12:35:05 Yeh Apr 11 12:35:41 hi guys Apr 11 12:36:08 i would create a overlay admob when an intent-filter is launched Apr 11 12:36:18 have u got a sample? Apr 11 12:38:27 So basically add all methods that I need from the Handler to the interface and then use the listener to call them to decouple the Handler from the Activity Apr 11 12:39:59 The problem is I still have a bunch of fields I am referencing from the Handler that belong to the Activity. Apr 11 12:40:26 Yeah, I only put bundle in there as it can take all data which you can then just handle in the activity, but you can change that to anything you want Apr 11 12:43:14 NoirAvlaa: that's not the one I think. The arrow looking key, this one: http://i.stack.imgur.com/rLYuP.png Apr 11 12:43:57 Aye, that's the one Apr 11 12:44:05 Next/return/enter/go etc Apr 11 12:44:09 That's the button that changes Apr 11 12:44:11 ah okey. Apr 11 12:44:29 i have returned Apr 11 12:45:01 I figured I can go with multiline and set the max length and the precision doesn't have to be so precise then. All I got to do is catch the "return" key or whatever to find when they have finished typing Apr 11 12:47:13 NoirAvlaa: So I pass all the fields I need to the Handler as well in the constructor? Apr 11 12:47:42 Erm, what's the handler doing? Apr 11 12:49:16 Handles messages that are sent from the Activity and MyProcessor Apr 11 12:52:23 Yeah just pass in what you want to process, then use the interface to handle what comes out Apr 11 12:53:07 right, gotta run out... New phone's arrived and I need an adapter for it :/ Apr 11 12:56:07 The problem is that myProcessor needs myHandler and myHandler neesd myProcesor Apr 11 12:57:24 if you mean that process must know the reference to processor, you can pass it in constructor Apr 11 12:57:58 if this is executed in different thread, you should use something like threadloop and notify what he have to do Apr 11 12:58:20 you can use a stack (synchronized) to add Runnable to executed Apr 11 13:00:02 if you have to do a task in parallel and retrive back value Apr 11 13:00:15 there is a class already ready for the job Apr 11 13:00:16 http://developer.android.com/intl/zh-cn/reference/android/os/AsyncTask.html Apr 11 13:01:07 you have 2 handler (onProgressUpdate, onPostExecuted) that handle when job is updating and when job is done Apr 11 13:02:01 Passing in the references doesn't do it, crashes my app Apr 11 13:02:52 I get a nullpointer inside the Handler trying to access something from the Activity that no longer exists Apr 11 13:03:49 ok i do not understand the problem Apr 11 13:03:53 I pass a reference of a dialog to the Handler and when the handler tries to dismiss the dialog I get a crash Apr 11 13:03:54 can you repeat it Apr 11 13:03:58 i join right now Apr 11 13:04:04 so i lose something Apr 11 13:04:55 Handler of what? Apr 11 13:14:37 SuperStep: This is the code https://gist.github.com/anonymous/945f779b712166a6bb7dc76baf95c4d9 Apr 11 13:14:49 I get the NPE in line 17 Apr 11 13:15:25 Before I didn't pass in the progressDialog reference and just referenced it via the implicit reference to the enclosing Activity and didn't get the crash. Apr 11 13:15:29 ok Apr 11 13:15:32 so Apr 11 13:15:46 how create new instance of MyHandler? Apr 11 13:17:11 private MyHandler mMyHandler= new MyHandler (this, mProgressDialog); Apr 11 13:18:24 I also manipulate the mProgressDialog from the Activity directly Apr 11 13:18:48 let me think Apr 11 13:19:53 ok, if i understand Apr 11 13:20:30 the MyHandler reference throw NPE because mProgressDialog is already deleted from JavaGarbageCollector Apr 11 13:21:13 you show me the reference of processDialog is passed when MyHandler instance is created Apr 11 13:21:20 but i miss how you create it Apr 11 13:21:28 How I create what? Apr 11 13:21:35 DialogBuilder Apr 11 13:21:54 where is created? in Activity? Apr 11 13:22:27 if activity is delete in this process Apr 11 13:22:27 Yes in the Activity Apr 11 13:22:42 you can use static class to have reference Apr 11 13:22:44 The Activity still exists, it crashes while the dialog is showing Apr 11 13:23:03 can you paste the error? Apr 11 13:24:15 yes one second Apr 11 13:24:23 ok thanks Apr 11 13:25:09 https://gist.github.com/anonymous/7bd4cd32cd64071eda48dc6775ace59a Apr 11 13:26:00 can you make a test for me? Apr 11 13:26:10 Ah the reference is passed in before the dialog exists Apr 11 13:26:18 instead of this Apr 11 13:26:20 private MyHandler mMyHandler= new MyHandler (this, mProgressDialog); Apr 11 13:26:24 can you do this Apr 11 13:26:29 private MyHandler mMyHandler; Apr 11 13:26:35 Maybe it is better to use a callback in the activity to dismiss the dialog Apr 11 13:26:55 if(mProgressDialog != null) myHandler = new MyHandler (this, mProgressDialog); Apr 11 13:27:54 usually, i dismiss a NotifyDialog in Activity with callback from the same Dialog Apr 11 13:29:16 a Dialog have handler for something like 'onOperationDone(OnOperationDoneListener listener)' -> (in activity) dialog.dismiss() Apr 11 13:29:51 in the method i only call OnOperationDone.'call()' Apr 11 13:30:07 sorry OnOperationDoneListener*.'call()' Apr 11 13:30:33 I do the initialization of the dialog in onCreate now, testing now. Apr 11 13:30:38 but, im pretty sure the error is the you pass null in MyHandler constructor Apr 11 13:30:52 because i see Apr 11 13:31:02 Yes, that is exactly what happens. Apr 11 13:31:03 you create new instance non in onCreate Apr 11 13:31:23 but you create instance in class method Apr 11 13:31:38 so, maybe, you create the DialogBuilder after Apr 11 13:31:50 why would updating an image in a remoteimageview too frequently cause the device to reboot? Apr 11 13:32:12 dcope, never see this problem Apr 11 13:32:16 https://github.com/nostra13/Android-Universal-Image-Loader/issues/908 Apr 11 13:32:33 'cre8ivejp' in that thread is the only other person online i can find that is seeing this Apr 11 13:32:37 i'm also seeing it on 6.0.1 Apr 11 13:34:55 Changing the initialization now Apr 11 13:35:23 ok Apr 11 13:38:13 Yes, this step works now Apr 11 13:38:19 thanks Apr 11 13:38:19 nice Apr 11 13:38:23 no problem Apr 11 13:38:45 But I still get the memory leak Apr 11 13:38:51 So need to pass more references to the Handler Apr 11 13:39:03 because you have circula dependency Apr 11 13:39:19 circular* Apr 11 13:39:49 yes Apr 11 13:40:06 you just set to null the pointer Apr 11 13:41:04 http://stackoverflow.com/questions/1910194/how-does-java-garbage-collection-work-with-circular-references Apr 11 13:41:22 if the object still reachable JGC dont delete it Apr 11 13:42:02 without reference is no more reachable so the Garbage scheduler in nect schedule delete the object Apr 11 13:42:05 next* Apr 11 13:42:12 I am setting it null in onDestroy Apr 11 13:42:14 But still leaking Apr 11 13:42:39 try to call manually in android studio the garbage collector Apr 11 13:42:52 or you can use System.garbageSomething() Apr 11 13:43:04 I use LeakCanary and LeakCanary does taht Apr 11 13:43:11 Before checking for leaks Apr 11 13:43:28 System.gc() -> call garbage collector manually Apr 11 13:44:46 garbage collector is always called by the JVM when there is not enought space for allocate Apr 11 13:44:54 in this way you call it manually Apr 11 13:45:18 Yes, but GC cannot free Apr 11 13:45:28 Because there is still a reference to the Activity Apr 11 13:45:42 activity is still reachable? Apr 11 13:46:40 Yes Apr 11 13:46:57 The problem is the circular dependency, one needs the other so no matter which order I initalize them in something is always null Apr 11 13:47:53 but the activity remove the reference to the handler? Apr 11 13:48:30 MyProcessor leaks Apr 11 13:48:35 the Activity Apr 11 13:49:03 you just have to remove the reference non more needed Apr 11 13:55:49 What's the point of having to set a default value to the "getBooleanExtra()" method? I wouldn't be utilizing that boolean if it didn't have a value when reading it? Apr 11 13:58:41 Hello guys, I succeeded to set an alarm, but I fail to cancel an alarm. I did as follows: http://paste.ofcode.org/y6UdzKAsM2zFsbCnwsJVwf When canceling the pendingIntent is null. What am I doing wrong here? Thank you. Apr 11 13:59:37 Bernzel_, that you at least have a value. Apr 11 14:05:53 Number5: this is code for my old project for canceling alarm http://pastebin.com/ASU2Se16 Apr 11 14:06:28 afair the id (BATTERY_CHECKER_ID here) should be the same as the one you have set before Apr 11 14:06:57 pendingIntent is null probably because you supply null Intent Apr 11 14:11:34 Ashiren, thank you for sharing your snippet. The crash was solved by replacing null with an intent. I only can't confirm that the alarm is really canceled, I need to test is later. Apr 11 14:40:51 hithere Apr 11 14:41:46 any pain / problems with new AS 2.0 ? Apr 11 14:42:01 SuperStep: I fixed the leak now. Thanks for your help Apr 11 14:42:06 NoirAvlaa|AFK: also thanks Apr 11 14:53:33 bolovanos, not with AS2.0 Apr 11 14:53:47 the N preview stuff has given me some headaches though Apr 11 15:00:00 I am trying to build a docker image to be able to build an aar for me, and the base image I am using is doing a step to copy a folder that I am not aware of, and it is also failing on that step Apr 11 15:00:30 Specifically the "COPY tools /opt/tools" step in https://hub.docker.com/r/jacekmarchwicki/android/~/dockerfile/ Apr 11 15:01:18 Hmm I guess it is "${ANDROID_HOME}/tools" which gets added to the PATH in the previous step? Apr 11 15:01:37 If so not sure where the android-accept-licenses.sh comes from Apr 11 15:02:49 Both "tools" and the sh don't really have a source from which they'd come Apr 11 15:02:56 Is the script missing anything? Apr 11 15:04:55 Don't think so? It's building successfully on Docker Hub, and I am able to get it to work fine when I pull the image they built Apr 11 15:05:01 Building it locally isn't working though Apr 11 15:05:25 *shrug* Apr 11 15:05:31 Maybe they mount something then Apr 11 15:11:26 hmm maybe thanks Apr 11 15:15:18 Hello. My snackbar hides the view behind it.How can I make it resize the view instead? Apr 11 15:24:53 Random question: why with activities/fragments etc do we pass objects and information through bundles/intends? Why is it not a good pattern to just have setThing ? Apr 11 15:26:05 Taios: Android was architected that way, and with setThing on an Activity/Fragment there is 0% guarantee it will work. It often will, but it often won't as well Apr 11 15:27:01 Taios, bundles because of the lifecycle of an android app. Could be killed at any time, and needs to be recreateable. This facilitates a uniform way to reinstantiate activities. Intents allow for uniform cross app actions to be performed Apr 11 15:27:31 Ah I see ok, makes sense Apr 11 15:27:40 thanks! Apr 11 15:27:48 np Apr 11 15:29:00 vedu, I am interested in that as well. Perhaps try looking into how it is achieved with the FAB and the Coordinator layout Apr 11 15:30:15 truckcrash: the FAB behaviour is modify the y-coordinate. Can't do the same for a view that matches its parent Apr 11 15:31:25 vedu, CoordinatorLayout handles thus already Apr 11 15:31:53 Oh, you want a snackbar beneath your content Apr 11 15:32:03 pfn: yes :) Apr 11 15:32:13 that's easy as well, similar behavior, except resize the content Apr 11 15:32:20 rather than modifying y pos Apr 11 15:33:46 I guess he is wondering how to achieve this if he is using match parent for the height, but the containing parent is not resized by coordinator layout (i believe) Apr 11 15:33:50 I thought I am missing something very simple. like an XML attribute Apr 11 15:33:55 help Apr 11 15:34:08 how does GCM work? Apr 11 15:34:09 Felishia, ask Apr 11 15:34:14 oh, read Apr 11 15:34:26 or be more specific Apr 11 15:42:57 Felishia: can you explain the question Apr 11 15:43:38 what else do I need to install/ what should I change to fix this error: "error while loading shared libraries: libz.so.1" Apr 11 15:44:33 meoww, that's a pretty fundamental library. You're probably missing the 32bit version since you probably wouldn't have a working system w/out it. So whatever your distro needs to do to install the 32bit libz stuff Apr 11 15:48:09 syntax wise, does this look correct? http://pastebin.com/bKRp1gzc I'm trying to find out if all my bools in an array are true or not. Apr 11 15:48:52 sorry Apr 11 15:48:54 I'm back Apr 11 15:49:16 truckcrash, thepoosh I'm trying to understand how GCM works, but I'm not quite good at java, so if someone can elighten me Apr 11 15:49:16 that did it! Apr 11 15:49:17 thank you! Apr 11 15:50:01 GCM is a mechanism connected to google cloud and periodically checks for messages Apr 11 15:50:10 Felishia, https://www.google.com/search?client=ubuntu&channel=fs&q=how+push+notifications+work&ie=utf-8&oe=utf-8 Apr 11 15:50:14 plenty of reading Apr 11 15:50:18 there is a lot of documentation on it in the android documentation website Apr 11 15:50:27 and also that too ^^ Apr 11 15:50:49 but I also have ios :< Apr 11 15:50:56 http://developer.android.com/distribute/engage/gcm.html Apr 11 15:51:08 Felishia: it can also connect with iOS devices Apr 11 15:51:11 read up Apr 11 15:51:24 I know Apr 11 15:51:28 that's why I'm confused Apr 11 15:51:29 Felishia: here, read here: https://developers.google.com/cloud-messaging/gcm#arch Apr 11 15:51:36 hey thepoosh Apr 11 15:51:40 g00s: sup? Apr 11 15:51:54 Felishia: the second link has all the info you need Apr 11 15:52:23 thepoosh not much, working on anything cool this week ? Apr 11 15:52:34 kinda Apr 11 15:52:43 implementing a Websocket connection Apr 11 15:53:07 new server architecture Apr 11 15:53:17 with binary data Apr 11 15:53:20 i don't hear very good things about WS Apr 11 15:53:23 and protobuf Apr 11 15:53:33 explain Apr 11 15:54:29 thepoosh not sure if i can find the link Apr 11 15:57:43 g00s: well, look for it! Apr 11 15:59:53 so all I get is a token Apr 11 15:59:59 it's all what the client will give me Apr 11 16:00:04 does the token expire? Apr 11 16:01:42 Hey Apr 11 16:03:42 Felishia: not really Apr 11 16:04:00 thepoosh, not really? o.O Apr 11 16:04:21 well, you should be requesting a new one if the app has updated Apr 11 16:04:33 but read the docs Apr 11 16:09:45 Blah - is there a name of a component for this? I have a list where a user will select a book and I want to open a "detail view" of the book with the option to select a chapter or continue reading where they were left off. I was about to do this as an activity and realised the activity will cover the whole screen and I want it more as a sort of...pop up? Apr 11 16:10:33 I am mostly an iPHONE developer... We have this Navigation system that rocks... where we can transition from one screen to the next with absolute simplicity... Getting Buttons and Intents to Line up is a screaming pain the inte as on android.... is there not a better way to do Navigation? for example... I have a 5 part questionair.. each page is a question, The NEXT button goes to the... Apr 11 16:10:35 ...next screen. Question 5, there is a submit button that returns to Page 0... should I be using another technique.. perhaps Fragments? Apr 11 16:10:53 IrishGringo viewpager Apr 11 16:11:57 Taios: oooohhhhhhh sounds like it has potential... Apr 11 16:15:09 it's a pain because you don't know it, otherwise it's a single component... Apr 11 16:16:42 pfn: was that comment to me? Apr 11 16:16:47 yes Apr 11 16:17:32 well,.... I'm reading about it now... and I repeat.. iPHONE is sooo much better than this... but its the best I can do I guess... Apr 11 16:17:49 what component is better? Apr 11 16:17:51 on ios? Apr 11 16:18:09 I find android dev much easier than ios ah although there was some nicer things on ios with story boards Apr 11 16:18:23 UINavigationController... StoryBoard... Apr 11 16:18:45 that's norm what happens though tbh I think when you switch frameworks...I spent a while being like "this would be easier on android" :D. Apr 11 16:19:47 iOS has had and comprehensive widgets from day 1, including all those navigation thngs like UINavigationController Apr 11 16:20:22 on the other hand, g00s suffers from grass is greener syndrome Apr 11 16:22:28 if i would like an icon to rotate , depending on the Y position of a bottom sheet - which is the best way to do this. would i use View.rotate() , RotateDrawable, or something else ... Apr 11 16:23:16 RotateDrawable is from API 1, are there better ways to do that ? Apr 11 16:23:24 Is this something co-ordinator layout would be useful for? Apr 11 16:23:34 I havn't used it, i'm going from memory Apr 11 16:23:49 can I send notifications thru gsm that are not shown? Apr 11 16:23:53 GCM Apr 11 16:23:54 XD Apr 11 16:23:57 the view to rotate is already in the bottom sheet, so its translation is already handled Apr 11 16:24:14 Felishia: I believe so. Apr 11 16:24:26 like I just want to update the app state Apr 11 16:24:39 it’s up to you to build the notification object that gets displayed, so you just don’t make one of those, and you should be fine Apr 11 16:30:10 how can I mock an ssl connection using mockwebserver from okhttp3? Apr 11 16:31:38 will Viewpager work with 4.3 devices? Apr 11 16:31:58 it should Apr 11 16:32:01 IrishGringo sure Apr 11 16:32:26 FragmentPagerAdapter is a POS though Apr 11 16:33:08 works for trivial cases Apr 11 16:33:09 easily Apr 11 16:33:19 g00s: another stupid question so I dont have to ask more stupid questions... I'm looking at Docs... how could I have answered that question myself? is there a table of supported items per API? Apr 11 16:33:58 top right corner Apr 11 16:34:00 Tis actually a pretty good question =). Apr 11 16:34:50 Most things are backwards compatible with support libraries. Although how to know what thing is in which support library is something i've always wondered Apr 11 16:35:21 on the built in stuff, the top right corner will have an “Added in API Level X”. Support library is generally supposed to be compatible back to the version of support library it is Apr 11 16:38:17 s73v3r, are u sure about that? :o Apr 11 16:38:28 sure about what? Apr 11 16:38:29 so I can send data Apr 11 16:38:35 without displaying a message Apr 11 16:39:03 even if my app is not open right? Apr 11 16:39:07 you are limited on the amount of data, but what you can do is send a message telling the app to sync, and then have the app make the request Apr 11 16:39:07 it'll wait for my app Apr 11 16:39:20 what if the app is currently not running? Apr 11 16:39:33 it’ll open it in the background, just like if you were displaying a notification Apr 11 16:40:02 so I don't need to try to sync anymore? Apr 11 16:42:15 thepoosh how is instant run working for you ? Apr 11 16:42:28 Felishia: that's the whole point of push... Apr 11 16:42:55 Leeds, but I mean what if the app is not running? Apr 11 16:43:10 the app will be started, in the background, and the message will be delivered Apr 11 16:43:20 also, did you find your 64-bit adb from yesterday? Apr 11 16:43:27 Hii how can i add drag and drop feature in grid view Apr 11 16:43:28 oh right so there's basically some degree of guarantee that the app will get my message Apr 11 16:43:38 unless the app is removed Apr 11 16:43:54 not quite a guarantee, but something like that, yes Apr 11 16:45:21 Hi All! Apr 11 16:45:58 also, did you find your 64-bit adb from yesterday? Apr 11 16:46:08 I've got a problem with TextView.setText() Apr 11 16:46:54 Felishia: ? Apr 11 16:47:09 recom.setText(recommendations); //Toast.makeText(WheelActivity.this, recommendations, Toast.LENGTH_LONG).show(); Apr 11 16:47:10 Leeds, I had to change of machine like 3 times Apr 11 16:47:21 but anyway I just want to know about this gcm service Apr 11 16:47:30 did you or did you not have a 64-bit adb binary? Apr 11 16:47:33 I just want to be sure that my messages will be delivered Apr 11 16:47:36 read the docs Apr 11 16:47:38 though I'm not sure about the limit Apr 11 16:47:43 recom.setText() crashes Apr 11 16:47:48 Leeds, I didn't have a 64 bits machine Apr 11 16:48:09 Toast works Apr 11 16:48:25 you said yesterday that you couldn't get adb to work because it was 64-bit Apr 11 16:48:31 where did you get a 64-bit adb from? Apr 11 16:48:36 weirdie: pastebin the crash... Apr 11 16:48:56 Leeds, yes 64 bits on a 32 bits machine Apr 11 16:49:22 I have another issue now :< I want to know how much data can I fit in the payload request of GCM Apr 11 16:49:38 RTFM Apr 11 16:49:45 and tell me where you got a 64-bit adb from Apr 11 16:50:02 Android Studio Apr 11 16:50:37 really... Apr 11 16:51:10 http://pastebin.com/npkmBh5y Apr 11 16:51:24 adb: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=90addc5e3980f6efab749c9032cc8d7ad60dfb94, not stripped Apr 11 16:52:04 hmm... ok Apr 11 16:52:13 weirdie: and what does that tell you that the error is? Apr 11 16:53:10 Leeds: http://pastebin.com/YZUxjU0w Apr 11 16:53:53 weirdie: no, I didn't ask for your source Apr 11 16:54:28 I asked you to read your stacktrace and tell me what the error is Apr 11 16:54:33 Leeds: I know, but I don't know how to explain my problem Apr 11 16:55:15 weirdie: read it Apr 11 16:55:17 what does it say? Apr 11 16:55:45 Fatal Exception. NullPointerException Apr 11 16:55:54 right, so what's the problem? Apr 11 16:57:19 what sort of exception killed your app? Apr 11 16:58:08 Felishia: I installed AS2.0 on Friday - I got 32-bit SDK binaries... I just did a plain SDK install, got 64-bit binaries... Apr 11 16:58:09 This problem appears when I use .setText() with TextView. TextView exists Apr 11 16:58:59 so i can't understand: why this exceptions raises? Apr 11 16:59:36 weirdie: are you 100% sure that the findViewById succeeded? Apr 11 16:59:44 this is plain wrong Apr 11 16:59:52 weirdie, don't reference your views inside onDraw Apr 11 17:00:31 don't even do anything with view there, onDraw is mainly suited to draw on the canvas you get from the parameter Apr 11 17:01:31 adq, ok. Apr 11 17:02:09 I use this Activity to show TextView and draw some Arcs Apr 11 17:02:15 where can i find the Android TV source code? Apr 11 17:03:22 Where should I calculate several values and then show them in TextVie? Apr 11 17:06:07 I can make some calculations in onDraw, or I shall use onCreate to calculate and show TextView and after that use onDraw? Apr 11 17:10:31 Felishia: by the way, in case you haven't found it yet, you can send up to 4KB in a GCM data message Apr 11 17:16:27 has anyone implemented a library like UINavigationController for Android ? Apr 11 17:16:50 i guess that would kinda be like flow / mortar maybe Apr 11 17:16:56 maybe an MVP type thing Apr 11 17:17:13 Leeds: findViewById fails... ^( Apr 11 17:20:44 s73v3r question about UINavigationController. Lets say you have list A , B, C. You select A and show A'. Then you select something again and now see A''. If you then select B, then A - will you see A or A'' ? Apr 11 17:21:18 A’, i think Apr 11 17:21:22 in other words, does each hierarchy preserve its 'task stack' Apr 11 17:21:29 when you switch root notes ? Apr 11 17:21:31 *nodes Apr 11 17:21:38 no, in order to go back, you’d pop the stack Apr 11 17:22:03 if you really wanted to, you could write something yourself that would preserve the stack, but that’s not built in Apr 11 17:22:10 ok Apr 11 17:29:31 With the --filter option in "android update sdk -u --filter 1,2,3,4" is there a way to find a list of the possible values other than the numbers listed in "android list sdk"? I'm trying to automate this to update the sdk with certain components Apr 11 17:30:24 you can use shorthand Apr 11 17:31:46 Mavrik: Is there rules on how to write the shorthand? or a list of the shorthand somewhere? Apr 11 17:32:02 android list shows you all short names for components Apr 11 17:32:18 and you can use them instead of numbers so you don't rely on order Apr 11 17:33:20 Mavrik: Ah found it. It needs the --extended flag or I can't see the shorthand Apr 11 17:33:36 yeah Apr 11 17:33:42 Cool thanks again Apr 11 17:38:47 Ologn new business / tech book looks interesting http://www.amazon.com/Platform-Revolution-Networked-Transforming-Economy-And/dp/0393249131 Apr 11 18:07:31 I just installed Studio 2 stable, does anyone know where its settings directory is? Its not in my home dir like other versions Apr 11 18:09:25 on what os? Apr 11 18:09:32 hasnt changed afaik Apr 11 18:09:35 Mac Apr 11 18:12:25 Found it, it's in ~/Library/Preferences/AndroidStudio2.0 Apr 11 18:19:06 hello, i have a question Apr 11 18:19:21 its possible add item to adapter at runtime Apr 11 18:19:36 i have to add it backward and forward Apr 11 18:19:56 not sure what you mean by backward and forward, but yes it is Apr 11 18:20:09 ok, i have a widget like a gear Apr 11 18:20:21 must be scrollable Apr 11 18:20:43 the content of gear it's the day from the current day Apr 11 18:20:50 i want add item only at runtime Apr 11 18:21:06 never use this pratice Apr 11 18:25:39 can you give me a demo Apr 11 18:31:56 Hey all Apr 11 18:35:08 hi guys, looking around about using websockets in android apps I've seen people telling to use GCM since it's an already open connection and let you use less battery Apr 11 18:35:24 however, gcm can't work as a bidirectional communication right? Apr 11 18:36:38 it can Apr 11 18:36:43 http://android-developers.blogspot.com/2014/08/powerful-new-messaging-features-with-gcm.html Apr 11 18:37:35 oh the Two-way XMPP messaging part? Apr 11 18:37:40 yeah Apr 11 18:38:19 oh ok so the server needs XMPP Apr 11 18:38:38 at least it works while the app is not running Apr 11 18:38:38 i haven’t actually used it, so I’m not sure Apr 11 18:38:44 Anyone seen this before? https://www.youtube.com/watch?v=Mhllo1xQer8 Apr 11 18:38:46 Pretty funny haha Apr 11 18:39:22 markyosullivan: how about https://www.youtube.com/watch?v=E3418SeWZfQ&nohtml5=False ? :D Apr 11 18:39:53 all the javazone clips are awesome :D Apr 11 18:41:57 javatar Apr 11 18:42:00 id watch that Apr 11 18:48:53 Never seen that one alex88 :D Apr 11 18:48:58 never seen any of them tbf Apr 11 18:49:42 they're greay Apr 11 18:50:49 android 2.0 can i work on android N or i need android 2.1? Apr 11 18:52:47 Just a question i not sure about. Apr 11 18:58:25 ok Apr 11 19:06:44 is anyone knows why the exif orientation of an image taken by a camera is always returns 1 ? ;] Apr 11 19:33:50 Candyman, ;] Apr 11 19:51:52 So I'm trying to play with wit.ai's API, and I'm using their example application but I'm getting an Audio_Recording error, despite including the permission. Any ideas? Apr 11 19:51:58 The error: E/AudioRecord: AudioFlinger could not create record track, status: -1 Apr 11 19:54:34 Hi everyone, I am facing an issue with Android 4.4 using Socket.io. I am attempting to connect to an HTTPS server using TLS 1.2. On other HTTPSURLConnections I am able to set the enabled protocols properly, however using Socket.io it isn't working at all. If anyone could possibly give some input on that it would be greatly appreciated. Apr 11 19:56:06 Here is a github issue I have opened on the matter. Apr 11 19:56:07 https://github.com/socketio/socket.io-client-java/issues/298 Apr 11 20:20:35 Hi guys im having some errors with permissions can anyone tell me if my code is ok, i believe im so angry i cant see errors anymore, here the code - http://pastebin.com/Q9aCeGg3 Apr 11 20:21:11 can I adb shell to an AVD running under android studio. adb devices is empty for me Apr 11 20:22:01 sure but if you do not see your emu via adb devices you should fix that first Apr 11 20:23:11 i've got a weird behavior with getSpanSize(final int position) from my gridlayoutmanager, it does the contrary, like if i said at position 0 to have 1 span and at other positions to have 2 spans, it displays 2 span for first item and then 1 span for all other item Apr 11 20:23:32 (and i don't use reverslayout), wtf Apr 11 20:25:15 anyone see a problem with AS 2 - i have instant run disabled - where after a build, the IDE can't install the APK. And if the APK was previously installed, it is not uninstalled on the device. But it seems AS can't get the new one on there ? O.o Apr 11 20:25:35 saw a ticket related to that g00s Apr 11 20:26:00 https://code.google.com/p/android/issues/detail?id=199647 this one Apr 11 20:26:36 well, not exactly the same after rereading it Apr 11 20:26:37 adq ok thanks. yeah i'm not using multi-user Apr 11 20:27:05 i should correct myself, the build starts, the app is uninstalled from the device, and then AS says it can't install the new one Apr 11 20:27:11 so when i look at the device there is nothing there Apr 11 20:27:12 lol Apr 11 20:27:17 :( Apr 11 20:27:46 adq i think they should fire everybody :D Apr 11 20:28:03 idk why they don't consolidate basic vital things Apr 11 20:28:03 it happens sometimes Apr 11 20:28:24 you like being beta user eh? Apr 11 20:28:36 hate it Apr 11 20:28:48 i've stopped reporting ticket except in very rare cases because of that Apr 11 20:29:17 sometimes they ask you more info or copy/paste requests from who knows where without reading that all was already provided too Apr 11 20:30:14 i also get another weird dialog sometimes when i kick off a build, that says there is already a gradle build in progress Apr 11 20:30:23 but not that i am aware of :P Apr 11 20:30:26 g00s: just tried, works fine for me Apr 11 20:30:57 astroduck it usually works, except when i doesnt - i haven't been able to reproduce it Apr 11 20:31:03 oh IDE internal error, yey Apr 11 20:31:59 report to google Apr 11 20:32:59 i'm paying attention now, trying to reproduce and will file bug Apr 11 20:33:48 WTF, rebuilding a project without any changes takes 1min. They call this fast? Apr 11 20:34:25 2.0 preview was better than this :P Apr 11 20:35:12 hehe - i remember xav giving performance graphs at the last I/O - looked like thngs were going to get blazing fast ! Apr 11 20:35:19 but somehow, that didn't happen :P Apr 11 20:42:11 I'm using spoon, and on one of my devices the app crashes, this stops the test. Is there any way to continue testing even if the app crashes? Apr 11 20:45:54 hey, is it possible to programmatically launch settings->applications intent? Apr 11 20:46:47 korst3n: I think you make an intent to go directly into your applications settings page. Apr 11 20:47:39 eghdk: thank you, i see that its possible to start application settings yet i need to send the user to the application list.. Apr 11 20:51:42 android studio somehow hogs the ADB connection. adb devices only lists my phone after I close android studio Apr 11 20:52:09 can I adb shell while also having android studio open? Apr 11 20:53:50 yes Apr 11 20:54:15 and you're using a mismatched version of adb then Apr 11 20:54:20 use the same one android studio uses Apr 11 20:54:56 oh that might be the case. I use the adb from my operating system Apr 11 20:55:01 thank you Apr 11 20:57:28 maybe uninstall that one. having two sets of SDK seems like a recipe for a bad time Apr 11 20:57:41 interesting. ListPreference defaultValue doesn't work for me Apr 11 20:58:13 only works as a "int" iirc Apr 11 20:58:39 so you have to match your array with an int position Apr 11 20:58:43 I got it to work, I used the adb executable from ~/Android/Sdk/platform-tools/adb and my device now shows up Apr 11 20:58:50 ty pfn Apr 11 20:59:06 which will introduce you a need of intlistpreference because it does not save int value :') Apr 11 20:59:33 no, defaultValue must match a value within your values Array Apr 11 21:00:15 ah maybe it was for the android:summary="%s" Apr 11 21:00:19 then.. Apr 11 21:01:24 i have entryValues = Apr 11 21:01:28 ui_night_mode_no Apr 11 21:01:39 and defaultValue = "ui_night_mode_no" Apr 11 21:01:43 this isn't working Apr 11 21:02:12 according to stetho :D Apr 11 21:03:52 * adq shrugs like a pfn Apr 11 21:05:06 i uninstalled the app completely from device and still get that stupid dialog "Launching App: restart app? The app is already running" Apr 11 21:05:20 the ide is tripping all over itself Apr 11 21:08:01 adq hm, weird. so ListPreference defaultValue sets when you use an integer only Apr 11 21:08:19 according to pfn, no Apr 11 21:08:32 defaultValue="0" literally set it to 0 Apr 11 21:08:50 i cannot verify because all my listpref are intlistpref Apr 11 21:08:53 but if i set it to a string in entryValues, it doesn't take Apr 11 21:09:47 I am throwing in the towel Apr 11 21:09:52 and getting a desktop for android dev Apr 11 21:10:04 missingno what were you using before ? Apr 11 21:10:07 instant run doubled my compile time lol Apr 11 21:10:12 a maxed out mbp Apr 11 21:10:19 missingno turn IR off Apr 11 21:10:27 I know but my compiles are still slow Apr 11 21:10:28 that helped me anyhow Apr 11 21:10:34 the doc says it can be "everything": http://developer.android.com/reference/android/preference/Preference.html#attr_android:defaultValue Apr 11 21:10:36 oh actually I should try jrebel first Apr 11 21:19:20 missingno also try dexOptions process count Apr 11 21:19:32 it was default 4, but that was too much for my machine Apr 11 21:19:55 so you would get 6 jvm: 1 for AS, one for gradle, and 4 for dx Apr 11 21:20:06 i changed it to 2 Apr 11 21:21:10 Just learned that a new project I'm working on uses websockets for certain things while I'm inside of the application. Is there a go to library for sockets on Android? Apr 11 21:21:25 Something like okhttp from JakeWharton Apr 11 21:22:50 eghdk okhttp has support for ws Apr 11 21:23:07 g00s: Oh really? suhweet. Apr 11 21:23:31 Haven't used websockets before but I feel like I get the gist of it. Apr 11 21:23:39 https://github.com/square/okhttp/tree/master/okhttp-ws Apr 11 21:23:51 i have no idea which impls are best though Apr 11 21:23:57 Just an open connection so client and server can talk faster. Apr 11 21:28:23 Hi everyone, I am facing an issue with Android 4.4 using Socket.io. I am attempting to connect to an HTTPS server using TLS 1.2. On other HTTPSURLConnections I am able to set the enabled protocols properly, however using Socket.io it isn't working at all. If anyone could possibly give some input on that it would be greatly appreciated. Apr 11 21:28:37 https://github.com/socketio/socket.io-client-java/issues/298 Apr 11 21:28:42 I have opened a github issue on the matter as well Apr 11 21:39:33 g00s: Any idea why I can't import okhttp ws even though I already have okhttp in my apps build.gradle? Apr 11 21:40:43 eghdk do you have okhttp-ws ? Apr 11 21:40:48 oh yes Apr 11 21:40:56 sorry no idea :( Apr 11 21:51:27 eghdk maybe you have the incorrect version? or your gradle compile statement is incorrect? Apr 11 21:51:29 compile 'com.squareup.okhttp3:okhttp-ws:3.0.1' Apr 11 21:51:36 should look like this Apr 11 22:04:56 Thanks RyanT had it formatted the wrong way. Apr 11 22:05:07 np egdhk Apr 11 22:05:37 So how do I just send requests over this socket? Apr 11 22:07:54 Try socket.io? That's what I am currently using.. Apr 11 22:09:37 https://github.com/square/okhttp/tree/master/okhttp-ws Apr 11 22:09:54 Super short description on how to use okhttp-ws. Not really useful. Apr 11 22:13:53 I'll delete it Apr 11 22:14:30 Has anybody working with a MediaPlayer seen an onCompletion listener being hit over and over and over again? It’s only happening to me on a few devices, namely, Nexus 5 v5.1.1, Note 4 v.5.0.1, and Galaxy S6 v5.0.0 Apr 11 22:14:38 All other devices call the listener when appropriate Apr 11 22:15:20 Hey JakeWharton you might be getting blown up about this already, but are there plans to update the sdk manager plugin to play nicely with Android Studio 2? Apr 11 22:15:52 In a release anyway Apr 11 22:16:00 Well I never released it for 1, so it seems unlikely Apr 11 22:16:46 RyanT: Is Okhttp-ws the go to web socket library? You mentioned socket.io ? Apr 11 22:18:55 eghdk: I'm not too certain about the go to library. I just happen to be using socket.io. I believe there are a couple other libraries to look at. Apr 11 22:19:07 https://github.com/TooTallNate/Java-WebSocket Apr 11 22:19:10 Okay, I'll take a look at socket io Apr 11 22:19:11 here is one that may prove useful Apr 11 22:19:33 just as a preface socket.io uses a node.js server i believe Apr 11 22:20:39 I already have a server to connect to, I just need to implement it on the client side. Apr 11 22:22:51 i'm using rxjava and retrofit to make a call to a rest service that gets chained to do some other work and getting a android.os.NetworkOnMainThreadException. However, I'm definitely observing on the main thread and subscribing/unsubscribing on schedulers.io() Apr 11 22:23:06 the same code is working for a different call; could it be the other work that's generating that exception? Apr 11 22:23:35 Show code? Apr 11 22:23:53 ok, hang on, this might take a few mins Apr 11 22:24:12 If you're chaining it sounds like you're missing a subscribeOn inside a flatMap Apr 11 22:25:11 oh, would i need to do the scheduling before chaining it into a flatMap? Apr 11 22:25:52 Why do some of my breakpoints not have the checkmark, and thus don’t actually break? Apr 11 22:26:16 it sorta looks like this: api.getAll().flatMapIterable(x->x).map(x->some stuff()).observeOn(main thread).subscribeOn(io).unsubscribeOn(io) Apr 11 22:26:26 JakeWharton: Any reason not to use okhttp-ws? Seems to conform to RFC so that's all I need. Apr 11 22:27:02 i thought that you could just schedule at the end since nothing is yet subscribing to it -- is one of those other calls kicking off the rest call? Apr 11 22:27:02 eghdk: nope. Use it! Apr 11 22:28:02 How much problem can I get into if I publish an app that bundles remixed music containing samples from 70s songs? Apr 11 22:28:15 idk if that is the right place to ask... Apr 11 22:28:25 JakeWharton: Cool. Will do. It's my first time using ws, so excuse my ignorance, but isn't the point for a websocket to stay open? I got okhttp-ws to open a connection but now curious how I send another request back Apr 11 22:29:39 s73v3r, what are you trying to break on? Apr 11 22:29:53 nevermind, the part wasn’t actually being executed Apr 11 22:30:04 ah. kk Apr 11 22:31:06 kommunicate: looks fine. You're sure there's no other API calls? Apr 11 22:32:39 JakeWharton: that observeable gets chained into another one that uses .filter() -- any issue with that? Apr 11 22:33:08 then finally the .subscribe() call gets made Apr 11 22:33:33 kommunicate, can you post the code? Apr 11 22:34:05 truckcrash: sure, give me a min Apr 11 22:40:37 hmm.. this is weird, i got it to work, but i'm not sure why -- uploading the code to pastebin to get your $0.02 on it Apr 11 22:42:16 http://pastebin.com/yr34gzqs Apr 11 22:42:50 whoops, pasted that slightly wrongly Apr 11 22:43:35 not sure why returning the .compose() observable is ok but not the other observable Apr 11 22:46:04 i guess the scheduling code doesn't get applied unless it's in the chain rather than as a child, but i'm not sure why Apr 11 23:06:58 ok, ignore all this, I didn't understand what I was doing with rxjava Apr 11 23:07:10 JakeWharton and truckcrash: thanks for the help! Apr 11 23:28:12 hello, i need endless adapter for custom widget (Scrollable Wheel like ios), i need it for date picker (endless in both direction) how i can made it? Apr 11 23:31:21 why not just use the Date Picker? Apr 11 23:31:30 because top manager want Apr 11 23:32:12 that doesn’t make any sense Apr 11 23:32:27 we have custom layout Apr 11 23:32:45 the app must respect the project Apr 11 23:33:32 you can style the datepicker Apr 11 23:34:00 datepicker have different approch to pick date Apr 11 23:34:16 we have a gear (scrollable wheel) to scroll for pick date Apr 11 23:34:36 and the datepicker has spinners Apr 11 23:34:39 what’s your point Apr 11 23:35:00 ok Apr 11 23:35:16 but i have only one spinner that move the date from 1 day at time Apr 11 23:35:55 we have only one wheel that scoll the date in both direction Apr 11 23:36:03 one spinner to pick a date? that sounds terrible Apr 11 23:36:18 yeah, but is the way he want to do Apr 11 23:36:29 tell him he’s wrong Apr 11 23:36:42 this approch have reason Apr 11 23:36:48 one spinner means people are going to be spinning forever Apr 11 23:37:39 yes, but how i say, the approach have a reason Apr 11 23:37:48 doesn’t sound like it Apr 11 23:37:57 but the wheel must be infinite Apr 11 23:38:11 infinite spinning ! Apr 11 23:38:15 sign me up ! Apr 11 23:38:21 LoL Apr 11 23:38:31 SuperStep is your boss a designer, UX guru, etc ? Apr 11 23:38:40 because if not, its just a stupid opinion Apr 11 23:38:40 nope Apr 11 23:39:19 ok i explain why this component it needed Apr 11 23:39:33 yeah, your boss is wrong. if the person is trying to pick a day further out than tomorrow or yesterday, they’re gonna be frustrated and give up Apr 11 23:40:12 s73v3r, the day is changed very rarely Apr 11 23:40:13 if you really want to do this, and I would emphasize not to, then you want to look at the source for the DatePicker, and see how they do it Apr 11 23:40:21 ok Apr 11 23:40:27 thanks Apr 11 23:40:31 that’s not an excuse to give them a shitty experience for changing it Apr 11 23:40:57 this application is not for android store Apr 11 23:41:05 doesn’t matter Apr 11 23:41:11 is custom app that work for internal project Apr 11 23:41:15 doesn’t matter Apr 11 23:41:19 rarley the day must be changed Apr 11 23:41:19 someone is going to use it Apr 11 23:41:24 doesn’t matter Apr 11 23:41:31 ok but be quiet Apr 11 23:41:40 i know this is not the best approach Apr 11 23:42:01 but this is the directive give to me Apr 11 23:42:03 hehe Apr 11 23:42:03 about what? you forcing shitty experiences on people who apparently cannot decide not to use the app? Apr 11 23:42:24 go back and tell the boss no Apr 11 23:42:30 LoL Apr 11 23:42:33 i cannot Apr 11 23:42:38 yes, you can Apr 11 23:42:41 s73v3r be quiet ! :D Apr 11 23:42:45 tell him to go back and use a regular datepicker Apr 11 23:43:02 it’ll be 10,000x less buggy than whatever you make, and 10,000x less frustrating for the user Apr 11 23:43:30 problem is the platform datepickers are pretty inconsistent too across versions Apr 11 23:43:40 but there are some 3rd party projects Apr 11 23:43:53 would have been nice if they backported that stuff to support lib Apr 11 23:44:09 actually, i think they should just put the whole platform in support lib Apr 11 23:44:12 :D Apr 11 23:44:26 omg too expansive Apr 11 23:44:49 i have to fix it and need to many time Apr 11 23:45:00 i just want a endless Adapter Apr 11 23:45:12 in both direction Apr 11 23:45:25 they don’t exist. which is why I pointed you at DatePicker, to see how they do it Apr 11 23:46:21 ok maybe i can use some bounds Apr 11 23:46:32 i load just one year in both direction Apr 11 23:46:42 >.> Apr 11 23:46:45 <.< Apr 11 23:46:48 yeah i know Apr 11 23:46:59 for this i want endless, for load at runtime Apr 11 23:47:28 fuck this shit Apr 11 23:47:43 heh Apr 11 23:47:48 someone kill me D: Apr 11 23:48:25 just put the DatePicker in Apr 11 23:48:46 i have to kill my boss for put the DatePicker Apr 11 23:48:47 then your boss has to decide whether it’s worth your time to change to what he wants, or work on other parts of the app Apr 11 23:49:00 SuperStep yeah just put DatePicker in there, and tell boss its a lot of work to do it endless Apr 11 23:49:02 odds are, the boss isn’t going to notice Apr 11 23:49:06 maybe he will forget about it Apr 11 23:49:25 impossible Apr 11 23:49:49 SuperStep so what is the user most likely to select ? Apr 11 23:50:10 would it make sense to have buttons in addition like 'same time tormorrow' , 'same time next week', etc Apr 11 23:50:30 yeah i know Apr 11 23:50:36 but the problem is not this Apr 11 23:50:42 is for particular purpose Apr 11 23:50:55 ok, good luck ! Apr 11 23:51:05 sometime things are in the hands of fate Apr 11 23:51:30 hey krabador you are there! :D Apr 11 23:51:52 hi SuperStep , what's up Apr 11 23:51:58 all right Apr 12 00:04:56 anyone have idea how overflow menu in Google Photos has icons ? Apr 12 00:06:30 theres an overflow menu? Apr 12 00:06:54 i guess theres one when viewing an image but theres no icons i see Apr 12 00:07:24 i see them. on the left side of the menu label Apr 12 00:08:07 Yea theres icons in the drawer, not what hes asking though Apr 12 00:08:13 Or am i missing something Apr 12 00:08:22 how i can print string in TestCase? Apr 12 00:08:33 that’s not the drawer. that’s the overflow menu Apr 12 00:09:20 Then were definitely looking at different things Apr 12 00:09:30 three dots in the action bar? Apr 12 00:09:41 Thats an overflow menu Apr 12 00:09:59 that’s what I’m clicking Apr 12 00:09:59 I dont see one lol Apr 12 00:10:07 Yea my G photos only has a drawer Apr 12 00:10:19 ¯\_(ツ)_/¯ Apr 12 00:10:54 anyways, g00s, i’m not 1000% sure, but I believe you can specify the icon in the xml Apr 12 00:10:54 orbyt_ do you have Photos selected in bottom nav ? Apr 12 00:11:23 s73v3r yeah you can specify the icon in XML ... but they only show if they are in action bar Apr 12 00:11:50 maybe they’re setting the leftdrawable on the textitem? Apr 12 00:11:53 seems like a weirdly arbitrary restriction Apr 12 00:12:13 s73v3r hmm, maybe Apr 12 00:12:48 although i don't think you have access to the textview like that, unless you have custom views for each item Apr 12 00:13:06 so i guess maybe thats it, custom views for each item O.o Apr 12 00:13:10 http://stackoverflow.com/a/20318161/3917064 Apr 12 00:13:15 wonder if that works Apr 12 00:14:25 g00s: yes, I guess that's the latest version of the idea of web 2.0, virality etc. Apr 12 00:15:33 o hey Ologn Apr 12 00:16:05 s73v3r orbyt_ ok time to decompile photos :D Apr 12 00:16:13 lmao Apr 12 00:16:15 let us know what happens Apr 12 00:22:36 31 menu xmls O.o Apr 12 00:25:53 i wonder how googlers navigate these large apps, so many layout files in one directory ... Apr 12 00:27:52 FrameLayout android:orientation="vertical" wut Apr 12 00:28:14 oh sweet does that get preserved on decompile? lol Apr 12 00:30:51 well the menu is in a maybe i'll try that Apr 12 00:35:42 anybody use the emulator behind a proxy? Apr 12 00:36:15 The only way I could figure it out is by specifying the proxy info in command line arguments Apr 12 00:36:25 I save it as a .bat script Apr 12 01:00:48 is there any good RangeBar lib go to with? **** ENDING LOGGING AT Tue Apr 12 02:59:58 2016