**** BEGIN LOGGING AT Thu Mar 31 02:59:58 2016 Mar 31 03:00:01 which loads well Mar 31 03:00:08 but when i press the return/back Mar 31 03:00:10 button Mar 31 03:00:21 then press the button that triggers the event again Mar 31 03:00:24 sounds straightforward, you're doing something against gms when googleapiclient hasn't connected yet Mar 31 03:00:27 it retunns Mar 31 03:02:21 pfn: he's calling the code in onConnected Mar 31 03:02:45 no idea what onConnected is Mar 31 03:02:54 is that some gms callback? Mar 31 03:03:10 yep Mar 31 03:03:21 Yea; com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks Mar 31 03:03:28 explodes: don't I need to pass something to instantiate communication now?: Communication c = new Communication(); Mar 31 03:03:51 cpt-oblivious: Yes, look at the new Communication constructor Mar 31 03:04:10 yea I don't understand what that is :p Mar 31 03:04:15 probably registered the wrong activity for a listener the second time Mar 31 03:04:37 well I understand what a constructor is, just not what argument you're passing into it Mar 31 03:04:46 the @NonNull MainActivity mainActivity thing Mar 31 03:05:17 cpt-oblivious: @NonNull means you cannot pass in null, MainActivity means you pass in a MainActivity instance, and mainActivity is the name of the variable used in the constructor function Mar 31 03:05:32 I see, passing in 'this' works Mar 31 03:05:39 cpt-oblivious: ergo: Communication c = new Communication(this); // if you're in MainActivity Mar 31 03:05:43 cpt-oblivious: yep! Mar 31 03:06:08 mainActivity.loginUpdateUI(result); Mar 31 03:06:11 that is still broken though Mar 31 03:06:18 it says it doesn't know what mainActivity is Mar 31 03:07:06 also tried mMainActivityRef.loginIpdateUI(results) but that also doesn't work Mar 31 03:08:28 mMainActivityRef is a WeakReference to MainActivity. You'll have to call: MainActivity mainActivity = mMainActivityRef.get(); if (mainActivity != null) { mainActivity.loginUpdateUI(results); } Mar 31 03:08:44 Look at the paste I sent you, it has that code Mar 31 03:11:05 oh damn, you're right. I'm blind. Mar 31 03:11:19 okay, so this works Mar 31 03:11:30 So thanks a lot for that explodes! Mar 31 03:11:33 but this stuff is black magic :p Mar 31 03:12:08 WeakReference are important, the more you develop for Android, the more you'll hear about "don't leak context" Mar 31 03:12:36 MainActivity is a Context, you want a context in memory only as briefly as you need it, otherwise your app will run out of memory Mar 31 03:12:46 WeakReferences are a power Java tool to help keep memory in check Mar 31 03:13:07 So you don't want hard dependencies between all activites to make interaction possible between them because you force all activities to stay in memory that way: Mar 31 03:13:17 and by using weak dependencies / checking if they exist, you don't have that problem? Mar 31 03:13:30 There are also better, more advanced, ways to pass around "events" - such as successfully logging in - to the various places in your app that care about such events Mar 31 03:13:49 Weak References, not weak dependencies, but yes Mar 31 03:14:06 That is exactly it! Mar 31 03:14:33 Yea that makes sense Mar 31 03:15:14 but at least now all my networking code with async and interaction between those activites works! yay! Mar 31 03:15:18 so thanks a lot for that explodes! Mar 31 03:15:32 that was the hard part, now it's simply adding a bunch methods to an API Mar 31 03:15:49 Nice Mar 31 03:15:51 Good luck Mar 31 03:16:49 Is there a convenient way to destroy all activities? Mar 31 03:17:00 I have a logout button which currently just spawns the main activity again Mar 31 03:17:17 But Ideally I'd like to clean up all activities Mar 31 03:17:55 oh found it already: intent4.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); **** BEGIN LOGGING AT Thu Mar 31 03:30:36 2016 Mar 31 03:30:39 it doesn't include fastboot drivers, though, and won't load the google fastboot driver because it's unsigned :( Mar 31 03:34:48 explodes: I have another question about linking classes: http://pastebin.com/67N8pk6t Mar 31 03:35:05 I created a baseActivity which contains my menuItems so I did not have to duplicate that event listener code in all my other activites Mar 31 03:35:13 so my other activities simply extend this baseActivity Mar 31 03:35:46 But now I want to disable / remove certain menu item entries based on a variable Mar 31 03:36:18 ok Mar 31 03:36:22 I'm not exactly sure where and how to deal with this Mar 31 03:36:30 Ideally I don't want to duplicate a ton of code Mar 31 03:37:14 cpt-oblivious: I do this, in onCreateOptionsMenu, you inflated your menu layout into "menu", from here, you can simply do: if (isSignedIn) { menu.removeItem(R.id.action_signin); } Mar 31 03:37:59 also: if (!isSignedIn){ menu.removeItem(R.id.action_signout); } Mar 31 03:39:27 yep that works, thanks a lot again! Mar 31 03:39:34 cpt-oblivious: Another not-so-common code pattern: check out the switch statement in onOptionsItemSelected: http://pastebin.com/sh9Ue8F5 Mar 31 03:40:01 Notice the curly braces around each case, that sets a scope so that you can reuse the "intent" variable name without having to add nubmers Mar 31 03:40:02 What about that switch pattern? Mar 31 03:40:19 oh Mar 31 03:40:42 yea I wrote this at the very start of my android project when Intents were still magic Mar 31 03:41:21 oh so the { are important, since without them it's not allowed. Mar 31 03:41:21 They are, then they wont be, then they will be again :P Mar 31 03:41:25 Which is why I simply added the numbers :p Mar 31 03:41:32 explodes: that is sooo true :p Mar 31 03:41:49 oh I have another hard question which is on my backlog of thigns to do Mar 31 03:42:02 Lets do it Mar 31 03:42:08 I have 10 minutes tho Mar 31 03:42:09 I start a video activity Mar 31 03:42:11 which plays a video Mar 31 03:42:27 but in the mean time it also plays audio in the activity that launched the video activity Mar 31 03:42:34 I want the audio to shut up until the video activity closes again Mar 31 03:43:15 You'll need to save your audio state in your audio activity. I'd look at "Icepick" https://github.com/frankiesardo/icepick to easily save and restore state Mar 31 03:43:32 explodes: http://pastebin.com/NWq0KuDc Mar 31 03:43:53 You save the audio file, position, and if it is playing, then on resume, load that file at that position, and if it was playing, play the track Mar 31 03:43:57 I do have an UtteranceProgressListener working (which was a pain in the ass) Mar 31 03:44:04 but I'm not sure if I can use that for video as well Mar 31 03:44:15 oh it's not that complicated Mar 31 03:44:28 yep. you got this. Mar 31 03:44:28 explodes: if you look at like 11 Mar 31 03:44:41 ok Mar 31 03:44:42 that playVideo launches a new activity Mar 31 03:44:45 but while that activity does stuff Mar 31 03:44:49 the playAudio also starts playing Mar 31 03:45:01 I want that playAudio to not execute untill playVideo is done Mar 31 03:45:41 ok - so save state in your activity that you need to play audio when you resume your activity (your activity will resume when the video activity "backs out"/finishes) Mar 31 03:46:06 yea I kill my activity with: VideoActivity.this.finish() Mar 31 03:46:22 So how do I make the other activity pause? Mar 31 03:46:48 tts.stop() Mar 31 03:47:04 well it shouldn't even start Mar 31 03:47:05 then resume it onResume, if you have "state" about your audio to play. Mar 31 03:47:10 then dont start it! Mar 31 03:47:16 well yea.. but how :p Mar 31 03:47:20 that code magically executes Mar 31 03:47:29 while I want it to only launch the activity and then shut it :p Mar 31 03:47:33 if (e.playVideo){ playVideo(); } else { playAudio(e.question, "question"); } updateGrid(); Mar 31 03:47:54 no because after the playVideo is done, it still needs to play that audio Mar 31 03:47:58 so can't be an if/else :p Mar 31 03:48:08 the audio just needs to wait for it's god damn turn! :p Mar 31 03:48:09 #onResume() { if (mQuestionState != null) { playAudio(mQuestionState, Mar 31 03:48:13 alright let me type it out Mar 31 03:48:59 explodes: something similar to this but then for video? http://pastebin.com/g3076imJ Mar 31 03:50:40 ooh so that onPause() is automatically called when another activity is launched I guess? Mar 31 03:50:55 cpt-oblivious: http://pastebin.com/jhF0uNEn Mar 31 03:50:59 cpt-oblivious: yes. Mar 31 03:51:07 there is always only 1 activity Mar 31 03:51:20 again: look at https://github.com/frankiesardo/icepick Mar 31 03:51:55 hmm Mar 31 03:52:21 so how does the control flow of that work Mar 31 03:52:30 so it hits the if statement, starts executing the video activity Mar 31 03:52:58 how do i change the default when connecting over usb debugging, to RNDIS Mar 31 03:53:12 cpt-oblivious: yep, and the onResume handles the audio when you return Mar 31 03:53:19 cpt-oblivious: I have to go. Good luck. Mar 31 03:53:26 thanks a lot again for the help! Mar 31 03:57:19 aww man this is a known issue with marshmallow Mar 31 03:57:25 =( it defaults to mtp for me Mar 31 03:57:31 it used to default for charging , for others Mar 31 03:57:38 but i need it to default to rndis =( Mar 31 05:21:04 When storing strings in a resource file do I need to escape the a backslash and if so can someone point me to documentation that says as such. I can only find stuff that says I need to escape ' and " Mar 31 05:58:23 after adding leak canary library I am facing exit value 2 issue while building.. Mar 31 05:59:15 has anybody experienced it the same.. actually i fixed it by adding multiDexEnabled =true Mar 31 05:59:21 but dont know the reason Mar 31 06:01:37 http://google.com test Mar 31 06:02:21 thanks, I needed that Mar 31 06:19:28 explodes: I have a question about the weakreferences Mar 31 06:19:39 I want to use that communication class from other activities Mar 31 06:19:46 do I now need to have a weak reference to each of those? Mar 31 06:20:00 then my communcation class ends up with a constructor of like 5-6 parameters Mar 31 06:20:28 I would create an interface that has the methods you need, such as onLoginSuccesful, and onLoginFail etc, and keep a weak reference to the interface type. then pass the interface type in as the constructor parameter Mar 31 06:21:24 uhm Mar 31 06:21:24 Overall, the pattern you're using isn't *bad* but it isn't great- for practice, this is a really great exercise, and over time you'll find a better way to do this, but let me type you up some code Mar 31 06:21:32 Send me a paste with the Communication class Mar 31 06:21:38 ok Mar 31 06:22:31 explodes: http://pastebin.com/98Y3zjrH Mar 31 06:22:52 sounds like good thing for eventbus Mar 31 06:23:09 so right now I'm calling the login() method from the main activity via: Mar 31 06:23:11 Communication c = new Communication(this); Mar 31 06:23:11 c.login(); Mar 31 06:23:53 But I have another activity (TeacherMenuActivity) that also wants to be able to instantiate a communication class object, and call getProgress(). Mar 31 06:25:42 So I should make the Communications class into an interface Mar 31 06:25:52 so that I don't have as many ugly dependencies all over the place I guess? Mar 31 06:28:27 nope you're fine Mar 31 06:28:35 I just cleaned up your ProgressEntry class a little bit Mar 31 06:28:47 I also moved the username and password to be paramters of login Mar 31 06:29:08 I added an interface "Listener" in the Communication class that your activities can either implement or pass in Mar 31 06:29:24 (I'd recommend passing in instances of the Listener, but implementing the interface is fine too) Mar 31 06:29:37 I see Mar 31 06:29:43 http://pastebin.com/H6Y3BTbx Mar 31 06:30:02 I also changed the constructor parameter to be a Listener instead of MainActivity Mar 31 06:30:19 Notice how the Listener interface has two methods: onLoginResult and onProgress Mar 31 06:30:38 I'll answer some questions you may have, then I have a proposition for you Mar 31 06:30:56 a proposition? O Mar 31 06:30:58 :O Mar 31 06:31:09 * cpt-oblivious goes to get coffee for explodes Mar 31 06:31:20 Yes, but first, is there anything about the new code that you do not understand? Mar 31 06:31:36 I'm not sure how to use this Mar 31 06:31:53 like, you have another class which then becomes: class a implements Communication { Mar 31 06:32:09 Right. So, firstly, add "implements Communication.Listener" to MainActivity Mar 31 06:32:51 Your MainActivity will then need to implement "void onLoginResult(String)" and "void onProgress(ProgressEntry[])" Mar 31 06:33:26 Second, TeacherMenuActivity will also need "implements Communication.Listener" Mar 31 06:33:48 then you TeachMenuActivity will need to also implement "void onLoginResult(String)" and "void onProgress(ProgressEntry[])" Mar 31 06:35:11 give me 5 mins, I'm editing stuff all over the place (including the paste :p) Mar 31 06:35:18 hello, does anyone know how it's called the listview used by datepicker in android 4 Mar 31 06:35:46 the listview has 3 row element with center element automatically selected Mar 31 06:35:57 spinner Mar 31 06:36:02 oh Mar 31 06:36:15 or I might be wrong Mar 31 06:36:26 cpt-oblivious: ok Mar 31 06:36:32 yep Im wrong Mar 31 06:36:34 no... Mar 31 06:36:40 https://developer.android.com/guide/topics/ui/controls/pickers.html Mar 31 06:36:42 this ? Mar 31 06:36:51 yes like this Mar 31 06:37:06 but i need the single row for custom data input Mar 31 06:37:24 and i need one in horizontal mode Mar 31 06:37:28 so make it Mar 31 06:37:36 extend Dialog or AlertDialog Mar 31 06:37:49 use your super developer skills Mar 31 06:37:51 or use setView Mar 31 06:37:58 show everyone that you're the boss Mar 31 06:38:00 yes, but is not for the time Mar 31 06:38:12 explodes: the changes you made to the ProgressEntry class don't work (or I'm retarded) Mar 31 06:38:15 gordon_: sometimes i feel like the developers radioactive spider Mar 31 06:38:21 lol Mar 31 06:38:37 maybe i can start from listview and use custom adapters? Mar 31 06:38:41 at least you dont need jquery to add two numbers, right? ;) Mar 31 06:38:48 no Mar 31 06:38:54 Hello everyone Mar 31 06:38:56 it's pure java widget Mar 31 06:39:00 gordon_: that is one of the best questions i've seen Mar 31 06:39:04 sathyam1992: ! Mar 31 06:39:06 you didnt get the joke SuperStep Mar 31 06:39:07 cpt-oblivious: don't work how? Mar 31 06:39:10 few hours ago LunarEclipse120 helped me update my Samsung Galaxy S3 (i9300) from CM 11 to CM 13 Mar 31 06:39:22 xD Mar 31 06:39:22 thepoosh: I quietly wish that was trolling Mar 31 06:39:25 yeah now i get Mar 31 06:39:28 cpt-oblivious: Notice that I capitalized the first letter: ProgressEntry Mar 31 06:39:31 the installation was successful. however, there is a slight problem. I'm unable to get the CB broadcast messages to stop Mar 31 06:39:31 http://meta.stackexchange.com/a/48195/236038 Mar 31 06:39:45 SuperStep: ^^ Mar 31 06:39:51 I'm seeking your help in this regard. Mar 31 06:39:55 explodes: I fucked up the brackets, no wonder it was unhappy. Mar 31 06:40:23 gordon_: you know what I hate? Mar 31 06:40:50 will anyone be able to help me in this regard? Mar 31 06:41:31 thepoosh: how should I know Mar 31 06:41:37 so i have to made one from scratch? Mar 31 06:41:53 I hate dealing with dialogs that don't have support libs for them Mar 31 06:42:06 I avoid dialogs ;) Mar 31 06:42:11 ProgressDialog has no appcompat widget Mar 31 06:42:14 SuperStep: probably Mar 31 06:42:31 sathyam1992: This is the wrong channel, I would join #android-root or the cyanogen mod channel Mar 31 06:42:31 very annoing Mar 31 06:42:38 I hate facebook integration the most Mar 31 06:43:06 by the way, thanks for help Mar 31 06:43:17 cpt-oblivious: I need to sleep within 17 minutes or I'll have a crappy day tomorrow Mar 31 06:43:30 hahahaha :P Mar 31 06:43:37 cpt-oblivious: Not sure what timezone you're in but I will be back online tomorrow in 8:17 hrs Mar 31 06:43:38 Thanks explodes: Mar 31 06:43:46 i'm from italy, i wake up right now Mar 31 06:43:49 SuperStep: well, you want to do something strange (at least from android widget perspective) Mar 31 06:43:53 explodes: I'm in GMT+1 Mar 31 06:44:01 (yes I have no sleep rhythm) Mar 31 06:44:04 I'm almost done with the changes Mar 31 06:44:06 gordon_: i hate facebook upgrades Mar 31 06:44:11 of major versions Mar 31 06:44:14 cpt-oblivious: no worries, we still have a few minutes Mar 31 06:45:02 gordon_: this is how I feel when upgrading FB SDKs Mar 31 06:45:02 http://cdn.meme.am/instances/500x/67625290.jpg Mar 31 06:45:16 yeah Mar 31 06:45:27 it's not even regular deprecation Mar 31 06:45:31 they just remove them Mar 31 06:46:14 dont tell me, I was upgrading from 2.x to 4.8 recently Mar 31 06:46:17 explodes: ok so I'm now at the implementing those methods in the main activity part Mar 31 06:46:23 same here Mar 31 06:46:26 it was tough Mar 31 06:46:31 there's 4.10 now, but it requires compilation for api 23 Mar 31 06:46:36 which I cant do right now Mar 31 06:46:37 yep Mar 31 06:46:43 we have 4.08 Mar 31 06:46:46 for that reason Mar 31 06:46:57 because of the permissions Mar 31 06:47:01 yep Mar 31 06:47:03 same Mar 31 06:47:04 fuckers Mar 31 06:47:07 :D Mar 31 06:49:05 explodes: why do I need to implement all the methods of the interface in all classes where I use the interface? Mar 31 06:49:32 because that's how java works ? Mar 31 06:49:53 at least until java 7 Mar 31 06:49:57 java 8 is different Mar 31 06:50:02 cpt-oblivious: right, that's where the proposition comes in. Mar 31 06:50:15 why can't you just implement / override the methods you actually need? Mar 31 06:50:20 gordon_: java8 allows you to only partially implement interfaces?! Mar 31 06:50:31 thepoosh: it allows for default methods Mar 31 06:50:37 YAY! Mar 31 06:50:41 with implementation in them Mar 31 06:50:42 default values as well? Mar 31 06:50:50 for parameters? Mar 31 06:50:50 oh.. i dont know this one Mar 31 06:50:55 * thepoosh hopes Mar 31 06:51:00 you mean in methods ? Mar 31 06:51:04 yes Mar 31 06:51:15 void doStuff(int count = 0) Mar 31 06:51:20 like in cpp Mar 31 06:51:34 I dont think so Mar 31 06:51:41 you need scala / kotlin for that Mar 31 06:52:27 I'm not sure I understand the purposes of interfaces. Wouldn't it make the most sense if just a single class implements the methods of the interface and that via all the other classes you can access those methods? Mar 31 06:53:47 no Mar 31 06:54:02 how would you imlement on click then ? Mar 31 06:54:13 you can implement many interfaces Mar 31 06:54:21 but onlu extend one class Mar 31 06:54:24 gordon_: that is just a java thing Mar 31 06:54:32 yes, i know Mar 31 06:54:35 just putting it simply Mar 31 06:54:42 cpt-oblivious: not in this case Mar 31 06:54:42 in C based languages you can have multiple inheritance Mar 31 06:55:05 explodes: if you need to maintain the code, not in any case Mar 31 06:55:18 cpt-oblivious: you want *any* class to be able to call these methods, probably not just your activities, although it may end up being just limited to activities. this code doesn't need to even know about activities Mar 31 06:55:51 So is a simple @override without implementation fine if I don't intend to use it in a specific activity? Mar 31 06:56:01 cpt-oblivious: So what I've done is made you login and progress methods accept a "callback" that is just Mar 31 06:56:15 cpt-oblivious: a simple one-method interface that accepts some object type T Mar 31 06:56:28 http://pastebin.com/6qdAr11y Mar 31 06:56:29 thepoosh: well.. I was lucky not to use EJB2 Mar 31 06:56:58 uhhh Mar 31 06:57:07 but when you look at it implementing interfaces all over the place ;) Mar 31 06:57:21 cpt-oblivious: notice that the Communication constructor no longer takes any parameters, the login method now takes a Callback, progress now takes a Callback, Mar 31 06:57:23 explodes: so I have to rename the listener? Mar 31 06:57:45 cpt-oblivious: with this refactor you're going to have to move some of that code you just wrote around. Mar 31 06:58:08 gordon_: you can just look at aws implementations Mar 31 06:58:22 too sacred ;) Mar 31 06:58:24 *scared Mar 31 06:58:37 cpt-oblivious: now your activities won't have to implement the methods it doesnt care about :) Mar 31 06:58:46 ah that's nice Mar 31 06:58:47 one callback for each call you make Mar 31 06:59:15 I'm kind sorry for the runaround, but at the same time, now you see why it is better this way Mar 31 06:59:20 yea Mar 31 06:59:24 this way I learn more from it Mar 31 06:59:27 give 2 mins, let me shuffle around my code. Mar 31 06:59:33 ok Mar 31 07:01:55 explodes: shouldn't that construct of private class WeakCallback be called that as well instead of CallbackHandler? Mar 31 07:02:01 constructor* Mar 31 07:02:20 cpt-oblivious: oh whoops, yes, I renamed it halfway through and forgot to finish Mar 31 07:04:16 also had to make WeakCallback on line 29 final according to my IDE Mar 31 07:05:13 explodes: ok so I made all the changes Mar 31 07:05:18 Sweet. Mar 31 07:05:46 Now your code is 1) more succint, 2) more maintainable, 3) scope is more isolated to its responsibilities (implies 1 & 2) Mar 31 07:06:03 yea Mar 31 07:06:18 And less prone to leaking Context. Mar 31 07:06:30 now I only need to figure out how to call this from the other methods Mar 31 07:07:30 new Communication().login("cpt-oblivious", "ilikebigbutts", new Callback(){ @Override public void onResult(String result) { /* use result */ }}); Mar 31 07:08:06 and that overriden onResults is called with the result of that right? Mar 31 07:08:14 yup! Mar 31 07:08:59 new Communication().getProgress(new Callback(){ @Override public void onResult(ProgressEntry[] result) { /* use result */ }}); Mar 31 07:09:07 It's easy like that Mar 31 07:09:10 I have to sleep Mar 31 07:09:16 it's kinda like javascript with all the callbacks Mar 31 07:09:26 Let's not say things we can't take back Mar 31 07:09:31 :D Mar 31 07:09:52 well almost any javascript function that is async starts with callback unless you want everything to execute randomly Mar 31 07:09:57 I cursed a look before I figured that out Mar 31 07:10:01 A little bit (a lot of bit) more refactoring of this pattern and eventually you'll wind up with something called Retrofit Mar 31 07:10:02 a lot* Mar 31 07:10:38 http://square.github.io/retrofit/ Mar 31 07:11:25 Find me tomorrow if you have more questions, I have to sleep Mar 31 07:11:27 what's the right directory for xml drawables? just drawable? Mar 31 07:11:32 yes Mar 31 07:11:34 uhh Mar 31 07:11:36 vector drawables Mar 31 07:11:38 sorry Mar 31 07:11:43 explodes: thanks for your time. Mar 31 07:11:51 running the app now, let's see if it works Mar 31 07:12:23 wooo it works Mar 31 07:16:03 nice. no problem man - it was fun Mar 31 07:16:08 I'm out for reals Mar 31 07:16:51 how do you guys think dagger 2 compares with dagger 1? Mar 31 07:17:29 personally I feel that the lighter proguard you get from dagger 2 doesn't pay for the extra effort that is implementing it Mar 31 07:17:46 and migrating is specially not worth it Mar 31 07:18:31 dagger2 is more type safety Mar 31 07:20:19 Just not having to deal with reflection and proguard stuff is worth Dagger2 Mar 31 07:20:33 As a result also more compact code. Mar 31 07:20:40 And smaller binaries. Mar 31 07:36:34 Well, proguard is no issue with dagger1 either. Mar 31 07:36:41 Just -dontobfuscate Mar 31 07:37:07 Obfuscating your code is useless in any way anyway. Mar 31 07:48:43 Anyone knows why would recycler view scrolll not be picked by coordinator layout? Mar 31 07:58:57 sivi, maybe you forgot to add app:layout_behavior="@string/appbar_scrolling_view_behavior" Mar 31 08:05:27 thanks adq, tried adding it and it did not seem to change anything Mar 31 08:05:57 well, look several examples and tutorials you will find online, compare, fix, profit Mar 31 08:06:18 lol ok Mar 31 08:12:10 hello, recylerview notifyItemInserted does not refresh the UI . http://paste.ubuntu.com/15566062/ Mar 31 08:13:38 this is exactly what happens, initializer data creates adapter and i see 1 row data, after addData method worked i see nothing changes and if i notifyDataSetChanged, it works but also blocks my recylerview so i cant click to the item Mar 31 08:17:43 lol setHasfixedSize false solved, i even didnt realize that there is a method like this in my code. thx anyway Mar 31 08:19:48 thanks adq, solved by adding android:fitsSystemWindows="true" to the Toolbar element in xml Mar 31 08:35:50 hey guys! I'm developing an Android TV app and faced a problem that I didn't have before. Inside the search activity, Android gives me an option to search by voice recognition. And everything worked nicely before today. The logcat says that RECORD_AUDIO permission is required, but it has been present since the beginning of the app. It doesn't give me an exact line of crash, it just can't resume my search activity. Anyone with exper Mar 31 08:36:15 Did you request Android 6 permissions like you should? Mar 31 08:36:39 What do you mean? Here's the line in the manifest file: Mar 31 08:37:03 that's not how you ask for permissions on android 6 Mar 31 08:37:17 just ? Mar 31 08:37:32 or through java code? Mar 31 08:37:58 lazz: https://developer.android.com/training/permissions/requesting.html Mar 31 09:00:48 Alright guys fixed it! Thanks a lot people! Have a great day! Mar 31 09:24:53 ugh, how hard can it be to get a button on my action bar :p Mar 31 09:37:01 well this is annoying Mar 31 09:42:00 cpt-oblivious: pretty easy Mar 31 09:42:12 the xml is playing with me Mar 31 09:42:56 cpt-oblivious: are you adding the icon to the menu.xml file? Mar 31 09:43:05 uhm Mar 31 09:43:11 I created a separate file Mar 31 09:43:16 since I don't want it in the setting menu bar Mar 31 09:43:20 I want it on the action bar Mar 31 09:43:45 it's part of the menu of the ActionBar Mar 31 09:43:54 oh Mar 31 09:45:09 I tried that Mar 31 09:45:14 but it keeps adding it in the settings menu panel Mar 31 09:45:36 thepoosh: isn't this supposed to force it on the action bar: android:showAsAction="always" Mar 31 09:49:15 טקדןר Mar 31 09:49:17 yesir Mar 31 09:49:20 ooooh I managed it Mar 31 09:49:27 my namespacing thing was fucked Mar 31 09:50:16 oh noez Mar 31 11:16:05 if i post a runable to a handlerThread, how can i make sure its not queued up while another is in progress? Mar 31 11:16:45 aep: HandlerThread has a Looper that goes through a queue of tasks to run and runs them serially Mar 31 11:16:47 i tried aquiring a semaphore before posting and releasing inside the runnable at the end Mar 31 11:16:52 yeah i know Mar 31 11:16:56 i dont want them queued up at all Mar 31 11:16:59 if you suspect starvation you can postInFrontOfQueue Mar 31 11:17:13 that's not how CPU time works Mar 31 11:17:15 nah. its a download thing that has to run in the background Mar 31 11:17:38 i just dont want to do it again when the user presses the download button while its still in progress Mar 31 11:17:40 I think there is a misunderstanding, everything is queued Mar 31 11:17:56 so manage it with flags and states Mar 31 11:18:13 yeah i tried that Mar 31 11:18:57 you can also check the queue for existing tasks Mar 31 11:22:39 but that would mean writing a boolean state from one thread and reading from another Mar 31 11:22:39 dunno if thats safe Mar 31 11:22:51 ah nice, there is AtomicBoolean Mar 31 11:25:53 Hi, I've made on activity that is a TableLayout. So I have applied some TableRows in my xml. But I need one element that isn't inside a TableRow, a simple textview. Is it bad practice to NOT have all elements in a TableRow when using a TableLayout? Mar 31 11:26:41 why?! Mar 31 11:26:57 thepoosh: was that for me? Mar 31 11:27:00 why would anyone use table layout Mar 31 11:27:02 ?! Mar 31 11:27:45 Dunno , I thought it sounded logical since that whole activity will have a table look where everything is arranged from top down in rows. Mar 31 11:29:28 options.inJustDecodeBounds = true; BitmapFactory.decodeStream(stream, null, options); options.outWidth and height are -1 anyone got an idea ? Mar 31 11:29:44 thepoosh: could you elaborate why it isn't a good idea? Mar 31 11:37:11 tablelayout are not good looking and hard to manage Mar 31 11:37:24 why not RecyclerView or PreferenceFragment? Mar 31 11:39:18 thepoosh: No reason, I'll check them out. Otherwise, could I use LinearLayout and make TableRows out of my elements anyway? I felt they provided a good look Mar 31 11:40:38 dunno, worked with tablelayout once Mar 31 11:40:43 4 years ago Mar 31 11:48:10 that was awful? Mar 31 11:50:26 I have an issue. Used TransType to export fonts to both OTF and TTF. But regardless of file extension the textColor is not set anymore. Mar 31 11:55:38 hithere Mar 31 11:57:31 hm, even robot doesnt seem to listen to textColor. I wonder what could be overriding it or whats up Mar 31 12:25:35 adding a font overrides the textColor in xml. I need to set the textColor in code instead. Seems to ignore the padding/margin in xml too. It didn't do that with another font (It didnt do that when I built it on another OS with another font) Mar 31 12:25:35 Hey people! Not so while ago I've updated my project's support library to 23.1.1 because I needed the GuidedStepSupportFragment, but now my ImageCardView shows me an error Binary XML file line #21: You must supply a layout_width attribute. Mar 31 12:25:57 This happens when I try to search for a movie inside the SearchFragment Mar 31 12:26:33 I use the same class for the BrowseFragment and everything's okay, but when I try to search for a movie it crashes with that error, even tho I'm not inflating from XML Mar 31 12:26:44 Anyone with experience with this problem? Mar 31 12:35:19 Can I achieve transparency with rgba colors? I heard someone meantioned you can use #80ffffff for example to do this, but it hasn't really worked out so far. Mar 31 12:36:19 The A in the RGBA is the alpha channel Mar 31 12:36:44 (the last two hexadecimals) Mar 31 12:37:01 Bernzel, it depends where you want to use it actually often it is ARGB Mar 31 12:37:03 And #80FFFFFF would be transparent if you'd have ARGB not RGBA :) Mar 31 12:38:04 ktwo: Ah I see. Well it's for this library: https://github.com/lopspower/CircularImageView Where there seem to be some sort of layer on top of the image I place as src. It disrupts my color theme so I need to transparent that border color Mar 31 12:39:10 For many things like drawable setColorFilter you can just save your color as int like int col = 0xAARRGGBB its pretty handy Mar 31 12:51:46 hi! Mar 31 12:53:08 does the gradle experimental plugin support precompilled headers? Mar 31 12:53:31 I want to read the sensors on android (including camera) and do some manipulation. How do I do this using C++? Is there a book that I can use to get started? Mar 31 12:53:33 this could be really helpfull for big projects (3000+ source files) Mar 31 13:15:28 Is it weird to, in an Activity, have a nested class that implements Runnable, and do any SQLite transactions in that runnable on a bg thread Mar 31 13:16:32 I know most transactions will be less then 60 ms Mar 31 13:16:37 But just to be sure Mar 31 13:19:50 I personally would probably use a separate class for that task Mar 31 13:20:12 Well a nested class is pretty much a seperate class, no? Mar 31 13:21:17 Well, technically you could probably fit everything into one file.. But you know why start here. Basically i would design the code in a way you could even replace sqlite with something else without touching the activities at all Mar 31 13:21:50 Hm true, well... say I am saving an array of object X Mar 31 13:21:57 I have an X model class Mar 31 13:22:10 And that class has a X#Save method, which does the actual transaction Mar 31 13:22:22 It always depends what your aim is, if its just a very simple app, not huge complexity - hell - why not. but if you start adding more and more nested classes, better do decent separation of things Mar 31 13:22:37 So all Im doing in the nested runnable class is looping over array of Xs and calling X#Save(thisX) Mar 31 13:23:22 Know what I mean ktwo Mar 31 13:57:23 When storing strings in a resource file do I need to escape the a backslash and if so can someone point me to documentation that says as such. I can only find stuff that says I need to escape ' and " Mar 31 13:58:10 hello, i wrrite application based on communication client-server Mar 31 13:58:43 how set session client-server on android? Mar 31 13:59:21 or how look default communication based on authorized connection? Mar 31 14:13:52 I have an EditText element. But the text inside it is centered vertically. I would like the text to start from the top-left corner and work it's way down to bottom-right corner. Any way to do so? Mar 31 14:22:59 working from home today, woo Mar 31 14:44:15 drose379: what you’re saying is pretty much a hacky ORM. Mar 31 14:44:28 drose379: seriously, look into an ORM like ORMLite or GreenDao. Mar 31 14:44:40 I’m not sure if there’s an ORM similar to hibernate on Android, though Mar 31 14:47:58 is it ok to make user put method of payment in the app for in app purchases Mar 31 14:48:12 "enter credit card number to buy that" etc Mar 31 14:49:51 or do I have to use whatever android offers for payments Mar 31 14:50:01 guideX: You're using your own payment method? Not Google IAP api? Mar 31 14:50:13 well I'm considering my options Mar 31 14:50:22 credit cards would be easier for me Mar 31 14:50:41 because I already have it setup, and would just use my existing site web services to do it Mar 31 14:51:49 just wondering on a strictly rules level, do apps make it into the store like that Mar 31 14:53:26 guideX: the rules pretty much say you can only use Google’s payment system. Mar 31 14:53:41 WhatsApp fought against that, but lost. Mar 31 14:53:46 ah ok Mar 31 14:54:09 I wonder specifically what that means.. like can my users go to my website, setup the method of payment with their login, and then purchase without entering a cc? Mar 31 14:54:16 in the app? Mar 31 14:54:36 or is it any buying concept Mar 31 14:55:16 I wonder what the policy is, and what you can and cannot do, maybe somewhere they spell it out Mar 31 14:56:33 guideX: buying any non-tangible items through anything distributed via the store has to happen via IAP Mar 31 14:56:48 funnily, this does not apply to webbrowsers, unless Google wants it to. Mar 31 14:57:28 hrm ok Mar 31 14:58:08 btw, guideX, this policy might be illegal in your country, but unless you want to go through the courts, you have next to no chance at succeeding. Mar 31 14:58:19 oh not looking to fight anything Mar 31 14:58:30 just trying to figure the way forward for my app in the purchasing area Mar 31 14:58:58 the credit card option would've been a quick and dirty way to get it working fast, but we'll see Mar 31 14:59:22 maybe i'll just remove that part for now, and do it round 2 Mar 31 14:59:24 guideX: but Google wants its fair 30% share of your money! Mar 31 14:59:36 <[7F3DEA92]> guideX, I still adore your app idea I just don't have time to make it happen D: Mar 31 14:59:44 btw, IAP can be reversed at any time by Google, and you have to expect them taking every money you got ever. Mar 31 14:59:46 <[7F3DEA92]> guideX, [7F3DEA92] == OverCoder Mar 31 14:59:53 [7F3DEA92]: keep it in mind though :D Mar 31 15:00:07 Several devs have been hit before by Google forcing them to pay back years of store and IAP payments Mar 31 15:00:17 which obviously kills your business. Mar 31 15:00:55 hrm, maybe I'll just add the 30% to the price of the item Mar 31 15:01:06 i'll leave that up to the people in charge of the project :D Mar 31 15:01:16 <[7F3DEA92]> guideX, sure :P Mar 31 15:01:19 sounds like I have a payment gateway to learn though Mar 31 15:02:56 anyone know if the android studio is stable yet in 2.1? Mar 31 15:02:58 more noob questions... when you use the google api, the money goes to google, then you can get it into a bank account? Mar 31 15:03:45 guideX: kinda, it’s more complicated than that. Also, legally, the money is still Google’s, only lent to you. Mar 31 15:03:49 hey everyone. Mar 31 15:04:00 have fun trying to explain that to the ones who made the project. Mar 31 15:04:30 justJanne: what do you mean lent.. I mean we provide a service, we should get our cut right Mar 31 15:04:43 well anyways I'l read up on it :D Mar 31 15:05:06 guideX: yes, but Google can take the money back if they believe you violated their ToS, or if they have reason to believe you compete with them. Mar 31 15:05:17 read the play store ToS Mar 31 15:05:30 or rather, send them to someone from legal Mar 31 15:12:59 currently adding a bottomsheet (wip): https://vid.me/Pw9y Mar 31 15:17:05 adq, the up-swipe to reveal sucks, especially pre-marshmallow because of the google now launch gesture Mar 31 15:17:28 or was it pre-lollipop Mar 31 15:17:31 pfn, yeah well, i force the state to be expanded as first Mar 31 15:17:43 then user can dismiss it via swipping or touching another area, or the back button Mar 31 15:18:07 not sure if i will change that behavoir or not, cause the user is not aware then that he can swipe it up again for example Mar 31 15:18:34 give it a little bounce on initial peek Mar 31 15:18:45 maybe i will put something at bottom which is covered by the sheet when expanded, so in any situation if the user is not aware he can swipe up again, he can click this part to make the sheet expand again Mar 31 15:18:49 anyone remember the problem with compound drawables on textview where if you use a selector they dont resize on state change? you end up having to use android:constantSize on your selector? anyone got any workarounds? Mar 31 15:18:50 e.g. an overshoot interpolator Mar 31 15:19:22 noted thx pfn, but i don't trust most user to be able to intuitively understand this bounce means you can slide Mar 31 15:19:25 still it's neat Mar 31 15:23:52 Napalm, yes Mar 31 15:24:10 i always backup'ed the padding prior to changing it and restoring it after the change Mar 31 15:24:16 was very annoying Mar 31 15:26:17 humm maybe i mistook this pb with another one, for compounds i used setCompoundDrawablesWithIntrinsicBounds Mar 31 15:26:53 and i don't see this padding hack in my code like i needed with setImageDrawable Mar 31 15:38:43 adq: here ya go https://gist.github.com/slightfoot/b508ed468e8bfe9d699c5d644928cff6 Mar 31 15:38:46 sorted it that way Mar 31 15:39:08 dang Mar 31 15:57:41 Napalm using AS 2.0 RC ? Mar 31 15:57:50 nope Mar 31 15:58:04 didnt know it was RC yet.. thought it was still beta Mar 31 15:58:16 hey Napalm Mar 31 15:58:20 hey jvrodrigues Mar 31 15:59:40 Napalm ok. yeah, just wondering what the requirements to run it are Mar 31 15:59:53 do i need sdk tools rc, build tools rc, etc ... Mar 31 16:01:00 no idea Mar 31 16:03:36 https://github.com/bytedeco Mar 31 16:03:40 hmm, this is pretty awesome Mar 31 16:12:45 stuff like ffmpeg, opencv, etc. all bridged for java Mar 31 16:13:38 https://github.com/bytedeco/javacpp Mar 31 16:24:13 when a video file is streamed as a virtual webcam, so that the emulated camera on the android emulator receives the video, some apps fail because they try to auto-focus Mar 31 16:24:18 is there a way to stop an app from auto-focusing? Mar 31 16:35:10 What is the correct way to use the @TargetApi annotation? I have this code https://gist.github.com/MarkyC/84bc6f3267f42b6be08346a67a9ec69f and I assumed the annotation would ensure the code would not run on older devices, but my Crashlytics report says otherwise Mar 31 16:35:51 g00s: Xamarin is now free Mar 31 16:36:05 s73v3r yeah just saw that ... Mar 31 16:37:06 maybe google should just hire MS to do their tools :P Mar 31 16:37:18 looks like we’re all out of a job Mar 31 16:37:40 s73v3r out of a job ? Mar 31 16:37:54 who’s gonna want native Android development now? Mar 31 16:38:21 s73v3r: Jesus Mar 31 16:38:32 Thank God I learned C# Mar 31 16:41:38 MarkyC, annotation is for lint Mar 31 16:41:41 MarkyC, that is all Mar 31 16:42:02 MarkyC: @TargetApi has documentation if I remember correctly, but to recap, it only hides warnings about API level, it doesn't do anything runtime. Mar 31 16:42:06 pfn: I was expecting magic. Am dissapoint Mar 31 16:42:08 lol, no one wants C# for development Mar 31 16:42:21 hah Mar 31 16:42:26 c# isn't so bad Mar 31 16:42:31 and it'll now run on many platforms Mar 31 16:42:43 pfn: honestly, it's a pretty nice language. Writes like Java; LINQ is pretty swell Mar 31 16:42:44 * Zharf wonders if calling a method with @TargetApi would cause a warning Mar 31 16:42:53 Zharf, I've never seen one Mar 31 16:42:59 but it's not that hard to wrap it in an if clause Mar 31 16:43:02 but then again, I don't have java AST linters Mar 31 16:43:05 pfn, I think it should, really Mar 31 16:43:09 supports structs (value types)... Mar 31 16:43:11 Zharf, it probably does Mar 31 16:43:21 I've never paid enough attention to it Mar 31 16:43:23 shoudl try Mar 31 16:43:29 Zharf, if you're writing java Mar 31 16:43:35 but since I don't write java anyway Mar 31 16:43:35 * pfn shrugs Mar 31 16:43:38 :) Mar 31 16:43:40 ;31 Mar 31 16:43:50 AST linters don't work Mar 31 16:45:12 If I want to check for something each time the application starts (on a background thread), would the Application class be a good place for that Mar 31 16:45:41 define start Mar 31 16:45:41 reasonable enough Mar 31 16:45:53 the application instance might stick around longer than you expect Mar 31 16:46:03 True good point Mar 31 16:46:13 Its just backup to server, so its no huge deal Mar 31 16:46:29 drose379: What kind of thing are you checking? Like a force update thingy? Mar 31 16:47:20 Its to backup data to the server, say I have an array of X objects, and the user tries to delete one, and for some reason the request fails.. That X gets placed into a local table (ToBeDeleted) Mar 31 16:47:29 drose379: chicago? Mar 31 16:47:41 is your nick name supposed to be d rose? Mar 31 16:47:50 Basically I need to check if anything is in the ToBeDeleted, and send those to server Mar 31 16:47:53 No RustyShackleford Mar 31 16:47:58 Just my name Mar 31 16:48:03 hah never mind Mar 31 16:48:10 Ok lol Mar 31 16:48:32 everyone calls derrick rose d. rose Mar 31 16:48:40 Right yeah Mar 31 16:48:44 thought maybe he was your favorite Bulls player or something Mar 31 16:48:55 I can see why youd think that Mar 31 16:49:06 s73v3r: did you see my explanation Mar 31 16:51:19 i did now Mar 31 16:51:28 Thoughts? Mar 31 16:52:29 so if the DELETE call fails, you don’t retry? Mar 31 16:52:49 For a delete, no I dont retry Mar 31 16:52:51 with exponential backoff? Mar 31 16:53:11 Well heres the thing Mar 31 16:53:15 It deletes locally every time Mar 31 16:53:26 So the user actually has no idea whether it has been deleted from the server or not Mar 31 16:54:05 so then when they start up the app again, it syncs with the server, and then it’s there again Mar 31 16:54:23 and they’re like, “I thought I deleted that" Mar 31 16:54:28 No it never re-appears Mar 31 16:54:33 Its deleted locally every time Mar 31 16:54:43 But Mar 31 16:54:44 until you sync up with the server Mar 31 16:55:10 Theres a reason why that doesnt happen, but I forget why Mar 31 16:55:14 Let me look Mar 31 16:55:53 i wouldn’t recommend that. you’re encouraging a situation in which the data on the server is out of sync with the data on the device Mar 31 16:56:03 you want one source of truth Mar 31 16:56:54 If the user is offline and deletes something, the server is always going to be out of sync with the device Mar 31 16:56:55 Inevitable Mar 31 16:57:20 don’t allow delete when the user is offline Mar 31 16:57:39 Meh Mar 31 16:57:50 Ive got a whole offline/online sync in place Mar 31 16:57:53 Working fine really Mar 31 16:58:11 the offline situation is a rare one, which you would have to code around. but i wouldn’t use it just for the case when a call fails Mar 31 16:58:28 either retry, or just say “unable to process request" Mar 31 16:58:49 This app has to be designed to be used offline though Mar 31 16:58:56 So i really have no choice Mar 31 16:59:13 offline is different than failed request, though Mar 31 16:59:14 Anyone that's here that took a look at my MainActivity and Repository class yesterday (if you need a refresher http://pastebin.com/TStvjrb9) I just read that you're not supposed to add Items to the Array that is backing your adapter on a different thread. Anyone have any suggestions? Mar 31 17:00:22 Whats the dif s73v3r Mar 31 17:00:34 offline, you don’t have the chance to retry Mar 31 17:00:36 online, you do Mar 31 17:00:52 So you just think I should offer a change to retry it Mar 31 17:01:15 chance* Mar 31 17:05:24 Kind of a tough situation s73v3r Mar 31 17:14:01 it doesn’t have to be a chance. just do it if you know you have internet and the call fails Mar 31 17:14:05 exponential backoff Mar 31 17:23:08 hi there. im searching for a solution to build .apk after commiting code. is there any way? kind of a "build server?" Mar 31 17:23:31 sponge-tmp, travis, jenkins, circleci, etc. Mar 31 17:23:52 pfn: ty, will look at those Mar 31 17:24:26 Jenkins works well for us Mar 31 17:26:50 I think I've seen jenkins used a lot for people I've worked with Mar 31 17:30:04 will jenkins run on a raspberry ? Mar 31 17:32:16 maybe? It’s java Mar 31 17:32:27 sponge-tmp: barely Mar 31 17:33:59 mh ok Mar 31 17:34:20 sponge-tmp lol wut Mar 31 17:34:29 lol Mar 31 17:34:32 sponge-tmp: computational power is an issue. Mar 31 17:34:32 g00s: u w0t m8 ? Mar 31 17:34:43 raspi 2 or 3 should be able to Mar 31 17:34:47 http://stackoverflow.com/questions/35104418/error-on-ssl-socket-factory-when-running-junit-test-case-android any ideas on getting sslsocketfactory to work in junit? Mar 31 17:34:58 No, raspi 2 will shit on your build. Mar 31 17:35:09 Get a proper CPU -_- Mar 31 17:35:11 you need a raspi cluster ! Mar 31 17:35:19 built out of legos! Mar 31 17:35:50 Mavrik: raspi 1 is far worse Mar 31 17:36:15 overclock the RPis and dip them in vegetable oil Mar 31 17:36:16 So is ARM3 Mar 31 17:36:50 we’ve got an Amazon S3 instance Mar 31 17:38:02 well.. Mar 31 17:43:40 SSLContext.getInstance("TLSv1.2") throws in JUnit, no idea why... Mar 31 17:45:28 g00s: ! Mar 31 17:50:42 djmax, not using Java8? Mar 31 17:51:04 Hey guys, what's the proper way to save recyclerview's dataset when orientation is changed? I have the same layout for portrait and lanscape so the fragment isn't recreated when I rotate the device, but the recyclerview looks empty Mar 31 17:51:48 No, not using java8 Mar 31 17:52:26 It appears that they don't want to actually use SSL in Junit tests, which I'm not sure I quite get. Mar 31 17:55:50 hey thepoosh Mar 31 17:55:55 sup? Mar 31 17:57:05 g00s: this is way too many results for this search query Mar 31 17:57:06 https://github.com/search?q=This+should+never+happen&type=Code&utf8=%E2%9C%93 Mar 31 17:59:05 g00s: also, earlier I agreed with gordon_ that this is what working with FB SDK feels like Mar 31 17:59:07 https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-xlp1/v/t1.0-9/12524164_10153406783196960_7799726297062230547_n.jpg?oh=5924d4d4f2bc8f30d54bc0c3c8b6fc6f&oe=577F183E&__gda__=1469282912_204ed910aa1367ac99c5ad59e4408f53 Mar 31 18:00:04 well, we can start project with all social network register / login pages will be implemented in ;) Mar 31 18:00:14 i wouldn't know, fuck facebook ;) Mar 31 18:00:31 you cant just ignore it Mar 31 18:00:39 pretty much Mar 31 18:00:43 i have so far ;) Mar 31 18:01:12 you can, personally, but it might be something you pay attention to for your users Mar 31 18:01:45 I'm trying to test a fragment with espresso, I have no clue what I'm doing Mar 31 18:01:53 if mu users asked for Fb i still wouldn't do it Mar 31 18:01:54 haha Mar 31 18:02:04 so it seems i'll need an ActivityRule... how do I prepare the fragment? Mar 31 18:02:42 RustyShackleford: You set it up just like you do in the app. Espresso doesn’t know about fragments Mar 31 18:03:04 so i'd need to write code that clicks the appropriate buttons Mar 31 18:03:11 so that the fragment I want to show is visible Mar 31 18:03:22 yup Mar 31 18:03:38 oh christ Mar 31 18:04:48 espresso tests are ui driven tests Mar 31 18:05:12 espresso is quite nice Mar 31 18:05:55 right, would work perfectly for this Mar 31 18:06:16 except we don't have the boilerplate laid out Mar 31 18:06:29 seriously its like watching the 3 stooges try to code an android app Mar 31 18:06:34 Does anyone know why in the strings.xml file I need to escape the \ character? Mar 31 18:06:37 hi im woking on a Barcode app with BT barcode Mar 31 18:06:41 works fine so far Mar 31 18:07:00 but i woudt like to act on the keyevent if the barcode reader has finished Mar 31 18:07:25 Q can i lockk what event happent Mar 31 18:07:29 log Mar 31 18:08:06 public boolean onKey(View v, int keyCode, KeyEvent event) brings alot of stuff Mar 31 18:08:20 all keypress are double so i guess keydown and up Mar 31 18:09:11 hmm, CV hand tracking is mostly based on an open palm, are there any tracking systems that are good enough for a generic fist, or alternative hand positions, I wonder Mar 31 18:09:26 View.OnKeyListener is this right maybe only keydown Mar 31 18:10:15 is there al ist of the keycodes Mar 31 18:11:16 pfn, Kinect 2? :) Mar 31 18:14:19 i think addTextChangedListener(new TextWatcher() better to go with Mar 31 18:29:06 Does Assert.something() not throw an Exception? Mar 31 18:29:17 e.g. when it's false?? Mar 31 18:29:37 I'm trying to test inside an async function, and I'm waiting for the outcome and asserting inside, but it passes anyways Mar 31 18:31:03 async testing doesn’t work that way Mar 31 18:33:04 I see that it throws Throwable not Exception, so that works. But what's the proper way to assert in a callback then? Mar 31 18:39:17 anyone have suggestion for circular progress bar library that does determinate and indeterminate ? Mar 31 18:39:37 djmax: how are you waiting for the outcome? Mar 31 18:39:40 i'd like to show battery charge for BT device maybe 24dp x 24dp , pretty small Mar 31 18:39:50 CountdownLatch Mar 31 18:40:49 Cross-related : is xda-dev's forum layout/system based on any existing internet forum software? Or is it its own thing? Mar 31 18:44:45 g00s. I am in the middle of making one. Wont me ready until this weekend Mar 31 18:44:51 but i'll share it then if you need Mar 31 18:45:17 truckcrash lol a vegetable pi jenkins cluster ? Mar 31 18:45:38 lol wut? a circular progress bar Mar 31 18:45:44 truckcrash oh haha Mar 31 18:46:03 its actually really simple to make one. Mar 31 18:46:28 yeah .. there are quite a few already Mar 31 18:46:37 indeed. Mar 31 18:46:37 probably don't need to make another one :P Mar 31 18:47:22 Yeah, well i want to. :P and it will work just how i want. Mar 31 18:47:39 this was nice, but no indeterminate https://github.com/lopspower/CircularProgressBar Mar 31 19:18:44 Is it a bad idea to iterate through my users purchases in a splashscreen for example? Is it more preferred to store them in SharedPreferences and have the classic "Restore" button? Mar 31 19:25:26 Bernzel, you can query them in async and refresh your item on demand or when all is done Mar 31 19:26:08 storing them in sharedpref is a bad idea due to security issue, and with iab v3 there is cache now (though this cache is not great and easily flushed) Mar 31 19:26:35 beginner question. during installation of android studio there was an option to select the amount of memory for the emulator. I accepted the default 1GB. It turns out the s5 AVD that is predefined requires 1536MB, and it wouldn't run under HAXM until I reduced the size to 1GB in the AVD manager. The device monitor says that HAXM is working, but the emulated device is still hideously slow. How can I increase the amoiunt of Mar 31 19:26:35 memory the emulator can use ? Mar 31 19:26:45 Bernzel, and you can still have this "restore" button, cannot hurt Mar 31 19:27:14 kinch, it's also based on how much ram available you have Mar 31 19:27:22 kinch: emulator is slow per se Mar 31 19:27:31 try genymotion and, for the best, real device Mar 31 19:27:32 kinch, increasing the ram won't make it fast, avd just sux Mar 31 19:27:36 try genymotion indeed Mar 31 19:28:15 ok, I understand it is going to be slower. I'd still try in creasing the amount it can use. Where do I do that ? Mar 31 19:28:19 in genymotion (and avd too), i rarely give more than 1GB or ram Mar 31 19:28:23 it's more than enough for each vm Mar 31 19:28:56 in the avd manager kinch, edit your vm and show adv options Mar 31 19:29:29 why isn't there something like var Mar 31 19:29:33 ArrayList itemList = new ArrayList(); Mar 31 19:29:38 seems kind of redundant Mar 31 19:29:42 yes, that is where I reduced the amount for that particular AVD to 1G. That's not the setting I'm asking about Mar 31 19:31:23 I'm looking for the place to change the amount of memory the emulator can use. It is an option during installation, and I chose the default 1G Mar 31 19:31:35 guideX, you have osmething like ArrayList itemList = new ArrayList<>(); now Mar 31 19:31:56 yeah Mar 31 19:32:06 but in c#, I can do var blah = new List(); Mar 31 19:32:16 then the List is assumed Mar 31 19:32:39 maybe more of a #java topic Mar 31 19:32:53 it's in the installer for HAXM kinch Mar 31 19:33:06 well maybe it's different depending on the OS, but it's when you install it Mar 31 19:33:28 see for win: https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows there is a mac page too somewhere Mar 31 19:34:00 guideX, well imagine blah is a list instead of an arraylist Mar 31 19:34:07 you would want to indicate the type Mar 31 19:34:22 because you can do: List itemList = new ArrayList(); Mar 31 19:34:58 but yeah, it could guess based on the constructor the default type for most use cases but.... ask oracle :) Mar 31 19:35:52 adq, ok, thanks Mar 31 19:38:15 now digging to find the bloody thing... Mar 31 19:41:29 adq: excellent answer, thanks. Mar 31 19:52:45 Hey guys, I'm trying to implement a task killer for all background processes, like this --> http://pastebin.com/hkycCpuB - but the Activity Manager definition on line 7 is not working. specifically that "context" can't be resolved Mar 31 19:58:44 task killers are still a thing ? Mar 31 19:59:44 I'm just trying to do something in the background related to another task Mar 31 20:00:18 so I just need working code for it, not making it a thing, @g00s Mar 31 20:00:29 where is that code Mar 31 20:00:35 it cant resolve context Mar 31 20:01:52 it's in a java class that inherits from one of my main classes for a certain situation Mar 31 20:02:23 does it inherit activity, service or application Mar 31 20:02:26 remove the context. Mar 31 20:02:46 just leave (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); Mar 31 20:02:49 acq, it made a world of difference to re-run the HAXM installer and allocating 1.5GB, keeping the AVD memory to 1GB Mar 31 20:02:55 but this is beginner java question Mar 31 20:03:00 (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); Mar 31 20:03:04 I hate java Mar 31 20:03:07 sorry :) Mar 31 20:03:16 think that what i just pasted is going to work Mar 31 20:03:24 ty Ashiren Mar 31 20:03:39 adq, rather Mar 31 20:04:09 * pfn plays with cv Mar 31 20:04:29 control voltage? Mar 31 20:04:40 computer vision Mar 31 20:04:43 :> Mar 31 20:08:12 wow, dark patterns in the kindle ebook reader ... Mar 31 20:08:56 when you exit full screen from reading a book, it puts 'Add audible narration for $19.95' right under the fucking action items Mar 31 20:09:58 wow, i have no idea what i did to lose my recyclerview adapter after orientation change in some fragments inside a FragmentPagerAdapter Mar 31 20:11:01 normally views recreate during orientation change Mar 31 20:11:06 and variables get lot Mar 31 20:11:09 lost Mar 31 20:12:19 yup, and i don't use setretain.. Mar 31 20:14:08 it's prettry weird because the views are displayed accordingly to the adapter and its linked list, but when i tried to request a notifydatasetchanged or notifyitemchanged, the test prior to do it constiting of checking if the adapter is null always return true Mar 31 20:14:32 and thus, nothing is refreshed and it keeps the default data state Mar 31 20:15:40 huh, so the code compiles, but it's not killing any processes... Mar 31 20:16:48 all I need is a simple block of code that kills all my open apps.... Mar 31 20:17:06 Ashiren: think you could point me n the right direction? Mar 31 20:18:31 titanblue, you need privilege to kill other processes than your own Mar 31 20:18:47 I've declared that in my manifest :/ Mar 31 20:18:54 what did you declare? Mar 31 20:19:09 Mar 31 20:19:13 a simple kill against the pid of the target process should suffice, maybe some flags up to -9 Mar 31 20:20:03 maybe you don't give the correct packagename then Mar 31 20:21:17 I was trying to basically use this http://pastebin.com/hkycCpuB Mar 31 20:24:06 sorreh never tried to kill a process Mar 31 20:24:24 (in android) Mar 31 20:25:39 adq: does that look off? Mar 31 20:26:04 why is it so hard to learn android development? Mar 31 20:26:37 and android dev just has so many best practice guides its hard to get to ccertain points Mar 31 20:27:14 umm.. no more keytool? Mar 31 20:27:15 http://keytool.sourceforge.net/ Mar 31 20:28:45 titanblue, not sure, try first with a simple example with an app you put in background and a known packagename, then verify that your loop gives the correct packagename with packageInfo.packageName, long time i did not touch pm but i remember i was using a resolution query against but not sure it's needed in your case, and check stackoverlow Mar 31 20:28:49 stackoverflow* Mar 31 20:28:55 maybe its jsut all of sourceforge Mar 31 20:29:47 gotcha Mar 31 20:30:03 maybe I oughta just kill everything because I can't hit system so it just won't Mar 31 20:34:20 Does anyone use bottom sheets? Mar 31 20:34:32 I want to use a bottom sheet to have an input field and a button? Mar 31 20:34:43 but it doesn't seem like the guidelines encourage this. Mar 31 20:35:00 They seem to be used solely for showing options to the user, or showing more info to the user. Mar 31 20:42:24 hi guys i have a stupid problem i cant solve yet, involves a textview, button and edittext, when user touch edittext the keyboard appear and user input some text, and then he hits the button so the text is sent to textview, but the text remains in the keyboard so user in order to type something new needs to delete from the keyboard the previeus text, how can i fix this Mar 31 20:43:25 so when user hits the button the previus text is deleted and ready for user to type some new text Mar 31 20:43:35 The text remains in the keyboard? or it remains in the EditText? Mar 31 20:43:36 deleted in the keyboard Mar 31 20:43:46 remains in keyboard Mar 31 20:44:04 Hmmm... what keyboard are you using? Mar 31 20:44:23 default Mar 31 20:45:06 Well there is not place to add text "in" the default keyboard. Could you share a screenshot? Mar 31 20:45:29 sure, gimme a sec Mar 31 20:47:04 AKK9: Yeah, they’re not for input fields. That would be a dialog Mar 31 20:50:12 http://postimg.org/image/p2lvanc57/bf95c77d/ Mar 31 20:50:18 here the pic Mar 31 20:50:24 s73v3r, I want to make my FAB button change to an input field at the bottom of the screen Mar 31 20:50:38 that wouldn’t be a bottom sheet, I don’t think Mar 31 20:50:53 Think the whatsapp message input box, but only appears when you click the FAB Mar 31 20:51:22 why not just add a view with that at the same level as the FAB, and animate the transition? Mar 31 20:51:44 it sounds like you’re just gonna have to roll your own Mar 31 20:52:06 Where do I start with those cool mophing animations? Mar 31 20:52:29 that I’m not sure. Sorry Mar 31 20:52:39 Josh-Spartan, It looks like that is your edit text, not the keyboard. Just call editText.setText(""); on it Mar 31 20:53:03 after you have taken the text for sending as a message Mar 31 20:53:46 :o Mar 31 20:53:54 damn i feel so noob Mar 31 20:54:00 yeah is the edittext Mar 31 20:54:55 thanx truckcrash i believe i need a rest now Mar 31 20:58:51 how do i add buttons programmatically to the screen ? the buttons have a styling which is designed in .xml Mar 31 20:59:04 Josh-Spartan, no prob Mar 31 20:59:41 sponge-tmp, have you tried reading any documentation on that? Mar 31 21:00:02 I use SharedPreferences to set some values: http://pastebin.com/k9nzRpXE but it must take Context as parameter. And in the method I'm putting this string I have no context, so what's happening if I null it like shown in the pastebin? Mar 31 21:03:00 truckcrash: not really. I want to add an array of buttons on the screen (for level selecting). something like this: http://www.androidtapp.com/wp-content/uploads/2013/01/Word-to-Word-Level-select.png Mar 31 21:04:13 sponge-tmp, Then that is where you should start. Most people in this channel are not here to be your tutor. Try reading and learning. If you get stuck somewhere, come back with what you have tried, and your specific problem, and then someone may help you. Mar 31 21:04:24 If you dont know where to start, try d.android.com Mar 31 21:04:34 ok thx Mar 31 21:05:26 sponge-tmp, no prob. good luck Mar 31 21:06:19 question about AVDs. I've created a new AVD for a nexus 7 from the list in the AVD manager, and when it boots up in the emulator it looks very different from the real device. For example the icons for the applications are very different from those on the real Nexus 7. The camera looks like an old fashioned SLR for example. The About window in settings says that it is version 6, same security patch level, but it says "About Mar 31 21:06:19 Phone", where the real device is "About tablet". I'm curious, the Nexus 7 is a google device, untainted by skinning. Why does the emulated Nexus 7 look different ? Mar 31 21:14:46 I have no wireframes or direction for my android app.. more of a general design/programming question I guess but, maybe a better approach is to draw out on paper in advance instead of just from brain to code Mar 31 21:15:36 YES Mar 31 21:15:50 so many people forget that critical step Mar 31 21:18:03 s73v3r: I can still re-use my code, but I think i'll scrap some of what I got, and replicate from paper to code for a better shaped app Mar 31 21:18:26 cause right now it's just scatterbrainedness type code Mar 31 21:25:10 AKK9: by bottom of the screen do you mean above the keyboard? Mar 31 21:25:18 I haven’t used whatsapp Mar 31 21:26:20 tricknology, yeah Mar 31 21:26:51 It woudln't be ther all the time, but I want it so I click the FAB and then it transitions into a text field Mar 31 21:27:11 ObjectAnimator, likely Mar 31 21:29:51 anyone else update their system tools SDK and discover that you can no longer debug? Mar 31 21:30:04 oh lawd.. Mar 31 21:30:17 no Mar 31 21:30:25 system tools doesn't affect debug Mar 31 21:30:35 sorry, android support Mar 31 21:30:53 npe @ at com.android.tools.idea.run.AndroidSessionInfo.isEmbeddable(AndroidSessionInfo.java:62) Mar 31 21:31:06 prettay, prettay, prettay, prettay annoying Mar 31 21:38:12 Josh-Spartan: You want to register an onClickReceiver and editText.setText(“”); editText.requestFocus(); Mar 31 21:39:40 just figured it out.. for some reason the debug profile got corrupted after that update (for whatever reason). Recreating it fixed it Mar 31 21:45:54 well thing is fixed now tricknology but thanx for your support Mar 31 21:47:30 AKK9: Look into ObjectAnimator, and create your own View to Animate if you want to have material stuff. Button’s IIRC is kind of a pain Mar 31 21:47:52 np Josh-Spartan Mar 31 21:55:43 Any good solutions for keyboard hiding the EditText element it's typing to? Can I make my layout increase in Y when the keyboard comes up and goes back when it's hidden again or something? Mar 31 22:03:46 Bernzel, show a video of what you intend Mar 31 22:04:42 pfn a video? Mar 31 22:06:08 i've been to refactor one of my activities to use the data binding api and got stuck with some mvvm related doubts: Mar 31 22:06:20 ^ been trying Mar 31 22:06:29 Bernzel, your description is not useful Mar 31 22:07:05 I'm really puzzled why the emulator is so slow. It's not emulating another hardware architecture, The system image is x86, the android monitor says that HAXM is working, and yet the performance is easily a 50-100 times slower than the real device on a 2.5Ghz host machine of the same architecture Mar 31 22:07:12 Hello, I am having an issue with the keyboard obscuring the EditText I am trying to enter text into. Is it possible to use the height of the keyboard to resize my views so that they are not being blocked? Mar 31 22:07:14 something is simply not right Mar 31 22:08:14 is the activity considered part of the view? it looks more like the code behind from the MS mvvm world Mar 31 22:09:01 pfn , well I'll try to make it clearer instead. I have an EditText element that is positioned quite low down in my layout. So when the user starts typing on the onScreenKeyboard the keyboard is covering a great part of the EditText view, so they can't see what they're typing. Mar 31 22:09:22 the webs says the viewmodel should not have reference to the activity/context. however, some examples i've seen have it Mar 31 22:10:34 Bernzel, then choose adjustResize or adjustPan Mar 31 22:13:36 lol kinch Mar 31 22:13:46 how should the viewmodel show a toast or a dialog or switch fragments? should the viewmodel have indirect reference to the activity through, e.g. a facade? Mar 31 22:14:07 pfn: and put my EditText in a ScrollView I suppose? Mar 31 22:14:10 you can make it communicate via several ways bitkiller Mar 31 22:14:17 depends on the behavior you want Mar 31 22:14:49 adq, could you tell me your approach? Mar 31 22:15:26 listener callback, event bus, passing carefully a context, etc Mar 31 22:15:35 broadcast Mar 31 22:15:38 so many ways Mar 31 22:16:11 sharedpreferences :') Mar 31 22:19:01 aqh, yep i can see all these possibilities, but i would like to get to a solution more mvvm compliant Mar 31 22:19:11 ^ adq Mar 31 22:22:24 bitkiller, https://github.com/googlesamples/android-architecture Mar 31 22:22:34 haven't read it yet, but maybe that what you search for Mar 31 22:24:25 interesting. i have some links here, but not organized Mar 31 22:25:33 adq, lol ? Mar 31 22:27:53 the idea of using a facade came from this ms article https://msdn.microsoft.com/en-us/library/hh848245.aspx#sec15 Mar 31 22:28:41 it turns out that the issue may be with the CPU. It's a core 2 duo (yes, old, but ought to be quite serviceable) model p8800, and has the features they require XD, and virtualization, but _current_ versions of HAXM doesn't support it. Old versions did, but they are nowhere to be found. Bloody hell. Mar 31 22:29:48 it's an intel conspiracy to drive pc sales Mar 31 22:29:50 observe that NavigationServiceFacade abstracts PhoneApplicationFrame, which may be poorly considered the context in the winphone world Mar 31 22:34:56 anyway, anyone have any idea where to find old versions of haxm ? Mar 31 22:35:11 1.1.5 or so for Mac Mar 31 22:39:39 Can you programmatically change attributes of xml files? e.g. change android:columnWidth="50dp" in ? Mar 31 22:40:25 ok found it Mar 31 22:43:14 nope, does not work.. gridview.setColumnWidth() does not work :( Mar 31 22:50:49 hmm. thought I was smart and tried to find the old haxm in an old android studio. it's supposed to be in the package somewhere isn't it? Mar 31 22:53:58 Can anyone tell me how to go about getting a custom keylayout to load for my hardware keyboard in android? It's loading the generic keylayout right now and I don't want to edit that one but create a new wine the will load for this device. Mar 31 22:55:12 ( 9574) AndroidRuntime: java.lang.RuntimeException: setParameters failed Mar 31 22:55:15 most useless error ever... Mar 31 22:56:05 E ( 512) Camera2-Parameters: set: Preview size cannot be updated when preview is active! (Currently 1920 x 1080, requested 1280 x 768 Mar 31 22:56:10 ahh, error is from another process Mar 31 23:04:32 Is there a file naming convention for keylayout files to have theme load on a specific device or is there a descriptor in the files that it uses? My device is loading the generic.kl file and I want to create a custom one. Mar 31 23:05:28 it matches the vendor/product id Mar 31 23:05:40 there's stuff about it on xda Mar 31 23:05:48 you can also provide a keyboard layout from an app, and select it in settings Mar 31 23:05:55 better than using a rooted method, which is not supported here Mar 31 23:10:47 totally stumped and very aggravated. The androud studio file as downloaded does not contain the haxm installer. anyone have version 1.1.5 for Mac ? Mar 31 23:12:25 haxm installer is in android sdk manager Mar 31 23:13:34 yes, the current one. I need an older version Mar 31 23:13:46 * pfn shrugs Mar 31 23:13:54 go to intel's website and find it Mar 31 23:14:17 heh, that sounds so easy doesn't it.. Mar 31 23:14:26 why the older one? Mar 31 23:14:43 the older one works with a core 2 duo processor Mar 31 23:15:57 pfn: Looks like all I have to do is create a keylayout file Vender_xxxx_Product_xxxx.kl that matches the dumpsys input info Mar 31 23:16:07 something like that, yes Mar 31 23:16:57 Les go try that then. Mar 31 23:46:30 kinch oh oh, so the newer one doesn't ? Mar 31 23:53:47 hi, got an activity with a few AsyncTaskLoader, and I'm getting RejectedExecutionException when I restart it a bunch Mar 31 23:54:06 is there a trick to making sure the background jobs are all cancelled? Apr 01 00:02:47 handle it yourself properly Apr 01 00:07:30 I know that I should do that. What I don't know is how I should do that. Apr 01 00:07:42 I'm asking *how* to handle it myself, properly. Apr 01 00:08:57 read jcip Apr 01 00:09:37 ok Apr 01 00:09:45 that's not helpful Apr 01 00:09:52 I'm asking about android loaders Apr 01 00:10:35 the answer is to learn how to concurrency Apr 01 00:11:06 I'm not trying to actually handle the concurrency stuff, myself, just use the provided API's in android Apr 01 00:11:07 i think they’re asking specifically how to cancel jobs on an AsyncTaskLoader Apr 01 00:11:19 I’m 99% sure the AsyncTaskLoader is not covered in JCIP Apr 01 00:11:19 you can't guarantee that they have stopped Apr 01 00:11:30 not using the api in asynctaskloader Apr 01 00:11:30 I'm about 99.99997% sure it isn't Apr 01 00:11:40 period Apr 01 00:11:43 you can .cancel() Apr 01 00:11:44 and that is all Apr 01 00:11:47 beyond that, you need to jcip Apr 01 00:11:54 but pfn is right in that you cannot guarantee that a task has stopped. Apr 01 00:12:15 the task itself can be told that you have called cancel, and inside the task you can do something about it Apr 01 00:12:23 so right now, I'm using restartLoader to start the loader loading Apr 01 00:12:45 i believe tasks that have not started are not started if cancel is called Apr 01 00:12:51 * pfn goes back to his crash course in CV Apr 01 00:12:53 and I'm checking for isLoadInBackgroundCancelled in teh loadInBackground method of the loader itself Apr 01 00:13:04 s73v3r: correct Apr 01 00:14:19 the problem presents itself when I change the screen orientation repeatedly Apr 01 00:14:38 there are 2 AsyncTaskLoader loaders that get started onResume with restartLoader Apr 01 00:15:22 eventually, the executor used to actually execute AsyncTask stuff gets filled up because the tasks themselves are piling on Apr 01 00:16:06 perhaps the issue is that the tasks are queued to run whether or not they're cancelled Apr 01 00:16:44 and if tasks get added on while the first one is still running, they could conceivably fill up the queue with cancelled tasks Apr 01 00:16:47 vOv Apr 01 00:16:53 I'll investigate further and report if I find anything out Apr 01 00:17:45 this is when you jcip Apr 01 00:18:43 dude Apr 01 00:19:00 I have a hardcopy of jcip in arm's reach, but it says nothing about the specifics of using Android Apr 01 00:19:20 the answer is obvious why it fails if you read jcip at all Apr 01 00:19:23 I understand how the executorservice works that backs AsyncTaskLoader Apr 01 00:19:46 and how to fix it Apr 01 00:20:22 what I'm not sure of is what the great Google intended for me to do that I'm not doing correctly Apr 01 00:20:34 android has nothing in framework for canceling tasks besides flagging Apr 01 00:20:36 duh Apr 01 00:20:40 jcip is the rest of the answer Apr 01 00:20:51 this is basic java concerns Apr 01 00:21:11 no, it isn't. Apr 01 00:21:24 Hi, I have an interesting problem: many of the users of my app are reporting that the app restarts after the phone goes to sleep and is woken again. I have also noticed this behaviour with my new Huawei phone with other apps, but it never did it with my old Samsung S3. Having the app restart is an inconvenience to the users. How should I handle this? Apr 01 00:21:32 this is "I'm not using LoaderManager, AsyncTaskLoader, and the Activity lifecycle correctly, somehow" Apr 01 00:21:58 Slither: define: "the app restarts" Apr 01 00:22:20 It goes back to the original login activity Apr 01 00:22:41 Android arbitrarily kills activities - are you not saving any sort of state? Apr 01 00:22:50 at least, it is allowed to kill anything you're not looking at Apr 01 00:23:27 yes they aren't losing any data, but they still have to log in again after the app goes to sleep Apr 01 00:23:36 *device goes to sleep Apr 01 00:23:42 how do you store "is logged in"? Apr 01 00:24:14 if you're not already using SharedPreferences, look into them Apr 01 00:24:37 I'm not sure if I'm using SharedPreferences for 'is logged in' but I'm using them for other things Apr 01 00:25:48 Slither: how do you know if a user is logged in? Apr 01 00:26:47 it sends a request to the server then if the server approves the login credentials the next activity is loaded in the app Apr 01 00:27:23 I haven't got the project opened but I'll just open it and check if it stores a SharedPreference Apr 01 00:33:16 rager: no it doesn't store any login info as a SharedPreference - I'll look into doing that, thanks Apr 01 01:36:46 I'm having trouble getting a custom keylayout to work properly, anyone done one before? Apr 01 01:45:04 I'm having trouble getting a custom keylayout to work properly, anyone done one before? Apr 01 02:13:36 Hello Apr 01 02:14:13 interesting http://dangrover.com/blog/2016/01/31/more-chinese-mobile-ui-trends.html Apr 01 02:16:41 im assuming generated keystore dont contain any sensitive information about the system/person that created it correct? Say i'm generating a keystore for a clients app, which the keystore will then be given to the client. Apr 01 02:18:21 Hello i need a help. I want to create an app what program do you tell me to make apps Apr 01 02:39:18 Android Architecture Blueprints Apr 01 02:39:27 lol, 6 years late .. **** ENDING LOGGING AT Fri Apr 01 02:59:58 2016