**** BEGIN LOGGING AT Thu Aug 11 02:59:58 2016 Aug 11 03:01:56 liuwenhao i tried to find the bug. whenever i look through the BLE issues that are open i become despondent Aug 11 03:02:35 so much stuff from 2014 assigned but not fixed Aug 11 03:02:44 i'd go with iOS if you can Aug 11 03:02:49 Haha I wish Aug 11 03:02:53 the iOS version of this is already finished Aug 11 03:03:02 I was tasked with adding the functionality to Android Aug 11 03:03:49 I'm going to try GATT, I think it's switching to BLE as soon as it's paired which is causing all of my problems Aug 11 03:03:50 liuwenhao any way you can program the device to disable classic mode Aug 11 03:04:15 I don't think so Aug 11 03:04:33 `````````` lol Aug 11 03:04:42 This is the first time I've ever had to work with bluetooth Aug 11 03:04:47 Unfortunately Aug 11 03:05:01 BT has a bad rep Aug 11 03:05:04 I thought the camera apis were bad Aug 11 03:05:09 that was what I worked on full time before I got this task Aug 11 03:05:25 The two worst parts of Android Aug 11 03:05:47 Camera2 is a joke, I feel bad for anyone who has to use it Aug 11 03:06:32 Samsung discards like 1/2 of the API except for their own apps and locks out the rest anyways so you can't even use it fully without huge workarounds Aug 11 03:07:18 i recommended on reddit, Play Store allowed whitelists instead of blacklists, i got downvoted Aug 11 03:07:32 basically for those apps, like camera things, i'd go with nexus only Aug 11 03:09:02 That's actually a great idea Aug 11 03:09:09 especially for camera apps that want to use RAW Aug 11 03:09:18 where it's only supported on like 10 phones out of the 10k Android devices Aug 11 03:10:21 It would be good if the manifest filters had more granular control Aug 11 03:10:37 like uses feature:"camera 2 raw" Aug 11 03:10:40 instead of just camera Aug 11 03:10:40 liuwenhao you can also pair the BT device though the setting app Aug 11 03:12:30 Yeah that's what I'm doing, just shooting off intent to bluetooth settings, and when the user comes back try to open a socket and send a byte array to the device Aug 11 03:13:09 Can anyone recommend a good samba / cifs client library? Aug 11 03:14:52 tx hm there is apache camel jcifs Aug 11 03:15:17 also apache commons VFS Aug 11 03:15:29 i wouldn't get my hopes up though Aug 11 03:19:16 liuwenhao here Aug 11 03:19:24 's another great one https://code.google.com/p/android/issues/detail?id=81130&q=ble&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened Aug 11 03:20:35 liuwenhao i think my favorite bug though - and i kid you not - is when you have multiple devices connected, you can actually get deviceX callbacks for deviceY and vice versa Aug 11 03:20:46 basically, you get callbacks for the wrong devices Aug 11 03:23:22 ... awesome Aug 11 03:23:38 Thanks for the link, it will help me cry myself to sleep Aug 11 03:23:54 2014 it was reported? wow Aug 11 03:26:05 Hey can someone tell me how I can get this date format to a local timezone and then convert it to a long (by doing get time or whatever) this is not working? http://pastebin.com/f4MypSDE Aug 11 03:29:21 http://stackoverflow.com/questions/38886792/how-to-convert-this-date-string-into-a-long Aug 11 04:31:39 Why google play store throwing this error "Your device isn't compatible with this version. Even my app supports that version. Aug 11 04:33:44 Hi any one is there? Aug 11 04:39:31 r92115_: context? Aug 11 04:44:22 I have developed an app which supports API Level 9 to Above and published it on the play store. But google play store giving the alert in one of device "Your device isn't compatible with this version" for my App and that device details are here :- Device Name - Samsung, Code name-Kitkat, Version Number-4.4.2 & API Level-19 Aug 11 04:44:57 i searched on google also but didn't get any solution. Aug 11 04:47:05 I don't think that error is necessarily referring to OS version Aug 11 04:47:18 what's the app? Aug 11 04:47:35 it's a transportation app Aug 11 04:47:52 efmfm employee Aug 11 04:47:53 link? Aug 11 04:48:14 https://play.google.com/store/apps/details?id=com.app.newt.employee Aug 11 04:48:55 so, it's not compatible with most of my devices either Aug 11 04:49:04 also, do you own app.com? :) Aug 11 04:49:36 any specific reason Leeds ? Aug 11 04:49:50 why this app not support in some of devices? Aug 11 04:50:06 in my case, it looks like it's supported on phones, but not on tablets or TV Aug 11 04:50:15 yeah Aug 11 04:50:24 it support only phones Aug 11 04:50:59 but in some of phones also not supporting Aug 11 04:51:22 pastebin your AndroidManifest.xml Aug 11 04:53:07 nice spam Aug 11 04:53:50 where should i paste Leeds? Aug 11 04:53:50 <[Saint]> paste/bin/. ;) Aug 11 04:54:57 <[Saint]> http://lmgtfy.com/?q=pastebin Aug 11 04:57:03 not able to paste all text any other solution Leeds Aug 11 04:57:28 why are you not able to paste all text? Aug 11 04:57:43 into a pastebin Aug 11 05:00:16 done Aug 11 05:00:27 i have pasted my AndroidManifest.xml file there Aug 11 05:00:53 er... you need to actually give us the link Aug 11 05:00:55 <[Saint]> here's the part where you realize you fucked up and need to actually give us the url of that paste. Aug 11 05:01:38 no, guess not Aug 11 05:02:54 <[Saint]> not abale to paste all pastebin any other solution Leeds Aug 11 05:03:42 r92115_: you paste your code into the site, then save it and it gives you a link you can share with other people, so they can help you Aug 11 05:03:54 you don't just paste it in and announce it Aug 11 05:05:03 plz find the link :) http://pastebin.com/jiTTJnKr Aug 11 05:05:35 [Saint]: no! hastebin Aug 11 05:05:46 doesn't have any Ads Aug 11 05:06:10 <[Saint]> If you're not blocking ads upstream of your browser experience you're failing at life. Aug 11 05:07:54 eh, I only see 1 real ad on that page, plus a couple of ads for "pastebin pro" - it's ok Aug 11 05:08:23 r92115_: I'll ask you again if you own app.com Aug 11 05:08:33 and also what the actual device is you're having trouble with Aug 11 05:09:17 also, please respond much more quickly :P Aug 11 05:09:37 Samsung duos Aug 11 05:10:01 Model - SM-G350E Aug 11 05:10:31 [Saint]: I have a different attitude, if a site has annoying Ads I use another site :) Aug 11 05:10:48 <[Saint]> wyoung: sometimes one isn't given that option. Aug 11 05:11:04 [Saint]: That is always an option Aug 11 05:11:13 <[Saint]> Absolutely not. Aug 11 05:11:46 <[Saint]> One can not simple "just" use another online banking solution, for instance. Aug 11 05:11:54 <[Saint]> Along with a metric shittonne of other obvious examples. Aug 11 05:12:22 [Saint]: I wouldn't deal with a bank that spams me with Ads Aug 11 05:12:59 <[Saint]> Yeah yeah, alright Woz, calm down. Aug 11 05:13:11 ? Aug 11 05:13:13 * [Saint] puts on his "I don't believe you" face. Aug 11 05:15:12 <[Saint]> No one sane is going to change banks because they dislike ads. They'll just block said ads. Either in the browser experience or upstream of it. Aug 11 05:19:45 I am sane and I would, then again I havent been tested Aug 11 06:29:42 g00s: here? Aug 11 06:39:22 What is the best way to kill a process programmatically? I tried android.os.Process.killProcess, but it seems the OS sometimes tries to restore Activities that were open before the kill after the process is killed. Aug 11 06:42:38 barq: why do you need to kill a process? and what process exactly? Aug 11 06:55:40 hi. PreferenceManager.getDefaultSharedpreferences, gets preferences and doesnt update itself when preferences changes? Aug 11 07:03:03 perfinion: Several apps that run on a custom device that I am working on. I want to kill them to get rid of any data or state they hold when logging off a user so that the system is clean when the new user logs in. Aug 11 07:05:32 <[Saint]> barq: why wouldn't you use the built-in user profiles in Android for that? Aug 11 07:06:05 yeah i'd use the profiles too so they're completely separate Aug 11 07:06:16 <[Saint]> and sanity is restored. Aug 11 07:07:13 Does that work with api 17? Aug 11 07:08:02 <[Saint]> 4.2.2+, so...yes? Aug 11 07:08:16 <[Saint]> unless I'm mixing up API<->version again. Aug 11 07:08:40 <[Saint]> may I ask why 4.2.2, which is pretty widely regarded as woefully insecure? Aug 11 07:09:05 Because it's a custom device that is hard to migrate to new versions Aug 11 07:09:36 <[Saint]> it's pretty hard to say that any of your attempts to secure user data have much merit, then. Aug 11 07:10:29 What parts make it insecure? The user doesn't have a lot of options playing with the device, it's all Kiosk mode Aug 11 07:10:49 is it on kernel 3.10? if it is, updating to latest version shouldnt be all that hard Aug 11 07:11:05 I just don't want any data to exist from one user's session to the next. Aug 11 07:11:32 <[Saint]> http://www.cvedetails.com/version/157201/Google-Android-4.2.2.html Aug 11 07:11:35 <[Saint]> or "a lot" Aug 11 07:11:46 selinux isnt on in 4.2.2 which is a big one Aug 11 07:11:55 * [Saint] nods Aug 11 07:11:58 4.4 and later sandbox things a ton better Aug 11 07:12:32 <[Saint]> sometimes with a project it is best to admit you did it wrong from the get go than it is to try and clusterfuck a sense of security into it. Aug 11 07:12:43 <[Saint]> I understand that is difficult to admit at the best of times. Aug 11 07:12:44 I think api 17 is kernel 3.4 Aug 11 07:13:08 the api levels dont specify a kernel version Aug 11 07:13:17 thats up to the chipset manufacturer Aug 11 07:13:36 look at your specific device under settings Aug 11 07:13:53 <[Saint]> The obvious answer here is user profiles. The thing is question is how much value that has when the OS is widely exploitable. Aug 11 07:13:56 its likely 2.6.x (god no) or 3.4 or 3.10 Aug 11 07:13:57 Just checked, 3.4 Aug 11 07:14:01 <[Saint]> *in question Aug 11 07:14:42 [Saint]: The value is that sessions are cleanly separated from each other, that is the problem I am trying to solve right now. Aug 11 07:14:42 hey guys im doing remote directory, and when I switch between users (on key press) it will bring up new window, but it will be blank (works perfect the first time), and I have super.onBackPressed(), and finish() in onBackPressed() method. Am I doing something wrong? Aug 11 07:14:45 not only that, user profiles themselves got a lot more locked as time went on too even if you exclude exploiting the rest Aug 11 07:15:01 * [Saint] nods Aug 11 07:15:13 barq: is it just one app? you might be able to get the package manager to wipe the app data on logout Aug 11 07:15:27 killing it would keep the data obviously Aug 11 07:15:31 No, it's a whole bunch of apps. Aug 11 07:15:36 <[Saint]> fun. Aug 11 07:16:10 how much data is shared between people? does a new login start from complete scratch? Aug 11 07:16:40 its like a tablet to order on in a restaurant or something? Aug 11 07:18:33 It's for on-call work, yes. User switching is not very common, but it's a feature that is required. You more or less start from scratch after logging out. Aug 11 07:19:21 Can you manage the user profiles programmatically? The user is not allowed to use the android menu, only kiosk mode. Aug 11 07:20:12 barq: then i'd probably call the equivalent of "pm clear com.pkg.name" for all the packages you need to reset Aug 11 07:20:51 Why is that better than kill process? Aug 11 07:21:17 Oh, wipes the data Aug 11 07:21:28 barq: i think you need to install your manager app under admin stuff then you can call and tell it to clear programatically Aug 11 07:21:40 So you would leave the processes running? Aug 11 07:21:51 barq: yeah, pm clear foo is the same as going into settings and finding the app and clearing its data Aug 11 07:22:03 barq: pretty sure clearing the data will murder the processes too Aug 11 07:22:31 barq: but mainly i htink just killing the processes is not what you want to do, you'd need to reset the apps too, no? Aug 11 07:22:44 killing hte process does nothing to the data Aug 11 07:22:46 So user profiles can't be handled exclusively programmatically? Aug 11 07:23:14 barq: they can, you make your manager app ask for admin privs then it can Aug 11 07:23:48 barq: settings->security->device administrators Aug 11 07:25:18 There is no device admin available Aug 11 07:25:46 barq: yeah cuz you need to write your app to do it Aug 11 07:26:10 barq: https://developer.android.com/guide/topics/admin/device-admin.html Aug 11 07:28:09 barq: https://developer.android.com/reference/android/app/ActivityManager.html#clearApplicationUserData() Aug 11 07:29:04 Added in API level 19, unfortunately Aug 11 07:29:57 <[Saint]> wait wait...the entire thing depends on the user not breaking out of Kiosk mode, and this is on API 17? Aug 11 07:30:10 <[Saint]> You're gonna have a baaaaaaad time. Aug 11 07:32:44 Yes. Aug 11 07:32:52 But it works. Aug 11 07:33:14 I have asynctask that populates a listview in a second window, when I hit back press so I can have new info show up in listview I have a blank screen. in onbackpress, I put this.finish(); and super.onbackpressed(); Am I missing something to start fresh everytime I open second activity window? Aug 11 07:36:46 you are just finishing your activity? Aug 11 07:37:07 you're overriding onBackPressed() and doing nothing except what it already does Aug 11 07:38:14 barq: somhting like this i think: http://stackoverflow.com/a/38436249 but you want to just clear not actually uninstall/reinstall but it should be some api like that Aug 11 07:39:34 perfinion, I have super.onBackPressed(); in the method now, but when it opens second time, the window is blank (works perfect the first time) Aug 11 07:40:35 Demon_Jester: yeah, onBackPressed just finishes an activity already, you are subclassing Activity right? Aug 11 07:40:45 Activity.onBackPressed is pretty much just finish(); Aug 11 07:41:21 perfinion, yep, I am using intent to start the second activity, if for some reason you need to know that. Aug 11 07:41:26 perfinion: There is no back button. Aug 11 07:41:52 barq: the back stuff was to Demon_Jester Aug 11 07:42:35 Demon_Jester: what are you trying to do? Act A opens Act B? then when B closes you want to re-load the list in A? Aug 11 07:42:51 Demon_Jester: if thats the case, you just run the asynctask in A's onStart() Aug 11 07:43:48 perfinion, naa, i want the info loaded into B everytime window opens, not into A when B closes. Aug 11 07:44:32 Demon_Jester: how do you open B? onBackPressed is for going backwards not forwards? Aug 11 07:45:18 perfinion, I mentioned earlier that I am using intent to open B, but I wasn't sure if that was relevant. Aug 11 07:47:44 Demon_Jester: a button launches the intent? Aug 11 07:47:56 why wouldnt it do the same thing if you open it a second time? Aug 11 07:48:10 it works first open but not second? Aug 11 07:48:12 anyone here familiar with KeyboardView & related stuff for making an IME? i'm trying to figure out how to make a custom `popupLayout` and keep it below a specific TextLayout so that it doesn't cover it up Aug 11 07:48:35 i'd like to just keep the `popupLayout` view centered on the keyboard Aug 11 07:49:42 perfinion, from menu option it opens. To be honest it could be something in Activity A that makes it blank. Do I need to "close/cancel" intent to destroy data and populate with new information? Aug 11 07:51:07 Demon_Jester: hitting back in activity B will kill it and everything in it, then you just do the same again to open it Aug 11 07:51:21 Demon_Jester: Intent i = new Intent(...); startActivity(i); Aug 11 07:51:31 perfinion, its probably something in A im missing. Aug 11 07:52:33 Demon_Jester: pastebin the code that you are using to start activity B? Aug 11 07:53:29 perfinion, http://pastebin.com/BiXvPXEC Aug 11 07:54:05 oooh NEW_TASK Aug 11 07:54:06 hmm Aug 11 07:54:11 are you sure you want that? Aug 11 07:54:21 perfinion, what would you recommend? Aug 11 07:54:50 Demon_Jester: you probably dont need i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); just remove that line and try? Aug 11 07:55:06 Demon_Jester: but if thats not it, how are you starting your asyncTask? Aug 11 07:55:13 perfinion, yeah I will try that, give me few minutes. Aug 11 07:56:23 android how to avoid implementing unused listeners Aug 11 08:01:14 perfinion, the app crashed when i tried to open it a second time, this is the error "Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?" Aug 11 08:01:49 perfinion, wait, I think I know what the problem is. Hold on. Aug 11 08:02:23 Demon_Jester: you're going from one activity to another all within your own app right? or crossing to another app? Aug 11 08:02:36 perfinion, same app, Aug 11 08:03:21 how is it possible to cancel an inapp test purchase after the recent update? trying to free an inapp Aug 11 08:21:41 is there a merge requests area for AOSP? :p Aug 11 08:23:08 I wish I knew Aug 11 08:23:53 Kinda like to make one Aug 11 08:24:07 tx: submit to gerrit Aug 11 08:24:08 ended up just submitting a diff for a specific commit (master at the moment) via a comment Aug 11 08:24:13 yeah Aug 11 08:24:14 ? Aug 11 08:24:32 tx: https://android-review.googlesource.com/ Aug 11 08:24:40 perfinion: thanks matew Aug 11 08:26:04 tx: github? Aug 11 08:26:25 wyoung: just a mirror Aug 11 08:27:23 ah Aug 11 08:28:22 Anyway, seems to be working. :D Cheers perfinion. Aug 11 08:28:37 tx: awesome Aug 11 08:28:43 Time to get these //FIXME's out of the way. Aug 11 08:29:12 gg Aug 11 08:30:28 Ah right, I still haven't picked my CIFS/SMB library yet. Aug 11 08:30:40 jCIFS seems like the way to go. Aug 11 08:30:44 there is a nice one for java Aug 11 08:33:52 So glad I managed to fix this MTP problem. I actually ended up re-writing the whole thing in Java as I couldn't just root every device and swap the affected files over. Aug 11 08:34:18 For now I can hope that this just gets accepted so it won't be a problem later. :P Aug 11 08:34:37 But raw USB IO without JNI = crap. Aug 11 08:34:38 (too slow) Aug 11 08:52:10 tx: what was hte problem? Aug 11 08:52:31 tx: if you're fixing mtp stuff and sending it upstream to AOSP why not just fix it in C ? Aug 11 08:53:32 perfinion: I have fixed it in C Aug 11 08:53:42 oh good Aug 11 08:53:46 the problem was with the native library Aug 11 08:53:50 (not the JNI bindings) Aug 11 08:54:06 But as a "right now" measure for using it in android apps... :p Aug 11 08:54:16 lol Aug 11 08:54:34 hopefully it gets in for N then since that release should be soonish Aug 11 08:55:27 you mean right now you've written an android app to export /sdcard itself and skipping the normal mounting that hte system does? Aug 11 08:55:41 or for an app to mount another device? Aug 11 08:55:50 haha Aug 11 08:56:04 this is more for hosting MTP devices via OTG Aug 11 08:56:10 (cameras and the like) Aug 11 08:56:18 aah okay gotcha Aug 11 08:56:33 yeah i was thinking it might be that direction if its in an app Aug 11 08:56:58 https://code.google.com/p/android/issues/detail?id=219062&q=mtp%20closed&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened Aug 11 09:04:07 meth: HTML5 and CSS for Android? I feel ill Aug 11 09:04:32 I should really scroll before posting Aug 11 09:10:58 markyosullivan: meth? Aug 11 09:11:14 markyosullivan: don't have anytyhing to do with meth mate Aug 11 09:11:43 html5 and css.. not even once Aug 11 09:12:17 Ashiren: A? Aug 11 09:17:13 hithere - I am abou to upload my app to Play, I have red quite a few of materials from Google, but it is new to me so I would appreciate something easy to read all in one place for newbie like me Aug 11 09:17:23 can you please recommend something? Aug 11 09:17:45 I was also here - https://support.google.com/googleplay/android-developer/answer/113469?hl=en Aug 11 09:17:53 but maybe there is something better Aug 11 09:19:32 what could be better than the official documentation and guidelines? Aug 11 09:20:07 from android/google? everything Aug 11 09:22:19 <[Saint]> K. Aug 11 09:22:35 <[Saint]> Makes one wonder how everyone else figured it out then. Aug 11 09:22:52 <[Saint]> Prsumably everyone with an app on Google Play just threw shit at the wall until something stuck. Aug 11 09:22:55 <[Saint]> Werid. Aug 11 09:24:21 welcome to android development Aug 11 09:24:25 raoul11, 1) do not know - just asking 2) what would be the best source for me from all google sources? Aug 11 09:24:32 its not that bad Ashiren /: Aug 11 09:25:05 is the page I have linked good or is there anything better - pls no flame Aug 11 09:25:55 bolovanos: if you've got specific questions, we can try to help with them Aug 11 09:27:04 Leeds is bot, isn't it? Aug 11 09:27:08 Short description -- luv how google force thier google translate to it Aug 11 09:27:09 lol Aug 11 09:27:17 bolovanos: he isnt Aug 11 09:30:55 <[Saint]> We have no evidence of this. Aug 11 09:31:19 <[Saint]> Does anyone actually have a proof of life for Leeds? Hmmm? Aug 11 09:31:33 this is the first time - it reacted on me Aug 11 09:31:46 we're gonna need to see the official birth cert as proof Aug 11 09:32:03 We are going to need a bigger boat Aug 11 09:32:12 I need to see cook book for G play app publishers :( Aug 11 09:33:07 I tend to ask questions to get people to give the information needed to solve their issue - even if I can't solve it myself Aug 11 09:33:55 wyoung: Wasn't you, someone was in here called meth haha Aug 11 09:34:45 Leeds, that seemed like a bot answer to me Aug 11 09:34:56 Leeds: tell the truth! you're actually Siri right? :P Aug 11 09:35:14 he's the inbred son of siri and cortana Aug 11 09:35:18 oh god Aug 11 09:36:10 http://memesvault.com/wp-content/uploads/Extreme-Facepalm-Meme-01.png Aug 11 09:44:11 markyosullivan: o Aug 11 09:44:27 markyosullivan: meth rots your brain Aug 11 09:47:30 wyoung: I wouldn't know but thanks for the tip :p Aug 11 09:47:43 people also vote for trump Aug 11 09:48:06 there is a collaration Aug 11 09:49:11 wyoung: FTFY * correlation :) Aug 11 09:49:34 the_fog: ead Aug 11 09:50:00 wow Aug 11 09:50:12 hopefully you dont know what hat means causeI dont know what TFY means Aug 11 09:50:14 TFY Aug 11 09:50:15 F Aug 11 09:50:26 fixed that for you? Aug 11 09:50:30 tbnx Aug 11 09:50:35 wbat? Aug 11 09:50:38 tbnx? Aug 11 09:50:50 keyboard fail Aug 11 09:57:07 do you sometimes have a huge list of variables in your maanager class? Aug 11 09:57:14 like 30+ Aug 11 10:00:25 that little? Aug 11 10:09:17 hello. i have a question regarding theming with appcompat Aug 11 10:10:35 my "colorPrimary" parameter also themes the windowBackground Aug 11 10:11:05 It should only theme the color of the actionbar if i am not mistaken Aug 11 10:12:44 hi Aug 11 10:13:18 I have a UsbDevice connected to my android and it needs to be flashed Aug 11 10:13:25 on Linux i use fxload to flash it Aug 11 10:13:33 is there a way do do the same on android ? Aug 11 10:13:37 (without beeing root) Aug 11 10:33:54 Ashiren doesnt it get cluttered with so many vars? is there a technique for simplifiying it Aug 11 10:35:52 actually what do you mean by manager class Aug 11 10:49:28 Hello. What is the correct way to start a service so that every activity can call one of its methods? Aug 11 10:50:57 I want to start it at the very begining, and stop it at the very end and in the meantime retrieve one piece of data belonging to that service, which keeps being updated all the time by the service itself. What would be the correct way to implement and communicated with this Service? Aug 11 10:52:28 hello, world. I need help with an account issue, but submitting the form at https://support.google.com/googleplay/android-developer/contact/dev_registration just hanges (there's a circle going around to the left of the submit buttion). is there an email address I could use instead? I wasn't able to find any :( Aug 11 10:53:00 raisondetre, how will you start the service at the beginning and stop at the end? Aug 11 10:53:46 start service at first Activity's or even Application's onCreate(). still that doesnt 100% guarantee the service will be available to first Activity's at the total beginning Aug 11 10:53:58 Mavrik, I know you can do .startService() or bind it so I don't know which one I should use Aug 11 10:54:09 I'm getting this error message: http://pastebin.com/cWvV6Xr9 from this method: http://pastebin.com/a3fcBCHm and I can't understand why or what it really means. FileNotFound? But I'm trying to create a new file? Aug 11 10:54:20 raisondetre, this is why I'm asking Aug 11 10:54:21 bind is more for short-living services Aug 11 10:54:25 How will you know you're "at the end"? Aug 11 10:55:06 I'd have the service send sticky data over eventbus tho :) Aug 11 10:55:22 Mavrik, when the user presses the button OK, the application shuts everything downs and kills itself Aug 11 10:55:31 Bernzel: afair FAT system, which is likely to be in this storage, doesnt allow for : character Aug 11 10:55:32 ugh O.o Aug 11 10:56:21 Ashiren, that ":" from the DateFormat you mean? Aug 11 10:57:12 Mavrik, what do you think I should do? Aug 11 10:57:13 yes, which you use as filename Aug 11 10:57:20 it cant create the file. thats is my guess Aug 11 10:57:29 Yep. Aug 11 10:57:30 ok let me see Aug 11 10:57:38 You get FileNotFound if you try to create a file with invalid filename. Aug 11 10:57:48 that's good to know, thanks Aug 11 10:58:35 hm unless "-" isn't allowed either, it didn't work. I changed to ".format("yyyy-MM-dd_hh-mm-ss", now);" Aug 11 10:59:04 Bernzel, also, your actually error is EACCES (Permission denied) Aug 11 10:59:14 You're trying to throw a file on root of SD card. Aug 11 10:59:20 Can't do that without permissions. Aug 11 10:59:29 I have WRITE_EXTERNAL_STORAGE in manifest Aug 11 10:59:34 and READ Aug 11 10:59:37 (And on newer Androids with secondary SD cards, you can't do that without using SAF either.) Aug 11 10:59:57 I should probably write to local instead then Aug 11 11:00:12 is this on android M+ Aug 11 11:00:32 also i think the + isnt allowed either Aug 11 11:00:42 in GMT+02:00 Aug 11 11:01:10 not sure how to fix that actually Aug 11 11:01:14 the + Aug 11 11:01:35 why dont you use just the millisecond timestamp, no additional characters Aug 11 11:01:55 can you show me Ashiren ? Never heard of that before Aug 11 11:02:24 ehh Aug 11 11:02:45 Environment.getExternalStorageDirectory().toString() + "/" + System.currentTimeMillis() + ".jpg"; Aug 11 11:02:57 oh you meant like that Aug 11 11:03:31 oh wait Aug 11 11:03:40 actually now is Date object Aug 11 11:03:53 yes Aug 11 11:03:54 Ashiren: HAI Aug 11 11:04:11 and its toString() always returned some formatted date Aug 11 11:04:22 that DateFormat.format() do nothing for it Aug 11 11:04:55 you probably meant String nowStr = android.text.format.DateFormat.format("yyyy-MM-dd_hh:mm:ss", now); and use that nowStr Aug 11 11:06:31 And I suppose you meant to CharSequence that variable instead? Aug 11 11:07:57 uhh Aug 11 11:08:33 I might skip the whole date variable and just make up a filename Aug 11 11:08:43 it simply isn't working Aug 11 11:09:30 eeyup Aug 11 11:12:50 Ashiren, Since I'm writing to external sources, where would this method write to if there were no SD card installed? Would it write at all? Aug 11 11:14:02 didn't work to write out a filename either. Strange Aug 11 11:14:04 it depends what getExternalStorageDirectory() returns Aug 11 11:14:23 it may actually return 'external' storage, which is inside device Aug 11 11:16:27 okey. That permission denied is bugging me Aug 11 11:16:50 what bloody permission Aug 11 11:22:34 or maybe post the androidManifest. probably some typo Aug 11 11:24:19 Ashiren, http://pastebin.com/9yFH4PA2 Aug 11 11:24:33 btw , removed the activity tags for better readability. Aug 11 11:25:15 Hello guys I have started a Service from one of my activities via the use of Intent. Now how can I call a method in the service via this Intent? Aug 11 11:30:24 found anything wrong Ashiren ? Aug 11 11:30:41 Ashiren, "For API 23+ you need to request the read/write permissions even if they are already in your manifest" is this true? Aug 11 11:42:55 is there something more actual http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename ? Aug 11 11:43:10 because AS complains about assigning string to flavours Aug 11 11:43:39 Hello, I have two graphic elements (a button, and a relative Layout with a Textview inside) that are superimposed. But depending on device I launch the app, the element being in front is different... Aug 11 11:43:41 Bernzel: are you testing it on android M? Aug 11 11:43:55 then read about runtime permissions Aug 11 11:44:35 I tried bringtoFront() to force the good one, but its not working at all Aug 11 11:45:34 Ashiren, is Android M an Android Version? I run 6.0.1 Aug 11 11:46:56 Has anyone here ever worked with a Service before?? Aug 11 11:47:07 Bernzel: yes, it is M Aug 11 11:47:17 and you need special mumbo-jumbo to make it work in M Aug 11 11:51:07 Ashiren, mumbo-jumbo?? Aug 11 11:54:31 google runtime permissions Aug 11 11:59:53 Hello guys could anybody help me with a Service ? Aug 11 12:00:45 hi Aug 11 12:00:49 any way to set a second system language on Android ? Aug 11 12:05:02 xxavi, how should that work? do you want everything in two languages?^^ If its for input/voice recogn/specific apps it depends on the application if it is supported Aug 11 12:05:39 ktwo: nope, for the apps not having the first system language Aug 11 12:06:34 raisondetre: What you need help with? Aug 11 12:07:10 markyosullivan, I want to know how I can retrieve a small piece of data from a running Service Aug 11 12:07:25 Use callbacks Aug 11 12:07:30 raisondetre, I currently started the service with an intent but I know there are different ways to do it Aug 11 12:07:43 markyosullivan, is there a tutorial or something on that? Aug 11 12:11:00 xxavi, the app must support it then Aug 11 12:11:39 android language is only one, the developer can offer a way to override the system language in his app. so if you want this check the app's setting Aug 11 12:12:00 ktwo: ohhhh, ok, thanks Aug 11 12:14:31 Does anybody know where LocalBinder is defined? Aug 11 12:16:44 xxavi: android nougat support many languages with prorities Aug 11 12:17:36 gordon_: oh, ok, do you know any website about more info about it ? Aug 11 12:18:46 xxavi: quick search in google : http://www.androidauthority.com/android-7-0-features-673002/ Aug 11 12:18:48 search for Aug 11 12:18:52 Multi-Locale Mode for polyglot language support Aug 11 12:19:12 gordon_: oh, ok, thanks, I look it now Aug 11 12:20:47 gordon_: ohhh, I read it, your answer, answer exactally my question, thanks Aug 11 12:23:55 fabric vs flavours (applicationId, applicationIdSuffix) is this still problem ? http://stackoverflow.com/questions/25688475/crashlytics-different-package-names-for-different-gradle-flavours Aug 11 12:27:45 I need some advice. Is it better to have my app download data from my backend always, or have a loadingscreen that downloads data once, and applies it to SharedPreferences that I instead use in the Activites. The data is mostly URL's to the users images that will be downloaded and displayed. Aug 11 12:28:04 the loadingscreen is run when the user log in Aug 11 12:43:09 Hi all, does anyone know how I can define which flavor gets pushed to my phone when running the app? Aug 11 12:43:17 I have 2 flavors setup in Gradle. Aug 11 12:54:04 sdousley: find the build variants pane Aug 11 12:54:14 xorgate: hehe I was JUST writing to say I worked it out hehe Aug 11 12:54:41 next thing, I copied a drawable from my main flavor to the custm flavor, and it's complaining about the line: Aug 11 12:54:44 Aug 11 12:54:50 saying the URI is not registered Aug 11 12:55:08 but it's a direct copy of the drawable from the main flavor (I just need to change a color, which I haven't yet) Aug 11 13:01:38 If I want to KEEP a listview item 'selected' (or highlighted), do I need to set its background to another color? Or can this be done in a statedrawable? Aug 11 13:02:34 <_richa> Hi, anyone here use sqlite in their android apps? Aug 11 13:02:43 _richa: yep Aug 11 13:02:59 what is "pkg" in http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename Aug 11 13:03:27 <_richa> what's your favoured approach to handling migrations of the schema? I know there is onUpgrade and onDowngrade in the SQLOpenHelper, but theres more to the subject than just "implement these methods" Aug 11 13:05:14 I have set flavour accordingly to docs ^, but I cannot find package named .free nowhere in project directory Aug 11 13:05:41 _richa what you mean migrations? Aug 11 13:06:13 <_richa> say, in a future update we want to update the database schema. How do we properly manage these migrations is a fully forward-thinking way? Aug 11 13:06:33 <_richa> is there a preferred model or utility to help streamline this process? Say for example Flyway for Java databases Aug 11 13:07:14 Just update the version number, the onUpgrade method will create a new version of your DB with the changes to the schema Aug 11 13:08:14 <_richa> Supposing the client db is several versions behind the latest, the onUpgrade method would have to be bloated immensly to cover support for db's since schema #1, surely? Aug 11 13:08:16 anyone know how to to change the `tint` of a `` ? Aug 11 13:09:21 Is there any way to pull an ssl certificate from the device? Aug 11 13:09:29 One of the defaults Aug 11 13:10:00 _richa: I'm not sure if I follow Aug 11 13:10:31 <_richa> pretend the following scenario: Aug 11 13:11:53 <_richa> Local device has schema #1. Hasnt updated app for some time, then updates the app. Latest schema is #4... During the app updates that the client missed, schema #2 introduced some new columns, schema #3 renamed a column and migrated some data, schema #4 removed a couple of columns Aug 11 13:12:02 ok got it - it changes . for - so the name is app-free-debug.apk Aug 11 13:12:23 why is it app and not the real app name "com.example.app" ? Aug 11 13:12:27 <_richa> Local device needs migrating from #1 to #4, through versions #2 and #3, because the migrations made in #2 and #3 are critical Aug 11 13:13:08 <_richa> compound that issue to say, 50 schema changes, and all of a sudden onUpgrade is becoming a massivly complex and bloated implementation Aug 11 13:13:37 many questions asked, very few answered... Aug 11 13:13:52 this community needs some help Aug 11 13:14:19 Is tehre any way for me to detect which variant is running from within the app itself? Aug 11 13:14:33 which flavor* Aug 11 13:14:41 <_richa> sdousley look at the BuildConfig class Aug 11 13:15:22 <_richa> sdousley BuildConfig.FLAVOR will give you the currently running flavour Aug 11 13:15:43 ah, cool ty _richa Aug 11 13:15:50 I really do love how easy Gradle makes flavors Aug 11 13:15:58 Trying to implement the same thing on iOS and it's not easy! Aug 11 13:16:04 to say the least Aug 11 13:16:10 1.5 days in, and still not got it nailed. Aug 11 13:16:14 <_richa> sdousley We are undergoing a similar split in iOS now. Aug 11 13:16:22 nearer 1.5 mins in, and Android was done Aug 11 13:16:26 <_richa> sdousley again, trying to recreate android flavours to get the task done Aug 11 13:16:44 I thought I had managed to crack it earlier when the other flavor logo showed Aug 11 13:16:50 then i ran the main app, and the other logo showed there too! Aug 11 13:17:04 <_richa> sdousley: ouch, I bet that stings lol Aug 11 13:17:13 yeah Aug 11 13:17:21 The number of times I've just sacked it all off, and started again Aug 11 13:17:23 I've lost count Aug 11 13:17:29 <_richa> sdousley: the iOS guy it say across from me now... pulling his hair out! Aug 11 13:17:34 <_richa> *is sat Aug 11 13:17:39 tell him he's not the only one! Aug 11 13:18:11 <_richa> :) Aug 11 13:18:26 <_richa> markyosullivan: any thoughts on my above scenario? Aug 11 13:18:35 Why am I observing apk name "app-free-debug" in "app\build\outputs\apk" instead of "com-example-app-free-debug"? Aug 11 13:20:08 _richa: Would it not just update to the latest schema? Aug 11 13:20:37 <_richa> markyosullivan: jumping from #1 to #4 would cause it to be out of sync, as #2 and #3 introduced some changes which would not be reflected Aug 11 13:20:41 Hey i dont think i understand things, I am trying to make a screen that has data and I store the data in the SQLite internally and the only way to reach that data is a content provider. ( it this an accurate statement ) Aug 11 13:20:56 <_richa> markyosullivan: and dropping the table and recreating it for a migration is not a possibility in this case Aug 11 13:21:03 wow that sounds like a HW qu. swear it is not... just kind of confused after a bootCamp class Aug 11 13:21:05 is that "app-free-debug.apk" right name to be uploaded to Play or am I looking in wrong directory? Aug 11 13:21:08 Why would you need to update the schema to version #2 and #3 when #4 should be the latest version of the schema Aug 11 13:21:34 Ah, so you're wanting to update the schema without losing data? Aug 11 13:21:44 <_richa> yes sorry, I should have mentioned that earlier on Aug 11 13:21:53 <_richa> its pertitent to the issue haha, sorry Aug 11 13:31:21 _richa: I'm not sure, I've never had to deal with that, any time I've updated the database, I could just delete it Aug 11 13:35:53 <_richa> markyosullivan: sorry, freenode decided to disconnect Aug 11 13:36:25 _richa: I'm not sure, I've never had to deal with that, any time I've updated the database, I could just delete it Aug 11 13:36:42 <_richa> ah okay, thanks anyway Aug 11 13:37:00 <_richa> I would love to be able to do that, but the db could have data that needs to be submitted to the server-side Aug 11 13:37:08 <_richa> otherwise I would just make my life easier and drop/create Aug 11 13:40:25 can anyone help me understand why i'm getting an exception when i try to long press a key to open a popup? if i remove line 17, it opens just fine (but i want a custom theme) Aug 11 13:40:26 https://dpaste.de/2dDM Aug 11 13:41:35 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.inputmethodservice.KeyboardView.setOnKeyboardActionListener(android.inputmethodservice.KeyboardView$OnKeyboardActionListener)' on a null object reference Aug 11 13:43:08 <_richa> anyone else have any insight on my sqlite migration problem? :) Aug 11 13:51:04 _richa, you know why my drawable won't work properly in my customised version(at least in IntelliJ)? Aug 11 13:51:26 it doesn't like the URL in Aug 11 13:51:37 even though it's a copy/paste of the code in the main drawable Aug 11 13:51:53 <_richa> I had a problem with urls in flavors Aug 11 13:52:05 <_richa> I'm sorry to say none of them affected me at the XML level Aug 11 13:52:09 <_richa> just the java level Aug 11 13:52:13 I mean, built, the app works fine. But I don't really like leaving errors, even if it is just an oddity with the IDE Aug 11 13:52:48 <_richa> "dont really like leaving errors" flavors are full of them sadly, as it leaves the none-selected flavor files unhooked Aug 11 13:52:55 <_richa> so they show countless compiler (and other) problems Aug 11 13:53:01 <_richa> but once that flavor is active again, they magically go away Aug 11 13:53:07 oh hehe Aug 11 13:53:09 fair enough Aug 11 13:53:26 <_richa> My advice in this case is, if it works, ignore the error ;) Aug 11 13:53:33 so I guess with errors in flavors, you just thinkg where's the carpet and sweeping brush? Aug 11 13:53:41 <_richa> because flavors are not fully managed properly in AS Aug 11 13:53:58 I'm not using AS, I use IntelliJ, but iirc, that's VERY similar to AS? Aug 11 13:54:09 <_richa> AS is built ontop of IJ, I believe Aug 11 13:54:16 yeah, had a feeling that was the case Aug 11 13:54:25 I initially started using Eclipse when doing android Dev Aug 11 13:54:29 <_richa> same here Aug 11 13:54:36 swiftly binned that off for IntelliJ (I'm a PHP dev, and use phpStorm) Aug 11 13:54:43 so IntelliJ felt like "home" Aug 11 13:54:50 <_richa> opposite for me though Aug 11 13:54:53 <_richa> we are a Java software house Aug 11 13:55:06 <_richa> so we use Eclipse for almost everything. IJ is foreign territory to us Aug 11 13:55:16 <_richa> I couldnt go back to eclipse now though, after forcing myself to use AS, I love it! Aug 11 13:55:35 yeah, I'm sure if you used nothing else, Eclipse is a perfectly good IDE Aug 11 13:55:44 <_richa> Great statement ;) Aug 11 13:56:19 but IntelliJ/AS are not "perfeclty good" they're "perfect" (well, pretty close to!) Aug 11 13:57:10 time to start pulling my hair out again! Aug 11 13:57:20 <_richa> haha back to iOS is it? ;) Aug 11 13:57:21 I started working on this yesterday morning (iOS) having worked out Android flavors Aug 11 13:58:05 Kinda makes me wanna say to this customer to do one if they want iOS Aug 11 13:58:13 <_richa> contractor? Aug 11 13:58:15 Unfortunately, that's not an option Aug 11 13:58:25 me? Nah, I work for a company Aug 11 13:58:34 <_richa> job security! +1 Aug 11 13:58:47 But we have an app that's been on Android/iOS app stores for 18 months+ now Aug 11 13:59:07 but we have a possible new relationship with a company who may bring in a LOT of new cstomers Aug 11 13:59:11 <_richa> almost as long as ours has been in development, hah! that's upsetting... Aug 11 13:59:15 so we aer thinking about doing a custom app for them. Aug 11 13:59:26 have you got yours onto itunes store yet? Aug 11 13:59:33 <_richa> test flight Aug 11 13:59:43 oh, getting it onto the store is the "fun" part Aug 11 13:59:45 <_richa> and similarly for droid, Closed alpha Aug 11 13:59:54 I think from initial submission to actually being available was like 6-8 weeks! Aug 11 14:00:03 Android was more like a couple hours Aug 11 14:00:34 I had to go through 3/4 modifications to the app, and the details of the app for Apple to even check that the app was suitable. Aug 11 14:00:44 <_richa> hah Aug 11 14:00:47 <_richa> +2 weeks per revision Aug 11 14:01:08 7-10 days per revision review yeah + time to make changes Aug 11 14:01:23 annoyingly 90% of the time, they would respond late friday night, so nothing got done till the following Monday Aug 11 14:01:47 even updates to the iOS app have to go through review, which means that generally, I do the iOS updates first, get them pushed to the store for review. Aug 11 14:02:01 then by the time they're reviewed, I've generally updated/released the Android app lol Aug 11 14:02:38 It seems CameraCharacteristics.LensIntrinsicCalibration is not implemented on most devices, is there another way to get the lens calibration parameters? Aug 11 14:02:39 there's 2 things I have done with this release tho. Firstly, updatin gthe SDK that we use, and then the flavors. Aug 11 14:03:27 on android, I took the opportunity to update the targetSdkVersion and compileSdkVersion which brought a whole new headache = org.apache.http isn't in 23+ so I had to move all our HTTP calls to okhttp Aug 11 14:04:15 so I've had 2 things to do, 1 was easy on Android (flavors) and the other was long, but relatively easy - updating the SDK Aug 11 14:04:35 on iOS though, fortunately, updating the SDK was simple - done in about 1 hour, but flavors ... that will take an unknown amount of time. Aug 11 14:04:46 I'm seriously tempted to just branch off and manage it as a completely separate app in a branch Aug 11 14:28:44 Anyone here worked with Bluetooth and noticed how slow it takes for BluetoothGatt to recognise changes in Bluetooth device states? Aug 11 14:28:53 *how long it takes Aug 11 14:29:38 markyosullivan, you mean, when using notifications? Aug 11 14:29:47 btw i don't use them Aug 11 14:30:05 No I just mean like for it to recognise the device has been turned off Aug 11 14:30:09 it's driving me nuts Aug 11 14:30:35 markyosullivan: we have an app that uses a bluetooth device, and it does take a little while to realise you've turned it on Aug 11 14:30:42 not massively long that it's an annoyance though Aug 11 14:31:15 Whenever I open up the app I try to auto connect to our bluetooth device and it "connects" even though it's not on Aug 11 14:31:18 it just doesn't make sense Aug 11 14:31:45 hehe that's quite amazing that it can connect with it off =/ Aug 11 14:31:57 BluetoothGatt says it's connected Aug 11 14:33:42 https://imgflip.com/i/18rry9 Aug 11 14:33:45 How I feel Aug 11 14:34:03 haha Aug 11 14:34:45 markyosullivan, i'm doing some tests right now. i'll let you know Aug 11 14:35:10 bitkiller: Thanks Aug 11 14:35:28 It seems to be pretty inconsistent, sometimes it's faster than others but generally it's pretty slow Aug 11 14:36:03 Even if I have it connected, I've got code which returns to the device connect screen whenever bluetooth device is turned off... doesn't work until about 10 seconds after the device is off Aug 11 14:37:09 <_richa> sdousley: sorry mate had to jump into a meeting Aug 11 14:37:16 hehe no worries _richa Aug 11 14:40:42 <_richa> was a nice distraction, but now what the whoes of sqlite migrations Aug 11 14:43:37 <_richa> markyosullivan: might have found what I was after... http://www.greenmoonsoftware.com/2012/02/sqlite-schema-migration-in-android/ :) Aug 11 14:44:20 Fantastic :) hope it helps Aug 11 14:44:38 app decided to stop working Aug 11 14:44:48 bitkiller: What did you do? Aug 11 14:44:52 but may be the laptop bluetooth Aug 11 14:45:02 Bluetooth could really be better for Android Aug 11 14:45:03 i was implementing a new feature Aug 11 14:45:20 Like having bluetooth integration with the emulator would help Aug 11 14:45:31 means I don't have to constantly use my phone to test the app Aug 11 14:45:43 How can one accomplish the functionality of chaining callbacks (like using CompletableFuture) on android api 18+? Aug 11 14:45:46 <_richa> agreed, even just a simple usb passthrough to a usb stick would do! Aug 11 14:46:35 Hi, i have a error, I try to use context.getSystemService(), but I get this cannot resolve symbol `context` Aug 11 14:47:11 <_richa> siac: where are you calling this from? Aug 11 14:47:50 markyosullivan: at least the emulators are usable now. When I first started our app, I was kinda forced to use phone, or wait 30 mins for the emulator to start lol Aug 11 14:48:22 siac: without seeing the code, it doesn't help that much, but most likely, context isn't defined Aug 11 14:48:30 _richa: I call in a Activity class Aug 11 14:48:33 would be my initial guess Aug 11 14:48:38 <_richa> this.getSystemService() Aug 11 14:48:53 I follow this https://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html#DetermineConnection Aug 11 14:49:26 _richa: So in this case an Activity is an Context? Aug 11 14:49:36 <_richa> roughly speaking Aug 11 14:49:59 sdousley: I agree back when AS was in beta the emulator was shite Aug 11 14:50:18 Genymotion was a good replacement but I always did my testing on physical devices Aug 11 14:50:28 <_richa> siac: if you follow the inheritence tree back about 3 or 4 levels, you'll see Activity inherits from Context Aug 11 14:53:43 _richa: Ok, I will try with this.getSystemService(), thank you, I have to read a lot :) Aug 11 14:54:09 <_richa> siac welcome Aug 11 15:04:17 hi. http://dpaste.com/27DK9G5 in this piece of code if statement doesnt work, Log.v shows "prefer_units_imperial", but if doesnt get executed only else statement. why is that? Aug 11 15:05:30 sometimes if block is executed, after switching between settings Aug 11 15:10:20 ok i managed to make it work. but if i set in settings to use imperial units, then kill the app Aug 11 15:10:41 when app starts again it uses metric. but in settings it shows imperial Aug 11 15:10:58 metric is default in my Sunshine app Aug 11 15:11:33 looks like app uses default preferences every time it starts... Aug 11 15:29:04 Anybody here on windows have issues connecting HTC devices to the ADB? Aug 11 15:33:47 The phone I'm trying to test on right now won't even prompt me to give the computer I've connected to access to it Aug 11 15:39:51 hey I am working on a simple App that takes userData stores it and allows the data to be edited. Aug 11 15:40:20 for some reason I can't seem to understand how to structure my classes without getters and setters ( old C# dev) Aug 11 15:40:35 then structure them with getters and setters Aug 11 15:40:45 and I am sort of lost on what I should be google'ing to find help Aug 11 15:40:57 basic java and data modeling :P Aug 11 15:41:03 any suggestions , sample apps i should look at ? Aug 11 15:41:50 I thought of data modeling but if i make classes how do I access them ( just intents based on dual activity screens . one to view other to edit data ? Aug 11 15:42:53 Question: When I type in this command, "touch /sbin/su /system/bin/su /system/xbin/su", i get this error: "touch: '/sbin/su': Read-only file system" Aug 11 15:43:18 I already made it writable through: "mount -o remount,rw /system" Aug 11 15:43:27 .... well if any1 is here Aug 11 15:43:50 see topic Aug 11 15:43:51 not here Aug 11 15:45:32 android-dev947: try ls -lhr and see what perms are set on the folder, I assume the mount -o did not give permissions correct Aug 11 15:45:44 how can i chain asynchronous operations together in android like this: https://gist.github.com/Michels10/8b5219063dcd0fb5de404d8402707d8c Aug 11 15:46:05 newke: don't compare strings with '==' Aug 11 15:46:07 is this something that rxJava will help with? Aug 11 15:46:11 but yeah ... this is not the room for linux/osx term commands Aug 11 15:47:22 eemgr: why don't you just save them all in 1 method Aug 11 15:50:32 memory issues Aug 11 15:50:38 byte arrays cause issues Aug 11 15:50:44 thats just a simplified example Aug 11 16:07:29 <_richa> sdousley how's it going? Aug 11 16:08:05 How do you handle screen rotation changes? Aug 11 16:08:35 Whenever I rotate the screen it seems like it calls onCreate within the Activity which stores my Fragments Aug 11 16:08:49 <_richa> rotating the screen destroys the current activity Aug 11 16:08:52 <_richa> and creates a new one Aug 11 16:09:00 <_richa> you have to re-init your views again Aug 11 16:09:01 That explains it Aug 11 16:09:07 markmarkmark, there's a flag you can set to prevent that Aug 11 16:09:28 jesseg: Did you mean me? Aug 11 16:09:39 <_richa> jesseg to prevent rotation, or prevent destroying activities during rotation? Aug 11 16:10:13 _richa: How are you supposed to handle screen rotation? Like how can I keep the fragment opened along with all the variables which is needed? Aug 11 16:10:21 markyosullivan, yeah I did something in my app to prevent destroying activities I think on rotate Aug 11 16:10:34 jesseg: That'd be extremely useful Aug 11 16:10:45 it still rotates but let me see what I did... Aug 11 16:10:45 I have different views for horizontal though Aug 11 16:11:03 markmarkmark, oh well I'm afraid you need to recreate then. I have same view either way. Aug 11 16:11:11 <_richa> markyosullivan you can save your variables to a state manager when your fragment/activity is on the down spiral (stop, detatch, destroy etc...) and load them in again on Create Aug 11 16:11:33 Oh boy Aug 11 16:11:35 markmarkmark, I think I put this under this is going to be fun Aug 11 16:11:50 <_richa> alternatively, create your own backing object which holds your variables Aug 11 16:12:21 <_richa> although the activity is killed, your hosting process stays alive, so your other static objects remain, such as a static backing object Aug 11 16:12:21 What's the best practice or recommended way to go about it? Aug 11 16:12:37 markyosullivan: https://developer.android.com/guide/topics/resources/runtime-changes.html Aug 11 16:12:57 <_richa> save the data to the android API state manager (I forget what its called precisely off the top of my head) Aug 11 16:13:05 <_richa> *savedInstanceState, thats it Aug 11 16:15:51 Any sugestions on ways to deploy ANDROID apk's on private phones? I have a private app that I want to deploy remotely. Aug 11 16:16:09 host it somewhere and give ppl the url Aug 11 16:16:33 <_richa> +1 Aug 11 16:16:50 xorgate: thats all there is to it... just give the URL, have them DOWNLOAD and it installs all by it self? Aug 11 16:17:02 sure Aug 11 16:17:13 I'm an iPHONE developer... forgive stupid questions Aug 11 16:17:17 <_richa> IrishGringo they will need "unknown sources" enabled on their device in order to install the app Aug 11 16:17:26 <_richa> its just a security feature that is easy to disable Aug 11 16:19:01 IrishGringo is it still pita to provision iOS devices for development ? Aug 11 16:19:25 it's easier now, but a bit messier at times Aug 11 16:19:40 you can add devices right through xcode automatically if they aren't on the provisioning profile Aug 11 16:19:55 g00s: what is pita? deploying test apps in iOS is very elegant. Aug 11 16:20:08 i remember some convoluted thing where i had to send an email and wait for apple to get back - but that was a while ago Aug 11 16:20:08 but since that often generates a new profile, sometimes you end up with a shitload of xcode generated provisioning profiles Aug 11 16:20:21 This might be more of a Java question rather then Android, but is it normal for an HttpURLConnection not to accept URLs that don't include the file MIME type at the end? Aug 11 16:20:40 When trying to download a file that is Aug 11 16:21:00 eemgr: yea... I have a lot of provisioning profiles... you really need a system to keep track of them. Aug 11 16:21:18 <_richa> Are they not all wrapped up in an xcode auto profile? Aug 11 16:22:25 no, since each app has it's own identifier (com.company.myapp) it generates profiles for that one in particular, iirc Aug 11 16:23:34 <_richa> is that the case with wildcard profiles? Aug 11 16:23:50 not sure on that Aug 11 16:24:02 <_richa> Wildcard all the things! Aug 11 16:25:48 <_richa> well, that's it Aug 11 16:25:52 <_richa> the end of another hard working day! Aug 11 16:25:53 <_richa> whoopie Aug 11 16:27:13 Whe dealing with an AppSectionsPagerAdapter, how would I change one of the fragments to another activity during runtime? Aug 11 16:27:17 When* Aug 11 16:28:31 Asking again - is there an easy way of executing arbitrary amounts of asynchronous operations? https://gist.github.com/Michels10/8b5219063dcd0fb5de404d8402707d8c Aug 11 16:28:36 chaining them, so to spea Aug 11 16:28:37 speak* Aug 11 16:28:44 eemgr like rxjava ? Aug 11 16:28:59 well i'm reading that now, but it hasn't been that easy for me to understand haha Aug 11 16:29:06 as long as it's the right tool for the job i'll keep reading Aug 11 16:29:08 just wanted to confirm Aug 11 16:29:42 yeah, rxjava is part of android developer canon these days :) Aug 11 16:29:43 eemgr, just have one background process and do it synchronously in that thread? Aug 11 16:30:06 also, g00s answer is better (from what I understand of Rx) Aug 11 16:30:24 i've been deferring this hipster reactive programming stuff for a while Aug 11 16:30:31 but i suppose it's time to get into it Aug 11 16:30:53 eemgr i use HandlerThead by itself quite often too ... Aug 11 16:31:34 but yeah, if you have those async ops like ^^ and want 1 kind on i/o and another task on computation thread, its very easy with rxjava Aug 11 16:31:59 okay, i'll keep trying to learn rxjava and maybe i'll ask again if i can't figure it out Aug 11 16:32:06 eemgr also there is a RxJava book coming from oreilly. looks complete enough to be useful Aug 11 16:33:02 eemgr, depending on how much understanding you have of Rx already, you may find this helpful. https://upday.github.io/blog/reactive_mindset_burgers/ Aug 11 16:33:04 i konw i did Aug 11 16:35:38 awesome, thanks Aug 11 17:05:34 Instant Run works with proguard now? Aug 11 17:08:25 explodes: not a chance in hell Aug 11 17:09:00 https://developer.android.com/studio/run/index.html#instant-run Aug 11 17:09:44 hello. i am developing a small application that uses bluetooth. i want to be able to comunicate with the bluetooth device on the other end through notification (sort of like google play music controls in the notification). i want to be able to do this even when my app is closed. so this notification must run as a service Aug 11 17:10:31 thepoosh ! Aug 11 17:10:39 the only thing i know is that i have to use Service class and Notification class. other than that i have no idea Aug 11 17:10:40 sup g00s Aug 11 17:11:06 not much thepoosh Aug 11 17:11:24 orglce: read up about broadcast receivers and PendingIntent Aug 11 17:11:31 g00s: this is my life now: http://i.imgur.com/0mhiAQR.png Aug 11 17:12:06 lol, do what? quit your job and go fishing all day? Aug 11 17:12:09 that would be nice Aug 11 17:12:34 thepoosh wouldn't you rather be doing something like https://www.reddit.com/r/aww/comments/4x82sc/theres_nothing_better_than_some_good_neck/ Aug 11 17:13:01 i like cows on my plate Aug 11 17:13:07 thepoosh: should i implement these two in my Service class Aug 11 17:13:27 no, you should create a notification Aug 11 17:13:51 and implement them in my notification class? Aug 11 17:13:57 that has a custom UI (RemoteViews) and each click fires an intent to a pre-determined BroadcastReceiver Aug 11 17:14:12 truckcrash: nah, too late for me Aug 11 17:14:14 2 kids Aug 11 17:14:52 but how can i add all of this to a service Aug 11 17:15:50 why service? Aug 11 17:15:52 where should i create a notification. before my activity is destroyed or should i create it in my service onStartCommand Aug 11 17:16:23 so that the notifications can work even when the activity is destroyed Aug 11 17:17:24 thepoosh: my app, with proguard enabled, is using instant run Aug 11 17:17:50 thepoosh: granted, for our app "instant" means 20seconds but that beats 2 minutes.. Aug 11 17:17:53 explodes: are you sure that it's running a flavor with proguard? Aug 11 17:18:19 i want to maintain a bluetooth connection and communicate with it through the notification Aug 11 17:18:23 because IIRC the "debug" flavor does use minifyEnabled=true Aug 11 17:18:43 orglce: notification is not part of the service Aug 11 17:19:45 sorry about interupting your conversation with explodes. he was first. will let you two have a talk Aug 11 17:22:19 thank you about the information :) Aug 11 17:22:35 for the information* Aug 11 17:24:37 I am not able to join android-unregistered. is there a way to do this? I have no problem with any other channels Aug 11 17:24:55 urnick nope Aug 11 17:25:44 have to be registered to talk here Aug 11 17:26:21 how can I register for android-unregistered? Aug 11 17:27:00 is it invite only? Aug 11 17:27:05 I am new to mirc Aug 11 17:28:12 why would you join #android-unregistered Aug 11 17:29:08 it has the largest user base and I am learning droid dev Aug 11 17:29:31 Then channel exists solely to tell people to register and join #android Aug 11 17:30:08 it has 495 users though Aug 11 17:30:12 so? Aug 11 17:30:18 it's a pool of lurkers Aug 11 17:30:23 there's no discussion there Aug 11 17:30:34 #android has more users Aug 11 17:30:40 urnick, just sign off, delete the password from mirc, then join and you'll be stuck in #android-unregistered. Aug 11 17:30:52 dar10s is actively lurking Aug 11 17:31:10 okay, okay. I just didn't want to miss out on anything Aug 11 17:31:12 tough crowd Aug 11 17:31:21 urnick, yes :D Aug 11 17:31:59 urnick, but really, not much happens in unreg. Aug 11 17:32:29 okay. good to know Aug 11 17:32:37 yeah that is odd ... can't even type in unreg Aug 11 17:32:50 "Cannot send to channel: #android-unregistered" Aug 11 17:32:52 of course not, it's mode + s Aug 11 17:33:00 it's just for dildos that don't know to register Aug 11 17:33:06 or authenticate Aug 11 17:33:09 or leave it after authenticating Aug 11 17:33:16 ha .. didn't see that.. but did know the ladder Aug 11 17:33:17 i just joined... im regs Aug 11 17:33:21 regd* Aug 11 17:33:31 apparently 495 people that try to do android dev are idiots :p Aug 11 17:33:37 I wonder what the overlap into #android-dev is Aug 11 17:34:01 why should it exist then. I really got in the way of me finding this channel. I just saw all these people joining but I couldnt see them type Aug 11 17:34:09 but I am also new to IRC Aug 11 17:34:33 Not sure -dev is linked to it. #android requires authentication now, which is why the channel was created Aug 11 17:38:21 SimonVT did kroot set that up ? Aug 11 17:38:57 i can kinda see how its confusing for newbies, you see android-unregistered and think its a legit thing Aug 11 17:44:28 hey .. so starting a newProject i get "'android-24' requires JDK 1.8 or later to compile" but the projects min is version 16. How do i set the max to something like 19/23 (IE. not 24) Aug 11 17:44:45 when i edited the GRADLE.build file it caused other errors Aug 11 17:45:04 i thought i could just switch 24 to 23... in the gradle file Aug 11 17:45:17 assuming this is easy but not that easy Aug 11 17:52:05 hey guys Aug 11 17:52:27 so i have an application that has a main "news feed" Aug 11 17:52:33 that is chronological Aug 11 17:52:46 the feed is just a basic recyclerview Aug 11 17:53:07 im about to build a new feature that gives times-dates of spacecraft launches Aug 11 17:53:30 but I dont want to do just another recyclerview/list. I want to do something kinda unique. Any ideas for how to display data like that? Aug 11 17:54:41 orbyt_, sticky headers? Aug 11 17:54:48 well that's not unique Aug 11 17:54:55 um...what do you mean Aug 11 17:55:21 you group stuff by dates (launch date or launch month/year) Aug 11 17:55:34 while scrolling the group header remains on top of the view until a new group shows up Aug 11 17:55:42 very common thing actually Aug 11 17:55:57 http://www.appance.com/wp-content/uploads/2014/01/pinned-section-listview-android.jpg Aug 11 17:56:06 Ah right but its still just another list. I'm trying to come up with something a little different. Aug 11 17:56:07 you need something else if you want unique Aug 11 17:56:13 yea Aug 11 17:56:23 how about these line timelines with circles Aug 11 17:57:21 http://cdn3.wpbeginner.com/wp-content/uploads/2015/11/timelineexample.jpg Aug 11 17:57:49 anyhow this is more of an UI/UX thing not Android per se Aug 11 17:58:20 uh what^? this is android-dev ui/ux is pretty commonly discussed here :/ Aug 11 17:58:27 anyway Aug 11 17:58:37 thats nice but i dont think it would work well on a small screen Aug 11 17:59:31 Hmm maybe a view pager that displays a map....that might work... Aug 11 17:59:39 inside a card type thing Aug 11 17:59:48 what kind of a map Aug 11 17:59:54 data is important Aug 11 18:00:00 design should follow data not vice versa Aug 11 18:00:05 so what kind of data you got? Aug 11 18:00:16 well if were talking maps lat/long Aug 11 18:00:35 oh, then i don't see how a recycler view comes into play ) Aug 11 18:01:12 What? yea heres an app that does something similar that uses a RV: https://play.google.com/store/apps/details?id=me.calebjones.spacelaunchnow Aug 11 18:03:27 doesn't really look unique Aug 11 18:03:39 thats my point... Aug 11 18:27:21 hmm, dragging an .apk into Genymotion and getting a red circle with line through it.. Aug 11 18:28:28 why genymotion and not as emulator? Aug 11 18:28:58 there we go, just had to restart it Aug 11 18:29:13 raoul11, because, I have to run an older ap version side by side with the emu for testing purposes Aug 11 18:29:33 mostly because I don't know how parts of this app were supposed to work in the 1st place and I went from api4 to api23 Aug 11 18:29:41 much is broken Aug 11 18:29:49 thats a pretty big jump Aug 11 18:30:09 but you can have various emulators running diff apis Aug 11 18:32:12 can I load existing compiled .apks into a 2nd emu? Aug 11 18:34:41 this approach is working pretty well for me atm anyways Aug 11 18:35:10 http://stackoverflow.com/questions/3480201/how-do-you-install-an-apk-file-in-the-android-emulator Aug 11 18:35:28 k azv4 seems you got enough on your plate anyways Aug 11 18:35:47 raoul11, indeed! Aug 11 18:35:52 thanks for the link though Aug 11 18:43:22 Hi, I have a question. In my Activity I have an ImageButton opening up the camera, but as soon as i take a picture it goes back to the app. Is there anyway I can let the user take multiple pictures and then hit the back button themselves Aug 11 18:44:01 youre opening external camera app? Aug 11 18:44:08 opius, yes, but you won't get the pictures as a response. Just launch the camera main action Aug 11 18:48:16 dragorn looking forward to the winter already :P Aug 11 18:48:23 (this sucks) Aug 11 18:56:00 g00s, yep pretty rough out Aug 11 19:03:13 Winter is coming! People will have to learn new APIs :P Aug 11 19:06:10 Mavrik do you know what the oldest lie in America is? Aug 11 19:06:18 that developers will have to learn new apis :D Aug 11 19:06:36 well i tried there Aug 11 19:07:28 ^^ Aug 11 19:09:17 You actually tried? Aug 11 19:09:47 "Soong is the replacement for the old Android make-based build system. It replaces Android.mk files with Android.bp files, which are JSON-like simple declarative descriptions of modules to build." Aug 11 19:10:01 ugh, fucking json seriously ? Aug 11 19:10:08 hipsters Aug 11 19:10:45 alright, at least it can have comments Aug 11 19:11:49 I would prefer xml like Aug 11 19:13:08 I installed android x86 in a virtual machine. But when I boot, I get booted into a virtual console. Aug 11 19:13:13 i think json does not allow comments Aug 11 19:13:23 startx doesn't exist. Aug 11 19:13:31 How do I get to the graphical environment? Aug 11 19:13:58 k12: Try #android or #android-root Aug 11 19:14:23 #android told me to come here. I guess I'll try #android-root then Aug 11 19:14:45 lol Aug 11 19:14:46 This channel is just app dev, not various aosp ports :) Aug 11 19:16:11 yer in the limbo of #android* channels k12 Aug 11 19:16:13 this is pretty interesting https://medium.com/stories-from-eyeem/router-everything-in-its-right-place-4ca437871052#.ao7w6ade5 Aug 11 19:16:28 raoul11: I see that, unfortunately. Aug 11 19:16:56 If this were any other flavor of linux, I'd already be prepared. Aug 11 19:17:15 God Aug 11 19:17:16 But fsr, despite being based on the linux kernel, android is waaaaaaaaaaaaaaaaay different. Aug 11 19:17:59 Android doesn't have the equivalent of the iOS UINavigationController may as well make my own fucking thing. On wait. Aug 11 19:18:09 http://www.howtogeek.com/164570/how-to-install-android-in-virtualbox/ Aug 11 19:18:14 >< Aug 11 19:18:17 seems like a proper tut k12 Aug 11 19:22:57 svm_invictvs yeah, you're on your own there Aug 11 19:23:03 g00s Yeah Aug 11 19:23:20 probably the #1 reason every app i study is a mess Aug 11 19:23:33 its structure, navigation, are not explicit Aug 11 19:23:34 g00s Basically the last guy did that. He was given iOS wireframes and then decided he'd try to shoehorn iOS principles into an Android app Aug 11 19:24:14 g00s Rather than pushback on the product designer and explain to them, "Hey that's not how Android works...just because it's s square piece of plastic with a touch screen doesnt' mean you build the app the same way." Aug 11 19:24:35 And I met the guy, he was a dipshit with a capital D Aug 11 19:24:43 :D Aug 11 19:25:03 Introduced himself as "Probably one of the top three Android developers in the state." Aug 11 19:25:24 "probably" Aug 11 19:25:29 haha Aug 11 19:25:36 who were #1 and #2 :D Aug 11 19:25:40 who knows Aug 11 19:25:45 Hello! When does onDetachedFromRecyclerView actually get called on my REcyclerView.Adapter? I haven't witnessed it get called on activity change, screen rotation, back-button press, etc, anything Aug 11 19:25:49 his ego and his ego's ego Aug 11 19:26:02 heh Aug 11 19:36:12 hey guy's I'm trying to set a camera preview, but for some reason my app never gets past Camera.open() Aug 11 19:36:21 heres is the code: http://pastebin.com/7rq0S8XG Aug 11 19:36:28 any ideas? Aug 11 19:39:28 even running on a separate thread didn't help Aug 11 19:40:24 no exception? just freeze? was there Force Close? Aug 11 19:41:28 Ashiren: no exception, just freezes Aug 11 19:42:12 it doesn't even output the other log Aug 11 19:45:05 weird, the phone rebooted and then it worked for a second... then crashed Aug 11 19:47:46 do you release the camera afterwards Aug 11 19:48:00 perhaps some error in your exact model/phone Aug 11 19:48:16 that a process keeps the camera 'open' Aug 11 19:48:37 but weirdly enough that another try wont cause crash and will just freeze Aug 11 19:50:35 galaxy s6 Aug 11 19:50:54 it seems that after that restart and crash everything is working as expected Aug 11 19:50:58 weird Aug 11 19:51:32 If you're using the old camera API. Aug 11 19:51:39 And you mess up the parameters, it'll crash the camera driver. Aug 11 19:51:46 And you'll have to reboot the device before it'll start working again. Aug 11 19:52:28 that's probably what happened Aug 11 19:52:38 thanks Aug 11 20:02:45 is there a quick way to see what styles are effecting a particular view in Layout Editor Aug 11 20:35:28 how do I enable dev mode on marshmallow? Aug 11 20:36:49 the docs site is down Aug 11 20:37:00 https://developer.android.com/studio/run/device.html#device-developer-options Aug 11 20:37:25 then in case it's down for you: "Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom" Aug 11 20:37:55 thanks Aug 11 20:42:20 I'm still struggling to figure out how to chain asynchronous operations with rx java. (this is what i want to convert to rx: https://gist.github.com/Michels10/8b5219063dcd0fb5de404d8402707d8c) Aug 11 20:43:27 eemgr: Doesn’t look like either of these calls is chained to the other, correct? Aug 11 20:43:37 Just save these n files in a pool Aug 11 20:43:43 ideally i want them to execute sequentially Aug 11 20:43:56 if i just loop and upload them all then i get OOM errors Aug 11 20:44:16 If you want sequential then why saveInBackground? Aug 11 20:44:29 because the upload shouldn't be done on the main thread Aug 11 20:44:39 i know there are other ways to do this Aug 11 20:44:45 but i'm curious about rxjava Aug 11 20:44:55 and this seems like a practical use case Aug 11 20:45:01 Then save them sequentially in one Callable and put that callable in a thread pool Aug 11 20:45:09 No it doesn’t seem to be a good fit for RxJava Aug 11 20:45:17 it would if each save depended on the value returned by the previous one Aug 11 20:45:31 then you’d flatMap() through them Aug 11 20:45:33 fine, then lets pretend it does Aug 11 20:45:57 Then if each one returns an observable, flatmap through them Aug 11 20:46:59 no idea what that means, do you know of an example? Aug 11 20:47:10 and i've been trying to read the docs for a while Aug 11 20:47:14 Plenty of examples of flatMap() with Rx Aug 11 20:47:59 But if you’re new to it, just get familiar with map(), filter(), etc... Aug 11 20:48:05 flatMap() is a bit more advanced Aug 11 20:54:30 the operators that you can use to transform observables is relatively easy to understand Aug 11 20:55:08 Hi guys. I'm currently following the develop guides on Android develop.android.com. I'm at the start where we create a new intent to start an activity. The code is Intent intent = new Intent(this, DisplayMessageActivity.class); Aug 11 20:56:02 Can someone explain what "this" is doing in this case? I know how it works when referring to class variables, or used for constructor overloading etc, but can't quite figure out what's happening when it's being used as a parameter to a constructor Aug 11 20:56:30 It's used again later on here TextView textView = new TextView(this); so I figured i'd try to find out what it's actually doing now Aug 11 20:56:35 this refers to the class itself Aug 11 20:56:47 Faizan: Look up the signature of the Intent constructor, what’s the type of the first parameter? Aug 11 20:56:54 it's a context jaana Aug 11 20:57:07 Now look at Activity, what does it extend? Aug 11 20:57:21 Uh how can I check that? Aug 11 20:57:26 docs Aug 11 20:57:35 Ctrl-n “Activity" Aug 11 20:57:46 https://developer.android.com/reference/android/app/Activity.html Aug 11 20:58:01 Ah okay, extends ContextThjemeWrapper Aug 11 20:58:09 which in turn... Aug 11 20:58:45 extends ContextWrapper Aug 11 20:58:51 parco i thought 2.2 had that .. thought it was in i/o 2016 demo Aug 11 21:00:20 So jaana, it's a subclass of Context Aug 11 21:00:39 Yes. So you’ve learned that anywhere a Context is needed, you can pass an Activity Aug 11 21:01:16 so using this in the constructor refers to the current Activity Aug 11 21:01:24 and because Activity extends Context Aug 11 21:01:31 we can pass an Activity as a context Aug 11 21:01:34 something along those lines? Aug 11 21:01:42 Exactly. Aug 11 21:01:47 Perfect, thanks! Aug 11 21:01:52 this is a reference, like variables and fields Aug 11 21:02:10 Also, a bit off topic, is there a quick way to look at the constructors' parameters etc in android studio, or do I just need to google the classes' api? Aug 11 21:02:29 Ctrl-b on it Aug 11 21:02:46 Sometimes I write the temporary code in my file and ctrl-b it. Then I delete it Aug 11 21:02:55 Isn't it ctrl-p by default? for parameters Aug 11 21:03:04 ctrl-p gives you the expected parameters Aug 11 21:03:13 aha ctrl-b shows the actual implementation Aug 11 21:03:29 Oh ctrl-b is same as ctrl-left click, that's neat Aug 11 21:04:02 Is there any way that android studio ties in with the actual api? Just short hand method signatures etc like java docs have? Aug 11 21:04:07 Not sure if that makes sense Aug 11 21:04:51 As in any way to be directly linked to https://developer.android.com/reference/android/content/Context.html if I press some keys on the Context class Aug 11 21:04:56 Does anyone here have experience working with bluetooth low energy? I've been struggling with status=133 all day; tried the workaround by having my connection call running on the UI thread but no luck Aug 11 21:05:15 @g00s please save me Aug 11 21:05:40 133 sounds familiar Aug 11 21:06:04 liuwenhao i think its a generic code; of course its undocumented. you can find it in the ble stack header file Aug 11 21:06:32 something like #define ERROR_GENERIC 133 or something Aug 11 21:06:51 lol Aug 11 21:07:47 liuwenhao https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/5738f83aeb59361a0a2eda2460113f6dc9194271/stack/include/gatt_api.h Aug 11 21:08:57 hey i was right #define GATT_ERROR 0x0085 Aug 11 21:10:12 Nice find. How should I go about debugging this? I don't even know where to start honestly. I've been digging around Stackoverflow and code.google.com all day and most people recommended trying the code on UI thread due to device specific issues Aug 11 21:10:25 I have a really stupid question losing my mind here. If I have public class X extends Y {, Y is the subclass or superclass? Aug 11 21:10:25 But I still get the same error, so I don't know what to do Aug 11 21:10:27 on samsung has that issue Aug 11 21:10:30 *only Aug 11 21:10:32 Y is superclass Aug 11 21:10:38 okay thanks Aug 11 21:10:39 and i think it was an old samsung running 4.3 Aug 11 21:10:43 your subclass is extending superclass Aug 11 21:10:48 this is a matter of parsing the english lol Aug 11 21:11:01 ah okay gotcha Aug 11 21:11:15 so subclass inherits all of superclasses (non private) methods and variables Aug 11 21:11:20 and constructors Aug 11 21:11:29 ahh okay so thats why I could pass an activity as a context Aug 11 21:11:35 g00s: Problem is my test device is a Samsung Galaxy S5 so it forces me to work around Samsung BS first Aug 11 21:11:59 At least for working on the camera, it's always difficult to tell if it's an Android issue or Samsung issue Aug 11 21:12:56 liuwenhao you can try in developer options, enabling HCI logs Aug 11 21:13:08 device -> settings -> dev options Aug 11 21:13:21 Thanks, I'll check that out asap Aug 11 21:13:58 liuwenhao also, you are serializing your commands right ? Aug 11 21:14:04 like queueing them up Aug 11 21:14:11 only 1 thing at a time ;) Aug 11 21:14:24 I'm not even making commands yet, right now I am just trying to connect Aug 11 21:14:31 oh Aug 11 21:15:14 liuwenhao do you have the nRF connect app on device ? Aug 11 21:15:26 https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=en this one? Aug 11 21:15:49 liuwenhao yeah Aug 11 21:15:51 I will install it and try it Aug 11 21:16:00 if that can't connect, nothing will :D Aug 11 21:21:15 hmm weird Aug 11 21:21:16 so Aug 11 21:21:33 If the device is bonded but disconnected, it can't connect in the NRF app Aug 11 21:21:43 But if the bond is deleted, it connects and bonds instantly Aug 11 21:21:47 and stays connected Aug 11 21:22:08 yeah thats weird Aug 11 21:22:22 so then, do you have to delete bond to connect 2nd time ? Aug 11 21:24:44 Seems like it Aug 11 21:25:04 dunno what that could be. i bet its that bug with dual mode devices Aug 11 21:30:07 There seems to be no problem bonding/deleting bond, that works fine. It's just the actual connection that is messed up Aug 11 21:52:20 g00s: Do you think it's possible that switching to API21 would fix this issue? Aug 11 21:52:30 is there any way to block the NewApi lint errors on vector drawable but show the other NewApi drawable errors? Aug 11 21:52:32 I know a lot of the BLE APIs were improved in 21 Aug 11 21:52:56 liuwenhao i don't know, sorry Aug 11 21:53:25 No problem, I will try it just for fun Aug 11 22:42:43 liuwenhao still there ? Aug 11 22:43:00 Yeah Aug 11 22:43:14 this looks new , api level 23 Aug 11 22:43:17 https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#connectGatt(android.content.Context,%20boolean,%20android.bluetooth.BluetoothGattCallback,%20int) Aug 11 22:43:30 try TRANSPORT_LE Aug 11 22:43:44 haha, if that works you can argue minSdk=23 , you're a happy camper ! Aug 11 22:44:16 delete the bond first, so its in initial state Aug 11 22:45:04 can't believe thats api 23, lol that should be api 18 Aug 11 22:46:13 i bet thats the resolution to the bug i remembered Aug 11 22:46:48 I'll try it Aug 11 22:46:55 If that works I'm going to bash my head into my desk repeatedly Aug 11 22:46:55 https://groups.google.com/forum/#!topic/btstack-dev/9zWiU5_V9MI Aug 11 22:47:20 is your chip a TI CC25xx ? Aug 11 22:48:14 "reddit is down for emergency maintenance" they are terrible, always down Aug 11 22:49:41 No it's a BlueCore CSR8670 Aug 11 22:49:57 oh, never heard of that Aug 11 22:50:12 Adding TRANSPORT_LE still gives me status 133 in onConnectionStateChange =/ Aug 11 22:50:21 liuwenhao to be safe, reboot the device Aug 11 22:50:22 ha Aug 11 22:50:27 your phone :) Aug 11 22:50:34 D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=7 device=00:02:5B:00:FF:01 Aug 11 22:50:34 junk gets cached in the bluetooth service Aug 11 22:50:46 alright i'll try it Aug 11 22:56:34 g00s, liuwenhao i'm not sure, but i stabilized my BLE code by using MATCH_MODE_AGGRESSIVE and SCAN_MODE_LOW_LATENCY Aug 11 22:56:54 that's what i've found in my git log Aug 11 22:56:58 hm Aug 11 22:57:15 i had a list of weird status codes Aug 11 22:57:20 129, 133, ... Aug 11 22:57:28 133 is my bane right now Aug 11 22:57:32 133 is basically, can't get GATT layout Aug 11 22:58:18 bitkiller where did those flags go ? Aug 11 22:59:00 ScanSettings Aug 11 22:59:09 bitkiller: g00s: if I get a status 133 in onConnectionStateChange, what should I be doing? Should I manually call disconnect on the gatt and retry a connection? Aug 11 22:59:34 liuwenhao i do that ... but you shouldn't get 133 often Aug 11 22:59:43 i get it once in a while , like 1/10 times Aug 11 22:59:46 thats why i retry Aug 11 23:00:01 the same with me Aug 11 23:13:18 Do you wait or do exponential backoff or anything? or just recall connectGatt immediately Aug 11 23:13:42 either, i'd wait at least 500ms Aug 11 23:55:51 Hey, I'm building a pretty trivial app, using https://github.com/dm77/barcodescanner, and Gradle is breaking on me: Aug 11 23:57:48 I'm using the zbar, which imports a .jar, which Gradle seems to think is empty. It isn't. I checked. Aug 11 23:58:12 "Error:Gradle: error reading C:\[snip]\zbar\libs\zbar.jar; zip file is empty" Aug 11 23:58:27 Does anyone have any clue what could've caused this? Aug 12 01:10:57 Anyone using artifactory? I had it running on a dedicated server but I want to move it to a virtual machine (uses too much memory). Would love to get it free but it looks like it would cost around ~$18 /mo on AWS. Aug 12 01:23:15 hey so I am reading this and utterly confused... what is the thisActivity ? in regards to a camera's permissions Aug 12 01:23:17 https://developer.android.com/training/permissions/requesting.html#perm-request Aug 12 01:24:01 I feel like i should get this .. i have this inside the onCreate in the MainMethod. but the ide doesn't allow that . so Im lost at what m activity should be Aug 12 01:27:58 just write this Aug 12 01:28:40 dar10s_: ContextCompat.checkSelfPermission(Context context, String permission) is the method signature Aug 12 01:28:59 Activity extends context, so, you can just write "this" if it's in an activity Aug 12 01:29:17 if it's a fragment, well, you can figure that out, it's easy enough Aug 12 01:41:38 when i tried 'this' it did not work . then i noticed I shouln't have it in the on click method .. ughh eyes wakeUp Aug 12 01:41:53 thanks thats what i needed to learn Aug 12 01:48:21 you said it was in an onCreate, not onClick Aug 12 01:50:09 if you do need it in an onclick, for some reason, then you would do something like ActivityName.this, i believe Aug 12 01:55:01 ughh these permission things. I really think its my emulator and not my script. Aug 12 01:55:27 ( ha .. i did say that ) Aug 12 02:18:36 How can i use butterknife on a view that was inflated? **** ENDING LOGGING AT Fri Aug 12 02:59:58 2016