**** BEGIN LOGGING AT Thu Mar 19 02:59:58 2015 Mar 19 03:03:45 What happens if you call finish() on an activity and its previous activity got killed? Mar 19 03:03:49 is there a good "tree view list" class out there? Mar 19 03:06:28 guys, what do i need to share a simple link in facebook app from my app? Mar 19 03:06:44 i red that you dont need to have facebook login right? Mar 19 03:06:46 http://pastebin.com/mcKnq4tc Mar 19 03:06:55 thats my code and im geting: FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(MainActivity.this) Mar 19 03:06:55 .setLink("https://developers.facebook.com/android") Mar 19 03:06:55 .build(); Mar 19 03:06:55 uiHelper.trackPendingDialogCall(shareDialog.present()); Mar 19 03:07:02 ups sorry for taht Mar 19 03:07:03 that Mar 19 03:07:06 fonko: use a paste service pls Mar 19 03:07:11 E/Activity? Error: com.facebook.FacebookException: Error publishing message Mar 19 03:07:11 im guesisng you need to use the facebook api Mar 19 03:07:39 mm.. maybe Mar 19 03:08:01 have you googled Mar 19 03:08:15 im not familliar with facbeook but normally you authorize and then use the token to call into the api Mar 19 03:17:27 ok, time to play with okio :) Mar 19 03:17:38 yes it is Mar 19 03:18:01 :D Mar 19 03:21:13 ok, done! now I'm going to check the configChange thingy :) Mar 19 03:21:36 I have two activities with android:configChanges="keyboardHidden|orientation|screenSize" Mar 19 03:21:45 and no, I didn't know it was a "bad idea in general" Mar 19 03:22:06 I need these activities to rotate with the screen, but I don't want them to be recreated Mar 19 03:22:20 isn't it THE method? Mar 19 03:22:49 why dont you want them to recreated Mar 19 03:23:05 because it's "expensive" to create them Mar 19 03:23:11 create what Mar 19 03:24:02 ok, I could be saving some things in the state of the activity, but the user can change certain aspects of the views Mar 19 03:24:22 and there is an ImageView which I don't want to load again because it loads from an URL Mar 19 03:24:59 Cache the image Mar 19 03:25:06 how are you loading it in currently Mar 19 03:25:12 UniversalImageLoader Mar 19 03:25:17 nah Mar 19 03:25:17 http://square.github.io/picasso/ Mar 19 03:25:31 desmin88, why would you cache it instead of not recreating the activity? Mar 19 03:26:01 why dont i cut off my pinky toe so i dont stub it on the coffee table Mar 19 03:26:09 your thinking about it wrong Mar 19 03:26:43 Using picasso its all automatic Mar 19 03:26:56 you wouldn't have to do it on your own, plus its from square so you know its good shit Mar 19 03:27:08 square: da good shit Mar 19 03:27:17 ^ Mar 19 03:27:18 is that their new slogan ? Mar 19 03:27:27 lol Mar 19 03:27:27 I know I can cache the image desmin88, even with UniversalImageLoader. but it takes a few 100s ms to load again Mar 19 03:27:33 Mattx: If the user opens your app, presses Home, opens something memory-hungry (such as Google Chrome), and comes back to your app, you might find that Android has destroyed the activities (perhaps even the entire process). Then, with your current setup, the image has to be re-downloaded. Mar 19 03:27:40 you're missing a memory cache then Mar 19 03:27:46 even from cache, even more in a no-so-cool phone Mar 19 03:27:59 you're hardcore "preoptimizing" Mar 19 03:28:12 (I'm assuming you're not currently using caching, of course.) Mar 19 03:28:17 not even preoptimizing, just sort of being neurotic Mar 19 03:28:40 not for this image but for other imageviews I am using cache Mar 19 03:28:58 it's really simple to cache in Universal, I tried that Mar 19 03:29:01 why not this image specifically, thats kinda dumb Mar 19 03:29:08 because it is HUGE Mar 19 03:29:30 (it's a wallpaper to be precise, and no just one, but as many as the user wants to load) Mar 19 03:29:51 a wallpaper intended to be used as a background for the device? Mar 19 03:29:59 no Mar 19 03:30:07 needs context Mar 19 03:31:11 let's say there is a viewpager, each one has potentially a wallpaper (or an image of such size) Mar 19 03:31:23 so when the user change from one page to the other, I'll be caching the images Mar 19 03:31:26 which requires a lot of space Mar 19 03:31:32 why are they so big Mar 19 03:31:52 because they're hosted in a server which hosts big wallpapers? don't know Mar 19 03:31:56 wallpapers tends to be big Mar 19 03:32:03 I'm consuming that service, they're not mine Mar 19 03:32:31 If a huge image can fit into RAM without issue, can't it fit on hard disk without issue? Mar 19 03:32:39 heyoo Mar 19 03:32:40 Note that the disk cache could be limited. Mar 19 03:33:01 so you would avoid using configChanges at all costs? Mar 19 03:34:00 Mattx: just because you set that doesnt mean your activity wont be killed Mar 19 03:34:10 android can and eventually will kill it Mar 19 03:34:12 ok, I got it, it is a good reason :P Mar 19 03:34:33 Mattx is trying to fight the system! Mar 19 03:34:47 * Mattx just want to understand Mar 19 03:35:04 Stop resisting! *fires tazer* Mar 19 03:35:34 ok, I'm going to change that. thanks guys! Mar 19 03:35:57 "Nothing is certain but death and taxes" ~ B.F Mar 19 03:36:13 little known addendum is he also said "and android will definitely kill your activities, 'yo" Mar 19 03:37:33 tough crowd tonighg Mar 19 03:37:35 tonight* Mar 19 04:01:30 Well, I just filled out the new ratings survey, no Nazi images in my app at least. Mar 19 04:01:35 or farting sounds Mar 19 04:03:14 actually it was fairly painless. Mar 19 04:07:05 wait, we're not allowed farting Nazis now? Mar 19 04:13:59 done to the genre of Flappy Bird, it might be allowed in some countries Mar 19 04:14:15 well, you can have them, but if you lie about it they might remove your app Mar 19 04:15:26 and if you do have them children might not be able to install your app in some regions. Mar 19 05:13:50 i am trying to set an exception breakpoint in Android Studio and it's not working. anyone able to help me out? Mar 19 05:14:23 debugger keeps breaking in ZygoteInit. I've tried class filters, but they aren't working Mar 19 06:04:17 my Dialog Pickers arent using my app's theme colors. How can i manually set that? Mar 19 07:06:05 any opinions about this guys ? http://www.mendix.com/application-platform-as-a-service/mobile-paas/ ? Mar 19 07:06:21 how optimized would be the source code developed using such tools ? Mar 19 07:06:39 anybody here have used this tool ? Mar 19 07:43:25 is there any other way except string builder for UCwords in android like in php ? Mar 19 08:17:34 * DataTracer waves Mar 19 08:18:40 Anyone in or near Los Angeles? Mar 19 08:26:13 do you guys have any idea how to use external USB cameras on Android? Can't find anything that works online :( My phone supports USB OTG btw Mar 19 08:34:18 its for suitable for #android or #android-root Mar 19 08:39:15 Hi there. Mar 19 08:39:35 Hi frojnd Mar 19 08:40:06 good morning Mar 19 08:41:11 Not a whole lot of chatter goes on in here I see. Everyone sleeping maybe? Mar 19 08:41:40 I'm asleep right now Mar 19 08:41:45 hah hah Mar 19 08:41:56 I should be Mar 19 08:42:16 Well about to - I guess no Euro here Mar 19 08:43:32 Night Mar 19 08:43:39 g'night Mar 19 08:54:59 Does anyone know if sharing statistics (i.e. 5 men of age 43 did something) count as sharing user-provided personal information with third parties? Mar 19 08:58:16 depends on country? Mar 19 08:58:38 sex and age are personal information. Mar 19 08:58:46 Ok Mar 19 08:58:56 at least in my perspective. Mar 19 08:59:02 Alright Mar 19 08:59:13 if it was collected and shared, I'd expect it to be disclosed to me at least. Mar 19 08:59:14 but when does it become personal? Mar 19 08:59:22 I don't know. Mar 19 08:59:41 when it is sent from my ip? Mar 19 08:59:42 what you're saying sounds fair though Mar 19 08:59:50 Yeah Mar 19 08:59:55 with my user-agent info? Mar 19 09:00:07 I mean, what we're looking at is the publishing form for the play store Mar 19 09:00:20 and we are receiving information from the users Mar 19 09:00:33 but we never give it out on a personal level, only as usage statistics Mar 19 09:00:46 like people of this age are interested in your company or that kind of things Mar 19 09:00:51 but it still uses the personal information that they entered Mar 19 09:01:14 although it's not like we send out a spreadsheet of the personal information of our users Mar 19 09:03:16 but maybe that still counts Mar 19 09:03:44 because, like you're saying, it's something that's been told to us rather than the world. Mar 19 09:04:26 why do I have to create a separate class ( http://stackoverflow.com/questions/12912181/simplest-yes-no-dialog-fragment ) for a simple dialog fragment !? Mar 19 09:05:01 I want to create a simple one on my main activity which would just show up a yes/no and set an intent string ( among others ) Mar 19 09:08:24 just use the stuff inside the onCreateDialog method Mar 19 09:08:30 with a show() at the end Mar 19 09:08:46 ow Mar 19 09:08:48 great Mar 19 09:08:52 * BlackBishop tries stuff out Mar 19 09:10:24 lol you want to be a dev but you object to having to write code? Mar 19 09:10:59 So I'm locally running rails server. I also created OAUTH api. Now I'd like to test it locally in emulator (genymotion) Any ideas how can I convince genymotion when going to http://localhost:3000/login/ to really got to rail's server? Mar 19 09:11:16 ravilov: nope, I was just wondering why I have to separate it and not have it in my main class ( which is simple and small ) Mar 19 09:12:11 you can totally have it as an inner class in your main Mar 19 09:22:12 I use GCM to send notification when some new stuff happens on my app. What is the best way to handle (for the same notification) those 4 possiblities: 1. User is in activity A, 2.User is in activity B, 3.app is in backbround, 4.app is closed ? Mar 19 09:22:26 (each option should have different behaviour) Mar 19 09:23:43 do you guys have any idea how to use external USB cameras on Android? Can't find anything that works online :( My phone supports USB OTG btw Mar 19 09:29:52 webcams? Mar 19 09:32:45 Hi! Anyone here from Germany on TMobile by any chance? I'd like to checkout some app that's only available there. If anyone can grab it for me it would be highly appreciated :) (this app: https://play.google.com/store/apps/details?id=de.telekom.aps.wnwlite ) Mar 19 09:34:51 Chainfire, yes. usb cameras Mar 19 09:38:07 i use swipetorefresh with recyclerview, i want to hide the actionbar when scrolling down and show it when scrolling up, i added margintop to avoid screen flickering but now i have a blank space when the actionbar is hidden, i read you add a headerview for listview to solve this issue but how do solve it for recyclerview ? Mar 19 09:39:41 stanford_drone_ some devices have V4L2 support in the kernel Mar 19 09:39:45 which is pretty easy to use Mar 19 09:40:06 unfortunately, you need root to give yourself the permissions to access it Mar 19 09:40:32 (in the old days, the CAMERA permission gave you the right access, but it doesn't anymore) Mar 19 09:40:37 what's V4L2? Mar 19 09:40:48 I can have root just fine Mar 19 09:40:51 video 4 linux v2 Mar 19 09:40:59 android will support that? Mar 19 09:41:01 its a standard linux thing to work with stuff such as webcams Mar 19 09:41:14 well I know my Nexus7 has the V4L2 driver Mar 19 09:41:16 would it be easy to get the cam into opencv? Mar 19 09:41:21 I don't think it's standard though Mar 19 09:41:29 i don't need standard Mar 19 09:41:39 I'm not sure about easy Mar 19 09:41:47 i'm basically making my own android device. needs to connect 2 usb cameras Mar 19 09:41:48 but you can grab frames and feed them into whatever Mar 19 09:41:51 or just 2 cameras Mar 19 09:42:08 I have not worked with opencv though Mar 19 09:42:44 or just get the image data Mar 19 09:42:50 i just want all pixels in realtime Mar 19 09:43:01 how realtime? Mar 19 09:43:20 How can I create Polygon without adding it to map ? This is only example I can find : Polygon polygon = map.addPolygon(...) Mar 19 09:43:20 best I've been able to get is about 100ms delay Mar 19 09:43:46 Can I have Polygon without adding it to map ? Mar 19 09:43:52 the raw driver I had that talked directly to USB (no root required) was much quicker than V4L2 but it wasn't very reliable Mar 19 09:43:55 Chainfire, why is there that delay? i need it very realtime Mar 19 09:44:15 for computer vision and robotics Mar 19 09:44:25 I'm not sure, I think it's something in the kernel itself that lags Mar 19 09:44:38 well as I said you can write your own code that talks raw usb to the webcam Mar 19 09:44:45 then you'd have to figure out what the protocol is Mar 19 09:44:59 it's called UVC if I'm not mistaken Mar 19 09:45:18 I have not been able to find a good implementation of that myself that worked on Android though Mar 19 09:45:58 (then again, the last time I looked was years ago) Mar 19 09:48:25 stanford_drone_ why exactly are you basing this on Android though? Mar 19 09:48:31 Do you really need the screen / form-factor ? Mar 19 09:49:05 I've done quite a few embedded solutions based on Android, and if you don't need the screen/formfactor, you are much better off using something like a Pi running real Linux as a controller Mar 19 09:49:33 Chainfire, i just want to let developers make their own android apps for my embedded device Mar 19 09:51:33 just saying, in my experience it isn't an overly reliable solution Mar 19 09:55:37 Chainfire, why is that? Mar 19 09:56:40 android just isnt very stable Mar 19 09:56:49 if you're talking about months uninterrupted running Mar 19 09:57:04 at some point, some process you rely on will crash or be killed Mar 19 09:57:47 make sure you have a second background process that keeps track of everything you need to run and makes sure everything is restarted when needed :/ Mar 19 09:59:05 why would getSupportActionbar return null if the activity where it's called in is extending ActionBarActivity (appcompat..) Mar 19 10:03:07 Is there a way to include ""into xml for devices 2.3_ Mar 19 10:13:10 any alarm manager guys here? Mar 19 10:18:43 SheikhAman: are you doing a survey on developer expertise, or did you have a question to ask? Mar 19 10:20:12 Leeds, haha getting into IRC is too complex for a typical survey guy, I had a question Mar 19 10:21:06 Leeds, I am putting multiple Alarms, one creates another with an intent, unless a condition is met Mar 19 10:21:48 Leeds, the thing I am facing is that every alarm that is fired in this manner, gives me the same intent, even when I am setting a different intent Mar 19 10:22:31 Hi all. Somebody experience with d3.js in android? Mar 19 10:25:08 SheikhAman: I can't remember the exact situation off the top of my head, and it may have changed... but IIRC multiple alarms with similar intents can end up being treated as one Mar 19 10:25:55 I am sorry for being dumb, what would IIRC mean here? Mar 19 10:26:12 if I recall/remember correctly Mar 19 10:27:00 ahh okay :D Mar 19 10:27:03 do you use pendingintents for the alarmmanager? if so you need to give them different requestcodes to get different ones I think Mar 19 10:27:07 and when you say similar, that means intent pointing to the same class? Mar 19 10:27:25 memorion, Just found that out Mar 19 10:27:45 Thanks a lot!! Mar 19 10:28:10 np, had that problem with notification actions Mar 19 10:36:02 :) Mar 19 10:47:18 Hi, so why exactly is my app able to write to the external storage of anything below kitkat ? Mar 19 10:47:29 but not kitkat ? Mar 19 10:50:50 Unknown0BC, see https://developer.android.com/about/versions/android-4.4.html Mar 19 10:51:34 under "External storage access" Mar 19 10:56:15 someone has a suggestion for a library which shows the buttons to pick a date like in the material guide is shown here: http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7ZE5qQXZkb2xsaXM/patterns_errors_userinput11.png Mar 19 10:58:22 Hi! Is there a way to use a single resource XML for menu over different Activities? Mar 19 11:01:28 Mavrik, thanks but the question is about writing to the external SD card in kitkat. I can read it fine and that page only speaks about reading the external SD card. Mar 19 11:01:51 Erm. Mar 19 11:01:57 Yes? :D Mar 19 11:04:16 Yes kitkat does not seem to allow 3rd party apps to write to the SD card. I see a lot of ranting about it on the net. Mar 19 11:04:44 Yeah, you'll just have to workaround that. Mar 19 11:04:54 Note that Lollipop has that limitation as well. Mar 19 11:05:55 I don't understand the mind of whoever decided that. Mar 19 11:06:20 Unknown0BC, Whaaa? Mar 19 11:06:28 I don't think that's correct. Mar 19 11:06:45 One of my app writes images on SD card, but in it's own data folder, and it works Mar 19 11:07:19 but yeah, I am not specifically writing on SD card, I am writing on externalStorage, whichever the platform thinks is the externalStorage Mar 19 11:07:30 Talking about the External SD card not the internal one which also appears as SD Card. And in Kitkat. Mar 19 11:07:39 SheikhAman, writing to standard OS folders (pictures, download etc.) and your own data folder is explicitly allowed Mar 19 11:07:46 Hi people! Can anyone explain me what the numbers behind a "process has died"-message are? Mar 19 11:07:46 SheikhAman, free write access isn't anymore Mar 19 11:08:11 with Lollipop you can use storage access framework to get access to other folders as well, on Kitkat your're fscked Mar 19 11:08:16 ahhh. got it Mar 19 11:08:18 example: I/ActivityManager( 923): Process com.Bitsaurus.Byteblast (pid 1848)(adj 0) has died(94,209) Mar 19 11:08:21 good in a way, no? Mar 19 11:08:32 Their explanation was that it stops apps from leaving crap all over SD card Mar 19 11:08:42 I'm not buying it really :/ Mar 19 11:08:51 Mavrik, I do kind of agree with it Mar 19 11:09:16 do they delete the app folder once it is uninstalled? (since now they'd exactly know which folder the app is storing its crap? ) Mar 19 11:09:19 The thing is just what if you app needs gigs of space to save videos etc ? Mar 19 11:09:26 SheikhAman if you're writing to secondary external storages (such as the real sd card, not internal storage, which is indeed possible) something to keep in mind is that that folder gets wiped if the app is uninstalled Mar 19 11:09:35 which is really, really, bad Mar 19 11:09:39 in case of pictures and whatever Mar 19 11:09:42 SheikhAman, yes, they do Mar 19 11:10:10 Unknown0BC, um, didn't you read. You STILL retain access to your own external storage dir on that SD card Mar 19 11:10:12 just not other dirs Mar 19 11:10:20 you can STILL write to the DCIM, Pictures, etc. Mar 19 11:10:26 just not random folder Mar 19 11:10:38 anyone can explain that logcat-message? Mar 19 11:10:48 Oh I see. Ok thats not to bad then. Will try ty. Mar 19 11:10:53 @ Mavrik Mar 19 11:10:59 Mavrik, if what Chainfire is saying is true, then only it is catastrophic Mar 19 11:11:04 Unknown0BC, I don't remember offhand just how Samsung and others actually handle that htough Mar 19 11:11:13 not in the office to test :/ Mar 19 11:11:17 that means you should store pictures etc in appropriate folders Mar 19 11:12:22 it is documented somewhere that it works like that Mar 19 11:12:25 * Chainfire has never really tried Mar 19 11:12:27 basically Android devs think you should always use the getExternal... APIs Mar 19 11:12:38 Chainfire, yes, your external data dir gets nuked Mar 19 11:13:12 Chainfire, getExternalFilesDir(DIRECTORY_PICTURES) and getExternalFilesDir(DIRECTORY_MOVIES) doesn't :) Mar 19 11:13:28 again, not sure what Samsungs really return on that Mar 19 11:15:04 right, but depending on the situation, you really don't want to litter pictures and movies folders with that stuff Mar 19 11:15:11 because then it automagically shows up in viewers Mar 19 11:15:36 DIRECTORY_PRIVATE_STUFF_THAT_SHOULDNT_BE_NUKED doesn't exist Mar 19 11:16:39 yeah, thank god Mar 19 11:16:40 :) Mar 19 11:17:22 thank god? Mar 19 11:17:39 unintended (by the end user) loss of data is always bad Mar 19 11:18:16 having the phone full of random crap from uninstalled apps has also proven to be very abd Mar 19 11:18:18 *bad Mar 19 11:18:28 especially since users can't know what's needed or not when folders are just random junk Mar 19 11:18:48 I don' seem to get any write access to anywhere on the external sdcard... @ Mavrik Mar 19 11:18:59 well in this case its a special folder you need to request just like pictures and movies, not the standard external files directories Mar 19 11:19:20 ( my app works fine on versions below kitkat ) Mar 19 11:19:24 if you produce (not consume) data through an app that it stores somewhere, and you uninstall the app, and all your data is gone Mar 19 11:19:46 no amount of "crap needs to be cleaned up" counters that Mar 19 11:20:41 so nobody here knows how to interpret logcat-output? great... Mar 19 11:20:46 I'm off to have lunch Mar 19 11:21:38 Unknown0BC are using one of the dirs returned from context.getExternalFilesDirs ? Mar 19 11:21:42 *you Mar 19 11:22:28 note that hardcoding doesn't necessarily work, you may actually have to make the call to get the right permissions. also, not all devices have this properly implemented Mar 19 11:22:56 firmware bugs on the Samsung 7.7 for example prevent you from writing anything to the sdcard at all. also have you requested the right permissions in the manifest? Mar 19 11:24:09 Chainfire ( ap works fine on below kitkat ) manifest is correct. Not sure what getExternalFilesDirs will return could have a look. I have a directory selector which selects the directory to save photos in. Mar 19 11:43:11 ahoy, im trying to render an image into a bitmap via and then convert than to a byte array. is there any way i can prevent allocating BOTH the bitmap AND a byte array? Mar 19 11:43:46 via a context* Mar 19 11:53:49 is it possible to disable scrolling? Mar 19 12:02:31 joroci, scrolling where, on listview? Mar 19 12:08:01 recyclervie Mar 19 12:08:03 view* Mar 19 12:08:23 if i'm refreshing i want to disable scroll Mar 19 12:09:11 what i do now is, if i'm refreshing i'm doing scrollToPosition(0) Mar 19 12:10:59 hmm Mar 19 12:11:03 joroci, intercept the touch event Mar 19 12:14:45 are there any circumstances where "disabled" apps will start to run again? Mar 19 12:16:17 x29a: some Google apps that are disabled will still get auto-updated by Google Play and when they're updated they're also enabled again. Mar 19 12:16:45 ah ok, thanks Mar 19 12:17:08 but of course user has to click update manually Mar 19 12:17:20 x29a, otherwise no, a disabled app will not run and will not respond to intents Mar 19 12:17:24 or broadcasts or anything Mar 19 12:18:46 Mavrik: hm, yes, maybe you only get the notification. but if you ever press update all it'll include some disabled apps. Mar 19 12:19:03 ok, thats fine Mar 19 12:19:15 that never happened to me, the disabled apps were always in the separate bucket with the apps that need confirmation Mar 19 12:19:24 but then again, Play Store changes like every 2 weeks -_- Mar 19 12:19:24 i was more wondering if there was some way around the disabled flag Mar 19 12:19:56 which is good that there isnt Mar 19 12:20:03 Mavrik: used to work like that, but some update to Play or perhaps because of Lollipop some apps like Google Earth and Docs are included in update checks even if they're disabled. Mar 19 12:20:49 appel1: maybe they provide important API access for other apps? like google play services, location services, .. Mar 19 12:21:15 but still, overriding a userchoice, not so seksi Mar 19 12:21:16 x29a: afaik no, everything works just fine if they're disabled as long as you don't update them by mistake so they're re-enabled =) Mar 19 12:21:16 nah, I think it's just shoddy programming Mar 19 12:21:32 mavrik return false or true is enough? Mar 19 12:35:59 Is there an online-viewable source-repo of android 5.0 somewhere? Mar 19 12:37:02 Syntaxerror: https://github.com/android choose a repo :) Mar 19 12:37:14 thanks nyuszika7h Mar 19 12:37:48 lollipop-release branch I guess Mar 19 12:38:05 actually Mar 19 12:38:14 lollipop-mr1-release probably for 5.0.1 Mar 19 12:41:13 How is it possible that my if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) do not change in roll, pitch & yaw even if I rotate my device? Mar 19 12:45:08 where does the "Rotation Vector Sensor" retreive it's data from? http://developer.android.com/guide/topics/sensors/sensors_motion.html Mar 19 12:45:44 Hi @ all! I'm having a bit of trouble using Android Studio (just switched from eclipse). Problem is, that in gradle it seems that auto-merging Manifest files from lib-projects is default enabled (was off in eclipse) and now I'd like to switch it off in Android Studio. How do I do that? Mar 19 12:50:20 Ponsen: http://stackoverflow.com/questions/27790209/how-to-use-the-new-manifest-merger-of-android-studio-and-gradle Mar 19 12:51:16 maybe there not sure Mar 19 12:51:35 alien64: I'll take a look, thx Mar 19 12:51:52 Can someone recommend me oauth2 client library. In rails I set client_id (app's id), secret, and callback. Then I define client: client = OAuth2::Client.new(app_id, secret, site: "http://localhost:3000/") and after it I login. I create token token = client.auth_code.authorize_url(redirect_uri: callback) and after it I create access: accesss = Mar 19 12:51:54 client.auth_code.get_token('a723add61cd56e6a548717610780e3faefaa6e26cedb35060d04b9a1f75dda27', redirect_uri: callback) in the end I craete access.token and I can visit json like resources like this: http://localhost:3000/api/v1/bumblebees?access_token=a9dc08b43f07d79293c2ee10f9c5cb32dd058231a90466cbc7859d2d4edca055 The whole procedure (only 25 lines: https://gist.github.com/frojnd/806279cc7be3834d8b7f) Mar 19 12:51:56 is there an equivalent for android? Mar 19 12:52:52 Should I use https://github.com/danielsz/android-oauth2-client or https://github.com/wuman/android-oauth-client or any other? Mar 19 12:53:25 dude pastebin your code and give the URL here Mar 19 12:55:06 manifest merger? :P Mar 19 12:56:34 the answer was in that stackoverflow article: "Is there a way to block merging certain library manifests? Not that I know of, sorry."... Mar 19 12:58:16 humm bummer Mar 19 12:58:48 So, second and third problem: 1st: I'm kinda stupid. 2nd: The now always merged manifest from that other lib-project gives and activity a launcher icon for it's own activity. Now when I deploy my app i have 2 launcher icons. one starts my activity, the other icon starts the libryries activity. what now?! Mar 19 13:03:11 I have written an optical head tracker for a data-glass which runs on android and I like to use my output to support the android sensors. Mar 19 13:03:46 but I do not know if I should support the Sensor.TYPE_ROTATION_VECTOR and how to correct the android data Mar 19 13:05:06 tokam: what are you trying to achive and what device are you using? Mar 19 13:05:18 Epson BT-200 Mar 19 13:05:26 displaying a tunnel in the sky for pilots Mar 19 13:06:10 so it's an AR app using gyro-sensor for the tunnel? Mar 19 13:11:10 Ponsen: gyro + computer vision Mar 19 13:29:11 Chainfire, it's not for a long process. it's for a drone Mar 19 13:32:32 :) Mar 19 13:32:59 do you guys have any idea how to use external USB cameras on Android? Can't find anything that works online :( My phone supports USB OTG btw Mar 19 13:33:28 stanford_drone_: http://stackoverflow.com/questions/27518711/external-webcam-for-camera-to-android-using-usb Mar 19 13:34:27 stanford_drone_: there is also https://github.com/openxc/android-webcam that might help Mar 19 13:37:18 first link is very random. it's very hard to understand their language Mar 19 13:37:27 *their english Mar 19 13:38:49 is V4L2 too laggy for realtime computer vision on a drone? Mar 19 13:40:02 I want to draw simple rectangle (box) with solid background color. What I can to use? If I use just 'View', then I can't set w/h to it (programmatically) Mar 19 13:42:36 I'm trying to use scribe with gradle: https://github.com/fernandezpablo85/scribe-java/wiki/getting-started this is how my build.gradle looks like: https://gist.github.com/frojnd/e13a3a50f56e501ea6ff unfortunatelly ther is a problem on line 22: > Could not find method compile() for arguments [org.scribe:scribe:1.3.7] on root project 'BumbleBees'. Anyone date to look at the simple gradle file? What is the Mar 19 13:42:37 correct way to use gradle nowadays to add new libs? Mar 19 13:44:12 Guys, I need to add line, with leading imageview (into LinearLayout) Mar 19 13:44:24 do I need nested LinearLayout for that? :/ Mar 19 13:49:44 I'm officially blind: // NOTE: Do not place your application dependencies here; they belong in the individual module build.gradle files Mar 19 13:54:13 Hey guys, whenever a user return to my app after hitting the home screen, they are taken back to the firstActivity versus the activity they were last working on. I want them to resume at the last visible activity. this was reported as a bug, not sure it's fixed. https://code.google.com/p/android/issues/detail?id=38194&q=app+resume+open+done&colspec=ID+Type+Status+Owner+Summary+Stars Mar 19 13:56:29 android_sandwich: have you set any attributes in your manifest like launchMode or clearTaskOnLaunch on your activity? Mar 19 13:57:57 android_sandwich: or perhaps done something in code in onPause/onStop or perhaps onResume? :) Mar 19 13:58:06 appel1: no I haven't. Mar 19 13:58:32 again I haven't set anything in my onPause on onResume. Mar 19 13:58:36 is there any way to [virtually?] connect a real otg usb device to an android studio emulator so can test w/o having to swap the android device from computer to otg to computer to otg ad infinitum ???? Mar 19 13:59:29 for those, who are interested in that manifest question from earlier: in the activity-tag add this: tools:node="remove" and it removes all the node that would be added by merging Mar 19 14:00:05 android_sandwich: perhaps you've set noHistory on your other activities? or call finish in onPause? Mar 19 14:02:06 hmm that's a good point. let me check Mar 19 14:06:05 android_sandwich: I guess it could also be that the app has been killed while the user was away due to low memory and has to be recreated when the user returns and you haven't implemented saving and restorting activity state correctly. Mar 19 14:06:31 android_sandwich: logcat should tell you what is going on =) Mar 19 14:07:09 I have a question Mar 19 14:07:12 that's not the case because I hit home button and relaunch the app right away. I don't get any logs for activity being destroyed Mar 19 14:07:27 android_sandwich: ok Mar 19 14:07:28 within my Playstore developer console, I can go to "statistics" for a particular app Mar 19 14:07:42 now the stats end two days ago. Mar 19 14:07:48 they're always two days behind Mar 19 14:07:56 my quesiton is when does this get updated Mar 19 14:08:08 when does google play store's "day" end? Mar 19 14:08:53 for example, at what time today will I be able to see stats for March 18th? Mar 19 14:10:22 hmmmm? Mar 19 14:10:57 Anyone recommend a good tutorial/example on splitting up resoures for different api levels? For instance, implementing the ripple animation without breaking things? Mar 19 14:13:26 Hi! Mar 19 14:13:27 I've many INTs R.string.foo_1 R.string.foo_2 R.string.foo_3 etc. how can I do to get them programatically? Mar 19 14:13:39 I want to generate a random number and get the int with that number R.string.foo_{random} Mar 19 14:13:57 how do phone manufacturers connect the phone cameras to the processor? usb? Mar 19 14:14:10 i need to put two extra cameras Mar 19 14:15:59 stanford_drone_, not sure what you're doing is possible, but I could be wrong. Sounds interesting. Mar 19 14:16:28 stanford_drone_: just conneced a webam via otg-usb yesterday and tried to get the camera id's, but android would recognize the new camera. just got front and rear Mar 19 14:17:11 but I was able to attach the same webcam to one of those android-sticks and it worked Mar 19 14:18:05 what android sticks? Mar 19 14:18:32 Is there an android Canvas control, or am i thinking of something else Mar 19 14:18:46 i think it was a mk-808B (http://www.geekbuying.com/item/MK808B-Dual-Core-Android-4-1-Jelly-Bean-TV-BOX-RK3066-Cortex-A9-1GB-RAM-8GB-ROM-Mini-PC-TV-Box---Black-313213.html) Mar 19 14:19:28 oh, for tvs Mar 19 14:19:51 yep Mar 19 14:20:07 my logitech webcam worked like a charm Mar 19 14:20:23 I'm looking at making my own android phone hardware. maybe i can connect cameras like phone manufacturers do. how's that though? Mar 19 14:20:42 for some reason im not seeing "Canvas" as an option within the Layout Design view's "Palette" controls. Mar 19 14:22:05 stanford_drone_: idk... Mar 19 14:22:42 where is the android manufacturers channel?? Mar 19 14:24:04 doesn't exist Mar 19 14:24:26 Hi all, I run android 4.1.1-r6.1-21302222 x86 with virtualbox. When the screen go to sleep it doesn't turn black (or another color), just it "freeze". How can I do to turn the screen in black when it sleeping ? Mar 19 14:24:58 ( I want to see when the screen currebntly sleeping or not) Mar 19 14:28:17 hey all Mar 19 14:28:31 sup perlsyntax Mar 19 14:28:40 Cool Mar 19 14:28:42 If I wanted to draw a line programmatically Mar 19 14:28:50 what type of android control would I draw on? Mar 19 14:29:02 opengl Mar 19 14:29:09 no need for that Mar 19 14:29:11 simple 2 d Mar 19 14:29:41 canvas? Mar 19 14:45:22 okay, i did it Mar 19 14:45:25 phew. Mar 19 14:56:44 if i have a custom arrow icon how would i rotate it for rtl? Mar 19 14:57:19 joroci: mirror vertically Mar 19 14:57:51 yea but how? another drawable ? Mar 19 14:58:27 maybe someone else can help you with that... Mar 19 14:59:51 hmmm Mar 19 15:01:53 hm Mar 19 15:01:57 hmhmh Mar 19 15:01:58 :) Mar 19 15:02:02 I Mar 19 15:02:07 I have a strange question Mar 19 15:02:52 I have a class, called DrawLine, uses paint to draw on public void onDraw(Canvas canvas) Mar 19 15:03:17 in my activity java class I have a on touch listener for that view Mar 19 15:03:29 within the ontouch event, I would like to draw more on the canvas Mar 19 15:03:40 not sure what I should be googling here, or if my quesiton makes sense Mar 19 15:03:49 i'm probably just a noob and need to learn more... Mar 19 15:18:48 can i open a file downloaded in MODE_PRIVATE using an intent? Mar 19 15:19:45 mantas322: what are you wanting to draw? just a line at a X,Y point of onTouch? if so just in ontouch pass data to your view, and onDraw on the view if data is present can draw new stuff, otherwise just paint normal Mar 19 15:23:36 does someone here use http://kotlinlang.org/docs/tutorials/android-plugin.html ? Mar 19 15:23:39 can't get it to work Mar 19 15:26:11 I do not understand those languages that make java just easier to type, like scala Mar 19 15:26:37 scala is more than that, your comparison is more apt for kotlin Mar 19 15:31:40 whatitis, thanks. Mar 19 15:31:45 * mantas322 learning. Mar 19 15:36:07 am I allowed to pastebin some code and ask for help here? Mar 19 15:36:46 of course, as long as you dont pase it directly in the chat Mar 19 15:36:51 yeah, and if someone can help, they will Mar 19 15:38:02 okay here's my class http://pastebin.com/vTZ2zuWk Mar 19 15:38:16 within DrawSpecial() , I want to draw additional lines. Mar 19 15:38:44 I'm struggling with some basic concepts here :P Mar 19 15:39:16 has anyone experimented with compiling aosp with gcc pgo instrumentation? I'm not really finding anything with teh googlez. I know on my ARM devel boards building the stack with pgo increases performance almost by an order of magnitude.. Mar 19 15:39:20 where is drawSpecial being called? Mar 19 15:39:53 from another class drawLine = new nifsab.nifsab.DrawLine(this); drawLine.setBackgroundColor(Color.WHITE); setContentView(drawLine); drawLine.setOnTouchListener( Mar 19 15:40:36 and what is special? basically, everything is getting drawn in onDraw, outside of of onDraw, you should set flags or variables/points etc... and in onDraw if a flag is set draw whatever,or if there a new points plot those etc... Mar 19 15:41:06 everything has to be drawn from onDraw Mar 19 15:41:27 and I can extend the logic within it by passing new params? Mar 19 15:41:31 that's where you get your canvas, you can draw to bitmaps outside and later in onDraw have it draw a bitmap to the canvas Mar 19 15:43:14 okay. thanks. Mar 19 15:43:34 I got an OOM error from jsoup. I DGaF about malformed tags since I'm always looking for very specific triggers to start slurping data into a type and give up on illogical things. Mar 19 15:43:53 you can make drawSpecial, draw to a new bitmap and invalidate your view, then when onDraw is called i can draw your bitmap created in drawSpecial,there are quite a few ways to go about this. if you are just drawing lines, i'd say have drawSpecial have a list of data points, like x,y,x-end,y-end or use a Path, and in onDraw reads those values and plots or draws Path Mar 19 15:44:34 cool Mar 19 15:44:38 thanks for the help. Mar 19 15:44:59 yep,just google custom view onDraw and see what comes up Mar 19 15:52:58 how do i get the path of a File without the filename? Mar 19 15:53:27 OMG Mar 19 15:53:28 I did it Mar 19 15:53:34 thanks whatitis! Mar 19 15:54:19 ukgamer: File class? Mar 19 15:54:24 getParent()? Mar 19 15:54:56 luist * Mar 19 15:54:57 ops Mar 19 15:56:09 coooool. Mar 19 15:57:00 oh thanks :P Mar 19 15:57:06 I drew somethign on a canvas, then when I touch it, I draw something else. Got alot acomplished, pretty sure i can call it a day now. Mar 19 15:58:18 woo Mar 19 15:59:11 thats what i call progress. Mar 19 16:02:22 okay. Mar 19 16:02:26 next hurdle Mar 19 16:02:35 add an image on the canvas Mar 19 16:03:41 What is new in the new beta? Mar 19 16:04:47 aside drop support for recent kotlin plugin :( Mar 19 16:21:20 does anybody use html+js for dev?is yes then what is the best method to update some local json files Mar 19 16:21:28 if* Mar 19 16:23:15 no Mar 19 16:30:34 serses, html+js belongs on the web Mar 19 16:33:34 so is there any alternative to java? Mar 19 16:34:21 serses: sure, anything that runs on the JVM, or anything you can compile via the ndk Mar 19 16:35:22 any jvm language and any native language Mar 19 16:35:54 Hello. I need to use breakpoints in SDK sources, but sources appear to be of different version from that of device binaries. This leads to the inability to put breakpoints, since there is no actual executable code where I point. How do I make android studio show me sources of the sdk currently connected to the cable? I thought compileSdkVersion would be related, but I don't want to change it just to test on all devices. Thanks. Mar 19 16:37:42 You need to find the source file used to compile the class for that device, then tell AS to use it Mar 19 16:38:46 NExus devices kind of fit with the sdk sources Mar 19 16:38:50 Emulators should fit Mar 19 16:38:58 Everything else, you're out of luck Mar 19 16:39:53 Damn MIUI Mar 19 16:40:41 Is it even possible to connect MIUI sources to AS? Mar 19 16:47:16 But it is a different question and probably googlable. Thanks, SimonVT Mar 19 17:45:05 Could be big news for Android developers: http://blog.jetbrains.com/kotlin/2015/03/kotlin-m11-is-out/ Mar 19 17:48:41 What is Kotlin? Mar 19 17:48:56 x_x Mar 19 17:49:08 a programming language for java machine Mar 19 17:49:10 https://en.wikipedia.org/wiki/Kotlin_(programming_language) Mar 19 17:50:06 lol thanks i was reading that Mar 19 17:50:30 so I can use this to program Android but only in IntelliJ? Mar 19 17:50:33 or AS? Mar 19 17:51:03 I think so. They are, from what I read, gonna make an Eclipse plugin eventually. Mar 19 17:51:06 You should be using AS anyway. :D Mar 19 17:51:54 * tricknology covers ears Mar 19 17:52:04 I’m starting another freelance project soon Mar 19 17:52:17 maybe I’l not be so quick to jump the ship when I can’t find a setting Mar 19 17:52:48 Unless you're doing NDK stuff, I doubt there'll be any show-stoppers. Mar 19 17:53:05 so.. I have this layout that changes visibility and it’s supposed to occupy 100% of the screen, however the toolbar still shows Mar 19 17:53:38 this is because the parent that the in/visible layout is in has the attribute: android:layout_marginTop="?attr/actionBarSize" Mar 19 17:54:01 question is, how do I extend this layout past its parent? Mar 19 17:54:44 As far as I know, it's not possible. Are you sure you want this visibility-changing View to be a child of the "must be beneath the Toolbar" ViewGroup? Mar 19 17:54:46 or do I jsut make a layout that sits at the top of the parent with height=“?attr/actionBarSize" and the other layout below that? Mar 19 17:54:58 i don’t, no Mar 19 17:55:17 I see waht you’re saying Mar 19 17:55:32 make it the parent? Mar 19 17:56:01 or sit above the parent and wrap it? Mar 19 17:56:24 Couldn't it just appear in front of everything (including the Toolbar)? Mar 19 17:56:35 that’s waht I want it to do. Mar 19 17:56:42 it’s basically a loading screen Mar 19 17:57:30 If you use height="match_parent" and width="match_parent", and ensure that it is declared last in the XML file, that should work fine. Mar 19 17:58:08 it is last Mar 19 17:58:28 but the parent (outer relativelayout) has attribute: android:layout_marginTop="?attr/actionBarSize" Mar 19 17:58:44 so if i match parent it will/does have the same margin Mar 19 17:58:53 It shouldn't be in that ViewGroup. Mar 19 17:58:58 maybe I should just plop a fragment over it Mar 19 17:59:01 It should be in the top-level ViewGroup. Mar 19 17:59:10 so wrap the wntire thing in another viewGroup.. Mar 19 17:59:13 It should be a sibling of the Toolbar. Mar 19 17:59:18 ok cool Mar 19 17:59:28 And then just appearing in front of the Toolbar. Mar 19 17:59:40 (In terms of z-order.) Mar 19 18:00:27 I guess you could use a Fragment, alternatively. Some people would prefer a Fragment; some would prefer pure View stuff. Mar 19 18:01:06 well I think i might be using it a lot of places so maybe I should switch gears and go for a fragment Mar 19 18:01:26 and jsut add/remove it at my lesiure Mar 19 18:01:46 i downloaded a file into MODE_PRIVATE, how can i allow an Intent to open it?? Mar 19 18:01:51 Another option would be a custom View of some kind. Mar 19 18:02:04 is it okay if I name my next track/song after you TacticalJoke? Mar 19 18:02:15 and inflate it? Mar 19 18:02:30 You're writing music? Mar 19 18:02:42 I have since 2001 Mar 19 18:02:44 on and off Mar 19 18:02:59 Nice. Mar 19 18:03:14 this is the one I’m working on now Mar 19 18:03:15 https://soundcloud.com/zak-bot/duckument-grapes3/s-s9tiB Mar 19 18:03:28 electronic music.. warning Mar 19 18:05:44 Sounds good! Kinda hypnotic. Mar 19 18:06:47 the word pair "tactical joke" does sound like something you'd hear in a hip hop / rap dialogue Mar 19 18:07:01 lol Mar 19 18:07:42 You can use my name if you like, tricknology. Mar 19 18:08:09 "and when the feds come and find him gone it was a tactical joke all along" Mar 19 18:08:21 TacticalJoke: ah, that reminds me. I thought of an alternate username for you, since you mentioned "TacticalJoke" is a bit unprofessional. how about "TacticalBloke"? Mar 19 18:08:26 *they'll know it was ... Mar 19 18:09:14 That works well with the English thing. :D Mar 19 18:12:50 Hello Mar 19 18:13:01 I need a help with webview Mar 19 18:14:37 I have a website that uses php form i want to convert this into android app Mar 19 18:15:47 Can anybody help with this Mar 19 18:16:02 hmm? Mar 19 18:16:28 webview.loadUrl("your site")? Mar 19 18:16:51 It just gives the site view Mar 19 18:17:10 well... what exactly do you want to happen? Mar 19 18:17:13 Nothing is passed Mar 19 18:17:29 I want to open the website in my app Mar 19 18:17:31 ok Mar 19 18:17:37 im with you so far Mar 19 18:17:42 And use it as in a browser Mar 19 18:18:09 so you want to open other pages of your site inside the webview? Mar 19 18:18:21 Ya Mar 19 18:18:31 I have a form also Mar 19 18:18:38 Thanks TacticalJoke :) Mar 19 18:18:53 Which passes data using post method Mar 19 18:19:08 you need to create a new webviewclient Mar 19 18:19:15 and override the shouldOverrideUrlLoading Mar 19 18:19:27 just do this http://www.cnet.com/how-to/how-to-add-chrome-for-android-bookmarks-to-your-home-screen/ Mar 19 18:20:53 How does Android detect a mobile hotspot Mar 19 18:21:01 jvrodrigues i'm a beginner Mar 19 18:21:04 Created by another Android phone Mar 19 18:21:09 I need more than that Mar 19 18:21:14 Sorry Mar 19 18:21:26 Sherlock_regus: http://developer.android.com/guide/webapps/webview.html Mar 19 18:21:59 This is interesting: http://kotlinlang.org/docs/tutorials/android-plugin.html Mar 19 18:22:04 @groxx i have seen that its useless Mar 19 18:22:30 Sherlock_regus: it appears to cover exactly what you're asking. shouldOverrideUrlLoading in particular. Mar 19 18:24:08 Sherlock_regus: also, if you're able to use it, I'd strongly recommend using WebViewFragment instead of WebView. it handles rotation / other config changes much better than WebView. Mar 19 18:25:01 So will i have to learn android development in deep Mar 19 18:25:14 To do this Mar 19 18:25:18 Sherlock_regus: http://developer.android.com/guide/webapps/webview.html#HandlingNavigation Mar 19 18:25:22 everything is in there mate Mar 19 18:25:26 very simple :) Mar 19 18:25:30 literaly 5 lines of code Mar 19 18:25:58 to build an android app, generally yes. though I have seen some "make me an app" generators that might do it for you. (I'd have to go looking for them though, I don't remember them very well) Mar 19 18:27:51 In a couple of hours I built a seemingly fully functional app (that the client loved) usign only webview and their already responsive website design Mar 19 18:28:04 very funny Mar 19 18:28:17 easiest app i ever built Mar 19 18:29:00 So, Sherlock_regus, to answer your question, no, you do not need to learn android deep to build a webview app, but your app will never be as good as if it was native. Mar 19 18:29:07 we have an "app" like that Mar 19 18:29:25 gotta be careful if you're making one for the ios side too, getting it by app review can be difficult Mar 19 18:29:28 Does anyone know how to vibrate without using the Notification class or NotificationManager? I WANT to use the Vibrate class, which is easy... but I want to vibrate like the default vibrate. Mar 19 18:29:48 eghdk naughty naughty Mar 19 18:30:50 Well, I want to play a notification but not show the graphical notification. Mar 19 18:31:09 but I can't seem to figure that out, so I'm just going to do it myself. Mar 19 18:31:39 any advice jvrodrigues ? Mar 19 18:31:41 Kk thnk u Mar 19 18:31:58 Will the website work with xampp Mar 19 18:32:07 I mean the app Mar 19 18:32:20 eghdk: you could always look up what the notification source file does to vibrate by default Mar 19 18:34:32 eghdk all i can think of is vibrate, i never really noticed it vibrates differently from the notification Mar 19 18:35:37 Vibrate.vibrate() needs an argument Mar 19 18:35:41 eghdk a quick run through the android reference on the vibrator class gave me the answer you wanted Mar 19 18:35:42 so Mar 19 18:35:49 i sugest you begin there Mar 19 18:36:13 damn. you're able to access d.android.com? Mar 19 18:36:17 seems down for me right now Mar 19 18:36:42 eghdk: Working fine here. Mar 19 18:37:17 same here Mar 19 18:37:27 Loaded. jvrodrigues I'm looking at the source now for Vibrator. Mar 19 18:37:39 nice oen Mar 19 18:37:46 Where would I look? Mar 19 18:38:24 It doesn't seem like any vibrate methods accept DEFAULT_VIBRATE from Notification class. Mar 19 18:38:31 how to handle differently a GCM Message, wether the application is in foreground (switching activity, do not display notification), background (switching actity on notification click), closed (open the app) ? Mar 19 18:40:49 and there is so many cases to handle Mar 19 18:41:09 is there some tool for that ? Mar 19 18:42:32 blusky -> otto event bus seems like what you're looking for Mar 19 18:42:48 the logic is, the application receives a gcm message and sends a particular event Mar 19 18:43:19 blusky: OnUserLeaveHint of Activity class? Mar 19 18:45:01 Spannable >> Html.fromHtml? Mar 19 18:45:09 jvrodrigues: Any help here? I don't see what you could have been talking about, about the vibrator class. Mar 19 18:45:20 tricknology: nice tracks Mar 19 18:46:09 eghdk: grep default vibrate android Mar 19 18:46:17 *google grep default vibrate android Mar 19 18:47:37 lasserix: I want to vibrate for the default vibrate amount of time, which Notification can accomplish, but I don't want to show a notification. Mar 19 18:48:20 I've come to the conclusion that I have to use the Vibrate class, but according to the source... https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/Vibrator.java none of it's methods will do a default notification vibrate Mar 19 18:50:37 eghdk: so make your notification dummy transparent Mar 19 18:50:54 lasserix: Oooh. Mar 19 18:50:55 eghdk: yes that's why you use google to inspect what default is and then use those values Mar 19 18:52:15 lasserix: Wait, lasserix I'm not looking for a quick answer, I'm just trying to really figure this out. From what you just said, I have two options... make a transparent notification... OR Vibrate using the default value? Mar 19 18:52:34 umm do notifications do vibrate automatically? Mar 19 18:52:35 i dont know Mar 19 18:52:58 in that case, i've seen you can make essentially a hidden notification by making it transparent and maybe autodismissing it or something Mar 19 18:53:10 sigh... eghdk mVibrator.vibrate(time, AudioAttributes.USAGE_NOTIFICATION); its all in the reference mate Mar 19 18:53:22 if not, then grep the source, pull whatever DEFAULT vibrate is, and use that. tho maybe default vibrate is different per device type Mar 19 18:53:26 hum not sure about api level Mar 19 18:53:30 ^^^ Mar 19 18:53:50 Maybe I can rephrase my question... if I don't want to use the Notification class at ALL, is there any way to just use the vibrate class to default vibrate? Mar 19 18:54:15 the answer is yes! Mar 19 18:54:16 jvrodrigues: Yes, I see that but like I said, the vibrate method takes a time. Mar 19 18:54:24 yes it does take a time Mar 19 18:54:38 I don't want the time to be hard coded, I want it to be taken from the device default notification vibrate time. Mar 19 18:54:39 so find the time that notification defines as the default, and use that value Mar 19 18:55:06 ah. maybe it can be reflected? Mar 19 18:55:37 using reflection to solve this issue is like using nails to fix a broken plate me thinks Mar 19 18:56:10 Am I making sense groxx jvrodrigues and lasserix or am I just missing something stupidly simple here? Mar 19 18:56:43 I mean, does my problem make sense? Mar 19 18:57:22 yay http://www.reddit.com/r/androiddev/comments/2zl1y4/kotlin_m11_is_out_including_multiple_constructors/ Mar 19 18:58:57 eghdk: http://androidxref.com/5.1.0_r1/xref/frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java defines a default vibrate pattern. it's probably that. it's package level, so a) it's not public, and you'll need to use reflection if you want to get it, and b) it may not be defined on so you'll need a Mar 19 18:58:58 fallback anyway. Mar 19 19:00:19 ah. Thanks groxx . I really appreciate it. Still a newbie developer, don't know what reflection is... but it always seems hacky to use it, so maybe I'll look into posting an Invisible notification instead. Mar 19 19:00:56 it's a Java thing. there are plenty of googleable examples / explanations :) Mar 19 19:01:18 Yep. I've always strayed away from it, because people say it's bad... or takes a perf hit. Mar 19 19:01:36 It usually is bad :) Mar 19 19:01:39 Like in this case. Mar 19 19:01:41 both are true, though the perf hit mostly only matters if you do it a lot. Mar 19 19:03:08 Gotcha. Well then I'll learn it eventually. To complete the task at hand, I need to play a notification sound, and default device vibration, while NOT showing a notification in the tray. So maybe I'll look into seeing if that's possible. Let me know, if you guys happen to know the answer to that. Mar 19 19:03:31 eghdk: just hardcode the default notification value Mar 19 19:03:50 It shouldnt change much from device to device Mar 19 19:04:01 yeah, it does seem unlikely to change Mar 19 19:04:16 plus most apps have different notifications sounds/vibrations so chances are your average user will not even notice it Mar 19 19:05:01 jvrodrigues: Yes, I know that I can use NotificationCompat.Builder to setVibrate and setSound to defaults. I just need to figure out, how to not display the notification itself Mar 19 19:07:17 groxx: the only reason I care is because I notice a difference on two devices. Mar 19 19:07:30 One device does one vibrate, while the n6 vibrates twice Mar 19 19:07:54 so I know it's not a huge deal, but I'd like to have a future proof solution. Mar 19 19:08:22 eghdk: the problem is that because it's not part of a public API, there _is_ no future proof solution Mar 19 19:08:52 so no matter what you do, you'll need to do , and have a fallback if x fails. Mar 19 19:09:10 groxx: Exactly. So what do you think of my solution of using Notification and Build with DEFAULT_ALL, but not showing the notification? Mar 19 19:09:41 eghdk: dunno. if it works, sure, but I don't personally expect it to :) it may though. Mar 19 19:09:43 ty lasserix :) Mar 19 19:10:03 That way, I'll get what I want. Default audio. Default vibration. but one of my requirements is not to show the notification itself. Mar 19 19:10:19 also if it works, it seems like it's kinda an edge case, and may change in future versions (also unlikely, but not impossible) Mar 19 19:10:38 strange Mar 19 19:10:45 SwipeRefershLayout crashes Mar 19 19:10:52 when you switch off internet Mar 19 19:10:52 wtf Mar 19 19:10:56 wat Mar 19 19:11:10 probably a feature. Mar 19 19:11:45 Yeah, any easy way that you may know of to use NotificationManager.notify() but not show an actual notification? Mar 19 19:12:15 oh, so wifi off + clear data + 5.0 Mar 19 19:12:19 + emulator Mar 19 19:12:23 but doesn't happen otherwise Mar 19 19:12:26 awesome :) Mar 19 19:14:15 doh my bad Mar 19 19:15:48 Strange. app on material is 8mb and on 4.1 is 4 mb Mar 19 19:16:40 g00s: added some logic for the disconnect and recreate a gatt Mar 19 19:16:45 seems to work just fine, thanks Mar 19 19:18:20 lasserix: app on 5.0 is 8mb and on 4.1 is 4mb? Makes sense no? dalvik vs art. Mar 19 19:18:31 oh yeah Mar 19 19:18:44 maybe i didn't understand your q Mar 19 19:20:16 SOsm Mar 19 19:20:26 Isn't textview marquee supposed to scroll across? Mar 19 19:23:02 jareddlc nice Mar 19 19:26:04 hello Mar 19 19:26:34 lasserix, oh wow i didn't even know there was a marquee mode for the textview Mar 19 19:26:44 yeah you have to set a lot of things for it tho Mar 19 19:26:48 what happens if a GCM message is sent to a device that is not connected to the internet at that time? is it queued and for how long? Mar 19 19:26:55 marquee margue mode focus focuseintouch Mar 19 19:26:55 hah. me neither. Mar 19 19:27:07 or does the GCM server return an error for that client? Mar 19 19:27:12 I'm going to add that in, it'll make my comic sans text alert really pop Mar 19 19:27:19 hehe Mar 19 19:28:39 Thorn, see time_to_live and collapse_key parameters in server reference Mar 19 19:28:41 hi, ive rooted my nexus and im trying to edit the hosts file , but it doesnt seem to be taking effect.. Mar 19 19:28:48 everytime i ping the domain ive changed.. it still goes to the same ip Mar 19 19:29:04 ive tried restarting the device as well Mar 19 19:29:41 someone at irccloud has a sense of humor. "comic sans" is rendered in comic sans: http://cl.ly/image/1A3Y2y421U17 Mar 19 19:29:48 will do, thanks Mar 19 19:29:58 lol Mar 19 19:30:15 Thorn, but short answer is, the messages wait until they expire or are overwritten :) Mar 19 19:30:24 jareddlc what i'm working on now is if connection fails, retry connection with BLE device in direct mode N times, and then if that fails, fall over to indirect and try once Mar 19 19:31:40 any ideas? Mar 19 19:32:11 christo_m try #android-root Mar 19 19:40:39 so default ttl is 4 weeks Mar 19 19:46:27 all the slides in the stanford swift course are typeset in comic sans Mar 19 19:46:58 hmmm Mar 19 19:47:04 I have a question about Path Mar 19 19:47:14 im using Mar 19 19:47:15 path.lineTo(X,Y); Mar 19 19:47:28 and it draws a line from 0,0 to x,y Mar 19 19:47:49 you need to position your first point with "moveTo" mantas322 Mar 19 19:47:50 how can I have it draw initially from x y Mar 19 19:48:13 lineTo is drawing a line from the previous point, so if you did not set one, it will probably assume it's 0,0 Mar 19 19:48:18 is for* Mar 19 19:48:39 yes Mar 19 19:48:46 experimenting with moveTo, thank you Mar 19 19:48:52 np Mar 19 19:49:09 lineTo is relative Mar 19 19:49:23 you have also a way to draw a line with 2 coordinates, i will let you search and find that Mar 19 19:49:35 (in case you don't want to use moveTo) Mar 19 19:49:58 thats exactly what I needed. Mar 19 19:50:02 thank you adq Mar 19 19:50:04 !! Mar 19 19:51:52 they really need to make res folder recursive Mar 19 19:52:17 oops i said something wrong, lineTo is NOT relative, rLineTo is Mar 19 19:52:21 but anyway Mar 19 19:56:21 lasserix, agree... Mar 19 19:57:12 the res folder can get very messy Mar 19 20:00:25 shit. AS 1.2 is still having these dumbass window focusing problems in fullscreen mode. i tool a screenshot of my app, it popped up on some other desktop, and not i can't focus that window to save it, or close it Mar 19 20:02:02 With retrofit if i have bad request can is till get the body of the response? Mar 19 20:02:50 lasserix: yes, in failure use, error.getResponse().getBody() Mar 19 20:03:04 g00s: I can never tell if that's the fault of the app, or the windowing system. in general I lean towards windowing system :| it shouldn't be _possible_ for that to happen. Mar 19 20:03:20 yeah, OS X keeps losing dialogs all over Spaces Mar 19 20:03:35 even in non-Java apps Mar 19 20:03:37 groxx i lean towards app, becuase my other apps don't do it /but they aren't written in java/ Mar 19 20:03:43 java just fucks everything up everywehre Mar 19 20:04:07 Mavrik lol, so you have that problem :D Mar 19 20:04:12 yeah. and sometimes AS appears in the bottom left corner, taking up like 100x20px in total. AND occasionally windows spawn partially or entirely off-screen, which also shouldn't be possible. Mar 19 20:04:31 g00s, yeah, if I'm on another space when dialog appears in AS, it'll just be wherever Mar 19 20:04:35 ^ OSX specific rant, btw. though I see similar things in every OS. Mar 19 20:04:47 g00s, and when I refocus the spaces will jump up and down and the dialog will appear back on the AS desktop Mar 19 20:04:49 O.o Mar 19 20:05:34 Mavrik yes, thats the exact problem i have Mar 19 20:05:47 it just boggles my mind that windowing systems seem to always lack some sort of "is window location insane? then center it." logic. Mar 19 20:05:49 yeah, that happens even with non-AS dialogs Mar 19 20:05:56 how do you fix it? i usually focus on the full -window version and press escape or something Mar 19 20:06:00 sometimes some app will show a dialog that won't display in mission control Mar 19 20:06:03 sometimes it works Mar 19 20:06:04 and then it's impossible to close it Mar 19 20:06:08 or find it Mar 19 20:06:09 sometimes alt-tab will fix it Mar 19 20:06:10 fffuuu Mar 19 20:06:14 and then you go bash Apple devs on the head :P Mar 19 20:06:14 s/alt/cmd/ Mar 19 20:06:22 groxx, yep, but not always -_- Mar 19 20:06:23 get those pple devs over here Mar 19 20:06:40 yeah, I have no reliable fix. aside from bashing apple devs. (and all other windowing-system-writers) Mar 19 20:06:43 yall need to install gentoo Mar 19 20:06:47 just saying Mar 19 20:07:01 I like to go to iphonedev sometimes and casually troll people there. Mar 19 20:07:24 "Guys, if I set my phone background to black instead of an image or white, I will save battery right?" Mar 19 20:07:38 lame Mar 19 20:07:40 "cause it takes more power to color a pixel white than it does to color a pixel black." Mar 19 20:07:49 then they get into huge arguements. Mar 19 20:07:50 ahaha Mar 19 20:08:01 HAHAHAHAHAHAH Mar 19 20:08:07 iphone devs are funneh Mar 19 20:08:17 thats so painfully asurd Mar 19 20:08:45 well, that's true for oled screens ;) Mar 19 20:09:04 I wonder if it ends up being true (or backwards) for eink screens too Mar 19 20:09:29 i think eink would save battery by just not changing whatever was already there Mar 19 20:09:33 nah, for eink it's just the process of changing a pixel that requires power. dosen't matter if it's white->black or black->white Mar 19 20:09:37 is it "legal" to motivate your users to rate/review your app on google play on your app? like asking them from time to time with a dialog? Mar 19 20:09:41 interesting g00s i thought of doing something similar after x tries let user know something went horribly wrong Mar 19 20:09:53 TacticalJoke: AS 1.2's in-line debugging info is better than I thought initially. check this out: http://cl.ly/image/100A0z0B271f Mar 19 20:10:11 what's the correct way to delay onPerformSync() for a few minutes? I currently use Handler.postDelayed() to trigger the sync in my GCM broadcastreceiver but it seems that the thread is sometimes killed before the delayed callback fires (when the app is not in foreground) Mar 19 20:10:23 Mattx: I keep wishing it weren't, but so many apps do it, I assume the answer is either "yes" or "they haven't decided". Mar 19 20:10:27 Oh, that's neat. Looks like a potential huge time-saver. Mar 19 20:10:39 yeah, showing _all_ variables in play is pretty awesome Mar 19 20:10:56 I'm going to have an item in the sliding menu for that, I hope it is ok Mar 19 20:11:24 Mattx: i think the "generally accepted" solution is to ask once after X number of app runs what a user thinks of the app, and you can do some spinning here: one button saying "it's great!" goes to the google play rate app page, other buttons email the developer privately Mar 19 20:11:28 I'd put it at the bottom of the settings Mar 19 20:11:32 so you can avoid bad reviews from that popup Mar 19 20:11:33 and no dialog Mar 19 20:11:51 Spoom, yeah, that is my approach Mar 19 20:11:55 Thorn: depends. if it only matters while the app is running, postDelayed is probably the easiest. if it makes sense to wake the app up to handle the event, AlarmManager Mar 19 20:12:04 but please, only ask once Mar 19 20:12:30 or at least offer a way to turn them off :'( they're so annoying. Mar 19 20:13:11 Yeah, I hate those things. Mar 19 20:13:29 If I had been thinking of giving a rating, there's around a 100% chance that I won't after seeing one of those. Mar 19 20:13:32 groxx: in my case the sync is triggered by a gcm message. the delay is for throttling to avoid overloading the server. if there're no other threads running the delayed handler may never fire Mar 19 20:14:09 apparently android decides the broadcastreceiver is done and kills the process Mar 19 20:14:26 so I want to move the delay into the onPerformSync() itself Mar 19 20:14:36 assuming that's even a good idea Mar 19 20:14:58 Thorn: yeah, broadcastreceiver behaves that way. I'd use an alarmmanager to register an alarm to do the actual sync, and think about if a _wakeup alarm makes sense or not. Mar 19 20:15:29 probably have the alarm just start up an intent service, and do the sync synchronously (if easy). Mar 19 20:15:59 that way you'll have a service, which prevents you from dying while it's doing stuff, and it's easy to make wakeful if necessary. Mar 19 20:16:00 oh ok I understand you now Mar 19 20:18:43 Thorn, broadcastreceiver is not a lifecycle container Mar 19 20:18:49 well the syncadapter.onPerformSync() runs in its own service afaik, the problem is making it run after a delay Mar 19 20:18:51 it processes onReceive and exits Mar 19 20:19:23 then spin up a service to prevent the app from exiting Mar 19 20:21:01 can I just Thread.sleep(random); in onPerformSync() ? Mar 19 20:22:12 Thread.sleep() why? Mar 19 20:22:43 so that all the devices don't hit the server at the same time Mar 19 20:22:57 random can't guarantee anything Mar 19 20:23:22 even a predefined paremeter to sleep can't guarantee anything Mar 19 20:23:35 Wow, jackhexen didn't get downvoted in that Kotlin thread on /r/androiddev. Mar 19 20:23:40 That guy gets downvoted almost always. Mar 19 20:23:49 TacticalJoke what did he do / not do ? Mar 19 20:24:01 insult TacticalJoke Mar 19 20:24:12 In the various threads about statics recently, he's been downvoted for saying "It's sometimes okay to use statics" and stuff. Mar 19 20:24:14 I've been backing the guy. Mar 19 20:25:07 mikedg: invisiwdget doesn't work on N4 Mar 19 20:25:10 fix Mar 19 20:26:46 TacticalJoke i don't pay much attention to /r/androiddev - mostly just skim top 10 when i wake up to see if anything earth shattering happened in android land while i was sleeping Mar 19 20:26:49 Oh, he got downvoted for asking what "DSL" meant. (That's kinda understandable -- Google is God.) Mar 19 20:27:00 Yeah, it's a bit crazy in that there subreddit. Mar 19 20:27:14 most subreddits really Mar 19 20:27:51 JakeWharton: i'll fix it when i'm at i/o, get me a ticket Mar 19 20:27:51 whatever you write on /r/ will be misinterpreted in the most amazing ways, causing a cascade of downvotes Mar 19 20:28:03 mikedg: reboot fixed it Mar 19 20:28:06 move along Mar 19 20:28:55 i'll break it until i get an i/o ticket Mar 19 20:28:58 I got into a debate about parenting yesterday and someone downvoted everything I've posted on reddit in the past several months. Mar 19 20:29:01 Seriously, asking for “What is a DSL” on reddit is dumb Mar 19 20:29:02 TacticalJoke: it's a poor place to ask such a Google-able question. we see the same thing in this channel Mar 19 20:29:05 Even useful Android-related answers. Mar 19 20:30:06 Yeah, Google is my go-to guy for everything. I even google things like "brown shoes black suit" to see whether that's acceptable. :D Mar 19 20:30:19 TacticalJoke lol you got retroactive downvoted :D Mar 19 20:30:33 is there a good / best / recommended way to detect when a view is being "paused" / no longer visible, and e.g. pause orientation listeners or animations? from within a view, not from an activity/fragment, if possible. Mar 19 20:31:02 g00s: It was easy to tell because I had a bunch of 1-score comments that are now all 0. :D Mar 19 20:31:22 hello Mar 19 20:31:48 good evening Mar 19 20:32:39 werd Mar 19 20:33:08 TacticalJoke: This guy has a seriously condescending attitude, maybe it’s cultural Mar 19 20:33:22 I want to clear my canvas Mar 19 20:33:30 Maybe. I think his first language is not English, too. Mar 19 20:34:01 I feel weird that there are regulars in there who don't come in here. Who are these people?! Mar 19 20:34:14 Obvsly this place is superior. How can they not know that. Mar 19 20:34:33 don't invite them :D Mar 19 20:34:37 lol Mar 19 20:39:49 random question: what percentage of people who listen to music while they work out listen to, say, their own audio files on their device, vs. say an internet stream? Mar 19 20:40:15 What do you guys think of this UI for a main screen? https://vid.me/Uilc Mar 19 20:40:23 what would spotify count as? it can be downloaded locally and played, or streamed. Mar 19 20:40:36 I listen to downloaded YouTube videos pretty much exclusively now (often pieces of between 30 minutes and two hours in length). Mar 19 20:40:49 groxx: showing my ignorance here, but can spotify audio be played outside spotify? Mar 19 20:40:54 no Mar 19 20:40:57 Spoom: nope. Mar 19 20:41:04 ah, that would be a problem for my app idea Mar 19 20:41:13 play music too Mar 19 20:41:38 all DRM'd up, i would imagine Mar 19 20:41:43 yup Mar 19 20:41:59 too bad Mar 19 20:42:20 was considering making an app that would essentially beatmatch your music to your running pace Mar 19 20:42:27 I'd assume the percentage or "normal" people who put mp3s manually on their phones is pretty small Mar 19 20:42:30 but doing that with a stream would be nigh impossible Mar 19 20:42:50 (or at least require the assistance of the stream provider) Mar 19 20:43:21 eh... you can kinda treat streams as normal files. you might just need to buffer a bit further ahead than normal. Mar 19 20:43:36 drose379: That looks good. I think one of "Public" and "Private" should be selected by default (maybe the previous value?). Do you really need those toasts? (Isn't there already UI feedback making it clear what has happened?) Mar 19 20:43:40 Spoom don't know how much access you get but https://developer.spotify.com/technologies/spotify-android-sdk/ exists Mar 19 20:43:52 or you would just need to be able to query song for BPM Mar 19 20:43:53 ooh, interesting Mar 19 20:43:58 "does not have functions for metadata lookup" oops Mar 19 20:44:05 assuming you want to match the steps with the rythm Mar 19 20:44:22 TacticalJoke , good idea, Ill prob select "Private" by default just so accidents dont happen. and the toasts (snackbars) only pop up when there is a response from a server Mar 19 20:44:29 (the heart would work for bpm too) Mar 19 20:44:36 So basically the snackbars are there to confirm that the action was successful Mar 19 20:44:39 oh didn't read far enough again, it's still possible Mar 19 20:44:43 i would stretch / compress the music to the workout rhythm Mar 19 20:44:57 I see. I would be tempted to say that you should say nothing unless there's an error, because I think it's obvious what's going on. Just my opinion, though. Mar 19 20:45:09 (or the closest factor of two of that rhythm) Mar 19 20:45:15 I like that idea actually TacticalJoke , thanks Mar 19 20:45:35 Hey have I told you about a part I think im gonna work on next? Mar 19 20:45:44 I don't think so. Mar 19 20:45:49 not sure i would like a song i know to be stretched, except extremly with paul stretch algo :) Mar 19 20:46:08 memorion + Spoom: there's an AudioController interface that might be able to do that, though you'd need a beat-detecting lib + buffer a bunch, not sure if that's easily possible. Mar 19 20:46:26 i have some ideas there Mar 19 20:47:15 looks like the spotify SDK allows access to raw PCM data, which might actually work Mar 19 20:47:22 i wonder if pandora has something similar Mar 19 20:47:38 nooope Mar 19 20:48:24 https://developer.spotify.com/web-api/object-model/ doesn't look like it can give you the bpm or something like that Mar 19 20:48:48 yeah, i wouldn't think i'd have an easy source of bpm data Mar 19 20:49:03 i'd have to measure it and probably store it on a server (so i don't have to measure it every time) with some sort of audio fingerprinting Mar 19 20:50:37 is it possible to destory a previously drawn path on a canvas. Mar 19 20:50:45 http://the.echonest.com/ can give you everything you need it looks like Mar 19 20:51:10 That Kotlin post isn't even number one on /r/androiddev. Mar 19 20:51:18 People should be like "Zomg, Kotlin" by now. Mar 19 20:51:53 mantas322, yes you can reset() or rewind() Mar 19 20:52:07 or create a new path object (don't do that) Mar 19 20:52:27 mantas322, you should read the documentation, even the 0,0 is explained in the lineTo doc Mar 19 20:52:55 Spoom here is a library for the echo nest api https://github.com/echonest/jEN Mar 19 20:53:23 I see, thanks. Mar 19 20:53:32 thanks! Mar 19 20:53:48 Spoom happy to help Mar 19 20:54:27 heck yes Mar 19 20:54:58 .reset() on the path worked for me. Yeah, I'm still a little confused as to how canvas works Mar 19 20:55:18 thanks again adq, you've been very helpful today. Mar 19 20:55:55 there should be something like the reddit bots you can use to tip people for irc Mar 19 20:56:06 canvas is like a sheet of paper, your drawing operations are like a pen, and your paint associated to your drawing op are like the color, size, etc of your pen Mar 19 20:56:08 simply as that ;) Mar 19 20:58:06 but when it comes to paths, you can like , referrences them. Mar 19 20:58:10 it's not just flattened Mar 19 20:58:13 esspecially with animartions Mar 19 20:58:39 anywhom, I'm callin it a day. thanks guys. Mar 19 20:58:44 cyas Mar 19 20:59:49 "Kotlin and Java files can now reside in a single source folder" Mar 19 20:59:57 \o/ Mar 19 21:00:07 kotlin is fairly bad Mar 19 21:00:10 imho Mar 19 21:00:25 What's bad about it? Mar 19 21:00:41 harder to read => harder to maintain Mar 19 21:00:54 java is fine the way it is Mar 19 21:01:02 o.O Mar 19 21:01:06 weird. so turning off the screen doesn't imply a view is not-visible? so is there a way to know in a custom view if "I should update because I'm displayed", without requiring onScreenStateChanged + onVisibilityChanged? (since oSSC is APIv16+ only, which is too recent) Mar 19 21:02:12 Java might be easier for you to read because you're used to it. I think one of the main goals of Kotlin is to have the power of Java without all the bloat (which means things are easier, not harder, to read). Mar 19 21:03:25 the bloat is the reason I like java so much Mar 19 21:04:19 ive done extensive php and javascript programming and i find that anonymous types are more annoying than helpful Mar 19 21:04:26 to name one example Mar 19 21:04:41 they make maintaining the code a lot harder Mar 19 21:04:43 and to be honest Mar 19 21:04:51 those are both dynamic languages Mar 19 21:04:52 ive been a java developer for sometime now Mar 19 21:05:08 with hard static typing anonymous types are usually unambiguous Mar 19 21:05:10 most of my time is spent thinking not coding Mar 19 21:08:56 Kotlin has real advantages: first-class functions, extension functions, concise syntax, null safety, implicit casting, etc. I can understand not wanting to change language, but sometimes the benefits outweigh the drawbacks. Having said that, I doubt anyone will ever *have* to switch from Java for Android programming. Mar 19 21:10:26 I look forward to using kotlin one day but I'm not up to a level in java proficiency that I'd really benefit right now Mar 19 21:10:56 TacticalJoke one thing that didn't come is annotations though Mar 19 21:11:06 Yeah. Are they gonna add annotation processing? Mar 19 21:11:21 no idea Mar 19 21:13:20 i think all the android bluetooth stack devs just got up and left / quit Mar 19 21:13:22 https://code.google.com/p/android/issues/detail?id=69834 Mar 19 21:15:25 i was going out of my mind, using autoConnect=true but seeing android log /false/ ... Mar 19 21:15:47 seems to deserve a (╯°□°)╯︵ ┻━┻ Mar 19 21:15:59 they all need death by firing squad Mar 19 21:16:47 This Bluetooth stuff sounds uber-stressful. Mar 19 21:17:25 TacticalJoke if they spent like 20 minutes doing a code review, somebody that knew anything about java would have said "holy sh$#! wTFFF" Mar 19 21:17:28 they are too busy posting animated gif... Mar 19 21:17:58 Mar 19 21:18:06 the java side of BLE is mostly just a shim / wrapper for a service - its really hard to fuck this up! Mar 19 21:18:09 and they did ! Mar 19 21:18:33 90% of the BLE apis are: void foo(bar) { service.foo(bar); } Mar 19 21:18:50 in eth android framwork, just calling aidl onto the bluetooth manager Mar 19 21:19:31 which in turn, then just passes down into native code / bluedroid Mar 19 21:19:35 is it possible to build your own wrapper? Mar 19 21:19:46 I mean, shouldn't be necessary, but it might be a fix Mar 19 21:19:47 i'd have ot track changes to the aidl for each android version Mar 19 21:20:11 should be doable though Mar 19 21:22:17 the problem i'm having now is that when one device disconnects, it destabilizes the BT manager and causes all the connected devices to disconnect which - could be bad reviews if people think my software is at fault Mar 19 21:22:32 Can anyone tell me how to restart an InputMethodService? (I need to do it so setTheme() will take effect) Mar 19 21:22:33 not sure what to do there, maybe some analytics to see how often this happens and take it from there Mar 19 21:30:50 Ahoy Mar 19 21:32:45 * JesusFreke hands lasserix some Chips Mar 19 21:33:28 JesusFreke are you by any chance in puncing distance of the android bluetooth guys ? Mar 19 21:33:32 *punching Mar 19 21:33:43 g00s: no idea who they are :) Mar 19 21:33:55 maybe they dont exist any more :| Mar 19 21:35:10 g00s ask chet and tor to get one on the podcast so he has to reveal himself :D Mar 19 21:36:00 :D Mar 19 21:36:41 AS canary update 1.2preview3 Mar 19 21:37:43 adq it was out yesterday, but no release notes from what i can tell Mar 19 21:38:07 i thought maybe they recalled it but if you see it then ... :) Mar 19 21:38:34 oh Mar 19 21:39:59 what does the bar do in Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK. Is it OR Mar 19 21:40:28 no sets both Mar 19 21:40:31 it* Mar 19 21:40:41 android_sandwich: it adds them together, and since they are ints, it is a logical OR, yes. Mar 19 21:41:02 I see. Thanks Mar 19 21:45:09 Can anyone help me figure this out? So have retrofit error, trying to convert it to an object from the body using bodyAs. Except, the body is of the form [{...}] where the top is a jsonarray but always with a single jsonobject inside. Mar 19 21:45:15 Without changing server, how can I covnert it? Mar 19 21:46:50 lasserix you need to create a json deserializer in your object Mar 19 21:47:07 why cant i just use bodyAs Mar 19 21:47:15 then use a serializedname / expose object Mar 19 21:47:21 like every other object i convert Mar 19 21:47:56 and more importantly, why when inspecting the error, can i not see the values in the json at all? Mar 19 21:48:17 Does 400 Bad Request jsut not grab body? Mar 19 21:48:36 Thorbear: it doesn't really add tho. FLAG_FOO | FLAG_FOO = FLAG_FOO ... generally not what you'd expect addition to do Mar 19 21:49:10 good question, last time i had to do it i just created a deserializer in my objectanf got the json as an array Mar 19 21:57:08 Nah i dont Mar 19 21:57:09 but thanks Mar 19 22:03:25 Should you label activities that are only ever started from activities in your app? Mar 19 22:11:42 CedricBeust what do you think of kotlin m11 ? Mar 19 22:26:13 would appreciate some help with android exception breakpoints if anyone’s here: http://stackoverflow.com/questions/29138227/how-do-i-properly-set-an-exception-breakpoint-in-android-studio Mar 19 22:27:43 If a fragment is added to stack is it automatic poped when pressing back ? if i add one to stack and then press back and rotate device.. it returns to the state before back was pressed Mar 19 22:28:10 myke: I know, my wording was a bit off. In my head the bit-patterns are just added together. Mar 19 22:31:24 hey Leeds Mar 19 22:31:38 morning Mar 19 22:31:52 What's the launchMode for an activity that can be started from two different activities, but I only want one instance as part of same task? Mar 19 22:31:57 singletop with reorder? Mar 19 22:38:36 singletop or singleinstance both work for me Mar 19 22:41:56 bankai_ https://i.imgur.com/MGKpdM9.gifv Mar 19 22:42:40 awwww isn't that cute Mar 19 22:44:48 jake would float around the pool in a turtle pool http://www.potterybarnkids.com/products/turtle-toddler-pool/ Mar 19 22:45:04 yo dawg! i heard you like pools so we put a pool in your pool Mar 19 22:49:01 so you can float while you float :D Mar 19 22:53:19 wowser. soft input mode = adjustPan + rotate => massively glitched rendering. Mar 19 22:53:24 I can even screenshot it Mar 19 22:53:40 https://github.com/eleks/rnd-android-wear-tesla nice, now I just need a smartwatch and a tesla Mar 19 22:55:40 8 hours to build an app - i got this Mar 19 22:55:43 lol Mar 19 22:58:14 takes 8 just to do a build Mar 19 23:00:45 i'm wondering if anyone has seen this book one android + beaglebone http://shop.oreilly.com/product/9781784392161.do Mar 19 23:00:46 <_genuser_> hey guys. Mar 19 23:00:51 <_genuser_> anything fun you're working on? Mar 19 23:02:37 Revision control is the only thing keeping me sane. Mar 19 23:03:01 "hg rev -aC" all the things. :) Mar 19 23:03:23 Actually, that's redundant. It'd have to be "'hg rev -aC' the things". Mar 19 23:03:30 I'm working on eating this giant Torts😉 Mar 19 23:03:35 Or "hg rev -C" all the things. Mar 19 23:03:44 torta Mar 19 23:10:06 is it possible to add a spinner selector to a recyclerview? Mar 19 23:10:14 dp should be relatively same size on all devices? Mar 19 23:10:25 if i set textsize to 14 dp it should be same size on all devices? Mar 19 23:10:28 yes i know sp blah blah Mar 19 23:10:37 should be Mar 19 23:12:27 hmm Mar 19 23:12:43 on one phone it is literally illegabily small but on every other it is fairly large Mar 19 23:14:00 <_genuser_> weren't dp for dots per inch? then it would be dependent on the phone and it's resolution. Mar 19 23:14:10 no Mar 19 23:14:16 dp is density indpendent pixel Mar 19 23:14:18 same as dip Mar 19 23:15:05 <_genuser_> oh i just googled it. you're right. Mar 19 23:17:48 I notice that a lot of English-as-a-foreign-language speakers say stuff like "It allows to reuse code". If they merely added 'you', they'd sound like native speakers: "It allows you to reuse code". Mar 19 23:21:18 <_genuser_> TacticalJoke: lol, if they spoke like natives, how would you know who's who online :p Mar 19 23:21:40 :D Mar 19 23:22:03 Here's an example from the Kotlin documentation: "These conventions allow to write LINQ-style code:" "allow us" would be perfect there. Mar 19 23:22:30 oh man, did you ever read french source code/documentation? Mar 19 23:22:35 it's funny if you can tell someones native language by their mistakes Mar 19 23:22:46 so funny man, so so funny Mar 19 23:22:49 wtf Mar 19 23:22:54 300dp and it's like 0 Mar 19 23:23:06 <_genuser_> like indian people always say, "few years back". or I had done this two weeks back. Mar 19 23:23:16 <_genuser_> and some english. most others tend to say weeks ago. Mar 19 23:23:25 most indian english speakers are actually native english speakers Mar 19 23:23:33 the indian english is just a bit broken Mar 19 23:23:34 <_genuser_> nothing wrong with either. just noticed that quite a bit. Mar 19 23:24:17 <_genuser_> jvrodrigues: I wouldn't say native. altho, most of them speak it. there's always a mother tongue and english/hindi as 2nd/3rd languages that they speak from childhood. Mar 19 23:24:40 <_genuser_> but I suppose a country by itself tends to take language in its own direction. Mar 19 23:24:43 jvrodrigues I just mean it's interesting if you can recognize your fellow countrymen Mar 19 23:24:48 my indian friends always said 'i have a doubt' Mar 19 23:25:00 <_genuser_> g00s: that's true. instead of a question, they have a doubt. Mar 19 23:25:07 <_genuser_> my coworkers say that too. Mar 19 23:25:20 guys, my google-fu is failling me. You know this line : "Default screen margins, per the Android Design guidelines." ? Where are those guidelines?? I want to know what the other margin sizes are. Mar 19 23:25:30 16 dp Mar 19 23:25:34 ya it is though Mar 19 23:25:50 http://www.google.de/design/spec/layout/metrics-keylines.html Mar 19 23:25:57 Uhm, I'm scrolling a singel-line textview with an animation, to show all of the text. But it get cut, because there is "no more space" is there a way to buffer the ramaining text outside of the screen? So it will scroll properly and show all the text? Mar 19 23:26:12 MikeWallaceDev come on you didn't memorize that attr by now ? :P Mar 19 23:26:16 memorion, how in the world did you find that?? Mar 19 23:26:29 so weird font sizes way different for dp Mar 19 23:26:29 hey, wait a minute... you're cheating! that's a .de Mar 19 23:26:43 oops I revealed myself Mar 19 23:26:45 g00s, yeah, I'm disappointed in me too... Mar 19 23:27:08 memorion, seriously, thanks. :) Mar 19 23:27:21 MikeWallaceDev np Mar 19 23:27:30 Updating mental nationality database... Mar 19 23:27:33 That has to be on the .com somewhere... What was your search string? Mar 19 23:27:49 Not on the main thread, obviously. Mar 19 23:28:01 MikeWallaceDev: I get .co.uk if I do that stuff. Mar 19 23:28:12 Just so you know TacticalJoke , I'm Ukranian. Pay no attention to the Canadian accent. Mar 19 23:28:30 MikeWallaceDev http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-keylines-spacing works too :D Mar 19 23:28:49 The country whence Anna Fedorova hails. Nice. Mar 19 23:29:18 dragorn snow :| Mar 19 23:29:26 you betcha, eh! Mar 19 23:29:54 did palin add 'eh' after you betcha lol Mar 19 23:29:58 I'm surprised aboot that. Mar 19 23:29:59 dumbass Mar 19 23:30:09 :D Mar 19 23:30:24 I never did hear anyone say aboot though... Mar 19 23:30:36 I guess I'm too far from the coast Mar 19 23:30:41 Yeah, it's more like "abowout". Mar 19 23:30:49 HAHAHAHA Mar 19 23:31:17 Exclusive_: there's an ellipsize="marquee" option, would that work? Mar 19 23:31:46 we canadians never say that, I don't know what you guys are going on aboot Mar 19 23:32:09 You're Canadian shmooz? From where aboot? Mar 19 23:32:13 like take of eh you hoser Mar 19 23:32:18 toronto Mar 19 23:32:19 hy all Mar 19 23:32:27 Montreal! :) Mar 19 23:32:31 shmooz: Have you released your app yet? :D Mar 19 23:32:39 wait, so were you at AndroidTO? Mar 19 23:32:39 what is the difference between the old PowerManager API and JobScheduler API? Mar 19 23:32:54 TacticalJoke: no, I just started replacing the default media controller Mar 19 23:33:06 Mine is taking forever. Mar 19 23:33:21 Though I'm basically doing everything now. Soon, there'll be nothing to do. Mar 19 23:33:24 TacticalJoke: I should have a basic version in about a month Mar 19 23:34:00 shmooz, did you attend AndroidTO? Mar 19 23:34:12 no, when was that Mar 19 23:34:23 gregtom6, ugh, they're not even related. Mar 19 23:34:28 oh. October. 5th year. Mar 19 23:34:52 there's one in montreal now isn't there ? Mar 19 23:35:11 Next month. Jake is doing the keynote. I'm presenting. Mar 19 23:35:21 DroidCon Mar 19 23:35:32 cool :) Mar 19 23:35:44 where can we watch the live stream ? Mar 19 23:35:46 yeah, gonna be great Mar 19 23:36:03 Do you get nervous with public speaking? Mar 19 23:36:17 I don't think there will be a live stream. But it will be recorded. My agents wouldn't let me do it unless we had final cut. Mar 19 23:36:19 Mavrik: not related? then why there's a method called isPowerSaveMode()? Mar 19 23:36:43 TacticalJoke, nah. I'm a natural in front of people. But this is going to be a tough crowd Mar 19 23:36:49 Mavrik: I'm not an Android developer Mar 19 23:36:55 gregtom6, did you mix anything up? :) Mar 19 23:36:55 and a subject that I'm not very accomplished in yet Mar 19 23:37:00 That's good. That stuff would make me freeze up. Mar 19 23:37:10 Mavrik: what? Mar 19 23:37:11 well, that's why you didn't apply :D Mar 19 23:37:29 :) Mar 19 23:37:29 It's not as if they are kidnapping me :D Mar 19 23:37:49 droidcons and google io are the two reasons why I'd want to live in the US :/ Mar 19 23:38:07 there are many DroidCons outside the US Mar 19 23:38:21 I know but droidcon berlin looks pretty lame Mar 19 23:38:27 and I've been to I/O, it's freaking awesome. But I don't think I would go now Mar 19 23:38:39 well, Devoxx confs are rather nice in EU Mar 19 23:39:05 When I went, it was devs... Now it's press and people who want free shit. Mar 19 23:39:08 yeah, but they don't give out chromebooks :D Mar 19 23:39:12 You get more out of the videos Mar 19 23:39:31 The stuff around I/O is still pretty nice Mar 19 23:39:37 exactly. I don't want to be with the people who are only going for Chromebooks (no offense) Mar 19 23:39:48 the stuff around it is freaking awesome. Mar 19 23:39:53 Hard to get companies to pay the 3500$ price tag tho :/ Mar 19 23:40:12 Jeez, that's high. Mar 19 23:40:20 Man, the parties... wow. Mar 19 23:40:21 that's not the real reason I'd like to go without free stuff, and I'd only pay the student price Mar 19 23:40:45 well, plane ticket + place to stay + ticket price :/ Mar 19 23:40:45 this year they'll have more cardboard under their seats which they can fold into a chrome book Mar 19 23:40:46 I'm going to watch one of the best piano players in the world for ~$70 tomorrow. Mar 19 23:40:52 Ah, true. Mar 19 23:41:10 shmooz, I heard it folded into a self driving car? Mar 19 23:41:17 and you need to take the plane ticket/hotel at a very short notice due to stupid lottery Mar 19 23:41:27 TacticalJoke, that sounds awesome! Mar 19 23:41:36 isn't it just 900$ for the regular ticket? Mar 19 23:41:43 "just" Mar 19 23:41:43 MikeWallaceDev: no, but it does hover Mar 19 23:41:49 Mavrik, at least everyone gets a chance now with the lottery. Mar 19 23:41:57 true Mar 19 23:42:00 Yeah, I've seen him before: Evgeny Kissin. He's great. Mar 19 23:42:18 memorion, yeah, but I counted other expenses to it, my last I/O visit was approx. 3500$ in total Mar 19 23:42:33 I see Mar 19 23:42:42 not exactly Kissin, but have you ever watched Victor Borge? He's so awesome :D Mar 19 23:42:48 Yeah, he's brilliant. :) Mar 19 23:42:54 I love the masterclass videos with him. Mar 19 23:43:01 Why would dp be so different ? Mar 19 23:43:04 brilliant is a great description :) Mar 19 23:43:32 damn, now I want to watch Borge videos! :D Mar 19 23:43:44 No. Must Dev. Mar 19 23:44:22 btw memorion , I still didn't find values for activity_horizontal_margin ... :-/ Mar 19 23:44:47 MikeWallaceDev what do you mean by that? Mar 19 23:44:54 Hi everyone! I'm trying to access my database in my app without having to root my device, by running a shell with "adb shell" command.. but when I run the command "run-as com.my.ap" I just get this error message: "run-as: Package 'com.my.app' is unknown".. Mar 19 23:45:01 that's what I was searching for... Mar 19 23:45:17 Vercinger: It's an issue with some devices. Which device is it? Mar 19 23:45:19 I'm running an actual device plugged in via USB - device is a S5 galaxy running 5.0 Mar 19 23:45:23 Okay. Mar 19 23:45:29 I'm looking for the default values for different sizes of screen Mar 19 23:45:29 Vercinger: I get it with a Sony. Mar 19 23:45:37 TacticalJoke Mar 19 23:45:41 Vercinger: You should be able to do it with the emulator. Mar 19 23:45:45 Vercinger: is it a debug app? Mar 19 23:45:46 is it ridiculous to establish an xauth token with okhttp, then use that token with further retrofit requests? god i hate o/xauth. Mar 19 23:45:52 MikeWallaceDev the values for what exactly? Mar 19 23:46:16 the margins that an activity should have Mar 19 23:46:26 JesusFreke - It's an app I'm making, and I'm using terminal in android studio.. Mar 19 23:46:37 i.e. 64dp Mar 19 23:46:37 This is my first "bigger" app, so forgive my "newbness" Mar 19 23:46:44 to the edges of the screen? Mar 19 23:46:52 yes Mar 19 23:47:06 JesusFreke - is there a special way to make it "debug app"? Mar 19 23:47:25 that depends on the context doesn't it? how can there be margins for every case? Mar 19 23:47:36 Someone with an S5 says the same here: http://developer.samsung.com/forum/thread/native-debugging-still-broken-on-galaxy-devices/202/258621 Mar 19 23:47:39 they're guidelines Mar 19 23:47:41 And various people with an S4 say the same. Mar 19 23:48:49 yeah but you can put anything in your activity how can there be a default margin? Mar 19 23:48:54 So I might have to either root or revert? Mar 19 23:49:05 Vercinger: Can you use the emulator for "adb shell"? Mar 19 23:49:10 That's what I sometimes do. Mar 19 23:49:19 Vercinger: well, it's typically debug unless you explitely make a release app. It's based on whether the debuggable attribute is set in the manifest Mar 19 23:49:27 memorion, It's just a guide line for spacing... Mar 19 23:49:37 I think I'm just going to eyeball it Mar 19 23:49:38 I believe it gets set automatically by gradle Mar 19 23:49:51 but you can only use run-as with a debuggable app, hence my question :) Mar 19 23:49:57 but it sounds like it probably is Mar 19 23:50:35 Hey com.domain.appname What if I dont use my appname in my package name? Mar 19 23:50:47 MikeWallaceDev sorry if I'm being dense, you mean the 16dp on either side like here http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7emVMNzVwSGE1MkU/layout_metrics_keylines_mobile2.png ? Mar 19 23:50:58 MikeWallaceDev: Whoa, I was thinking of "Jorge Bolet". lol. I hadn't heard of Victor Borge before, but he's funny. :) Mar 19 23:51:05 My brain got confuzzled. Mar 19 23:51:09 memorion, yep :) Mar 19 23:51:21 TacticalJoke, HAHAHAHA what a difference! Mar 19 23:51:30 :D Mar 19 23:51:33 MikeWallaceDev that's in the link I sent you :P Mar 19 23:51:40 TacticalJoke, oh he is more than funny, the man can play. Mar 19 23:52:09 It's funny how my brain must've taken the B, put it on the "orge", and conflated the two ideas. Mar 19 23:52:24 memorion, you might be right. I was scanning for a table with values in it. I'll look again Mar 19 23:52:34 MikeWallaceDev you can overlay them on your app with https://play.google.com/store/apps/details?id=com.faizmalkani.keylinepushing Mar 19 23:52:44 Anyone know how to get the Nexus6 to show up in adb on OSX when in recovery mode? It works fine when I'm booted, but as soon as I reboot to recovery mode, I can't detect the device Mar 19 23:52:48 TacticalJoke, oh my, that's nothing... Let me find something for you (and all of you) Mar 19 23:52:50 they just show everything in the pictues, no tables Mar 19 23:53:08 I don't know why these aren't just defined in the android:dimens somewhere Mar 19 23:53:13 Mavrik: so? Mar 19 23:53:25 memorion, that's it. It's decided. I"m never googling again, you are the king! Mar 19 23:53:25 Nevermind... just needed to restart the adb server Mar 19 23:53:44 JesusFreke - it tells me it set it automaticly when I'm running it so I don't have to.. Mar 19 23:54:16 MikeWallaceDev if you need even more power you can use https://github.com/lucasr/dspec for that too Mar 19 23:54:48 Vercinger: Your options might be "root or use the emulator for this". Mar 19 23:54:50 TacticalJoke - what do you mean if I can use the emulator for "adb shell"? :) Mar 19 23:55:14 If you open the emulator and run "adb shell", it should work. Mar 19 23:55:16 I need to be able to get the database later on aswell for further in my work Mar 19 23:55:37 TacticalJoke, (and EVERYONE) check this out, it's freaky : http://mcsd-blog.mcbarons.manheimcentral.org/clausenj/files/2010/11/F-counting-puzzle.jpg Mar 19 23:55:47 Count, then write your answer here Mar 19 23:55:50 I don't think the emulator deletes stuff. The database should persist. Mar 19 23:56:17 can't use emulator either.. can't run VMs on this computer :( Mar 19 23:56:42 MikeWallaceDev: Six. Mar 19 23:56:49 LIES!! Mar 19 23:56:59 You've seen it before ;) Mar 19 23:57:07 I've seen similar, yeah. Made me count carefully. Mar 19 23:57:27 hehe Mar 19 23:57:37 Yeah, I've seen it before, but almost missed the first two of's Mar 19 23:57:46 I was thinking of switching from Windows to Linux for dev. So i have a question, will projects from AS in Windows load in AS linux ? Mar 19 23:57:46 Vercinger: Why can't you use the emulator on there? Just curious. Mar 19 23:58:02 Nightwalkerkg: I haven't specifically tried it, but I don't see why not Mar 19 23:58:07 I didn't trust my first count so I counted again in reverse (but the first one was right). Mar 19 23:58:19 I've watched a very smart friend count them by running his mouse over the letters and STILL miss the of's! Mar 19 23:58:25 JesusFreke, i have the same feeling, but i had to ask. :D Mar 19 23:58:49 TacticalJoke: emulator: ERROR: x86 emulation currently requires hardware acceleration! Mar 19 23:58:49 Please ensure Intel HAXM is properly installed and usable. Mar 19 23:58:49 CPU acceleration status: HAX kernel module is not installed! Mar 19 23:58:55 that's why :) Mar 19 23:59:07 can't install HAXM Mar 19 23:59:17 you can still use it, just slower Mar 19 23:59:18 Hmm, you shouldn't *need* to install HAXM. Mar 19 23:59:30 Well app won't run or anything Mar 20 00:00:04 I've not really come across that error before. I'm guessing you're trying to run an x86 image and you don't have HAXM installed? Mar 20 00:00:14 pass Mar 20 00:00:37 Think I have to allow VMs to run in my bios Mar 20 00:01:29 AFAIK, you need to do that only for HAXM. The emulator should work regardless. Mar 20 00:01:47 well I do have another "workaround" so to say.. I'm trying to "copy" my database from internal to SD card and thus I can use/check it there, but I don't know the filepath to my database Mar 20 00:02:16 Vercinger: To be honest, it's probably in your best interest to be able to get the emulator working in any case. Mar 20 00:02:26 Why? :) Mar 20 00:02:27 Or to use Genymotion or something. Mar 20 00:02:42 It's pretty important for testing on a range of Android versions, screen sizes, etc. Mar 20 00:02:46 I'm working with wifi scans Mar 20 00:02:54 It's only gonna be used on my device Mar 20 00:03:18 It's for my bachelor project and I'm using it to create a database of wifiscans around campus :) Mar 20 00:03:53 Otherwise I'd agree with u :) Mar 20 00:04:49 I see. Are you on Android Studio, BTW? It's easy to test my "x86" hypothesis. Mar 20 00:05:02 Tools > Android > AVD Manager. Mar 20 00:05:32 Yep Mar 20 00:05:39 If there is one item with "x86" under "CPU/ABI", we have verification. Otherwise, falsification. Mar 20 00:05:48 x86 Mar 20 00:05:49 Actually, that's not quite right. Otherwise, it could go either way. Mar 20 00:05:59 Okay. I think you can create a new image that isn't using the x86 thing. Mar 20 00:06:03 Though I haven't tried this. Mar 20 00:06:50 I think an arm image would work, I friend had to use that withoug haxm on his hackintosh to get it to work Mar 20 00:06:59 I can.. armeabi-v7a, x64_64 Mar 20 00:07:52 In meanwhile I download armeabi-v7a.. Any reason I get the exception using this method to "copy" my database: http://pastebin.com/xqedmEJU Mar 20 00:07:53 how is it that dp works everywhere else but in code it starts to change per density screen type Mar 20 00:08:27 I get: 03-20 01:02:02.846 15988-15988/appdev.vercinger.mifi W/System.err﹕ java.io.FileNotFoundException: /data/data/appdev.vercinger.mifi/databases/wifiDB.db: open failed: ENOENT (No such file or directory) Mar 20 00:08:30 Vercinger: /databases/ Mar 20 00:08:32 or /database Mar 20 00:08:36 cant remember Mar 20 00:08:40 but definatly not database.sqlite Mar 20 00:08:44 I tried that earlier.. I'll try again Mar 20 00:08:55 it is either database or databases i think the former Mar 20 00:09:05 oh wait nevermind Mar 20 00:09:12 you are copying to sdcard Mar 20 00:09:22 yeah TO sd card Mar 20 00:09:53 the method is placed in my databasehelper class.. Where the CRUDs etc. are Mar 20 00:10:32 And you're getting the exception for line 8? Mar 20 00:10:55 Oh, never mind; just saw the rest of the stack trace. Yeah. Mar 20 00:11:23 Vercinger: you should do File f= new File(inFileName) and see ifExists Mar 20 00:11:42 you making a wifi shark? Mar 20 00:12:09 bachelor project - have to try and make wifi positioning system Mar 20 00:12:22 http://stackoverflow.com/questions/19093458/copy-database-file-to-sdcard-in-android Mar 20 00:12:24 one of method is making wifi-fingerprint of area and then use the database Mar 20 00:12:48 to figure out where I am Mar 20 00:13:01 so yeah.. wifi shark might be proper term Mar 20 00:13:02 oh Mar 20 00:13:07 do you have write external permission? Mar 20 00:13:11 yep Mar 20 00:13:38 yeah don't sharks have ability to sense fish by the electrical impulses in their nerves and therefore can position them? Mar 20 00:13:39 heh Mar 20 00:14:18 triggers om noms Mar 20 00:15:31 android studio does not like running an app when installing armeabi.. Mar 20 00:16:23 TacticalJoke - running emulator with arm now.. Mar 20 00:19:47 lasserix - tried withous s on database, no dice Mar 20 00:19:55 trying the stackoverflow you posted Mar 20 00:21:16 TacticalJoke - adb devices tells me emulator is "offline" Mar 20 00:21:44 It'll probably take a while to start. Mar 20 00:21:50 k Mar 20 00:22:19 By the time it opens, you'll have gray hair, I'll have no hair, and we won't know what we're doing in this IRC channel anymore. Mar 20 00:22:42 i think its because i'm so used to c++ templates - i always seem to get fcked by java generics :( waaant duck typing sometimes Mar 20 00:24:04 hmm Mar 20 00:24:06 Duck debugging, duck typing... ducking everything. Mar 20 00:24:50 guess i'll just have to use Object / instanceof tests :( Mar 20 00:25:11 http://www.rubberduckdebugging.com/ ftw Mar 20 00:25:17 \o/ Mar 20 00:26:19 I delete a lot of questions I want to ask here because I realize what I'm doing wrong while typing the question Mar 20 00:26:27 That's the final stage programming: total mental breakdown featuring talking to bathtub toys for children. Mar 20 00:26:38 of^ Mar 20 00:26:38 well i figured it out Mar 20 00:26:46 setTextSize(UNIT TYPE, newSize) Mar 20 00:27:04 TacticalJoke - how do I do the run-as thingie on specific device? Mar 20 00:27:22 I think you have to have only one device connected for "adb shell", right? Mar 20 00:27:25 Vercinger: adb -s Mar 20 00:27:29 Oh, maybe not. Mar 20 00:27:33 they're not toys!!!!! They're my friends!! Mar 20 00:28:01 I liked that joke on reddit the other day: "My friends all tell me my girlfriend is imaginary. Joke's on them -- they are imaginary." Mar 20 00:28:26 :D Mar 20 00:28:42 dumb question here Mar 20 00:28:45 why can't i say if (foo instanceof T) thats so lame Mar 20 00:29:06 where is the event listener in android, and how can i feed it touch events manually? Mar 20 00:29:09 yeah i know, compile time type checking, still lame :) Mar 20 00:29:21 can i do that in kotlin ? Mar 20 00:29:37 is there another way to feed touch event but manually?? Mar 20 00:29:41 Does type erasure make that impossible at run time? Mar 20 00:29:43 actually, don't answer that. Mar 20 00:30:34 ParmesanCaesar, there is no central event listener, you can add a listener to a view Mar 20 00:31:04 g00s, TacticalJoke: The terminal just gives me the list of adb commands when I try to do "adb -s emulator-5554 run-as appdev.vercinger.mifi" Mar 20 00:31:59 MikeWallaceDev: okay - the extent of my knowledge is that there is a series of overlapping activities and an xml layout file for each Mar 20 00:32:29 ParmesanCaesar, I think you better start here : d.android.com Mar 20 00:33:13 i read through the build your first app portion Mar 20 00:33:31 good start :) Mar 20 00:33:51 Vercinger: I'm not sure. Can you say "adb -s whatever shell"? Mar 20 00:33:57 Otherwise just disconnect the other device and run "adb shell". Mar 20 00:34:44 MikeWallaceDev: couldn't find anything for simulating events - in my case I'm trying to create a set of real-time user events triggered in the emulator Mar 20 00:35:23 do the events have to be in specific places? If random, look for a tool called monkey (no, really) Mar 20 00:36:21 no there are embedded AppWidgets in the application (kind of like a new home-screen app) Mar 20 00:36:35 http://developer.android.com/reference/android/view/View.html#performClick() looked promising Mar 20 00:37:10 Maybe creating a custom view which somehow triggers these events on bootup Mar 20 00:37:16 that's a click, not the touch event that triggered the click Mar 20 00:37:37 MikeWallaceDev did you see this? https://github.com/quiqueqs/BabushkaText Mar 20 00:37:53 Vercinger: Did that answer your question? If so, press 5. Mar 20 00:38:05 Press 0 to go back to the main menu. Mar 20 00:38:18 oh cool, nice find g00s , thanks! Mar 20 00:38:39 doesn't 0 call your house directly TacticalJoke ? Mar 20 00:38:46 MikeWallaceDev just in case somebody asks you about it at conference, gotta know everything :D Mar 20 00:39:07 thanks mate! Mar 20 00:40:39 thanks btw, monkeyrunner looks like what I needed Mar 20 00:41:02 no problemo :) Mar 20 00:42:11 are emulators auto-rooted? Mar 20 00:47:58 still don't get why my "save to SD card" method doesn't work.. http://pastebin.com/xqedmEJU - /appdev.vercinger.mifi W/System.err﹕ java.io.FileNotFoundException: /data/data/appdev.vercinger.mifi/databases/wifiDB.db: open failed: ENOENT (No such file or directory) Mar 20 00:48:12 Vercinger: Can you now use "adb shell"? Mar 20 00:48:14 oh and TacticalJoke - i can run-as etc. Mar 20 00:48:16 ye Mar 20 00:48:18 Okay, cool. Mar 20 00:48:31 Vercinger: I think I'd try "adb shell" on the emulator and see whether your path is correct. Mar 20 00:48:39 g00s, re: android testing - it's an interesting idea. I don't know if it would work out in practice. might be better than nothing, dunno. Mar 20 00:48:42 Maybe the database name isn't quite right? Not sure. Mar 20 00:48:50 it is Mar 20 00:48:52 g00s, snow - yeah eff that. We might get 5-6 inches tomorrow, not looking forwards to this. Mar 20 00:48:53 just looked it up Mar 20 00:49:24 root@generic:/data/data/appdev.vercinger.mifi/databases $ ls Mar 20 00:49:24 wifiDB Mar 20 00:50:01 wifiDB, not wifiDB.db? Mar 20 00:50:08 I'll try :) Mar 20 00:57:44 g00s: To answer your question from this afternoon: I love the M11 Kotlin update. Just awesome. I’m busy renaming all my resource id’s to camel case now :) Mar 20 00:58:03 :O Mar 20 00:58:13 Haha. I've been using snake_case. ;o Mar 20 00:58:17 cbeust_ so you are using kotlin on your android work ? Mar 20 00:58:30 cbeust_ did you notice now you can mix java / kt files in the same folders ? Mar 20 00:58:48 * g00s has soft spot for snake case Mar 20 00:59:27 g00s: Yes I saw that in the release notes, I prefer to keep my sources separated though Mar 20 00:59:59 Actually, I’ve been doing that for a while: @+id=“hostName” Mar 20 01:00:11 camel case is just a habit now Mar 20 01:00:40 That Koan thing looks really interesting. Mar 20 01:03:24 I like the idea of avoiding layout inflation entirely. Mar 20 01:03:28 ah, i use iso11179 naming for my database stuff, and my resources too Mar 20 01:03:32 And avoiding XML entirely. :D Mar 20 01:07:18 Can Koan bind to arbitrary XML elements or does the author need to add the mapping of attributes manually? Mar 20 01:07:51 TacticalJoke!!!!!!!!!!!! Mar 20 01:07:58 no errors this time.. Mar 20 01:08:36 cbeust_: Not sure. Only found about it today. I'd be interested to find out the answer to that, though. Mar 20 01:08:42 Vercinger: Cool. Mar 20 01:09:15 TacticalJoke: This will decide the life or death of the project IMO. If each attribute needs to be mapped manually by the author, Koan will never be useful for anything but toy projects Mar 20 01:09:35 TacticalJoke http://tools.android.com/recent/androidstudio12preview3available Mar 20 01:10:09 cbeust_: It says "It's a depressing job to write all these extensions by hand so they're generated automatically using android.jar files from Android SDK as sources", so I'm guessing the answer is "It can't", which is unfortunate if true. Mar 20 01:10:37 g00s: Ah, cool. Mar 20 01:10:55 "you'll probably want to keep a stable version around until we reach beta" hint hint Mar 20 01:11:07 doest say so much though, 'fixed some bugs' heh Mar 20 01:11:24 "did some stuff" Mar 20 01:11:34 :D Mar 20 01:15:34 A bit too soon jumping the gun on that one I guess.. now getting error on the Outputstream part.. Mar 20 01:16:02 Do you have the permission to write to the SD card? Mar 20 01:16:15 Mar 20 01:16:34 What error are you getting? Mar 20 01:16:59 I think the problem is I'm trying to save it in a folder that's nonexistent Mar 20 01:17:06 You shouldn't do stuff like this: Environment.getExternalStorageDirectory() + "/database.sqlite" Mar 20 01:17:08 Use the Path constructor. Mar 20 01:17:12 s/Path/File/ Mar 20 01:17:18 (I had it mentally mapped as 'path'.) Mar 20 01:17:25 it told me I should Mar 20 01:17:38 bath constructor? Mar 20 01:17:41 path* Mar 20 01:17:43 File Mar 20 01:18:04 I'm confused Mar 20 01:18:22 Vercinger, s/Path/File/ means replace "Path" with "File" Mar 20 01:18:35 new File(Environment.getExternalStorageDirectory(), "database.sqlite") Mar 20 01:20:29 MikeWallaceDev - didn't help me :P Mar 20 01:20:57 TacticalJoke - I don't quite get where you're leading me Mar 20 01:21:45 I'm suggesting replacing [ String outFileName = Environment.getExternalStorageDirectory() + "/database.sqlite"; ] with [ File outputFile = new File((Environment.getExternalStorageDirectory(), "database.sqlite"); ]. (Though I doubt it'll solve this exact problem -- it's more of a general thing.) Mar 20 01:22:02 s/((/(/ Mar 20 01:22:15 ah okay.. Mar 20 01:22:34 see? It did help you :P Mar 20 01:23:38 for your roflcoptering amusement, I present to you my lollipop bug of the day: http://cl.ly/2r1c280C100O Mar 20 01:24:16 groxx: What do you use to capture videos of your phone display? Mar 20 01:24:18 tl;dr: fling a list hard enough, and it'll bounce off the top, pick up some speed, and start scrolling down. do it hard enough, and you can get it into infinite bounces, sometimes gaining speed forever xD Mar 20 01:24:32 deuteros: `adb shell screenrecord` Mar 20 01:24:44 deuteros - I saw a feature in android studio Mar 20 01:24:56 "screen record" Mar 20 01:25:21 ah didn’t know about that, thanks Mar 20 01:25:33 Physical material design. Mar 20 01:25:44 no error this time Mar 20 01:25:51 Vercinger: The File thing fixed it? Mar 20 01:26:03 yeah I did: File f = new File(Environment.getExternalStorageDirectory(), "database"); Mar 20 01:26:07 OutputStream output = new FileOutputStream(f); Mar 20 01:26:09 Damn, I was only suggesting that as a nitpick. :D Mar 20 01:26:16 I guess you had two / chars. Mar 20 01:26:25 might be the database.sqlite thingie too Mar 20 01:26:26 But even so I would've expected it to work. Hmm. Mar 20 01:26:42 You're not supposed to have extensions on the calls, I guess? Mar 20 01:26:50 filepath* Mar 20 01:26:52 I wouldn't expect that to work. Mar 20 01:26:57 You could try re-adding the suffix, I guess. Mar 20 01:27:01 screenrecord has a limit, like 180 seconds or something Mar 20 01:27:02 With the File thingamyjig. Mar 20 01:27:07 I get error if I have suffix on.. Mar 20 01:27:14 Strange. Mar 20 01:27:27 oh --time-limit. Mar 20 01:27:34 Does it mind three-character suffixes? Mar 20 01:28:30 I got errors when adding .db to the inputstream part Mar 20 01:28:46 Vercinger: That was for a different reason. Mar 20 01:28:55 It simply wasn't named "whatever.db". Mar 20 01:29:08 it should be.. Mar 20 01:29:25 You verified that it wasn't, via "adb shell". Mar 20 01:29:57 didn't show what extension/suffix it was actually Mar 20 01:30:25 Do I really need a card-reader to read the SD card now? Mar 20 01:30:42 Vercinger: It showed that the file name had no extension. That's why stuff was fixed when I suggested removing the extension. :p Mar 20 01:30:43 It's very limited what file-explorer shows me on the SD-card Mar 20 01:31:06 Good to know for the future :) Mar 20 01:34:46 As it is I can't find the database, but it might be because it's hooked up "as phone"? Mar 20 01:39:25 or maybe I'm doing something wrong and it doesn't actually copy it over :| Mar 20 01:50:08 I need help with NDK. I try build my App with Qt 5.4.1 for And. I got http://pastebin.com/6CU7N1PP Mar 20 01:53:31 wth Mar 20 01:54:24 Somethings off.. It's placing the database file ON my phone instead of SD card Mar 20 01:54:49 but with r/w so I can actually see'em Mar 20 01:57:39 well atleast I can get to it.. :) Mar 20 01:58:25 I am using the Android Studio, I added a SettingsActivity and am getting a null exception on : getActionBar().setDisplayHomeAsUpEnabled(true); any ideas? Mar 20 02:00:14 I read it is an issue with the new 5.0x api's.. but it offered no suggestions. Mar 20 02:08:41 interesting, sometimes the BluetoothGattCallbacks happen syncronously Mar 20 02:23:13 TacticalJoke - thanks a lot! :) By being able to view my database I was able to see I made a mistake when adding data and have fixed it.. Now I'll be able to start gathering that wifi data I need for rest of my project :) Mar 20 02:24:07 Glad it's all fixed. :) Mar 20 02:24:11 I had been sitting with this "shell run-as" problem the entire day and only few hours ago it dawned on me to look for an android irc room :) Mar 20 02:24:56 I figure exporting the database is also a better idea since I need to import it in other apps and datamining :) Mar 20 02:26:09 Also why it isn't saving to my SD card but on my phone instead: http://stackoverflow.com/questions/6049114/environment-getexternalstoragedirectory-does-not-return-the-path-to-the-removabl Mar 20 02:26:34 Ah, yeah. Was looking that earlier. Mar 20 02:26:36 at^ Mar 20 02:27:15 You guys have any idea why a a click in a context menu would only register for the first item in a listview Mar 20 02:27:26 I do registerForContextMenu Mar 20 02:27:35 But only the first item is allowed to make a selection Mar 20 02:28:00 The click-highlight is showing for the first item only? Mar 20 02:28:17 Its working for all items (menus showing) Mar 20 02:28:29 But when I go to select an option, only the first item actually acts on the option Mar 20 02:28:43 And i did a log test, and the method is only fired when the first item makes a selection Mar 20 02:31:16 onContextItemSelected isn't firing for context menus spawned by ListView children other than the first? Mar 20 02:32:10 Yes TacticalJoke Mar 20 02:32:27 You put Log.d inside onContextItemSelected (and not in some branch therein)? Mar 20 02:32:44 I did log.i Mar 20 02:32:49 At the top of the method? Mar 20 02:32:53 But yeah, first line in method Mar 20 02:33:00 Strange. Can't imagine what'd cause that. Mar 20 02:33:30 Hmm Mar 20 02:34:55 Couldnt find anyhting on google either Mar 20 02:35:23 Is there something you can post? Mar 20 02:35:30 General question as I'm newbie to this: should I make onStop() and onResume() have closeDB(); and openDB(); in them, for when I "minimize" my app or shut it down? Mar 20 02:35:34 The gragment, sure? Mar 20 02:35:41 Yeah, the gragment. Mar 20 02:35:42 fragment* Mar 20 02:35:43 haha Mar 20 02:36:22 Here TacticalJoke: https://github.com/drose379/SelfEducation/blob/master/app/src/main/java/dylanrose60/selfeducation/SubjectFragment/PublicSubjectsFragment.java Mar 20 02:40:39 drose379: You seem to be calling registerForContextMenu in a background thread. Mar 20 02:40:49 You should be calling it in onCreate or something. Mar 20 02:41:08 You think thats an issue? All items are being registered for context menu Mar 20 02:42:16 I'm not sure whether it'll cause this problem, but it's definitely not a good idea regardless. Mar 20 02:42:22 Views shouldn't be touched from background threads. Mar 20 02:42:50 I wouldn't be hugely surprised if it were causing this issue, because it's the kind of thing that could potentially create weird behaviour. Mar 20 02:43:58 Ok, lemme change it around Mar 20 02:43:59 Thanks Mar 20 02:44:06 All of that UI code should be moved out of the background thread. Mar 20 02:44:15 That 'swipeRefresh' stuff. Mar 20 02:44:23 It's all stuff for onCreate. Mar 20 02:45:05 Or onCreateView, I guess. Mar 20 02:46:27 Got it, Ill look at that Mar 20 02:46:28 Thanks Mar 20 02:47:25 I can't figure out how to change the color of a datepickerdialog :/ Mar 20 02:47:35 why doesnt it just follow my app's theme :( Mar 20 02:47:56 DadFoundMy_: are you building it with the right context? Mar 20 02:48:14 i.e. use the activity, not the application context, if that's what you're doing Mar 20 02:48:29 ill try that Mar 20 02:48:40 TacticalJoke moving it to oncreateview didnt work Mar 20 02:49:00 Did you move all of the UI code (including creating the adapter, etc.)? Mar 20 02:49:13 groxx: i dont think i ever use a context Mar 20 02:49:45 No I didnt Mar 20 02:50:01 DadFoundMy_: it's a UI object, it needs one somehow Mar 20 02:50:12 drose379: You should be creating the adapter only once, really. Mar 20 02:50:12 groxx: i create it with the line: DialogFragment newFragment = new DatePickerFragment(); Mar 20 02:50:19 Calling AbsListView.setAdapter only once. Mar 20 02:50:31 All this stuff should happen *before* you do any HTTP request or whatever. Mar 20 02:50:47 I cant build a list before I make the request to get the items though Mar 20 02:51:09 DadFoundMy_: ah, so it's a fragment, not a datepickerdialog? Mar 20 02:51:12 Ideally, your adapter's constructor would not require any list. Mar 20 02:51:24 You could create a public "setList" method. Mar 20 02:51:31 groxx: i thought datepickerdialog was a fragment.... Mar 20 02:51:37 im a goofball Mar 20 02:51:51 TacticalJoke I agree, but idt it is causing the issue Mar 20 02:52:02 I have the same setup in a dif frag and im not having this issue Mar 20 02:52:33 I am using the Android Studio, I added a SettingsActivity and am getting a null exception on : getActionBar().setDisplayHomeAsUpEnabled(true); any ideas? Mar 20 02:52:43 groxx: heres the code, it follows the google tutorial almost exactly https://gist.github.com/DylanRedfield/4fc90079aec804078a49 Mar 20 02:53:23 is it the getActivity() call on line17? Mar 20 02:54:09 58 Mar 20 02:54:32 it is the default settingsactivity as added by the studio Mar 20 02:54:55 DadFoundMy_: dunno, that looks fine to me. I haven't tried theming datepickerdialogs though :} Mar 20 02:55:03 s/:}/:|/ Mar 20 02:55:08 those keys are so close to each other :{ Mar 20 02:57:58 drose379: Perhaps you could try putting all that UI code into the Runnable.run override. Then you'd have it all running on the main thread without much effort. Mar 20 02:58:34 Yeah, thats what im gonna do. Something weird is happening though Mar 20 02:58:40 So I have 2 frags Mar 20 02:58:46 DadFoundMy_: the source implies it looks at a datePickerDialogTheme attribute: http://androidxref.com/5.1.0_r1/xref/frameworks/base/core/java/android/app/DatePickerDialog.java and there are other details in the parent classes. googling around at that might yield something useful? Mar 20 02:58:50 And they both have onContextItemSelected Mar 20 02:59:13 And when I choose something in frag 2, its saying Im getting an error in frag1 Mar 20 02:59:20 And if I comment out a line in frag1 Mar 20 02:59:37 Its giivng me a null pointer when I am using onContextItemSelected in frag2 **** ENDING LOGGING AT Fri Mar 20 02:59:59 2015