**** BEGIN LOGGING AT Wed Jan 25 03:00:02 2017 Jan 25 03:14:18 TacticalJoke, Thanks! Jan 25 03:17:08 No worries. Totally changing subject -- /r/androiddev has serious quality-control issues. Jan 25 03:17:17 Bad comments get upvoted. Jan 25 03:17:21 That sub is so bad. Jan 25 03:17:56 it's reddit ... you're in the wrong place if you want quality Jan 25 03:18:00 The other day, some guy got upvoted to +5 after saying something about using XML being faster than creating Views in code. Jan 25 03:18:08 in Java code* Jan 25 03:20:11 It's a shame, though, because there is some quality on Reddit. It just often gets drowned out by the noise. Jan 25 03:20:37 Maybe /r/androiddev's mods should start getting heavy and deleting demonstrably incorrect comments. Jan 25 03:20:47 Then again, the mods themselves could be clueless. Jan 25 03:23:37 I suppose it could be considered "faster" if you remove hte time not spent chasing weak reference failures in views Jan 25 03:23:54 Dagmar: It's slower. Jan 25 03:24:15 Though not always significantly slower. Jan 25 03:24:45 And what do you mean by "chasing weak-reference failures"? Jan 25 03:25:37 I can't imagine how `new SomeView(foo);` would mean "chasing weak-reference failures" while `` wouldn't. Jan 25 03:37:03 TacticalJoke i think as time goes on, there is less exciting stuff (signal) and more filler (noise) Jan 25 03:37:17 i hardly check it any more Jan 25 03:37:31 i basically look to see if there was an update to something i use Jan 25 03:37:52 after a while it became a kotlin circle jerk Jan 25 03:39:32 Yeah, I find it boring most of the time. I guess there's much new to say about Android development nowadays. Jan 25 03:40:55 -nowadays Jan 25 03:46:15 i wonder if ConstraintLayout will be stable before i/o 2017 lol Jan 25 03:46:22 1 year for a new view ... Jan 25 03:47:39 although it would have taken me several years at least :D Jan 25 04:06:49 I've been trying to cross compile chacl to stick same permissions whenever a file is called inside a directory - no success - is there someone here that knows of acl utilities binaries targeted arm/arm64? Jan 25 04:18:08 mmm... high def wireless gets closer http://spectrum.ieee.org/tech-talk/telecom/wireless/tiny-terahertz-modulator-packs-a-big-data-punch Jan 25 04:49:58 why is android-dev so damn hard? Jan 25 04:50:20 compared to? Jan 25 04:50:33 Hard in what sense... Jan 25 04:51:02 ...that the current online tutorial documentation suggests uses examples which Android Studio says are deprecated? Jan 25 04:51:19 ...by having god objects like Context? Jan 25 04:53:47 ...by ignoring easy to fix bugs and errors on code.google.com for several years before closing them for being outdated? Jan 25 05:26:30 quantum smartphones... gimme! https://www.technologyreview.com/s/531606/microsofts-quantum-mechanics/ Jan 25 05:43:47 capella thats from 2014 ... Jan 25 05:44:57 How much does a long app summary loaded with keywords help or hurt with Play Store SEO/Optimization? Jan 25 05:45:15 yah... catching up to alternate tech in the quantum architecture realms Jan 25 05:45:53 here "topological quantum vs adiabatic" Jan 25 05:46:05 Essentially what im asking is, should I add "fluff" with specific keywords to my app summary? Or should I keep it short, sweet, and specific? Jan 25 05:46:13 or annealing Jan 25 05:46:27 orbyt_ doesn't help at all Jan 25 05:46:39 actually, keyword spam will get you in trouble Jan 25 05:47:08 i think the keywords in the first 150 characters of the short desc are most important, but i can't recall Jan 25 05:47:12 g00s Not spam, just more of a longer, in depth. Alot of summarys I see are multiple paragraphs, mine is currently a few sentences. Jan 25 05:47:32 very little impact Jan 25 05:48:07 What are the biggest factors to search rank then? Jan 25 05:48:44 there are many, hard to know - google doesn't tell us Jan 25 05:48:52 Im assuming its very different then the page rank algorithms for web Jan 25 05:48:59 how fresh / updated the app is - is one thing Jan 25 05:49:08 Mhm Jan 25 05:51:07 how to transfer data between fragments? Jan 25 05:51:12 i am using activity as an intermediate Jan 25 05:51:26 sub_zerp spooky action at distance Jan 25 05:51:41 means? Jan 25 05:51:42 since we're talking about quantum stuff :) capella can fill in the blanks Jan 25 05:52:14 sub_zerp, Android docs has info on that Jan 25 05:52:37 no, you can't slip into the quantum to move data between fragments :p Jan 25 05:52:52 ologn i checked but its not working Jan 25 05:52:53 sub_zerp, https://developer.android.com/training/basics/fragments/communicating.html Jan 25 05:53:46 sub_zerp, it works for me Jan 25 05:53:55 :/ Jan 25 05:54:53 " All Fragment-to-Fragment communication is done through the associated Activity." Jan 25 05:56:31 ologn is it mandatory to make the interface inside the fragment? Jan 25 05:57:11 orbyt_ Ologn knows a bit about the SEO parts Jan 25 05:57:23 Oh? Jan 25 05:58:09 did google ever spin out the calendar view from Google Calendar? i keep thinking they did ... Jan 25 06:00:10 yes Jan 25 06:00:43 sub_zerp link ? Jan 25 06:05:56 Is there an Intercom for Android? Jan 25 06:06:06 Eg. A chat product to talk to customers using the app Jan 25 06:06:59 sub_zerp sorry got disconnected Jan 25 06:16:41 sub_zerp, I put the interface in the fragment, it's possible there are other ways that work Jan 25 06:17:40 orbyt_, there are some Google guides and videos for ASO/SEO Jan 25 06:18:20 Also advice they and others give makes sense...like having an icon that when viewed as a small size is easy to understand Jan 25 06:27:29 ologn thanks Jan 25 06:27:38 it worked :) Jan 25 07:44:18 how to do display text in single line rather than having it to scroll in edit text? Jan 25 07:44:51 i tried: android:maxLines="1" but this doesn't display text in one line. Jan 25 08:01:09 wee yet another database http://greenrobot.org/objectbox-performance/ Jan 25 08:35:58 Ashiren: but it outperforms all other embedded databases by a factor 5 to 15! Jan 25 08:46:27 AS is turning into shit with eachversion Jan 25 08:48:09 raoul11, that means your skills increase Jan 25 08:50:26 am not even sure whats happening Jan 25 08:50:36 suddenly errors on xml view Jan 25 08:50:41 cant find blahblah Jan 25 08:50:54 its right effin there, and compiles just fine Jan 25 08:51:31 raoul11, i'm gonna pm you a link Jan 25 08:58:25 raoul11: I just noticed icons changing colors from version to version but I'm not having major problems Jan 25 08:59:11 Melatonina: b4: http://i.imgur.com/0QEX75j.png | after: http://i.imgur.com/FOxB1Qr.png Jan 25 08:59:45 Ashiren, hmm, GreenRobot had one of the better ORMs for sqlite before Jan 25 09:00:04 Wonder if it has dumbass threading restrictions :) Jan 25 09:01:54 raoul11: sometimes similar things happen to me when moving classes and resources across modules. A clean builds fixes the problem for me, usually Jan 25 09:02:40 that didnt work Jan 25 09:02:42 u know what did Jan 25 09:02:49 rearrange the code Jan 25 09:06:58 clean build does not always reconstruct R. resources iirc Jan 25 09:07:26 you might need to push this run button (i know those staging in gradle are ... very different than a clean and make in other environment) Jan 25 09:07:34 it was different few years ago Jan 25 09:07:36 Mavrik: it seems it doesnt Jan 25 09:07:52 i have no idea why they do that nor like this Jan 25 09:08:17 clean is not cleaning, build project is not building everything, and run is not only running Jan 25 09:08:20 -_- Jan 25 09:08:22 but so far you have to deal with relations yourself but they say theyre gonna fix it for release version Jan 25 09:08:45 Mhm, I usually don't use foreign keys in SQLite if I can help it anyway. Jan 25 09:08:49 They're not even on by default :) Jan 25 09:47:16 i want to create an image for button but when i add they are saved as gray color: https://www.dropbox.com/s/gvk1toqz0oj60uv/grey%20images.png Jan 25 09:48:15 Yes, because material design demands that. Jan 25 09:48:22 Hence the tool removes the colors. Jan 25 09:48:32 The button graphics is then tinted with the theme color. Jan 25 09:49:59 then how do you add a colorful image to button? Jan 25 09:51:56 You will have to create and add them manually I guess Jan 25 09:56:23 if i add images as "launcher icon" then they are grey Jan 25 09:56:49 are not grey* Jan 25 09:57:12 1.) You shouldn't because it'll look terrible. Jan 25 09:57:20 2.) If you must, just create them manually. Jan 25 09:57:42 manually inside android studio? Jan 25 09:58:03 ?? Jan 25 09:58:20 why cannot you import an image to use for button? Jan 25 09:59:31 just copy the images into your projects drawable folders Jan 25 10:03:23 Ashiren: manually resize them or will they adjust itself? Jan 25 10:17:45 purplex88: manually resize Jan 25 10:17:56 but tbh i dont know why the android studio tool doesnt work Jan 25 10:18:10 or you can just put i.e. xxhdpi, the system will scale accordingly Jan 25 10:19:08 manual resize is bad Jan 25 10:21:21 it doesn't seem like common practice to have color images on buttons to me Jan 25 10:25:37 <_0xbadc0de> Hello Jan 25 10:26:07 <_0xbadc0de> If I generate and store a symmetric key under the android secure store Jan 25 10:26:51 <_0xbadc0de> as documented in the official site, it prevents key extraction because the key is stored and encryption algorithms are performed on a HSM Jan 25 10:27:07 <_0xbadc0de> *in Jan 25 10:27:33 <_0xbadc0de> but this won't prevent other apps from accessing the same key and performing cryptographic operations with it Jan 25 10:27:39 <_0xbadc0de> am I correct? Jan 25 10:29:44 <_0xbadc0de> and its not really prevents Jan 25 10:30:15 <_0xbadc0de> just makes more difficult because reversing HSM requires proper hardware and even with it (its very expensive) its still kinda hard Jan 25 10:38:59 hi Jan 25 10:39:35 Is there a way on Android allowing me to kill a process every hour? Like a cronjob running pkill? I do have root and xposed… (I know you are not supposed to do this, but I need this right now) Jan 25 10:39:57 it's also an ancient android, like v4.4 or so Jan 25 10:40:24 no google play, but nothing to be found on f-droid Jan 25 10:40:28 activity is object is destroyed when we change landscape to potrate Jan 25 10:40:29 or xposed… Jan 25 10:41:06 could be some kind of task killer Jan 25 10:41:20 ahh good old ancients times when everyone had task killers Jan 25 10:41:22 i do it manually with os monitor right now Jan 25 10:41:35 but i really can't be bothered and am not always on site. Jan 25 10:42:20 kill process, and it all works, no danger of data loss (as the network buffers while process is hung until killed) Jan 25 10:42:21 sounds like job for tasker of llama, or more for channell #android-root Jan 25 10:42:31 k, thx Jan 25 10:42:35 i do have tasker… Jan 25 10:42:58 <_0xbadc0de> wow I am glad for your help Jan 25 10:43:18 <_0xbadc0de> Next question: can I make a android app without using ridiculous gui stuff? Jan 25 10:43:34 Is there a way on Android (ancient v4.4) allowing me to kill a process every hour? Like a cronjob running pkill? I do have root and xposed, no gplay though and can't find anything on fdroid… (I know you are not supposed to do this, but I need this right now) Jan 25 10:43:38 ah sorry Jan 25 10:43:43 <_0xbadc0de> just console stdout to console and ssh to read response Jan 25 10:43:51 <_0xbadc0de> no? Jan 25 10:44:21 _0xbadc0de: well seems no one here right now cant answer the secure store question Jan 25 10:44:42 <_0xbadc0de> yeah and second question? Jan 25 10:45:15 <_0xbadc0de> like I am a security professional and sometimes I need to make algos and test stuff and it annoys me that to test algos I need to make a GUI app Jan 25 10:45:19 <_0xbadc0de> this is just ridiculous Jan 25 10:45:25 <_0xbadc0de> there must be another way Jan 25 10:45:32 not that i know of, normally Jan 25 10:45:42 <_0xbadc0de> OMG I hate android Jan 25 10:46:06 or if you have i.e. busybox, you can try to use scripts Jan 25 10:49:39 _0xbadc0de: you can output from onCreate Jan 25 10:49:52 _0xbadc0de, any reason you don't just compile a binary like of any other linux system? Jan 25 10:49:58 you're an "expert" right? Jan 25 10:50:01 :) Jan 25 10:50:09 :) Jan 25 10:51:18 <_0xbadc0de> wtf? Most of this stuff uses JVM runtime libraries Jan 25 10:51:38 <_0xbadc0de> KeyStore and such Jan 25 10:51:50 <_0xbadc0de> I could do that Jan 25 10:52:04 <_0xbadc0de> but won't even make sense because some devices as I said have embedded HSM Jan 25 11:01:55 <_0xbadc0de> and with this busybox, can I do what I want? Jan 25 11:02:10 <_0xbadc0de> a simple standard input-standard output program? Jan 25 11:37:46 Is there a way, for debugging purposes, to take a byte array from device and save it to file on my PC? Jan 25 11:38:10 as in byte[], not a ByteArray or anything complex Jan 25 11:39:29 write it to a file? Jan 25 11:39:36 and copy it to the pc Jan 25 11:40:05 yeah, ok, but then i need a to set an extra permission, was hoping I could avoid it :P Jan 25 11:40:13 you can avoid extra permissions Jan 25 11:40:24 just write it to internal storage Jan 25 11:40:57 or send it via an intent Jan 25 11:40:58 if your application is debuggable, you can do in adb shell; "run-as your.package.name; cp file /sdcard/file" Jan 25 11:41:02 and retrieve it by mail for example Jan 25 11:41:15 nice, thank you! Jan 25 11:41:25 not sure if the debugger can dump it properly, but you can at least inspect its content Jan 25 11:43:08 run-as is my most recent best friend Jan 25 11:43:22 so useful for getting the databases out of the device for inspection Jan 25 11:43:52 sounds like sudo Jan 25 11:44:07 as different user* Jan 25 11:44:21 kinda, I guess, it only works for debuggable applications though Jan 25 11:47:54 hello, ive a question about the widget tutorial https://developer.android.com/guide/topics/appwidgets/index.html#implementing_collections (part Setting up the pending intent template). There is in the onUpdate() method two times intent.setData(Uri.parse()).. Is this a bug in the tutorial? Jan 25 11:49:37 OK, so I have a byte[] thing, which I am told is an YUV image, possibly... I want to check this in the debugger. what would be a good way to create an image so i can see it in the debug? Jan 25 11:50:32 BitmapFactory/Bitmap.CreateBitmap returns null... Jan 25 11:50:43 whats the way to get time in android and calculate the difference between times as well? Jan 25 11:51:38 I was using Time but deprecated. Jan 25 11:52:11 java Calendar Jan 25 11:55:07 seems so many ways Jan 25 11:57:10 anyonebutme: http://stackoverflow.com/questions/9192982/displaying-yuv-image-in-android Jan 25 11:58:33 Ashiren: Thanks, I think I got it. Jan 25 11:59:26 misterli: could be bug Jan 25 12:00:02 or maybe they meant toastIntent Jan 25 12:00:06 shouldnt it be the "toastIntent.setData(...)? Anyway, the tutorial doesnt work Jan 25 12:00:19 * Ashiren shrugs Jan 25 12:03:07 Feel free to help me figure out how to implement setEditTextWidth() here =) http://stackoverflow.com/questions/41850922/how-to-set-fixed-minimum-width-of-edittext-so-it-wraps-tightly-around-hint-and-l Jan 25 12:18:26 Zta77, what are you trying to do? You want an edittext which is aslong the width of the hint + numberOfAllowedInputChars*width of one char? Jan 25 12:21:46 misterli, yes it should be toastIntent.setData Jan 25 12:22:04 Zharf, yea. But still dont get it why it should be used since it works simply without Jan 25 12:23:30 misterli, it's just data for the intent handler which doesn't seem to use it Jan 25 12:24:45 misterli, there's that thing where the extras get ignored when comparing intents Jan 25 12:24:48 // When intents are compared, the extras are ignored, so we need to embed the extras Jan 25 12:24:52 // into the data so that the extras will not be ignored. Jan 25 12:24:53 that's why it's there Jan 25 12:25:17 Ah, ok, got it Jan 25 12:49:09 what's the best way to wait for an element to appear in uiautomator.android and proceed with next actions? Jan 25 12:50:44 * raoul11 thepooshes thepoosh Jan 25 12:53:08 hi raoul11 Jan 25 12:53:15 hi buddy Jan 25 12:53:19 power went out last night Jan 25 12:53:26 think my fridge is shortening Jan 25 12:53:56 its not refrigerator anymore? Jan 25 12:54:34 that sux Jan 25 12:54:36 hi Ashiren Jan 25 13:06:37 I'll be pissed if this works Jan 25 13:09:18 misterli: If that's how to read it, then I must improve my problem description.. Jan 25 13:09:47 But usually hints disappear when one starts typing Jan 25 13:10:18 I've been seeing a weird bug happen intermittently for awhile where stuff loses it's margins/paddings if it had it's background changed programmatically. I *think* it's maybe keeping weak references to what was set into code instead of copying the values into the view data... Jan 25 13:10:49 Never shows up until an app has been backgrounded for awhile Jan 25 13:11:54 My guess is the GC is reaping them since they were set as method variables Jan 25 13:18:45 AsyncTask.doInBackground causes a NetworkOnMainThreadException -.- Jan 25 13:19:26 lol Jan 25 13:19:31 you should call asynctask.doInBackground() manually Jan 25 13:19:37 shoudlnt* Jan 25 13:19:38 a != A Jan 25 13:20:16 =) Jan 25 13:20:28 ah... I guess that explains it Jan 25 13:20:38 you're using the static call when using AsyncTask, not even sure how you managed to do that Jan 25 13:20:41 you call it manually!? Jan 25 13:20:41 because it's not allowed Jan 25 13:21:04 also huh? AsyncTask has static doInBackground? Jan 25 13:21:18 no Jan 25 13:21:23 he is misusing it Jan 25 13:21:39 well obviously. Jan 25 13:21:54 It should only be used euphemistically Jan 25 13:22:02 ppl should stay away from asynctask, too many issues for little benefits and not much valid use cases with it Jan 25 13:22:08 it was introduced in the early days of android Jan 25 13:22:27 and most neophytes in android dev are using it, and wrongly Jan 25 13:23:10 the prototype is protected abstract Result doInBackground(Params... params); Jan 25 13:23:16 should i have just used a new Thread instead? considering it's a simple blocking call to network, so no loops or anything like that. Jan 25 13:23:23 it's not even a static class Jan 25 13:23:33 call* Jan 25 13:24:02 using asynctask for network is not recommended if you read the doc Jan 25 13:24:06 use some kind of Executor. or better if its some internet stuff use some librsry like retrofit to handle it for you Jan 25 13:24:07 it's for short operations Jan 25 13:24:19 (it's short) Jan 25 13:24:25 no it's not Jan 25 13:24:41 but i'm not gonna say what you should use, you have to decide yourself Jan 25 13:24:55 its more for 'fixed'-time operations Jan 25 13:25:20 could be quite long provided you roughly know how long it will take Jan 25 13:25:25 with internet its not likely Jan 25 13:26:23 default timeout on socket is often near 30sec, so if the network is struggling, that makes it unsuitable for asynctask Jan 25 13:26:36 + postexecute is full of trap (no more activity context if destroyed, etc) Jan 25 13:27:13 They merrily use it in the android docs Jan 25 13:28:03 Default timeout on a TCP socket is still generally set to the value that hasn't been relevant since the early freakin' 90's, i.e., five minutes Jan 25 13:28:24 It makes me furious every time I see someone hasn't set it to something more reasonable for today like 30ss Jan 25 13:29:33 Why can I load images with HTTPS link using HTTP in Android? Jan 25 13:30:01 lol Jan 25 13:30:10 because android can hack, mitm and strip secure connections Jan 25 13:31:55 I was planning use HTTPS but the links are already working. Jan 25 13:32:45 can't even remember the last time I used asynctask Jan 25 13:33:01 probably 3-4 years ago Jan 25 13:34:30 threads? Jan 25 13:36:57 Ashiren: doesn't seem to be true. Jan 25 13:39:32 no wai Jan 25 13:42:01 raoul11, you can replace pretty much all asynctasks with rxjava, most with just retrofit/okhttp... Jan 25 13:42:30 some things I'll write my own threads for though, but those are even rarer nowadays Jan 25 13:43:21 What is a good way to convert the result of TelephonyManager.getAllCellInfo() to JSON so I can write it to a file? Jan 25 13:44:12 A shot of vodka would be a good start Jan 25 13:44:26 It's a little early for that :) Jan 25 13:44:49 its never too early for vodka Jan 25 13:44:55 Are you sure? You're the one who apparently wants to store JSON in a file Jan 25 13:45:02 or hammerwine in thepoosh case Jan 25 13:45:23 Dagmar: What's wrong with storing JSON in a file? It makes for easy parsing later Jan 25 13:45:48 You have sqlite available, for one thing Jan 25 13:46:19 what Jan 25 13:46:46 If what you're storing in json ever changes between runs, you've got a fun problem Jan 25 13:47:51 dougquaid, why do you want to write it to a file in the first place though? why not just ask it again from TelephonyManager? Jan 25 13:48:21 So I can see the results on a computer Jan 25 13:48:44 and do some statistical analysis of the network Jan 25 13:50:14 hammerwine is not a thing out of the army Jan 25 13:50:17 raoul11: Jan 25 13:50:38 thats what u settlers gets hammered off on fridays no? Jan 25 13:50:47 inb4 going to plunder&pillage Jan 25 13:51:09 dougquaid, have you tried gson or jackson? Jan 25 13:52:03 Zharf: No, I'm not familiar with those. I'm admittedly very new to android programing Jan 25 13:52:17 gson's easier, probably, jackson's more powerful Jan 25 13:52:28 google it Jan 25 13:53:07 not sure if this is the right place to ask, but what is the difference between a process running in a process VM, vs a process running natively? Jan 25 13:53:09 gson looks like just what I need Jan 25 13:53:13 thanks Jan 25 13:54:55 jackson is huge methodcount wise Jan 25 13:55:15 true, but it can also do things gson can't Jan 25 13:55:29 or can't very easily Jan 25 13:55:33 bout 5x greater Jan 25 13:55:57 not even with typeadapters? Jan 25 13:56:11 or custom deserializes/serializers? Jan 25 13:56:29 you can do anything with custom deserializers of course, but it's more manual work Jan 25 13:57:24 http://eclipser.xmms2.org/git/wanikani.git/tree/app/src/main/java/org/xmms2/eclipser/wanikani/api/model/TypedItem.java?h=redo there's no gson analogue for this for example Jan 25 14:12:09 No. Jan 25 14:12:17 A factory reset wipes _all_ user data. Period. Jan 25 14:12:19 @#$@ Jan 25 14:22:06 So I have gson mostly working. I'm making a call to TelephonyManager.getAllCellInfo() and writing the results to a file. The only issue is that gson is escaping " characters. For example, {[\"foo\":\"bar\"]}. How can I avoid that? Jan 25 14:27:10 Unescape them Jan 25 14:27:13 pastebin your relevant code, dougquaid Jan 25 14:27:32 ...if it's even an _actual_ problem Jan 25 14:27:57 Might only be a presentation thing Jan 25 14:28:06 Anything that parses them should handle the unescaping correctly. Jan 25 14:28:21 Otherwise, burn that code and find something else that doesn't suck Jan 25 14:28:35 to my knowledge gson doesn't escape json parts, only string parts Jan 25 14:28:45 Dagmar, and stop being so arrogant Jan 25 14:29:14 This isn't arrogance. This is from years of seeing people f**k up by failing to serialize data correctly. Jan 25 14:29:26 arrogance Jan 25 14:30:30 Look, there's only two reasons for escaping output like that Jan 25 14:31:11 don't assume, ask for code, provide explanation on what he's done wrong, stop being so arrogant Jan 25 14:31:20 1. The format the data is being stored in will treat the escaped character differently from the rest, usually as a delimiter. If this is the case then the complementary parsing method MUST handle these correctly when returning the stored data into variables. Jan 25 14:31:41 2. The author of the code doesn't _know_ whether this will happen or not, which is just @#$@# terrifying. Jan 25 14:31:46 I don't think this is #2. Jan 25 14:32:07 ...unless someone's trying to parse the stuff with a simple regexp or something. Jan 25 14:32:39 Messing up with this is _exactly_ how the vast majority of these bloody SQL injetions happen. Jan 25 14:34:31 Zharf: http://pastebin.com/0hfLNEhj Jan 25 14:34:35 You'll see PHP coders doing #2 all the time when they've slapped together a bunch of escape/unescape calls in a chain, like urlencode(base64_encode(hex_encode(somedata)) Jan 25 14:34:53 can an app read the sharedPreferences of another app? Jan 25 14:34:58 Zharf: Wait, sorry. I missed something in that paste Jan 25 14:35:12 dougquaid, yeah don't put it in JSONObject, it's already a json string Jan 25 14:35:37 Zharf: Oh right. That makes sense. Thanks! Jan 25 14:35:39 CrowX-: SharedPreferences is normally private to the app Jan 25 14:35:53 So, if escaping happens and it's _actually_ introducing changes to the data, then it's time to just walk away and find another library or pair of libraries to use Jan 25 14:36:28 Dagmar: Ok, I get it, you're better at this than me... Geez, you are arrogent Jan 25 14:36:56 Ashiren, what do you mean by 'normally'? Jan 25 14:37:01 No, I'm trying to make a very fine point _clear_ so that maybe you'll avoid learning it the hard way Jan 25 14:37:28 well if app has root priviliges then of course it can read other apps' files Jan 25 14:37:37 ah Jan 25 14:37:40 so it's private then. thanks. Jan 25 14:38:24 SharedPreferences is just xml file stored in app's internal space Jan 25 14:38:58 Hi! Jan 25 14:39:18 What's the best way to create / edit a JSON file within an app on Android? Jan 25 14:39:24 I should use Java FileStream for it? Jan 25 14:41:12 depends on what your requirements are but options include JSONObject for "raw" access or gson/jackson for serializing/deserializing java objects Jan 25 14:42:21 JSONObject is inside the Android reference or the Java reference? Jan 25 14:43:22 org.json.JSONObject is included in android Jan 25 14:52:24 hi everybody... I have some nested recycler views (vertical outer one and each item a horizontal inner one)... How can i control priorities of the touch events? I always want to perform touch events on the outer recyclerview, or have it intercept events in the inner ones... Jan 25 14:53:17 the problem is that currently if I touch and drag sideways in an inner recyclerview and start moving vertically, it doesn't scroll the outer recyclerview... Only if I start pretty straight vertical movements the outer scroll is perfomed Jan 25 14:53:41 uh Jan 25 14:54:09 are you sure you want that? because if you do you'll need to do some pretty major customisations Jan 25 14:54:38 also it seems like a major UX nightmare Jan 25 14:54:43 well it just feels quite weird when using the UX right now... Jan 25 14:55:35 I don't have a solution but to make sure what you want is to scroll both horizontally and vertically with the same touch event? Jan 25 14:55:54 I would hope to always perform scroll in both directions on a touch... if I just scroll vertically, only the outer one performs the scroll, if I go horizontal only, only the according inner one will do... and if you move diagonally, both are scrolled Jan 25 14:56:14 that would be ok because once you lift your finger, the inner views will snap using a snaphelper Jan 25 14:56:33 so yes basically I want the parent and the kids react on the same touch events Jan 25 14:57:16 is there a reason for the two recyclerviews? why not just one with a grid? Jan 25 14:57:47 but if I consume all events in teh parent, the kids don't get it... if I don't intercept them in the parent and the kids take them (due to horizontal movement), the parent wont get any actions from within the same touch event Jan 25 14:58:05 PM and UX department want it that way... ;) Jan 25 14:58:23 the whole idea seems alien to me Jan 25 14:58:29 and it actually looks and reacts pretty neatly, just the touch priorities are not so great yet... ;) Jan 25 14:59:30 I need to see it in action to understand, but you'll need to do some completely custom touch handling somehow Jan 25 14:59:52 well on another page we use something a bit close to that: vertical recyclerview with cards which contain a horizontal viewpager with an image slideshow of each card Jan 25 15:00:33 although there is nothing special done, it reacts much better... maybe because the viewpager in the cards isn't that "heavy" on the reaction Jan 25 15:00:57 yeah but would you scroll vertically when you want to move a horizontal item? Jan 25 15:01:45 we have an unfortunate amount of horizontal lists in a vertical list in our application, against my wishes... but no one's ever wanted to also scroll vertically while scrolling the horizontal lists Jan 25 15:09:40 how do I verify that android studios is actually building my jni stuff? I do not see a .so anywhere in my directory, never mind packaging it up and sending to the phone (I am getting java linking exceptions anyway) Jan 25 15:10:13 leeming, you should definitely end up with a .so in a libs dir Jan 25 15:10:20 _should_ Jan 25 15:10:22 i know :) Jan 25 15:10:27 so i'd assume it's not building it :) Jan 25 15:10:45 I've never done AS-directed native component building; the last time I dealt w/ all that was before AS supported it natively Jan 25 15:11:23 yeah, annoyingly the information online is quite a mess.. ive been trying to do this for the last few days Jan 25 15:11:46 I am not currently using the experimental gradle plugin tho.. I am doing it via the cmake route (as per the google sample code) Jan 25 15:12:18 and by eye, it seems to be right. Android studios also understand as it does it's smart code analysis Jan 25 15:16:44 i wonder if it is because I am targeting a single arch? Jan 25 15:16:57 that is the only thing i can see that I'm doing that is fancy Jan 25 15:20:00 To get current timestamp on Android, which method I should use? Jan 25 15:21:18 Same way you would any java code Jan 25 15:21:33 ok Jan 25 15:30:39 <_0xbadc0de> hello Jan 25 15:31:07 <_0xbadc0de> What I want to do is to generate a aescbc256 privatekey, store it in AndroidKeyStore Jan 25 15:31:14 <_0xbadc0de> and use it to decrypt encrypt data Jan 25 15:31:53 <_0xbadc0de> Cipher aes256_cbc = Cipher.getInstance("AES/CBC/PKCS5Padding", "AndroidKeyStore"); Jan 25 15:32:15 <_0xbadc0de> Androidkeystore tells me that this specific implementation of AES is not available Jan 25 15:33:49 <_0xbadc0de> Provider AndroidKeyStore does not provide AES/CBC/PKCS5Pading Jan 25 15:33:50 <_0xbadc0de> help? Jan 25 15:35:32 i guess it depends on the software/hardware you are using Jan 25 15:42:46 anyone see something wrong with this code https://hastebin.com/tugayagata.scala Jan 25 15:42:50 i get null reference.. Jan 25 15:43:09 i mean, Bitmap is set to null Jan 25 15:54:27 _0xbadc0de: https://developer.android.com/training/articles/keystore.html#SupportedAlgorithms Jan 25 15:56:37 bubbely: Where is your url coming from? You should probably be using an image loader like Picasso or Glide regardless. Jan 25 15:57:48 Are fragments still the way to go? Jan 25 16:04:16 dsardari: new DownloadFilesTask(holder.imageView).execute("http://192.168.0.3/videoone.mp4"); ip addres on my local network Jan 25 16:10:16 bubbely: The method you're using is to create a thumbnail, not to download the file. Also, the expect parameter is the path of the local video file. It won't work with that url. Jan 25 16:21:50 dsardari: im trying to create a thumbnail of an mp4 via url.. possible? Jan 25 16:25:47 does the Android Runtime include the virtual machine? or is the virtual machine packaged with the application Jan 25 16:35:45 All the docs I find about Scopes with Annotations in Dagger 2 just say "You can do them" Jan 25 16:35:55 such as "You can create a scope that maps only to a user authenticated session" - @Fragmehttps://github.com/codepath/android_guides/wiki/Dependency-Injection-with-Dagger-2#scopesntScoped Jan 25 16:36:04 meh https://github.com/codepath/android_guides/wiki/Dependency-Injection-with-Dagger-2#scopesntScoped Jan 25 16:36:13 :P https://github.com/codepath/android_guides/wiki/Dependency-Injection-with-Dagger-2#scopes Jan 25 16:36:16 There we go Jan 25 16:36:32 But I have no idea how to know when I create some random annotation how it's going to be used Jan 25 16:38:50 <_0xbadc0de> When I generate a key from AndroidKeyStore to be used with AES_CBC_256 can the keystore also be forced to store the IV as well? Jan 25 16:41:05 <_0xbadc0de> because my app is generating a eky Jan 25 16:41:07 <_0xbadc0de> key* Jan 25 16:41:26 <_0xbadc0de> storing it in AndroidKeyStore key provider Jan 25 16:41:40 <_0xbadc0de> but when I try to cipher stuff it generates a new IV everytime Jan 25 16:42:59 * raoul11 thepooshes thepoosh Jan 25 16:44:32 raoul11: what's news baby boy? Jan 25 16:46:28 _0xbadc0de: each ciphertext needs to have its own random iv Jan 25 16:46:34 never reuse the same key and iv Jan 25 16:50:18 I'm working with an old code base that uses some deprecated methods. Right now I'm specifically working with LocationManager.removeGpsStatusListener() which was deprecated in API24. I'd like my app to work on API19 and above. How should I handle deprecated methods? Jan 25 17:02:12 <_0xbadc0de> how do I set my IV in my Cipher? Jan 25 17:05:10 new IvParameterSpec(new byte[] { ... } ) Jan 25 17:05:50 cipher.init(...) takes the ivParameterSpec IIRC Jan 25 17:14:11 Has anyone had issues with Facebook native ads crashing the Facebook app? Jan 25 17:16:11 When they’re in our app and the user goes back and forth between Facebook and us, our app starts to slow down and then we get a ANR from Facebook’s app, and our app starts running fine again Jan 25 17:18:47 Hi! Jan 25 17:18:54 Hi Jan 25 17:18:59 To create a file on Android, which is the best library to use? Jan 25 17:19:13 What kind of file? Jan 25 17:19:39 Hey can i start from this https://developer.android.com/training/index.html to learn android development? or do i need to learn java first? Jan 25 17:20:27 Blessed, you don’t need to be an expert but you definitely need to know some base java to not get lost Jan 25 17:20:37 Iarfen: https://developer.android.com/training/basics/data-storage/files.html Jan 25 17:20:38 konk3r: A file created inside the application, it's a json file :D Jan 25 17:21:22 How big is it? If it’s small and you don’t need to export it you can just store it in sharedPreferences and it would be less work Jan 25 17:21:40 ok, thanks! Jan 25 17:21:42 konk3r: i learned a bit C++, i know just basics. Jan 25 17:21:42 Otherwise it’s still pretty simple to write a file, just follow that link ^^ Jan 25 17:22:12 still some basics in java will be beneficial Jan 25 17:22:24 Blessed: Try out the tutorial, if you don’t understand the syntax go back and spend a little time brushing up on java Jan 25 17:27:33 konk3r: can u suggest good tutorial for android dev for beginner with just basic basic knowledge of programming? Jan 25 17:31:11 Sorry, I don’t know any off hand. If you already know a bit of C++ it shouldn’t be a terrible switch to move to java. I would look up some Java tutorials and spend a little time getting the hang of it Jan 25 17:42:05 anyone have exerience with a ListView item not being clickable when the item is a relativelayout ? Jan 25 17:42:32 yay butterknife 8.5.x fixes java 8 lint Jan 25 17:45:16 bubbely: or more like if there is clickable element in row? Jan 25 17:46:37 Ashiren: i dont follow Jan 25 17:47:00 so your item in listview is not clickable Jan 25 17:47:03 the item is row? Jan 25 17:47:09 ya Jan 25 17:47:55 anyway, google for focusable attribute Jan 25 17:47:59 i.e. this http://stackoverflow.com/questions/8955270/listview-items-are-not-clickable-why Jan 25 17:55:11 android:descendantFocusability="blocksDescendants" is not working Jan 25 18:05:47 Hello, I think I broke my project by syncing my desktop and laptop with OneDrive. When I left home earlier today I could compile, but that doesnt work anymore now as I was going to continue. It seems like I am getting errors on the project/android studio and not the code. Anyone know what might be the problem? Jan 25 18:05:49 Error:Error converting bytecode to dex: Jan 25 18:05:49 Cause: java.lang.RuntimeException: Exception parsing classes Jan 25 18:05:49 Error:1 error; aborting Jan 25 18:05:49 Error:Execution failed for task ':app:transformClassesWithDexForDebug'. Jan 25 18:05:49 > com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process Jan 25 18:08:55 okay I got it working whit clean project and rebuild project :) Jan 25 18:09:42 <_0xbadc0de> When I create a key and store it on the keystore Jan 25 18:10:12 <_0xbadc0de> the keystore is bounded for that particular app? Jan 25 18:10:24 <_0xbadc0de> so for instance if I have alias "1337haxxor" on apk1 Jan 25 18:10:34 <_0xbadc0de> then apk2 is not able to see this alias? Jan 25 18:15:28 Anyone up? I was wondering about the creating a WebView from a C++ library? Jan 25 18:15:42 Anyway, to go about it, new to JNI ehre Jan 25 18:15:43 *here Jan 25 18:15:47 damn Jan 25 18:15:54 is it ok if i paste a link to my stackoverflow post here Jan 25 18:16:32 bubbely: regarding? Jan 25 18:17:22 listview not clickable issue Jan 25 18:17:31 listview item* Jan 25 18:17:42 ah, no idea from here Jan 25 18:18:10 regarding your original question about SO, that is Jan 25 18:18:24 might as well paste it =p Jan 25 18:18:32 http://stackoverflow.com/questions/41858641/listview-item-not-clickable-it-is-wrapped-in-a-relativeview Jan 25 18:19:11 Remove android:clickable="true" Jan 25 18:19:24 k Jan 25 18:19:34 doesn't work Jan 25 18:19:53 Remove setClickable and LongClickable Jan 25 18:20:11 done Jan 25 18:22:21 still no go Jan 25 18:23:46 I don't see any other obvious errors, maybe the issue is elsewhere Jan 25 18:23:53 =({ Jan 25 18:25:20 if i remove the VideoView... i can click the item Jan 25 18:25:22 i just noticed Jan 25 18:25:25 maybe this means something? Jan 25 18:25:27 Make sure you didn't define anything superfluous (like onClick) in the XML Jan 25 18:27:01 ...and quite possibly the focusable attribute unless you're sure you need it. Jan 25 18:27:10 can I define custom attributes to be used in a TextAppearance? Jan 25 18:27:29 One of the most fun bits about Android UI is finding out which things magically get toggled off when you set something else. Jan 25 18:28:56 android:focusable="false" in the VideoView right ? Jan 25 18:31:34 does nothing Jan 25 18:34:57 nyone else? Jan 25 18:39:25 Maybe clickable="false" on the VideoView Jan 25 18:39:30 Or both Jan 25 18:46:44 Hi!! Jan 25 18:46:54 How I can access the internal storage of my app? Jan 25 18:47:07 It doesn't matter if it's with the smartphone or with Android Studio Jan 25 18:47:29 you can use ADB Jan 25 18:47:57 s73v3r: how it works? Jan 25 18:48:28 adb shell into your device, and then you should be able to browse the filesystem and find your app Jan 25 18:53:05 does AppBarLayout's scroll behavior work without it being an indirect child of a CoordinatorLayout? Jan 25 18:53:21 the documentation says no, but my undocumented-behavior-spidey-sense says yes Jan 25 18:53:24 the growing? I don’t thinkso Jan 25 18:53:51 if the documentation says no, then why wouldn’t you just put it in a coordinatorLayout? Jan 25 19:00:26 Does someone know what happens, when you try to connect to a bluetooth socket twice? Does it hang, or return -1 or something? Jan 25 19:00:30 Might actually work??? Jan 25 19:17:30 Hi! Jan 25 19:17:41 adb shell is not working for accessing my device, it's blocked xD Jan 25 19:17:47 what I have to do? Jan 25 19:17:54 do you have developer mode on? Jan 25 19:17:58 yes Jan 25 19:18:13 what do you mean it’s blocked? Jan 25 19:19:22 s73v3r: "opendir failed, permission denied" Jan 25 19:21:58 if that’s the case, then you may require root to do that Jan 25 19:28:14 s73v3r: how I can have root access? Jan 25 19:28:19 Is my device xD Jan 25 19:28:46 you’d have to root your phone. that’s something you’ll have to check on XDA how to do Jan 25 19:29:46 I want my app to continue using LocationUpdates even if the app isn't active. How can I do that? Jan 25 19:31:57 spin up a service Jan 25 19:32:27 keep in mind that with Doze and the like, that can be killed at any time Jan 25 19:33:55 Good point. But there must be a setting somewhere the user can toggle so that Doze won't kill the service, right? Jan 25 19:35:15 there is, but it doesn’t work that well Jan 25 19:35:30 and even with that on, it can still be killed for other reasons Jan 25 19:36:00 if you run your service in the foreground it'll be less likely to be killed Jan 25 19:38:19 i believe so Jan 25 19:38:40 i think you can also do it as a broadcastReceiver, and only be spun up when there’s a location update to be had Jan 25 19:39:01 hello Jan 25 19:40:25 can someone please help me by looking at my code, and tell me if there is something wrong: http://pastebin.com/0cvHBQtY Jan 25 19:40:35 it is a short snippet Jan 25 19:40:59 SirWoody: instead of just asking if something is wrong, please ask a more direct question Jan 25 19:41:07 tell us the actual problem you’re having Jan 25 19:41:39 my app crashes when i am using that snippet Jan 25 19:41:50 whats ansattNavn1 Jan 25 19:42:05 SirWoody: crashes how? please provide a stack trace Jan 25 19:42:06 also it would be useful to post the stacktrace with the exception Jan 25 19:43:12 hmm, well, i am programming it on my other laptop Jan 25 19:43:38 without knowing the actual error, we’re not really going to be able to help Jan 25 19:45:46 "attempt to invoke virtual method" "android.view.Window$Callback android.view.Window.getCallback()" "on a null object reference" Jan 25 19:46:42 "unable to initiate activity ComponentInfo Jan 25 19:46:47 post the full stack trace Jan 25 19:47:01 but basicaly, something is null, and you Jan 25 19:47:05 are trying to call methods on it Jan 25 19:48:10 what i dont understand is that i have used that snippet before, without fault Jan 25 19:48:21 you didn’t have something that was null before Jan 25 19:48:40 also, your names are terrible Jan 25 19:48:45 byeah Jan 25 19:48:48 i know Jan 25 19:49:08 i’m gonna have to guess that you don’t have a view with that ID in your layout Jan 25 19:49:17 but without knowing more, that’s all it can be Jan 25 19:49:59 i have the id on my EditViewm and it does have a id and it do find my view Jan 25 19:50:25 then you’ll need to read your full stack trace to find out where the NPE is Jan 25 19:51:02 I'm not an Android expert, but as far as I understand, findViewById requires the ID to exist in the R file. Do you have that ID in your R file SirWoody? Jan 25 19:51:33 SirWoody: is that ansattNavn1 a variable? Jan 25 19:51:37 or is it the ID? Jan 25 19:52:02 and if it’s a variable, are you absolutely sure it’s set? Jan 25 19:52:04 I'm surprised I haven't run into this before, can 9 patch be used for composite views? i.e. as a background of a linearlayout with multiple views within? Jan 25 19:52:30 pfn: i don’t see why not Jan 25 19:52:57 mr_lou: R.id.ansattNavn1 is a view in the mainActivity.xml Jan 25 19:53:12 but you’re not using that ID in your snippet Jan 25 19:53:25 heh "employee Name 1" Jan 25 19:54:03 s73v3r, I don't either, but oddly, it's not getting processed/scaled correctly per 9-patch rules Jan 25 19:54:09 it's just getting scaled as if it's a regular png Jan 25 19:54:36 i guess Button and the like have special methods for processing 9 patches Jan 25 19:54:58 it is not a variable, it is an id for a EditView Jan 25 19:55:16 not in that snippet it’s not Jan 25 19:55:22 you forgot R.id before it Jan 25 19:56:56 not really, that was set in a import static something above Jan 25 19:57:13 i have tried with various codes Jan 25 19:57:20 such as u mention Jan 25 19:58:25 the text also get highlighted when the findidbyView findes the view Jan 25 19:58:27 no, you need to have it as R.id.whateverthefuckyouhad Jan 25 19:58:43 just do that, and don’t do anything fancy Jan 25 19:59:02 i havent, it is the IDE that did the import Jan 25 19:59:09 autoshit Jan 25 19:59:21 but i did try what u mention Jan 25 19:59:35 ok, go back and triple check that you have an EditText with that id in your layout file Jan 25 19:59:52 and while you’re at it, post the entirity of your stack trace Jan 25 20:00:24 whenever you have a crash, and you’re not sure what’s happening, look at the stack trace Jan 25 20:00:37 and if you want to get help here, please post the stack trace right away Jan 25 20:01:26 hrm, for some reason, my 9 patch gets processed to not have the border lines when building... Jan 25 20:01:29 that's wonderful... Jan 25 20:01:47 fun Jan 25 20:01:58 if you add a button to the layout, does the 9patch work as intended? Jan 25 20:17:01 wtf, aapt singleCrunch fucks up 9 patches Jan 25 20:18:46 looks like I have to disable pngcrunching when 9 patch are present Jan 25 20:19:47 it's unbelievable the build system only supports "ALL" png crunching (including 9 patch), 9-patches only, or none Jan 25 20:19:57 it should be the other way around, non-9 patch crunching only Jan 25 20:20:11 so, ALL, non-9 patch and NONE Jan 25 20:20:30 or ALL, non-9, 9-only and NONE; in my case, I have to set none to workaround this dumb shit Jan 25 20:30:24 I know I've encountered this before, but I can't remember.... Jan 25 20:30:31 and google has some shitty hits for pngcrunch + 9patch Jan 25 20:32:54 and no, disabling 9.png processing didn't work, it broke all of my 9patches... Jan 25 20:34:21 is there a way to get a list of all the attributes listed in an AttributeSet? Jan 25 20:35:27 getAttributeCount and getAttributeName Jan 25 20:35:27 loop Jan 25 20:35:53 so just for fun, i did open a new project in Android Studio, with an empty Activity setup, where there aleady is an hello world in a TextView. and i signed it an id, called "test". i so did add following code to MainActivity.java "String shittystring = ((TextView)findViewById(R.id.test).getText().toString(); Jan 25 20:35:56 i was hoping there’d be an easy thing I could do while debugging. Guess not Jan 25 20:36:04 and that is also getting the same error Jan 25 20:36:33 I wonder if my problem with my 9 patch rendering is because it's being used in a gl surface... Jan 25 20:36:43 it's a view that gets drawn to a gl surface, that gets sent remotely... Jan 25 20:37:17 SirWoody What is your question/ Jan 25 20:37:18 ? Jan 25 20:37:53 wtf is wrong with android studio? why does that not work? Jan 25 20:38:34 it's prob because it didn't like your choice of variable name :) Jan 25 20:38:43 haha Jan 25 20:39:01 "why does this string have to be shitty?!" Jan 25 20:39:07 SirWoody: post your layout and your code file Jan 25 20:39:14 Your question is "what is wrong with Android Studio"? Lol. Jan 25 20:39:57 the problem isn't android studio, it's you Jan 25 20:41:25 pastebin.com/X8j3pgfC Jan 25 20:41:49 that is my simple code it wont let it work Jan 25 20:42:09 your link doesn’t work Jan 25 20:42:14 and I told you to paste the whole thing Jan 25 20:42:16 now it dord Jan 25 20:42:17 s Jan 25 20:42:20 the entire file, and your layout file Jan 25 20:42:26 i did Jan 25 20:42:58 what the fuck is shittyString inside? Jan 25 20:43:03 it’s not in a method Jan 25 20:43:06 nothing yet Jan 25 20:43:25 put it in the onCreate method Jan 25 20:43:41 when you’re trying to debug stuff, keep it simple. don’t try to be clever Jan 25 20:45:04 well it works now, why does it need to be inside the onCreate method? Jan 25 20:45:36 cause out in the middle of nowhere, it gets initialized before onCreate is called Jan 25 20:46:01 so it can’t look up that ID, cause it doesn’t have a layout file to look in yet Jan 25 20:46:06 hey guys, im using ionic2 to develop some simple android apps, i want to know if is easy to get the app in the google app store, and if they notify they user when a new update are available or if i need to code that in my app. Jan 25 20:46:08 thought it was the other way around Jan 25 20:46:10 no Jan 25 20:46:25 when it’s out there, you declared a class field Jan 25 20:46:36 ah Jan 25 20:46:52 thank you for youre knowledge Jan 25 20:47:15 and help Jan 25 20:47:17 :) Jan 25 20:47:27 and patience :p Jan 25 20:48:46 SamSagaZ: you just upload signed apk with your own key to google play developer account (afair it costs $25 once) Jan 25 20:49:59 then if you upload updated apk (it must be signed with the same key), the user will see within hours or 1-2 days there is new version on google play, or he will download automatically if auto update is on Jan 25 20:50:46 https://medium.com/disruptivehq/how-to-build-the-next-trello-and-sell-it-for-425-million-or-more-589045c9bd64 Jan 25 20:50:51 Interesting read^ Jan 25 20:51:15 but it does not recognice my string... Jan 25 20:52:58 and i do not even get to write my method inside the onCreate Jan 25 20:53:01 bah Jan 25 20:53:24 but i have to go Jan 25 20:53:31 thanks anyway Jan 25 21:17:44 Hey all. How would you do that nice micro interaction in the android stock alarm clock where you can drag the alarm button onto the snooze or stop button? There are circles appearing around the targets as the user drags the alarm button near them. Would you try to use a CoordinatorLayout with dependencies? Jan 25 21:21:05 Is there a quick way to clear all cache and permissions that my app asked for? Right now to test how a user experiences setup when first opening the app I have to uninstall it each time to "reset" Jan 25 21:21:27 Hello, I have a really basic app I'm developing but I can't get it to run in the emulator for android studio. When I start the app, it just hangs and then drops me back to the apps page saying "APP cannot run" Jan 25 21:22:37 what does the stacktrace say in logcat, rebelEpik? Jan 25 21:22:54 i will check right now, one second Jan 25 21:23:01 that's usually the first place you should look Jan 25 21:23:35 Baulde, install ADB idea Jan 25 21:23:44 I want to say nothing shows up when it happens, but I want to make sure Jan 25 21:23:55 Baulde, you can clear cache & stuff in one click Jan 25 21:24:05 adq, thanks. Ill look at it Jan 25 21:24:19 Baulde, it's a little plugin for android studio/IDEA Jan 25 21:24:30 (and also a must) Jan 25 21:24:41 otherwise you could do in command line via pm Jan 25 21:24:49 (this is what this plugin does under the hood) Jan 25 21:25:13 logcat returns no errors for me Jan 25 21:25:30 The actual message I get in the emulator is "App has stopped" Jan 25 21:25:51 be sure to know how to use logcat, if your app crashes, it should generate a stacktrace Jan 25 21:25:56 otherwise no one can help you, nor yourself Jan 25 21:31:01 ugh, so I can't seem to draw a view with a 9patch background to a bitmap while making the drawing handle the 9patch rules... Jan 25 21:32:01 Make sure your edge pixels are either 100% transparent or 100% opaque and black Jan 25 21:32:26 If even *one* isn't that way it'll screw the whole thing up, and it's _easy_ to miss one Jan 25 21:32:41 draw9patch and aapt both accept the image without complaints Jan 25 21:35:26 * pfn installs gimp... Jan 25 21:36:35 adq, thanks ADB idea is working Jan 25 21:43:25 yeah, the 9 patch is definitely correctly Jan 25 21:43:29 it only fails when I draw to a bitmap Jan 25 21:51:05 I've been looking around for a library for a Credit Card Text Watcher. Is there anything that works that doesn't have bugs when text is deleted? Jan 25 21:53:17 anyone willing to help out a noob? :D i've added some controls for my app into the notification drawer and they all work just fine, but it annoys me that the drawer slides up / closes when i press the buttons Jan 25 21:53:34 how are you handling clicks to the nav drawer items? Jan 25 21:53:50 It's probably as simple as returning `false` from that method Jan 25 21:54:50 i basically used this as a guideline: http://stackoverflow.com/a/26379013 Jan 25 21:55:36 tried building the NotificationCompat with .setAutoCancel(false) but that didn't work Jan 25 21:58:22 thanks Ashiren Jan 25 22:04:41 ok, a little bit of research suggests using getService instead of getActivity for the pending intents... Jan 25 22:17:12 android.location.GpsStatus was depricated in API 24 and replaced with android.location.GnssStatus. What happens if I use android.location.GnssStatus on < API 24? Will it fail? How do I handle deprecated classes? Jan 25 22:20:40 dougquaid, it will probably fail unless it's implemented in the support library (and then it would be some other api, support.android.location or something) Jan 25 22:20:51 dougquaid, you should be able to wrap your use in a test of the build Jan 25 22:21:52 dougquaid, ' if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { old api } else { new api }'. substituting the right version. Jan 25 22:22:16 dragorn: That makes sense. Thanks Jan 25 22:22:34 ought to work anyhow Jan 25 22:23:15 One more question - How do I check if the device has a GPS fix, and how do I check the quality of the fix? Jan 25 22:24:08 if I recall you register a handler for gps location and request the loc Jan 25 22:24:11 and you'll get called later Jan 25 22:24:30 but it should be in the gpsmanager (err, gnssmanager?) documentation. Or I guess location docs. Jan 25 22:24:41 (it's been a few years since I've written anything w/ gps) Jan 25 22:25:11 LocationManager. That's what you want to look at. Jan 25 22:25:58 you can probably get the coarse location instantly (w/ permissions of course), getting a more refined location means waiting for the gps to get fully woken up (usually) Jan 25 22:27:06 thanks again Jan 25 22:27:52 hope that helps Jan 25 22:37:24 Is there a broadcast receiver for ActivityRecognition or do you have to poll for it? Jan 25 22:44:16 Hey, where can i find a tutorial on how to add a navigation drawer to an activity with a Toolbar? Jan 25 23:03:36 oh, so the reason why my 9patch didn't work when drawing, the bitmap didn't have display metrics setup Jan 25 23:03:59 setup the displaymetrics for the destination render target and it came up ok Jan 25 23:13:17 sounds plausible Jan 25 23:15:27 Hey, where can i find a tutorial on how to add a navigation drawer to an activity with a Toolbar? Jan 25 23:16:50 AppCompatActivity is kinda new to me, as well as the toolbar Jan 25 23:20:35 Hi, I am targeting min sdk 19, and compiling with sdk 24. I am trying to make a tabbed interface, and I am using a FragmentPagerAdapter. For some reason, my fragments' onAttach(Context) methods are not being called. How could I get a reference to the Activity? Jan 25 23:21:37 if you’re not being attached, then you can't Jan 25 23:21:55 And how do I get attached? Jan 25 23:22:25 Because I can see the fragment's contents if I run the app... (quite new to android) Jan 25 23:22:39 What api did they switch onAttach from activity to context Jan 25 23:22:41 are you absolutely sure onAttach isn’t being called? Jan 25 23:23:26 are you using support fragments? Jan 25 23:23:26 Well, I added a debug break, and a Log message, and nothing happened, no log message, no break Jan 25 23:23:36 Nope Jan 25 23:23:42 that’s your problem Jan 25 23:23:47 use support fragments Jan 25 23:23:56 Okay, thank you very much Jan 25 23:24:07 onAttach changed from taking an Activity as a parameter to taking a Context in API 23 Jan 25 23:29:11 I have another problem now. My activity extends AppCompatActivity. Its getFragmentManager() returns a non-support FragmentManager, but if my fragments are support, how do I put them together? Jan 25 23:30:19 Oh, okay, read the documentation Jan 25 23:30:27 Fixed it Jan 25 23:59:40 TacticalJoke lol , first comment https://www.reddit.com/r/androiddev/comments/5q3022/the_proper_way_of_handling_config_changes/ Jan 26 00:00:03 g00s: Yeah, that was a great point. Jan 26 00:06:36 "It is very clear that Donald Trump, president of the United States, is three kids stacked in a trench coat. " lol thats hilarious Jan 26 00:23:43 Hm. Jan 26 00:24:47 I bought some chicken thighs about 7 days ago. 3 days ago I put them in a soy sauce & thyme marinade, they didn't smell bad at all. But then my schedule got complicated and they're still in the fridge, in the soy sauce marinade. Should I discard them or keep them? Jan 26 00:25:08 they’re 7 days old, total? Jan 26 00:25:19 and they’ve been in the fridge the whole time? Jan 26 00:25:20 Yeah. Jan 26 00:25:23 Yeah. Jan 26 00:25:33 On the lowest (i.e. coldest) shelf. Jan 26 00:25:48 i’m guessing in a ziploc bag or something similar? Jan 26 00:26:06 Well, the first four days in a pretty cold fridge, on the lowest shelf. The last three days in the lowest shelf of a slightly less cold fridge. Jan 26 00:26:10 Yeah, in a 1.5gallon ziploc. Jan 26 00:26:16 Very little air. Jan 26 00:26:21 About 2 cups of soy sauce. Jan 26 00:26:31 1 week is nothing, and the brine preserves Jan 26 00:26:33 About 8-10 pounds of chicken thighs. Jan 26 00:26:34 Eat only one of them Jan 26 00:26:37 i think you might be able to use them today, but I’d have a backup plan Jan 26 00:26:45 if you die, you had back luck Jan 26 00:26:55 you have to cook them today if you’re going to use them at all Jan 26 00:26:57 sounds like a nethack player Jan 26 00:27:02 s73v3r: I was going to just throw them in the oven and roast them all. Jan 26 00:27:07 if you don't die, they are still good and you can preserve them for a few more days Jan 26 00:27:13 s73v3r: Then again, it's like, idaknow, $10-$15, maybe I'll just chuck them. Jan 26 00:27:24 I don't mind being careful, but I do mind being stupid. I also mind being sick. Jan 26 00:27:46 eh, if they're raw, no harm can come from cooking them and eating them Jan 26 00:27:50 that’s why I said have the backup plan. cook them, but take one bite Jan 26 00:27:59 ? Jan 26 00:28:00 if they've gone bad, the worst will be that their texture will be unpleasant Jan 26 00:28:16 Okay, if it's risky I'll just dispose of them in the garbage. Jan 26 00:28:51 then again, the texture of non-free range chicken is generally unpleasant anyway Jan 26 00:30:06 puff: let us know how it ends. I'm worried now Jan 26 00:30:33 Nah, I'll just throw it away. Jan 26 00:30:57 Buy some chinese, instead? Jan 26 00:31:41 no, not chinese. Buy some mexican Jan 26 00:32:11 no, no. Do you have Russian restaurants with home delivery in the USA? Jan 26 00:32:25 That looks the safest thing, today Jan 26 00:50:29 here’s a question that I’m pretty sure I knew the answer to a long time ago, but forgot. Why, when dealing with TypedArrays in custom attributes, do we normally declare them as Final? Jan 26 00:54:46 Well, the word "we" is exaggerated Jan 26 00:55:28 s73v3r: could you show an example? Jan 26 00:56:23 final String typeface = array.getString(R.styleable.TypefacedView_typeface); Jan 26 00:56:34 no, that’s not it Jan 26 00:56:40 final TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.TypefacedView, defStyle, R.style.TypefaceTextViewStyle); Jan 26 00:56:43 that’s it Jan 26 00:58:21 s73v3r: There's no particular reason to declare a TypedArray reference `final`. It's no different from any other reference in this respect. Jan 26 00:58:33 I can't say I've noticed people declaring TypedArray references final more than any other variable. Jan 26 00:59:32 I guess it might help ensure that TypedArray.recycle is called (because reassigning the variable could mean forgetting this), but it's easy to remember to call this method (and AS even warns about this). Jan 26 01:00:43 The only hypothesis I could make is that since you want to recycle() the TypedArray after the use, you want to be sure to not overwrite it before you did. But 1) obviously that doesn't make it sure that you do it (and there is no "using" in Java to automatically dispose IDisposable objects like in C#) 2) That kind of code is usually so short and simple that the risk that you re-use the same variable is very slim Jan 26 01:00:55 lol, if the chicken is bad and you cook it, the toxins (PAMPs) stay in the meat ready for your pleasure ;) Jan 26 01:01:34 you won't get salmonella, but your liver could have a fit Jan 26 01:01:59 Melatonina: I agree, although note that we have Closeable and AutoCloseable, together with try-with-resources. (Though TypedArray doesn't implement this.) Jan 26 01:02:05 https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html Jan 26 01:02:11 "cooking rotten chicken" yields 541.000 results on Google Jan 26 01:02:25 TacticalJoke: thanks, I didn't know that. It's useful Jan 26 01:03:48 If your `minSdkVersion` is >= 19, you can use this on Android. Jan 26 01:04:16 oh, ok. Jan 26 01:06:42 puff: Did you see pages such as this? http://www.newhealthadvisor.com/How-to-Tell-If-Chicken-Is-Bad.html Jan 26 01:11:46 TacticalJoke: Yeah, but after three days in a soy sauce marinade, those tests aren't really feasible. Jan 26 01:12:16 TacticalJoke: My general rule with smelling meat is "No news is good news." Jan 26 01:12:17 Ahh, true. Though I wonder whether the smell would hold up. Jan 26 01:12:45 What the heck... sorry guys, I thought I was in ##cooking. Jan 26 01:12:54 So, how 'bout that Android... Jan 26 01:13:43 :D Jan 26 01:13:53 This has been a paid presentation by the Chicken Safety Association of America. Jan 26 01:44:56 Im testing notifications and have a loop that creates the notification and a pending intent so that when an alarm is up, the notification is displayed Jan 26 01:45:07 However, I only seem to ever get a single notification Jan 26 01:45:41 I have them set to display at 2, 4, 6, 8... minutes in the future, but only one will display and thats it Jan 26 01:45:51 Why might this be? Jan 26 01:46:39 orbyt_, are you re-using the same notification id? Jan 26 01:47:27 dragorn No. Jan 26 01:47:34 Let me post some code.. Jan 26 01:49:29 Alright, heres some code: http://pastebin.com/NYdKr1e3 Jan 26 01:50:21 With the exact above code, I do not get any notifications (at least not within 10 minutes) Jan 26 01:51:16 However, if inside of alarmManager.set() I use System.currentTimeMillis() + 120000 instead of the value of testTime, ill get 1 notification at 2 minutes in Jan 26 01:52:17 I also tried setting the time dependent on the variable i from the for loop, for example if i was equal to 0, id do System.currentTimeMillis() + 120000 Jan 26 01:52:30 If i was equal to 1, id do System.currentTimeMillis() + 240000 Jan 26 01:52:44 and if i was equal to 2, System.currentTimeMillis() + 360000 Jan 26 01:53:13 In the above scenarios, only 1 notification at the final time of System.currentTimeMillis() + 360000 (6 minutes in the future) was triggered Jan 26 02:44:48 I want my fragment to tell my MainActivity to hide a textview; to do so I created an interface in the fragment and implemented it on the main activity. However, the implemented methods in my main activity run BEFORE my onCreate method, therefore, my findViewById is returning null; Anyway to get around this? Jan 26 02:46:05 fattest: When is the Fragment calling back to its listener (the Activity)? Jan 26 02:47:11 TacticalJoke: my fragment has an innerclass that extends AsyncTask; and on this task's onPreExecute() method, I use listener.hideTextView(); Jan 26 02:47:37 TacticalJoke: I start this AsynTask in my onCreateView() in my fragment Jan 26 02:50:36 fattest: You might have to start it in onActivityCreated instead. (The reason I'm saying "might" is that I almost never use Fragments; there could be a better solution.) Jan 26 02:51:01 AFAIR, there is no guarantee that Activity.onCreate will have finished by the time that Fragment.onCreateView is called. Jan 26 02:51:15 There is a guarantee by the time that Fragment.onActivityCreated is called, though. Jan 26 02:56:25 TacticalJoke: but that's not the problem Jan 26 02:56:52 TacticalJoke: In my MainActivity, I have @Override public void hideTextView(){}; this method is being called before my onCreate so I can't access any getViewById() methods Jan 26 02:57:03 It is the problem, according to what you said. Jan 26 02:57:43 If you start the AsyncTask before Activity.onCreate has finished, it may complete (and call `hideTextView`) before Activity.onCreate has finished. Isn't that right? Jan 26 02:58:00 The problem is when it completes before Activity.onCreate has finished. Jan 26 02:58:09 ohh right Jan 26 02:59:05 fattest: create a property. get/setTextViewHidden() in the setter, when the value is changed you call a new method updateTextViewVisibility() where you actually update the visibility. in onCreate() you call updateTextViewVisibility() too. Jan 26 02:59:39 fattest: there are other ways to represent this same pattern but that's the basic way Jan 26 02:59:52 fattest: diet **** ENDING LOGGING AT Thu Jan 26 03:00:01 2017