**** BEGIN LOGGING AT Thu Jun 12 02:59:59 2014 Jun 12 03:00:34 it'll return null Jun 12 03:04:31 bankai_au: thank you Jun 12 03:04:55 I should attach android sources.. Jun 12 03:21:11 how do I make sure the entire UI is loaded and drawn before calling something? Jun 12 03:21:12 \ Jun 12 03:22:15 look at the activity/fragment lifecycle Jun 12 03:25:46 sorry, let me ask it the newbie way. If I put the call after the onCreate brackets are closed, does it mean onCreate has finished doing its thing/ Jun 12 03:27:31 Newbie question; where can I find the xml code that defines a button in ecplipse ide? Jun 12 03:28:06 BWestOz: http://developer.android.com/guide/topics/ui/controls/button.html Jun 12 03:29:11 thankyou Jesperhead, where cxan I see the button code in eclipse? Jun 12 03:29:27 layouts/activity_layout.xml Jun 12 03:29:33 bankai_au: there? Jun 12 03:29:39 or rather fragment_layout Jun 12 03:30:06 whatever the layout is titled. You can also modify button functionality programmatically (java) Jun 12 03:30:17 Oh i see, I have to click the tab at the bottom - thanks Jun 12 03:30:55 Jesperhead: yeah mate Jun 12 03:30:59 check out android studio as well. I found it easier to work with and less clunky. Jun 12 03:31:00 to toggle between graphical and code views Jun 12 03:31:55 jamesson: http://developer.android.com/guide/components/fragments.html and http://developer.android.com/training/basics/activity-lifecycle/starting.html Jun 12 03:32:08 bankai_au: Well I get a lot of answers saying "yes", so I'm hopeful. My code shows an example implementation but I do not see anything in logcat Jun 12 03:32:20 Jesperhead: sorry got lazy with my tab completion Jun 12 03:32:21 Jesperhead: check permissions Jun 12 03:32:40 forget whether one is needed, but I think so. Jun 12 03:33:29 nopii: i thought permissions need to be called only if it actually sending sms/making calls. My intended result is to just load the dialer/default sms app with the destination number already entered Jun 12 03:33:38 but i can add them just to try Jun 12 03:34:41 jamesson: no.. Jun 12 03:35:24 do you know OOP ? ;) Jun 12 03:35:55 gordon_: not as well as I'd like ;) Jun 12 03:36:17 gordon_: what am I misunderstanding? Jun 12 03:36:56 from what I understood from your sentence that you want to do something like onCreate() { } invokingMyMethd() Jun 12 03:37:41 gordon_: correct Jun 12 03:38:30 more specifically, once the ui is done populating call the function Jun 12 03:38:35 what is the best way to get a header out of a Retrofit Response? Jun 12 03:39:04 Loop over them Jun 12 03:40:45 jamesson: so the answer is no, becouse you want ot invoke function in the class, not from method Jun 12 03:41:19 gordon_: so it does need to be a lifecycle eventHandler? Jun 12 03:41:51 eh.. Jun 12 03:42:03 yeah nopii no luck with adding permissions. I added a log.v to the constructor and thats not even being called Jun 12 03:42:06 why cannot you just put it in the end of onCreate() ? Jun 12 03:42:25 and create your function Jun 12 03:42:59 gordon_: because it seemed to crashe the app last time I did it that way, but I will give it another shot Jun 12 03:43:20 ignore Jun 12 03:43:25 the constructor is called Jun 12 03:43:46 Jesperhead: for me? Jun 12 03:43:53 no my own problem, sorry Jun 12 03:48:31 jamesson: so something different is wrong -> stacktrack + code Jun 12 03:49:04 gordon_: still compiling, give me a sec Jun 12 03:49:24 http://xkcd.com/303/ Jun 12 03:49:32 that one is for you jamesson ^ Jun 12 03:51:45 JakeWharton thanks. that works. I am trying to get the sessionId. is there a better way than parsing it out of the Set-Cookie value? Jun 12 03:52:12 i mean, that's specific to your server specification Jun 12 03:52:18 Retrofit is just handing you the data it gets Jun 12 03:53:18 gordon_: quite accurate Jun 12 03:53:51 Is there an android emulator that actually works? Jun 12 03:53:51 frankly we keep buying better hardware to make this faster, but time is never negligible =P Jun 12 03:54:12 emulator-arm.exe keeps crashing. Jun 12 03:54:15 BWestOz: genymotion, google's android emulator for x86 processors Jun 12 03:54:18 gordon_: no in my particular case, but in general very true Jun 12 03:54:37 gordon_thanks, i'll look into that Jun 12 03:54:53 xkcd is always true Jun 12 03:56:02 while xkcd == true (foo) =P Jun 12 03:56:46 you need brackets Jun 12 03:56:52 and will invoke stackoverflow ;) Jun 12 03:57:24 my fave, cos Im ee http://xkcd.com/730/ Jun 12 03:59:04 touch tongue here Jun 12 04:05:46 not my background ;) Jun 12 04:15:00 Jesperhead: i thought there might actually be a permission to use the javascript binding abilities of webview, but it has been awhile. Jun 12 04:15:42 nopii: not a permission but a bool in the webview. i have it set to trye Jun 12 04:15:44 true* Jun 12 04:16:18 Jesperhead: did you try writing a simpler program, just to create a binding that prints a log message or something Jun 12 04:16:25 I've done it before so I know the interfaces work :) Jun 12 04:20:37 nopii: im not sure im using the data correctly. did you get a chance to check the example html? Jun 12 04:21:27 but no i havent tried anything simpler Jun 12 04:27:22 how 'bout a bunch of people here get together and make some new exciting apps Jun 12 04:28:14 i think everything has been done already shmooz :D Jun 12 04:28:35 that's what they thought before they invented the wheel as well Jun 12 04:28:50 we haven't even started Jun 12 04:37:39 hackathon! Jun 12 04:38:13 i hope bittorrent chat goes open source here Jun 12 04:38:40 privacy stuff gets me excited, lots of opportunities for those apps Jun 12 04:39:28 a p2p live streaming bittorrent video/audio player/downloader Jun 12 04:40:03 like popcorn time ? Jun 12 04:40:09 sortof Jun 12 04:40:55 it takes load off servers so the clients help to send it to each other and everyone is more happy Jun 12 04:41:34 with uploadable public and private lists of medias Jun 12 04:42:41 "everyone is 'more' happy", except the poor losers down here with shit connections Jun 12 04:43:37 they may not be able to stream live but they can buffer or download to storage Jun 12 04:44:36 do the dialogs in the iosched 2014 app look like they have their own action bars ? Jun 12 04:45:13 somebody complained on phandroid that it looked like metro … people need to calm down, a grid != metro Jun 12 04:45:35 now if tiles started flipping randomly well Jun 12 04:51:39 is there a downlaod for the io app anywhere? Jun 12 04:51:41 can't find it Jun 12 04:52:48 hm i just got it from the link here http://phandroid.com/2014/06/11/google-io-2014-android-app/ Jun 12 04:52:58 probably 1st time i installed from web Jun 12 04:53:39 there's a play ling on that page Jun 12 04:54:05 yeah Jun 12 04:57:06 eugh Jun 12 04:57:10 janky and ugly Jun 12 04:57:12 awesome Jun 12 04:57:25 yeah. its definitely janky Jun 12 04:57:58 i think they need to bring romain back for project butter redux Jun 12 04:59:12 nothing is wrong with Android Jun 12 04:59:21 it's app developers doing bad things Jun 12 05:01:41 shmooz: so you defined open source now :> Jun 12 05:02:00 JakeWharton: ++ Jun 12 05:02:57 i've always considered iosched to be a consolidation of current best practices by the high priests Jun 12 05:03:49 but going between my ipad and n7, there is still no contest in fluidness Jun 12 05:04:50 i guess we'll have to look at the source to see what could be making that main view janky Jun 12 05:05:28 what do you mean by 'fluidness' ? Jun 12 05:06:08 no perceivable hickups in the animations, etc Jun 12 05:06:11 is there a uri reference I can use to open a video file with the external video player? Jun 12 05:07:14 bankai_au even why i pull down the notifications tray its not fluid on this device anyhow Jun 12 05:07:15 g00s: oh, of course, only half read what you wrote and had my mind on a different track Jun 12 05:07:51 when i was getting a coffee this morning i was watching a girl on her ipad reading some emails or something and i noticed how much movement there was between her actions. it was quite interesting Jun 12 05:08:20 makes me wonder if apple should have made a bigger song and dance about their back-swipe Jun 12 05:09:17 eg. on android you have the back button, home button, stack etc on the bottom, so it's all in one spot. ios has the back button up the top, teh home button down the bottom and if you don't use back swipe navigation you're making so many grand gestures to do simple activities Jun 12 05:09:25 bankai_au if you were starting ios now, would you learn obj-c or swift ? Jun 12 05:09:45 i get the impression lots of shops will be moving to swift Jun 12 05:10:04 my understanding is swift is 8+, not backported to 7 Jun 12 05:10:12 ah,k Jun 12 05:10:40 i don't know for sure, that was just my understanding of it, but apple devs aren't faced with the same problems android devs are Jun 12 05:10:45 new ios version - fuck everyone else Jun 12 05:10:55 apple can get away with that; when ios 9 comes out 90% will have 8 & 9 Jun 12 05:10:57 new android version - arrrgghhh ... yet another one to support Jun 12 05:11:35 we'll be using the compat library forever ;) Jun 12 05:11:38 i reckon Jun 12 05:14:05 still not sold on swift, it looks a bit childish Jun 12 05:15:19 playground with safetynets Jun 12 05:16:36 g00s: lol Jun 12 05:16:43 have you seen how ios7 works ? ;) Jun 12 05:16:56 facebook app isnt smooth Jun 12 05:17:06 have the same problem as android one Jun 12 05:17:11 oh, i never used fb Jun 12 05:17:29 wow and I thought I was the only one in the world Jun 12 05:17:37 facebook write their own everything, they are shit in all mediums Jun 12 05:21:36 Can anyone offer an opinion on the best way to set a up an Android Virtual machine for building, testing etc. I'm using an i5 quad core with 16 gig of RAM and the default VM that comes with the ADK takes about 4 minutes to load, which is unusable. Is there a way of configuring to run better or should I just use a different VM, in which sace which one and how can I use it with eclipse? Jun 12 05:21:56 genymotion Jun 12 05:22:14 Does everyone agree with that? Jun 12 05:22:16 4 minutes? you're doing something wrong Jun 12 05:23:51 for testing ? Jun 12 05:23:52 Well I right click on the project and choose Run As> Android Application. I'm using an Android Ap Dev Book and following the instructions in it. When I've tinkered with the ADK VM before I remember it as being ridiculously slow Jun 12 05:24:09 I'd use intel's x86 image Jun 12 05:24:13 for testing Jun 12 05:24:16 and disable animations Jun 12 05:24:36 then you can run your integration tests Jun 12 05:24:48 for developing genymotion is fine Jun 12 05:24:52 but it likes to crash Jun 12 05:25:05 best option is a real device Jun 12 05:25:26 Is Blue stacks a VM? I've used it to run apps in Jun 12 05:25:41 bankai_au: according to google? no Jun 12 05:28:28 bankai_au: http://www.youtube.com/watch?v=uHoB0KzQGRg Jun 12 05:28:33 In the Android Virtual Device Manager - Device Definitions which one is the best to use? Jun 12 05:28:58 BWestOz: are you on mac ? Jun 12 05:29:06 no w8 Jun 12 05:29:14 ok good Jun 12 05:29:25 then you can choose intel's image Jun 12 05:29:35 and make device on x86 Jun 12 05:29:51 How do I do that in eclipse? Jun 12 05:29:52 if you want to develop - install genymotion Jun 12 05:31:24 I guess I have to. I don't understand why the default VM is so terrible. I just wonder if there's anything I can do with it. I can't imagine anyone could use it the way it seems to be Jun 12 05:32:16 http://wstaw.org/m/2014/06/12/Screen_Shot_2014-06-12_at_2.30.58_PM.png Jun 12 05:32:57 and mark use host gpu also Jun 12 05:34:04 will okhttp handle a 302 redirect? Jun 12 05:34:10 yes Jun 12 05:34:25 My CPU/ABI is greyed out for some reason Jun 12 05:35:16 BWestOz: choose the same device I did Jun 12 05:35:27 also did you installed image for that in android manager ? Jun 12 05:35:38 did you installed haxm driver ? Jun 12 05:35:53 I have used the same device Jun 12 05:36:24 no no, So I need to install an image? where do I get that? Jun 12 05:36:47 this is obviously the problem I am having Jun 12 05:36:49 android manager Jun 12 05:37:08 I guess I'll just shut this down ... Jun 12 05:38:11 where is the android manager? Jun 12 05:39:24 the place where you install sdk Jun 12 05:39:43 is it in the SDK or Eclipse ? Jun 12 05:39:54 sdk Jun 12 05:39:59 eclipse launches sdk... Jun 12 05:40:13 so many questions... so less google requests... Jun 12 05:41:36 I think this is it, the Android SDK manager under Eclipse>Window Jun 12 05:43:02 Ah, I just had to click some license thingo and it's anstalling a bunch of packages. Jun 12 05:43:20 Installing the IDE properly would prabably help ... Jun 12 05:43:29 Forgive me I'm a newbie :) Jun 12 05:43:30 lol Jun 12 05:44:29 Well hopefully this'll enable me to choose x86 for my VM and the Android VM will be useable Jun 12 05:44:31 BWestOz: is your box intel or AMD ? Jun 12 05:44:38 Intel Jun 12 05:44:50 ok let me know how much faster it gets after you do it Jun 12 05:45:14 installij intellij would help Jun 12 05:45:22 more than happy to. It's just taking a while to install all this stuff' Jun 12 05:46:50 *installing Jun 12 05:48:21 * BWestOz waiting . . . Jun 12 06:00:09 Well I've clicked install on the Android SDK manager and it's doing something. The folder's up to 2 gig now and it's still doing somthing. I figure that either it'll eventually finish, My hard drive will run out of space and fail catastrophically or I'll die. Jun 12 06:00:24 of old age Jun 12 06:04:38 You guys ever get mail (possibly spam) from people wanting to promote your apps? I got an email from the manager of one of Justin Bieber's friends. Jun 12 06:04:50 hey nopii still around? Jun 12 06:04:52 Yeah, I have Jun 12 06:05:11 He says he'll post the app on twitter, presumably for a price Jun 12 06:05:45 your statement is false Jun 12 06:05:53 since Justin Bieber doesnt have friends Jun 12 06:05:58 lmao Jun 12 06:05:58 so it's fake ;) Jun 12 06:06:14 having trouble with a javascript interface Jun 12 06:06:42 would you guys allow Justin Bieber or someone close to him promote your app on twitter? Jun 12 06:06:58 why not ? :D Jun 12 06:07:10 for money ? Jun 12 06:07:19 imagine all 15 year old girl testing it Jun 12 06:07:55 I put a game on Google Play and got an email from AppsZoom telling me they had put my game on their site for download and I could create an account with them. I emailed Google to ask if this was complient with Google Play terms and conditions - no reply; as Google have the Mary Celeste of customer support. Jun 12 06:09:11 BWestOz: I guess the question would be - are they actually distributing your game, in which case they're out-and-out pirates, or are they listing it but sending people to the play store for actual installs Jun 12 06:09:46 Well the link is to a file on AppsZoom Jun 12 06:09:58 sounds legit Jun 12 06:10:16 AppsZoom also has my games listed Jun 12 06:10:42 Looks like the downloads require an account and presumably are directly through though them and not the store Jun 12 06:10:42 are you and their host in the US? Jun 12 06:10:47 If Google don't care there's not much point in me worrying about it Jun 12 06:11:01 or, say, Oz? :) Jun 12 06:11:14 Well I'm in Oz Jun 12 06:11:20 I'm in US Jun 12 06:11:38 They might have an agreement with google or be a partner or something Jun 12 06:11:41 you could probably file a DMCA claim against their host - if the host is in the US Jun 12 06:11:55 My games only have like 10 installs, so I'll take any distribution I can get, even outside of Google Jun 12 06:12:17 I'm pretty sure Google doesn't have any agreement with random third-parties to copy the store from the play store... Jun 12 06:12:43 It doesn't seem like something Google would do Jun 12 06:12:56 It's a free game so why worry. It would be nice to get clarification from google because it seems an obvious breach of their terms. But as Google is nothing much more than a big computer probably nothing will happen Jun 12 06:13:04 Leeds, does Appszoom have your apps, too? Jun 12 06:13:35 yup, looks like it Jun 12 06:13:45 I have to leave. Thanks for your help & discussion Jun 12 06:14:30 including my one paid app... Jun 12 06:15:36 that's not good Jun 12 06:15:40 :) Why get it from the Play store when you can side load |our| version ? Jun 12 06:16:43 guess I'll give them temporary access to my facebook and see what happens Jun 12 06:17:39 their host is in Spain, so no DMCA... Jun 12 06:17:39 Just out of curiousity, has your paid app brought in more revenue than your free ones? Jun 12 06:18:20 no, but then it's crap and my main free one is... less crap :) Jun 12 06:22:13 so what they sent me was an email with two links - one which just goes to my Play Store listing, and one which sends me to *their* Play Store listing... Jun 12 06:22:35 I installed their app, which then asked me to login with my Google Account, using a webview... which I'm not going to do Jun 12 06:24:32 and... their app is uninstalled, they're blocked from my facebook Jun 12 06:41:21 hello, this is a looking-for-suggestions question but https://source.android.com/source/building.html well let's just say I don't meet any one of these requirements and to top it off, i have an extremely flaky internet connection, is anyone building on a VPS or remote server of some sort? Jun 12 06:47:37 Leeds, http://www.appszoom.com/faq #8 Jun 12 06:47:59 seems like they're just forwarding to the play store Jun 12 06:56:16 Guys can anyone explain what this and other files with this are? https://github.com/android/platform_frameworks_base/blob/master/core/jni/android_hardware_UsbDeviceConnection.cpp Jun 12 06:57:50 it's the JNI interface between the android application framework and the lower level usb stuff Jun 12 06:58:42 the methods in here implement the stubs in the java classes Jun 12 06:59:24 there'll be methods written as "native String getString(String foo);" some where in android.hardware.UsbDeviceConnection Jun 12 07:01:17 So, android uses JNI interface for all its USB related functions? Jun 12 07:02:05 so it seems Jun 12 07:03:23 Android USB api wants you to get permission to use a particular device. For this, you list all the devices, and on selecting one by the user, you ask for its permission. After user agrees you are free to use the USB device. Jun 12 07:03:47 But all of this is done using Java. Jun 12 07:04:07 I want to do this from native side of my code. Is it possible? Jun 12 07:04:26 I want minimum Java, if possible none. Jun 12 07:04:33 no idea i'm afraid Jun 12 07:04:47 why not do it in java? Jun 12 07:04:51 easy peasy Jun 12 07:05:14 Yup. I have done it on java. But my entire codebase is in C. Jun 12 07:05:27 And porting it to Java is out of question. Jun 12 07:06:54 the docs say that once access has been granted it's kept until the device is disconnected Jun 12 07:07:00 so you could ask for permission in java Jun 12 07:07:06 and then access the device later in C Jun 12 07:07:21 Yup. that is true. That is how I have been doing it. Jun 12 07:07:45 But, can I call this whole Java thing from my native code? Jun 12 07:09:12 And if what you said is true, I am trying to acheive this. My application in C -> Java USB permission -> JNI -> Native Code -> USB Jun 12 07:10:27 Aren't they making it more complicated? Can't I use those functions in the file directly, without going through all of the Java in between? I know this sounds cranky. Just sayin Jun 12 07:10:57 i suppose you can Jun 12 07:11:06 add the relevant headers and try Jun 12 07:13:02 For android studio I am supposed to install the JDK at this link? http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html or the one that is for arm (on that same link, "Looking for JDK on ARM?"? Jun 12 07:13:15 ... Jun 12 07:13:17 no Jun 12 07:13:32 so... that means... ? Jun 12 07:13:33 you install normal jdk for x86 Jun 12 07:13:46 or x64 Jun 12 07:13:49 ahh ok so it is that link but not the arm Jun 12 07:13:51 thanks Jun 12 07:14:03 why would you install jdk for arm / Jun 12 07:14:15 alex_PP: Please elaborate a little. Jun 12 07:14:21 aren't most android devices arm based? Jun 12 07:14:33 i know we had to compile or so for armv7 Jun 12 07:14:39 *our .so" Jun 12 07:15:02 But lasserix you are not building on arm devices right? Your laptop will be x86 or x64. Jun 12 07:15:06 lasserix: first you compile with normal java compiler Jun 12 07:15:10 ahh okay, thanks Jun 12 07:15:15 i see the differenc Jun 12 07:15:17 and then you're dexing it to dalvik Jun 12 07:15:19 lasserix: got time for a q&a? Jun 12 07:15:30 I am kind of tired but sure Jun 12 07:15:34 what are you working on? Jun 12 07:15:51 Interface for pages containing javascript Jun 12 07:16:12 i have no idea bout problems with javascript, just heard its a nightmare Jun 12 07:16:15 what's the problem? Jun 12 07:16:26 ahh the diamon operator in java 7 is nice! Jun 12 07:16:57 the page was developed for iOS and uses a third party lib called NativeBridge to things similar to launching intents to make phone calls/launch sms with destination field filled etc. Jun 12 07:16:57 and string based switches, about time Jun 12 07:17:08 string based switches? yay Jun 12 07:17:20 oh cool Jun 12 07:17:26 but what's the problem? Jun 12 07:18:19 well the lib is for iOS only. It's silly, because launching a webpage with tel: or sms: uris is cross compatible. so I thought I'd be clever and make an interface which will override all of the NativeBridge calls with my own Jun 12 07:18:41 Ahh wow automatic resource managment in java 7 is very nice! Jun 12 07:18:57 Why didn't i look at this before? *palm->to->face Jun 12 07:19:18 i see Jun 12 07:19:53 so the problems I currently have: the interface is being created/added, but none of the click are being register (log.v in each function) Jun 12 07:20:04 clicks* registered* Jun 12 07:20:31 additional, the JS functions create and pass json data, which is being passed as null Jun 12 07:22:31 coderbrahmin, I'm not a C dev Jun 12 07:23:01 i would assume you could go through much the same steps as the jni request permission method Jun 12 07:23:21 by importing the same headers as the jni stuff Jun 12 07:23:29 i have no idea if they're pubic or not Jun 12 07:23:49 Jesperhead I'd have to see some code to have any idea Jun 12 07:24:12 MainActivity: http://pastebin.com/EVEE1QvH , JavaScriptInterface: http://pastebin.com/TyY0dwBB , Example html: http://pastebin.com/8m1i5zSn Jun 12 07:24:14 that sounds familiar, but i'd guess "created/added" is not actually working, hence everything is null Jun 12 07:24:36 a string is also being passed and that parses correctly Jun 12 07:24:41 jesper Jun 12 07:24:42 add Jun 12 07:24:48 catch (Exception e) Jun 12 07:24:50 to those Jun 12 07:24:57 and see if it is throwing an exception you are not catching Jun 12 07:25:17 err, sorry i think that would crash it obviousily, like i said i am tired Jun 12 07:26:15 whats the html look like when you are using the "real" version? Jun 12 07:26:24 specifically, why is that last arguement null? Jun 12 07:26:28 lots of nested divs Jun 12 07:26:43 last argument is for the NativeBridge js lib. its for callback Jun 12 07:26:54 umm Jun 12 07:27:00 that would be why maybe? Jun 12 07:27:15 negative Jun 12 07:27:22 i need to ignore it Jun 12 07:27:37 so you methods in the interface are not being called? Jun 12 07:27:40 http://developer.android.com/guide/webapps/webview.html Jun 12 07:28:26 the NativeBridge lib is for iOS only. Since it's code is useless, I am creating my own interface with the same name, so the server side code remains unchanged Jun 12 07:28:54 correct, my methods are not being called. Jun 12 07:29:01 Caution: If you've set your targetSdkVersion to 17 or higher, you must add the @JavascriptInterface annotation to any method that you want available to your JavaScript (the method must also be public). If you do not provide the annotation, the method is not accessible by your web page when running on Android 4.2 or higher. Jun 12 07:29:04 the log.v in the constructor is called, but none of the others Jun 12 07:29:25 correct Jun 12 07:29:37 and I did (see the call function) Jun 12 07:29:39 you have @android.webkit.JavascriptInterface i am just wondering if maybe it is that for some reason Jun 12 07:29:52 since the example page clearly has @JavascriptInterface Jun 12 07:30:03 yeah i saw that and have since changed it Jun 12 07:30:11 im not sure how/why that changed Jun 12 07:30:13 sorry I also have not used anootations (understand them, but don't know exactly firmness of is bindings) Jun 12 07:31:21 also you are using activity and not context Jun 12 07:31:31 maybe you specifically need to you context, not activity, in your interface Jun 12 07:31:31 ?? which line Jun 12 07:32:00 on the android page public class WebAppInterface { Jun 12 07:32:00 Context mContext; Jun 12 07:32:06 not Activity mActivity Jun 12 07:32:28 since activity can be cast as context, i dont know that the reverse is true in this case Jun 12 07:35:19 k fixed that Jun 12 07:39:15 Jun 12 07:39:25 is equivalent to
? Jun 12 07:39:35 (i also don Jun 12 07:39:40 t know enough html, obviousily) Jun 12 07:40:12 also Jun 12 07:40:17 NativeBridge.call("prompt2Call", jsonData, null); is what yo have in your js Jun 12 07:40:30 but your interface is defined as public void call(String primer, JSONObject data){ Jun 12 07:40:34 *iunterface method Jun 12 07:40:56 i also added a "String ignoreme" Jun 12 07:41:20 and yes to your first question. Jun 12 07:41:46 are you getting a jsonexception in your verbose logcat? Jun 12 07:41:48 the important part is the onClick Jun 12 07:41:52 yea Jun 12 07:41:56 oh you are Jun 12 07:42:01 well then your json is wrong Jun 12 07:42:10 ? Jun 12 07:42:11 INFO:CONSOLE(11)] "Uncaught Error: Error calling method on NPObject." Jun 12 07:42:26 yeah that would be the third arguement problem Jun 12 07:42:48 but i mean the fact you're catching a json exception, just wondering if you verified it's not being caught and print but you didn't notice yet? Jun 12 07:42:52 D/GB.ImService( 4433): HEARTBEAT W/GB.ImApp( 4433): DB+not+open+and+no+password+provided Jun 12 07:42:54 the json obj is null Jun 12 07:42:57 What is this ^ ? Jun 12 07:43:11 Jesperhead your json is malformed? Jun 12 07:43:26 or it cant be passed... Jun 12 07:43:41 var x = {'member': [{'id':8286}]}; Jun 12 07:43:44 http://stackoverflow.com/questions/22027161/android-passing-json-object-from-webview-javascript-to-java Jun 12 07:43:52 You're missing the curly braces surrounding the object Jun 12 07:44:01 You can only pass Strings and primitives. – njzk2 Feb 25 at 22:01 Jun 12 07:44:02 jsonData["number"] = "#-###-###-####"; Jun 12 07:44:14 oh then just pass the string Jun 12 07:44:23 sigh i have no access to server side code Jun 12 07:44:41 cant you make a function that parses the json object into a string in your javascript/ Jun 12 07:44:50 i have to imagine that it possible Jun 12 07:45:17 i cant touch the javascript. i have a dev server set up but its pretty much a copy paste job Jun 12 07:45:44 all you need to do is add a function that takes a json object and spits it out as a string literal Jun 12 07:45:48 Is your x object serialized with double quotes as json text? Jun 12 07:46:00 otherwise, as you discovered, it is impossible :/ Jun 12 07:46:43 String jsonText = "{\"member\": [{\"id\":8286}]}"; Jun 12 07:47:50 Yeah that would be modifying the html code Jun 12 07:47:54 cant do it Jun 12 07:48:57 Are there any alternatives for VNC Server for android? As most vnc server software requires root for android, and i want to offer live support in app Jun 12 07:50:27 hold the phone opposite the webcam? Jun 12 07:59:55 Hi, somebody experience with Android and IOS development? I have a java function and need to make the same in objective c Jun 12 08:00:58 Jesperhead can you pass it in as a string? Jun 12 08:01:23 since js is weakly typed and json is essentially stringy Jun 12 08:03:14 yeah this is whats interesting. if I set my function to interpret it as a string, it says "undefined" Jun 12 08:03:34 as in warns or excepts? Jun 12 08:03:42 log.v Jun 12 08:03:58 (additionally, the dialer loads with the numerical values for the word "undefined" Jun 12 08:04:08 like using a phone numpad as a key Jun 12 08:05:02 umm Jun 12 08:05:18 can you just the json object somehow else from the webview object Jun 12 08:05:31 you accidentally a verb there Jun 12 08:05:35 like when it iniitalizes, and use the click delegate to handle the click Jun 12 08:05:40 hehe Jun 12 08:06:05 i am very tempted to go read neal stephensons newest book instead of getting libgdx set up in android studio ;p Jun 12 08:07:09 dont follow ya Jun 12 08:07:21 but right on, im unfamiliar with neal stephenson Jun 12 08:07:40 he wrote snow crash which is one of the original cyber punk books Jun 12 08:07:53 or a classic in the cannon anyways Jun 12 08:08:32 sounds interesting Jun 12 08:20:29 h=sorry, how do I do a stacktrace please? Jun 12 08:36:02 is it possible to cast a intent to string and from a string back to a intent again? Jun 12 08:41:12 Any ideas how I might transition a passwordless login to a username/password approach? Jun 12 08:41:37 as a last resort, because I intend to add Facebook/Twitter/Google+ Login to my app Jun 12 08:48:00 jammeson: throw new NullPointerException(); anywhere in your code, like onCreate Jun 12 08:48:07 that'll force a stacktrace in your logcat Jun 12 08:48:28 adkins: you can sometimes get the uri backing the intent into a string Jun 12 08:49:01 say lasserix how do you fare with animation? Jun 12 08:49:40 CodePulsar: if you are using actionbar add a non-text icon that resembles logging in, then add a splash page or something (an intro page) where the user can click into the content, but then ask them to log in with the option of remembering the log in info Jun 12 08:50:08 the non-text icon can be "green"/highlighted if authenticated and then "greyed" out normally Jun 12 08:50:09 umm Jun 12 08:50:17 Jesperhead: okay i guess, going to bed though Jun 12 08:50:28 right on, thanks for your input earlier. Jun 12 08:50:41 i am going to take a random guess and say the answer to your problem is Jun 12 08:50:49 setFillAfter/setFillBefore (true/false) Jun 12 08:50:53 on your animation Jun 12 08:50:55 n Jun 12 08:51:00 masking issue Jun 12 08:51:14 oh Jun 12 08:51:16 well good luck! Jun 12 08:51:17 I'm not sure what I can have as inner classes and what should be static inner classes. Eg, can I have a fragment class inside another without static? Is a non static FragmentPagerAdapter ok? Jun 12 08:51:26 good guess though, already dealt with that one. thanks. take care. Jun 12 08:51:55 phasip: a static inner class is the same as a top level class, that is: it can be instantiated without the outer class, whereas a nested non-static class can ONLY be instantiated if the outer class has been Jun 12 08:52:31 lasserix: Allright, so fragments can not be non-static, but can a FragmentPagerAdapter be? Jun 12 08:52:37 the problem with non-static inner classes as being nested they contain a reference to their outer class, and if the inner class has a reference to something like context, or something that survives the lifecycle of a typical non android object, it can hold onto that reference and leak it Jun 12 08:52:47 sure any class can Jun 12 08:52:47 it' Jun 12 08:52:56 s a top level class nested for convience Jun 12 08:52:58 lasserix: like this? intent -> uri -> string and vice versa? Jun 12 08:53:11 adkins if you can yeah Jun 12 08:53:46 phasip: this will clarify some of the static / inner that kind of thing w/r to android: http://www.androiddesignpatterns.com/2013/01/inner-class-handler-memory-leak.html Jun 12 08:54:09 basic idea is if your nested class can somehow outlive the outer class, it needs to be static and contain a weak reference to your outer class Jun 12 08:54:16 lasserix: intent.toUri() is deprecated.... Jun 12 08:54:55 however if it's only going to live correspondingly to the outerclass life cycle (say a fragment pager that is destroyed when the activity it lives in is destroyed) then it probably won't memory leak Jun 12 08:54:59 lasserix: there is also intent.toString() but there is no string.toIntent() ;) Jun 12 08:54:59 adkins: idk then, sorry Jun 12 08:55:20 adkins: http://developer.android.com/reference/android/content/Intent.html#toUri%28int%29 Jun 12 08:55:24 hey can someone help me with this http://stackoverflow.com/questions/24167337/java-lang-illegalargumentexception-when-using-youtubeplayerview Jun 12 08:55:55 Jesperhead: thx Jun 12 08:56:35 lasserix: But a non-static fragment eg, as I understand a fragment could be destroyed/re-instanciated by android and that's the reason one shouldn't use constructors for fragmens but instead use newInstance and bundle arguments? Jun 12 09:00:53 But if it's only a garbage collection issue a fragment with a viewpager could have non-static inner classes as the pages for the viewpager which would be really nice. Jun 12 09:03:09 Jesperhead: what u pasted helps to convert intent to string and to uri, but how do i convert from uri or string to intent? Jun 12 09:10:32 hey guys Jun 12 09:10:51 is there anyway to do something other than hiding the keyboard on backpressed? Jun 12 09:11:03 it seems that that's all the backpressed is doing for me Jun 12 09:11:12 i tried setting an onKey listener Jun 12 09:11:16 and i failed miserably Jun 12 09:36:14 Putting an ImageView into a LinearLayout, basically setting it's dimensions to 'wrap_content' why does not become smaller on higher resolutions/display sizes? Jun 12 09:36:21 Respectively, how do I get it to scale ;) Jun 12 09:37:06 platzhirsch: because Android uses density-independent resources? Jun 12 09:37:35 Estel: fair enough, but do you know what I mean? That I would like to scale up the dimensions? Jun 12 09:39:28 platzhirsch: sure Jun 12 09:39:48 just that it looks the same on every device and I cannot wrap my head around what is missing Jun 12 09:39:58 What do you mean by "looks the same" ? Jun 12 09:39:58 I've looked into scaleType Jun 12 09:40:24 Estel: well, you put a picture on the screen and the picture should not become smaller, because it is an essential part of the user interface Jun 12 09:40:27 Looks the same would normally mean that it shouldn't become any smaller on higher resolution screens :) Jun 12 09:40:28 I want to use it as a button Jun 12 09:41:49 man Jun 12 09:41:56 there should be a company that makes icons for you Jun 12 09:42:17 like just 1-shot service, you give your idea and they produce several icons for you to choose from, you choose, thanks, you're out Jun 12 09:42:53 platzhirsch: you can't do what you want by setting the width of the iamge to wrap_content Jun 12 09:43:11 Estel: do I have to scale it programatically? Jun 12 09:43:12 Set a specific width, either in code or XML Jun 12 09:43:29 in dp, yes, I did that Jun 12 09:43:55 What was the problem? Jun 12 09:44:02 but still, it becomes relatively smaller on a different screen :) Jun 12 09:44:14 you need to read about how that works, platzhirsch Jun 12 09:44:22 trying like this is going to take ages Jun 12 09:44:25 In DP it should remain almost relatively the same size on a different screen. Jun 12 09:44:46 http://stackoverflow.com/questions/2521959/how-to-scale-an-image-in-imageview-to-keep-the-aspect-ratio Jun 12 09:44:47 read that Jun 12 09:45:46 hello. can you change the package name of an existing published app in the play store? or will it reflect as a new app? Jun 12 09:45:57 you can't Jun 12 09:46:29 if you change the package name, that's a new app Jun 12 09:47:24 alright. thanks. now to explain that to a very anal retentive "marketing person" Jun 12 09:47:34 its easy Jun 12 09:47:34 Did they not like the package name? Jun 12 09:47:53 this is to ensure availability of all apps for users who have already download the app and have it running Jun 12 09:48:01 what if the app was paid? you cannot just discontinue it like that Jun 12 09:48:11 figured as much sicp Jun 12 09:48:14 really? Jun 12 09:48:21 no, it only made sense instantly Jun 12 09:48:27 the package name is basically the unique ID of the app as i understand it Jun 12 09:48:39 yea, but the reason for not allowing you to change it, I mean Jun 12 09:50:04 any android developer is here? Jun 12 09:50:16 t4nk788: hopefully... Jun 12 09:50:23 probably not Jun 12 09:50:28 no Jun 12 09:50:30 Good point Jun 12 09:50:34 t4nk788, this is #ios bro Jun 12 09:50:37 go to #android-dev Jun 12 09:50:40 it's flower channel Jun 12 09:50:50 any softkeyboard developer pls ping me Jun 12 09:50:56 waat Jun 12 09:51:07 I'm sure you'll lure them in with a pitch like that Jun 12 09:51:09 hey what about Swiftkey being made free? Jun 12 09:51:22 I downloaded it and it still said Trial, I read about how they made it all free.. Jun 12 09:51:25 they will disappear from market Jun 12 09:51:32 ohh Jun 12 09:51:38 since apple invented quickkey on last WWDC Jun 12 09:51:43 Swiftkey is too good to disappear Jun 12 09:51:43 disappear? Jun 12 09:51:47 i m developing a keyboard and hav some problem Jun 12 09:51:51 the paid versions he means Jun 12 09:51:53 frankly all soft keyboards are just shit Jun 12 09:51:54 gordon_: why will that make swiftkey disappear? Jun 12 09:51:57 <3 my hardware keyboard Jun 12 09:52:02 right? Jun 12 09:52:07 Estel: apple will patent it and sue Jun 12 09:52:11 If anything else, they have an awesome opportunity because iOS8 allows custom keyboards Jun 12 09:52:17 gordon_: ahh, stop being so cynical Jun 12 09:52:25 nah Jun 12 09:52:57 i hav problem to hide popup of key of keyboard Jun 12 09:53:18 is the problem that the popup is showing or not showing? Jun 12 09:53:31 no Jun 12 09:53:34 nice answer Jun 12 09:53:47 Estel: it happens with every app which apple *invent* Jun 12 09:54:00 That's just not true? Jun 12 09:54:08 i want that if a user press space baar then it should not appear Jun 12 09:54:18 Estel: yeah, slide to unlock ;) Jun 12 09:54:27 how will the user press a space bar if the keyboard did not appear in the first place? Jun 12 09:54:36 no no Jun 12 09:54:38 dude Jun 12 09:54:43 write your question on paper Jun 12 09:54:47 formalize it Jun 12 09:54:49 understand it Jun 12 09:54:52 it it not about keyboard Jun 12 09:54:53 then type it here Jun 12 09:55:15 the keyboard ill be appear but the popup of key ill not Jun 12 09:55:26 yea.... Jun 12 09:55:33 moving along Jun 12 09:56:06 gordon_: the prior art there wasn't exactly glaringly obvious, and their case in Europe on that was already thrown out Jun 12 09:56:08 how can i hide the popup on perticular keys? Jun 12 09:56:21 They've not sued google now because of siri Jun 12 09:56:47 Estel: it was partialy joke, and I dont want to talk about it really :) haters gonna hate Jun 12 09:56:52 and I'm apple hater Jun 12 09:57:17 can any1 help me? Jun 12 09:57:26 t4nk788: you can't. Users can select their own custom keyboards; there's nothing you can do to stop the spacebar appearing in even one of them Jun 12 09:57:37 you understand what this guy means? Jun 12 09:57:39 lol Jun 12 09:57:49 ohhhhh he wants to hide certain keys! Jun 12 09:58:05 It might be the longCLick popup from certain keys instead?\ Jun 12 09:58:10 But either way, nope.avi Jun 12 09:58:17 impossibruuuuu Jun 12 09:58:18 i want to hide popups Jun 12 09:58:20 not key Jun 12 09:58:30 show us an image of what you mean Jun 12 09:58:35 cause English is fail Jun 12 09:58:46 t4nk788: what you can do is ignore certain keys from within your or whatever so that those button presses don't register Jun 12 09:59:03 You can't override behaviour in the user's keyboard Jun 12 09:59:18 Estel: No sir Jun 12 09:59:20 Unless you take the route that, say, mobile banking apps take and provide an entire custom keyboard integrated into the app that has no popups Jun 12 09:59:28 i m developing custom keyboard Jun 12 09:59:45 ... well that was a useful piece of context Jun 12 10:00:28 n now i want to add the feature that if a user press space bar of my keyboard Jun 12 10:00:30 then Jun 12 10:00:47 the popup of key should not apper Jun 12 10:01:12 Surely you'd have some explicit code to make a popup appear in the first place? O_o Jun 12 10:01:23 ^^!! exactly Jun 12 10:01:43 i google a lot Jun 12 10:01:47 we all do Jun 12 10:01:57 but you have no proper way of mentioning your question Jun 12 10:02:17 youre not gonna find answers if you dont know how to say in words that youre looking for Jun 12 10:02:23 what* Jun 12 10:02:38 Scip:may i ping u in pvt? Jun 12 10:03:24 Sicp: make sure that your element for the spacebar in your XML file doesn't open a popup. Jun 12 10:03:30 you pinged me actually Jun 12 10:03:41 ya Jun 12 10:03:44 ok Jun 12 10:07:39 THE POPUP! Jun 12 10:07:45 the little ICON representing the pressed KEY Jun 12 10:08:38 it's called key preview Jun 12 10:08:53 ya Jun 12 10:09:40 Sicp:u hav any idea? Jun 12 10:09:44 http://stackoverflow.com/questions/7770099/how-do-you-disable-the-softkeyboard-key-preview-window Jun 12 10:09:58 see how to work with that Jun 12 10:10:25 this one is for specific keys, http://stackoverflow.com/questions/20299210/customize-soft-keyboard-key-preview Jun 12 10:10:34 Jun 12 10:10:45 this mentions what should happen for key with code 97 Jun 12 10:11:02 Howdy folks Jun 12 10:11:04 maybe there you can remove the drawable and it will stop appearing, or there will be an attribute that says "showPreview=false" Jun 12 10:11:05 dont know Jun 12 10:11:07 try Jun 12 10:11:18 anyone here familiar with freepie? Jun 12 10:12:52 Sicp:thanx a lot Jun 12 10:13:22 sure Jun 12 10:13:50 Does anyone actually understand childSupportFragmentManagers? :( Jun 12 10:14:02 lol childSupport Jun 12 10:14:13 mortgagePaymentDispatcher Jun 12 10:14:47 oh, it's just a childFragmentManager. My brain is addled Jun 12 10:17:41 Could someone help me trying to find a freepie script for headtracking to the shared memory tracker in vireio perception? Jun 12 10:20:46 any keyboard developer is here? Jun 12 10:21:36 any keyboard developer is here? Jun 12 10:23:58 any keyboard developer is here? Jun 12 10:24:03 no, you can stop asking now Jun 12 10:25:31 I need to get some sleep, will be back tomorrow Jun 12 10:25:44 this puzzle has been keeping me on edge Jun 12 10:29:04 hello Jun 12 10:29:11 Hey guys Jun 12 10:29:50 I've been following the android dev docs, and I'm getting an idea of how it 'works' but theres no tangible learning Jun 12 10:30:01 it doesn't really show you how to do anything practical Jun 12 10:30:30 try the book hello android Jun 12 10:30:33 There doesn't seem to be much in terms of guided app development tutorials, which would be really handy Jun 12 10:31:00 I've baught a book that I'm waiting for, but I'd like to have a play online Jun 12 10:31:04 any keyboard developer? Jun 12 10:31:19 do you know of any sites where there are walkthroughs for developing apps Jun 12 10:31:37 yeh there are some Jun 12 10:31:50 I found them from google but forgot them now Jun 12 10:32:25 AllTuna: Try this may be : https://www.youtube.com/watch?v=SzdDEscjIJ8 Jun 12 10:32:43 just found it on google+ Jun 12 10:32:46 https://www.infinum.co/the-capsized-eight/articles/top-5-android-libraries-every-android-developer-should-know-about?utm_content=buffer1d716&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer Jun 12 10:33:03 napster, 2012? Jun 12 10:33:05 2010* Jun 12 10:33:40 The development process for a “Hello World app” didn’t change too much in the past years. :) Jun 12 10:33:45 Also, I've made a basic 'type a message and see it on the next activity' type app Jun 12 10:34:53 try a game one Jun 12 10:34:56 I'm looking for tutorials which guide you through elements such as touching an object in a list and sending the info to the next page for further info Jun 12 10:35:44 you might as well just learn the framework stuff first Jun 12 10:36:00 The book I baught was Android Programming: The Big Nerd Ranch Guide Jun 12 10:36:01 any good? Jun 12 10:36:10 not tried it Jun 12 10:36:20 but hello android is quite good for a first book Jun 12 10:39:15 The book I baught is like 500 pages, heh, I've never read a book cover to cover over 100 pages really :P Jun 12 10:39:19 I'm not a reader :D Jun 12 10:39:38 its hard to program without reading Jun 12 10:39:42 impossible actually Jun 12 10:40:23 Well, I have huge experience with C++, PHP, MySQL, CSS, HTML, Obj-C, JS, Web dev and iOS app dev Jun 12 10:40:28 so I'm doing something right :p Jun 12 10:40:42 any softkeyboard developer? Jun 12 10:41:26 android wireless application development 1st-3rd edition i found to be concise and thorough Jun 12 10:46:04 So, if I want to load a background for my activity, am I supposed to use BitmapFactory Jun 12 10:51:43 http://stackoverflow.com/questions/24182568/nested-fragments-incorrect-after-reattaching-parent-fragment if anyone has any input, it would be appreciated :) Jun 12 10:55:05 AllTuna: You can do that by setting one through XML Jun 12 10:56:27 napster, so when would I use BitmapFactory? Sprites? Jun 12 10:57:11 AllTuna: Well you can use it whenever you want, but usually it is used when dealing with bitmap data is required, for example scaling etc. Jun 12 10:58:03 Oh, alright Jun 12 10:58:55 any1 hav knowledge about custom keyboard? Jun 12 11:03:26 hey guys quick question Jun 12 11:03:34 what is the diference between adding public on the constructor Jun 12 11:03:38 and not adding anything? Jun 12 11:03:58 do we just save the keyboard or is there some weird java hidden stuff happening on the background? Jun 12 11:04:16 As far as I'm aware it makes it available to any package? Jun 12 11:04:19 It makes it private to the package Jun 12 11:07:00 jvrodrigues: if you dont put public in it, the constructor will be something between protected and private Jun 12 11:07:15 without public it defaults to package-private. Easy to find yourself in any java tutorial. Jun 12 11:07:17 so you can only access it from classes in the same package Jun 12 11:07:49 http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html Jun 12 11:10:06 Why do I get an error on starting Android Studio that I need to install a 32bit JDK when I am on a 64bit system? Jun 12 11:11:09 Kake_Fisk: android-sdk does not support 64bit java Jun 12 11:11:43 It worked yesterday and all days before. o_o Jun 12 11:12:02 But are you sure? In studio.bat they have code for 64bit Jun 12 11:12:20 Maybe I should try a fresh install? Jun 12 11:12:25 if it asks for 32bit java, give it that :) Jun 12 11:13:02 How do I give it that? Install 32bit java as well as 64bit? Jun 12 11:13:08 yup Jun 12 11:13:15 :| Jun 12 11:14:46 or maybe they released a 64bit version and i dont know? Jun 12 11:14:48 mh Jun 12 11:15:06 looks like you have to google that. im not using AS Jun 12 11:16:24 Is there a way to make listview scroll more then its content? Jun 12 11:16:36 Yeah, I used 64bit java yesterday. I'll just try to reinstall. The program is still very buggy. That I've had to reinstall before :p Jun 12 11:16:47 yoavst: you could add empty views at the end Jun 12 11:16:59 does android studio support split screen? Jun 12 11:17:02 on windows Jun 12 11:17:19 njcomsec: a split viewport for the editor? Jun 12 11:17:32 I was thinking maybe one screen for the logcat or something Jun 12 11:17:37 or panels Jun 12 11:17:41 Yes Jun 12 11:17:54 njcomsec: you can detach every view from the mainview and move it to second monitor Jun 12 11:17:56 so yes Jun 12 11:18:15 http://www.jetbrains.com/idea/webhelp/splitting-and-unsplitting-editor-window.html Jun 12 11:18:16 oh right cool Jun 12 11:19:17 hmmm.. im getting the "skipped XXX frames " > traceview gives me this http://imgur.com/ZMjG2QF Well pretty much everything is on threads... I dont get it :/ Jun 12 11:33:33 hi, which are best practices to register device to GCM? it has to be registered at any launch or it's enough at any reboot? Jun 12 11:34:35 Hi there. Jun 12 11:35:27 I can't find anywhere: how to limit number of etnerered chars in sharedpreference? I'm using android settings activity but can't find anything on how to limit number of enterec chars for EditTextpreference Any ideas? Jun 12 11:35:35 Hi guys , i have got backup from my nokia messages and imported into android , but some of conversations date was set wrong in nokia (the date after now for example dec2014)and they are at top of messages now .is there any way to correct their date ? Jun 12 11:38:12 hello Jun 12 11:38:13 I need to run asynchronous task (getting stuff from the internet) that can be cancelled. What is the best approach to achieve that? Jun 12 11:39:18 how do I group 2 (or more widgets) together and use them as one? Layouts? Jun 12 11:39:34 mrpyo: use asynctask, at the beginning of it use dialog box with cancel option... Jun 12 11:39:55 Reinstalling AS worked. I was missing studio64.exe for some reason Jun 12 11:40:44 but how to stop asynctask? Jun 12 11:42:08 AsyncTask.cancel(boolean) Jun 12 11:42:16 ^^ Jun 12 11:42:36 mrpyo: more on AsyncTask at http://developer.android.com/reference/android/os/AsyncTask.html Jun 12 11:42:54 is it safe? Jun 12 11:43:23 mrpyo: safe as in? Jun 12 11:43:36 it just stops whatever work it was doing.. Jun 12 11:43:53 no interupted exceptions and so on.. Jun 12 11:44:01 and calls onCancelled instead of on postExecute Jun 12 11:44:16 s/on postExecute/onPostExecute/ Jun 12 11:44:23 can i set on clicklisteners in the getview? Jun 12 11:45:40 mrpyo, Never used it. But according to docs it should fit your definition of "safe" Jun 12 11:45:54 ok thanks Jun 12 11:46:15 mrpyo, I suggest reading docs yourself though Jun 12 11:46:22 ok Jun 12 11:49:42 i need help Jun 12 11:49:52 any android developer is here? Jun 12 11:51:28 t4nk788, ask and if someone knows will help Jun 12 11:51:54 how can i hide the popup of space key in custom softkeyboard? Jun 12 11:53:55 how can i hide the popup of space key in custom softkeyboard? Jun 12 11:54:48 popup?? Jun 12 11:55:01 i means key preview Jun 12 11:55:50 don't know what you mean Jun 12 11:56:16 shmooz:i m developing a keyboard for android Jun 12 11:56:44 by extending the default keyboard ? Jun 12 11:56:59 yes Jun 12 11:58:07 in that i want if user press space key then there should not be any keypreview at the time of pressing the key Jun 12 11:59:39 shmooz:i googled a lot but not found any usefull link Jun 12 12:05:37 how can i hide the popup of space key in custom softkeyboard? Jun 12 12:06:24 hi all Jun 12 12:06:43 how can i hide the popup of space key in custom softkeyboard? Jun 12 12:07:05 Isn't it problematic to make gui components final? Like final btnPlay = (Button)findViewById(R.id.btnPlay); Jun 12 12:07:40 Kake_Fisk:no Jun 12 12:08:08 Kake_Fisk, It depends on what you're trying to do. The reason I've seen this usage is so that anonymous inner classes have access to components. Jun 12 12:08:17 yeah Jun 12 12:08:37 I just thought final did something along what static does behind the curtains. Jun 12 12:09:13 need to get the asset path to list some file Jun 12 12:09:18 No AFAIK it just adds compiler checks to make sure you don't modify the reference. Jun 12 12:09:29 how can i hide the popup of space key in custom softkeyboard? Jun 12 12:09:30 the code is here if anyone can help me pls http://pastebin.com/jSPGCN7A Jun 12 12:09:39 josaphat: Ah, of course! Jun 12 12:09:52 danke Jun 12 12:10:05 Kake_Fisk, no problem Jun 12 12:11:30 t4nk788, you write a method called hide() in your MyPopupClass class. Jun 12 12:12:28 josaphat:can u understand my question? Jun 12 12:12:43 Estel: Just as an example regarding my 'scaling' issue https://dl.dropboxusercontent.com/u/2454891/smartphone.png https://dl.dropboxusercontent.com/u/2454891/tablet.png Jun 12 12:13:25 josaphat:popup means key preview Jun 12 12:13:37 That looks reasonably correct. The /physical size/ of the images is about consistent Jun 12 12:14:09 Which method would you recommend for playing short sound effects? Jun 12 12:14:35 Estel: Alright, but since this should be an UI element I would like that it takes up as much space on other screens Jun 12 12:15:03 Do you mean that it should take up a percentage of the width? Jun 12 12:15:05 t4nk788, you said "custom". Which means you customize it. Which means you write your own methods. If you're not more specific you're never going to find any help Jun 12 12:15:12 So in both ccases it should be 25% of the width? Jun 12 12:15:24 Estel: yes Jun 12 12:15:52 josaphat:i m developing my own keyboard for android Jun 12 12:15:58 is that done with layout weight.. Jun 12 12:16:02 platzhirsch: there best way to get a % width is to create a LinearLayout with children that have a layout_weight Jun 12 12:16:05 Yes Jun 12 12:16:08 gotcha Jun 12 12:16:29 any help pls Jun 12 12:18:19 t4nk788, I get that. So why not just remove the code that displays the popup? Jun 12 12:19:17 josaphat:if i remove the code the popup is not appearing on any other key Jun 12 12:20:16 anyone familiar with tasker? i'm trying to do something rather simple but i'm stuck :(( Jun 12 12:21:08 t4nk788, onClick(TheKey) { if(!TheKey.equals(KEYS.space)) showPopup(TheKey);} That's all you're getting from me Jun 12 12:21:54 rhapsody`, #android is a better place for discussion about apps. Jun 12 12:26:30 they are all sleeping/afk/wanking/at work/not knowing Jun 12 12:28:51 i set up tasker to play a sound when battery is fully charged, I wanted to make it play this sound 2 more times with 10min interval if the phone hasn't been unpluged, but I couldn't possibly find how to do this, I was sure it was possible Jun 12 12:33:30 ah, the good old "ANSWER MY QUESTION IMMEDIATELY, SERFS!" Jun 12 12:35:15 "WHY WILL NOBODY VOLUNTEER THEIR TIME TO HELP ME **NOW**"? Jun 12 12:36:10 Sounds invoicable Jun 12 12:37:08 rhapsody`, Also, why? Jun 12 12:38:46 happens all the time 8-) Jun 12 12:38:54 rhapsody`: this channel is not about using an android-device Jun 12 12:39:03 rhapsody`: we are all ios-lovers in here Jun 12 12:40:00 I still need to find a device to put iOS8 on :( Jun 12 12:50:40 I will buy the iphone 6 it's decided already Jun 12 12:50:56 android is a let down Jun 12 12:51:09 not trolling, im dead serious anout it Jun 12 12:51:25 good for you Jun 12 12:51:57 thie to /leave #android-dev && /join #iphonedev then. Jun 12 12:52:35 rhapsody`, if only android could notify when my phone's done charging! Jun 12 12:53:23 I can't be bothered to look at the little battery icon! That's ridiculous! Jun 12 12:53:31 did you guys ever got to the end of a class, after you wrote it, scroll it all back up, and thought to yourselves "good god, i'm a genius"? Jun 12 12:54:44 josaphat: its usually the opposite :D Jun 12 12:55:55 whenever you use reflection you get that feeling Jun 12 12:56:02 then you have to maintain it 3 months later Jun 12 12:56:05 jvrodrigues, Nope. In my experience the only time that happens is when months later you see that you're still using the class exactly the same way in a million different places and you can remove it without breaking anything. Jun 12 12:56:07 and you think you are an idiot Jun 12 12:59:48 I wonder why the iphonedev chan has @ops but this one hasn't, I might get kicked pretty fast over there if i don't ask the right question Jun 12 13:00:57 They just aren't opped up here Jun 12 13:01:35 it's iphone devs, they're mostly d-bags in my experience Jun 12 13:02:16 [14:01] guy when can i pre-order the iphone6, can't wait Jun 12 13:02:16 [14:01] can i run the next android on it ? Jun 12 13:02:31 ahah Jun 12 13:02:33 jvrodrigues: no more so than Android devs. Jun 12 13:02:44 the next iphone is going to be revolutionary with those new features Jun 12 13:02:48 Oh wait... Jun 12 13:02:54 they've been around for decades Jun 12 13:03:09 jvrodrigues, I'm an iPhone dev, I aint a dbag Jun 12 13:03:28 AllTuna, i was just joking really Jun 12 13:03:36 me too :) Jun 12 13:03:40 ahah Jun 12 13:06:00 ty for the kind support guys, i need to go now, but i'll be back no worries Jun 12 13:08:39 Google mostly doesn't believe in having ops in their IRC channels Jun 12 13:15:22 Leeds I used to see Romain in here a good bit, but then I never saw him again Jun 12 13:15:36 yeah, but he left the Android team a year or two back anyway Jun 12 13:15:46 Leeds oh, didn't know that Jun 12 13:16:37 hmm, no, only October last year - seems longer Jun 12 13:16:44 https://plus.google.com/+RomainGuy/posts/faCzPs6GKtg Jun 12 13:16:54 He still did that font rendering article not long back, so doesn't feel like he's that far away Jun 12 13:25:54 Is there a way to execute code when the app crashes? Jun 12 13:29:36 platzhirsch: maybe try http://developer.android.com/reference/java/lang/Thread.UncaughtExceptionHandler.html Jun 12 13:30:09 markmarkmark: ah great, thanks Jun 12 13:30:20 platzhirsch look at the source org.acra.ACRA https://code.google.com/p/acra/source/browse/trunk/acra/src/main/java/org/acra/ACRA.java?r=775 Jun 12 13:33:05 the oncreate in my activity is NOT called on rotation. How can I fix it? Jun 12 13:33:52 How would you make an animated layout Jun 12 13:34:53 kakazza: depends what animation? :P Jun 12 13:35:05 * Kake_Fisk, sorry Jun 12 13:35:39 Kake_Fisk: linearLayout.setLayoutTransition(new LayoutTransition()) is good enough lots of the time :) Jun 12 13:35:56 My background is tilted maybe 60 degrees. And I want it to scroll diagonally Jun 12 13:36:27 WantToCode: do you have android:configChanges="orientation" in your Manifest or something? Jun 12 13:36:36 nope Jun 12 13:37:19 hi! I am developing an app supports both phones and tablets. I am having layout problems with nexus 7 and standard 600x1024 7' tablet where I had to give dp values on the xml like size and margin. Is there a way to differantiate those two at dimens? Jun 12 13:37:38 The most recent change that I think which may have caused it is adding a custom view actionbar. because before it I remember that it worked Jun 12 13:38:20 Can it be the reason? Jun 12 13:42:25 WantToCode: if you have android:configChanges="orientation|keyboardHidden" in your activity tag in manifest it will not be recreated Jun 12 13:42:27 Here is my oncreate method http://pastebin.com/Y7PCN7hV Jun 12 13:43:31 sorry, but I have read at many places that using android:configChanges is not a good practice. Jun 12 13:44:57 I am saying that if you have that in the manifest onCreate will not be called Jun 12 13:45:10 not to use it Jun 12 13:45:14 no its not Jun 12 13:46:08 WantToCode: I would start commenting stuff out until it made sense Jun 12 13:50:30 I overrided all the lifecycle events, seems normal on boot but after rotation, after onDestroy, onCreate is not called again Jun 12 13:50:48 Could this be caused by the fragment somehow? Jun 12 13:53:04 I am interested in making my android device ONLY have connectivity through a VPN Jun 12 13:53:22 is this possible to force all comms through the VPN on a non rooted device? Jun 12 13:54:48 Images, you want to make an app that does this? Jun 12 13:55:06 Possibly - if it doesnt already exist Jun 12 13:55:22 I am using the ics-openvpn port presently to establish an openvpn connection Jun 12 13:55:36 but it seems like if I knock the ovpn server offline, I still have a data connection Jun 12 13:57:16 josaphat: I did some searching around, and you can find things like this: https://play.google.com/store/apps/details?id=com.privateinternetaccess.android Jun 12 13:57:26 josaphat: But I am prettysure they would have the same issue I am talking about Jun 12 13:58:59 I use VpnCilla for vpn access so it can be done. If you register system opening end enable it on the backgroud I think it will work Jun 12 13:59:52 Is there some kind of layout container that doesn't have any special properties? I just want to group my 4 buttons in a container Jun 12 14:00:08 I am not sure if it requires root or not. my device is rooted Jun 12 14:00:10 first time working with services Jun 12 14:00:23 can i pass object references to a service as if it was a regular object? Jun 12 14:00:27 or maybe i shouldnt? Jun 12 14:00:29 hmm Jun 12 14:00:38 i probably shouldn't tho Jun 12 14:01:04 Kake_Fisk: I use framelayout for that purpose Jun 12 14:01:09 thanks Jun 12 14:01:45 Kake_Fisk: the special properties of layout containers are just to describe how you want to group your buttons. do you want them in a line, in a grid, on top of each other? Jun 12 14:02:30 jvrodrigues: you can pass serializable or parcellable objects. Jun 12 14:02:58 jvrodrigues: you can use otto or eventbus to pass objects back and forth Jun 12 14:03:09 can you test apps on the android game tablets? Jun 12 14:03:25 or do you have to set up some weird drivers Jun 12 14:03:33 Is it possible to add the SDK docs to android studio? Jun 12 14:04:03 njcomsec: android game tablets? like what? Jun 12 14:04:18 Archos Gamepad Jun 12 14:04:20 njcomsec: what do you mean? you will need a driver to be able to debug. Jun 12 14:05:25 Click66: f1 Jun 12 14:05:26 njcomsec: generally speaking, any android device can run android apps through adb Jun 12 14:05:29 Click66: what do you mean? Jun 12 14:05:31 or alt f1 Jun 12 14:05:31 that one included Jun 12 14:05:35 i didnt need to install a driver for my nexus 5 or xperia j Jun 12 14:05:43 so they must use some default one Jun 12 14:05:50 so I wondered if tablets now use this Jun 12 14:05:59 instead having to install propriatary ones like before Jun 12 14:05:59 gordon_: thanks F1 is the shortcut :) Jun 12 14:06:01 yes. all android talks the same adb Jun 12 14:06:08 windows often needs specific drivers, but not always. ive never heard of linux or osx needing one Jun 12 14:06:12 if you're using windows you may need vendor drivers Jun 12 14:06:20 yeh windows Jun 12 14:06:24 thats what i mean Jun 12 14:06:29 why dont they al just use the same one? Jun 12 14:06:45 vudu: I just want to have doc info over a syntax Jun 12 14:06:49 njcomsec: you need to see it for yourself. if anybody haven't used that device Jun 12 14:06:50 bWXuaw windows Jun 12 14:06:53 *because Jun 12 14:07:47 linux/osx sometimes need you to add the vendor id to adb_usb.ini Jun 12 14:08:18 zinx: you can try it on windows too Jun 12 14:08:23 no, not really Jun 12 14:08:37 you might potentially be able to add them to the .inf, but windows is a PITA in general Jun 12 14:08:52 and you do haveto install drivers for windows. Jun 12 14:09:15 I have done it for some xperia device for google drivers Jun 12 14:09:25 and a huawei device Jun 12 14:09:29 and both worked Jun 12 14:09:33 not adb_usb.ini :/ Jun 12 14:09:47 'cause afaik it doesn't even use that on windows :P Jun 12 14:10:04 and for the .inf, you need the vid and pid, not just vid Jun 12 14:10:27 where should oauth client_id be stored in my application Jun 12 14:11:13 any of you see this before and/or know of a workaroudn? https://code.google.com/p/android/issues/detail?id=71098 Jun 12 14:11:58 zinx: android_winusb.inf is the right place I guess Jun 12 14:15:01 is there a way I can override the existing missed calls notification from Android? Jun 12 14:15:12 add something to it, replace it.. Jun 12 14:15:17 I just downloaded the latest Android Studio for Mac, and updated it. I have never touched anything android before. So, the question is: After a default install, I get a warning and an error. Warning says: "Warning:(4, 22) Old buildToolsVersion; recommended version is 19.1.0 or later" Jun 12 14:15:27 Error says "Warning:(4, 22) Old buildToolsVersion; recommended version is 19.1.0 or later" Jun 12 14:16:05 is there something I can do to fix it? should I file a bug-report? Jun 12 14:16:55 a clean install of the SDK should be working properly... Jun 12 14:18:12 The reason of my onCreate not calling is definitely using custom Actionbar. because If I comment it out. everything works normally. Jun 12 14:18:33 Do I need to destroy it somehow when activity is destroyed Jun 12 14:21:50 Spiff_no: go to build.gradle and change the the values Jun 12 14:22:07 you also need to update the build tools from sdk manager Jun 12 14:23:35 vudu, any idea about my problem? Jun 12 14:24:52 ok.. thanks.. but this should be up to date when installing the IDE in the first place imo, Im coming from iOS development, so maybe Im just spoiled.. ;) Jun 12 14:31:05 SimonVT, is there any way that I can override the existing missed calls notification? Jun 12 14:31:13 to add something to it for example Jun 12 14:50:40 frankdoyle: Oh, so I can just use an other RelativeLayout? Jun 12 14:52:03 Kake_Fisk: for your four buttons? sure, if that's the way you want to lay them out. you can nest viewgroups inside of viewgroups Jun 12 14:55:59 Yeah, I just thought that would be "bad" Jun 12 14:58:45 its less performant, but usually not enough that you'd notice. and if you do, you can optimize it some or rearrange things Jun 12 15:00:35 ah, okay Jun 12 15:02:17 yeah, keep it sane, but complex layouts might have 3-4 nested viewgroups Jun 12 15:02:20 how is it less performant? Jun 12 15:02:50 more objects in memory, more to do in each layout pass, etc Jun 12 15:03:26 but what if I don't call those relativelayouts from my code (i.e. not even give them an ID)? Jun 12 15:03:32 are objects of them still created? Jun 12 15:03:36 from..XML? Jun 12 15:04:08 Napalm! Jun 12 15:04:15 every view and viewgroup you declare in xml is instantiated when you inflate it. that's what inflate means; you're taking xml and turning it into actual objects Jun 12 15:04:22 you end up with a view tree Jun 12 15:04:34 findViewByID just traverses that tree and gives you a reference to that object Jun 12 15:04:58 so all of those XML elements are objects Jun 12 15:05:36 so you have 2 objects when you create a TextView and call it from code? the XML element and the object you created to store the XML reference of it? Jun 12 15:06:05 Is the Android bookmark icon (as in Play Store) not in the action bar icons pack, or am I just overlooking it? Jun 12 15:06:07 effectively, yes. if you have an xml doc that describes a linearlaoyut with three buttons in it, it's effectively the same as saying new LinearLayout ll = new LinearLayout(), ll.add(new Button), ll.add(new Button), ll.add(new Button) Jun 12 15:06:28 bit more complex, but that's the idea Jun 12 15:06:37 so you end up with 6 objects if you have those in XML, and want to reference them in code Jun 12 15:06:43 can you provide docs for what you're saying? Jun 12 15:07:34 anywhere that this is mentioned Jun 12 15:08:06 No, you just end up with the 4 (1 viewgroup, 3 views) Jun 12 15:08:26 that's more sensible Jun 12 15:09:29 That's what he said Jun 12 15:09:51 he's saying that XML elements are created objects, if you reference them in code or not Jun 12 15:09:59 Yes Jun 12 15:10:13 If you inflate an xml layout, objects are created Jun 12 15:10:13 so what if I create a textview object in code and findViewById it? Jun 12 15:10:26 that's 1 already created in XML, and 1 in code Jun 12 15:10:27 Then you get a reference to that object Jun 12 15:10:44 when you findviewByID, you're not creating objects, you're finding objects that already exist Jun 12 15:10:46 Nothing is "created in xml" Jun 12 15:10:52 xml layouts just describe a view hierarchy Jun 12 15:11:21 It has to be inflated (parsed) into view objects Jun 12 15:11:40 I see Jun 12 15:12:47 where are docs that talk about this Jun 12 15:12:56 I mean where do you guys know this stuff Jun 12 15:14:59 https://developer.android.com/reference/android/view/LayoutInflater.html Jun 12 15:15:13 setContentView, etc, eventually ends up with a call to LayoutInflater#inflate as well Jun 12 15:15:54 thanks Jun 12 15:15:58 couldn't tell you where all of it came from, but when I call inflater.inflate(R.id.whatever) it gives me back an instantiated viewgroup, and that viewgroup contains other instantiated viewgroups Jun 12 15:16:10 or views Jun 12 15:16:28 And then you just read https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/LayoutInflater.java Jun 12 15:33:20 Can you use a dagger injection in a fragment's onAttach? Jun 12 15:35:49 Sure Jun 12 15:36:52 There was a very nice Dagger guide or whatever on the Android Weekly email Jun 12 15:37:06 highcup, do you want the link? Jun 12 15:37:31 Sure, I'd even sign up for the email.. Jun 12 15:37:43 http://antonioleiva.com/dependency-injection-android-dagger-part-1/?utm_source=Android+Weekly&utm_campaign=9ab2d99a2b-Android_Weekly_105&utm_medium=email&utm_term=0_4eb677ad19-9ab2d99a2b-337833125 Jun 12 15:38:02 It's a nice introduction to ir Jun 12 15:38:04 it* Jun 12 15:38:16 Then you can check SimonVT's code https://github.com/SimonVT/cathode/blob/master/cathode/src/main/java/net/simonvt/cathode/CathodeApp.java Jun 12 15:38:57 Thanks Jun 12 15:39:00 Woah, there was even a video on design :D Jun 12 15:39:08 That's probably a bit overkill Jun 12 15:42:01 is anyone else here having updates with the recent android stuido updates, submodules and an outdated gradle version? Jun 12 15:42:45 Hey there, im using the navigationdrawerfragment provided by android studio. in my mainactivity, it works as it should. now i tried to change another activity to implement it, c&p the override methods and added all the stuff just the same as in mainactivity. thing is, it still works via slide, but a click in the top left doesnt open it, as it does in mainactivity Jun 12 15:42:58 SimonVT, what is? Jun 12 15:43:20 Syzygy, IDEA has said nothing Jun 12 15:43:29 Looking at my code to figure out how to use dagger Jun 12 15:44:02 alt0r: does the button have the hamburger? Jun 12 15:44:31 Ah Jun 12 15:44:37 Probably. It helped me though :D Jun 12 15:45:54 Estel: hamburger? Jun 12 15:46:10 alt0r: the three horizontal lines Jun 12 15:46:21 Hello, my Android SDK GUI appears to be pretty broken after an SDK update. Arrows won't open menus, random items disappear from the list, radio buttons immediately de-select etc. After reinstalling the SDK and reinstalling, is this some sort of Java issue? I'm on Max OS X. Jun 12 15:46:44 Estel: yes it does, but click doesnt do anything Jun 12 15:48:39 sounds like you missed something when you copied stuff over Jun 12 15:49:23 How do I center the contents of a RelativeLayout inside the RelativeLayout bounds? Jun 12 15:50:32 I found this gravity center_vertical that seemed to work Jun 12 15:52:41 layout_gravity is a property that determines where a view should sit in its parent if it isn't filling it. it should be exactly what you're looking for Jun 12 15:53:10 you can also use layout_centerinparent Jun 12 15:53:12 that should work too Jun 12 15:55:35 Hi all, one of my new apps is having massive slowdowns during gameplay. Could I get one of you to test it on your phone, it's already on the store? Jun 12 15:55:39 It didn't work when I tried, but I'll try again Jun 12 15:55:56 Oh, yeah, I'll just go for gravity :p Jun 12 15:56:31 Does anyone have suggestions or recommendations for an model layer on top of sqlite? satyan/sugar looks interesting, but I'm curious if anyone has any experience with anything Jun 12 15:56:46 jpiche: everything sucks Jun 12 15:57:19 Estel: sweet Jun 12 15:57:56 frankdoyle: double checked, c&p everything exactly same as from mainactivity, are there any other places / files I'd need to change? Jun 12 15:59:07 Estel: I've been doing manual queries in my apps so far, since I feel very comfortable with sql, but it's a ton of boilerplate Jun 12 15:59:57 jpiche: we've been using ORMLite - I'm a big fan Jun 12 16:01:16 nelsk: interesting; I hadn't seen that one Jun 12 16:03:14 hey can someone help me with this http://stackoverflow.com/questions/24167337/java-lang-illegalargumentexception-when-using-youtubeplayerview Jun 12 16:04:30 Does the Crashes & ANRs section in the developer console also include crashes from beta- /alpha-apks or only production? Jun 12 16:04:58 jpiche, nelsk same here, OrmLite Jun 12 16:06:25 Henry_Gale what's it called Jun 12 16:10:08 jpiche: make sure you have a solid migration strategy between releases. I've run into production crashes because migrations went south Jun 12 16:13:29 sorry, just saw your message Matt, let me PM you the play store link Jun 12 16:13:51 nelsk: right Jun 12 16:14:11 Hengry_Gale send it to theblang@gmail.com and Ill check it out over lunch Jun 12 16:14:16 Henry_Gale Jun 12 16:18:58 oncreate is not called on config change if I set custom view on actionbar, can somebody take a look. http://stackoverflow.com/q/24187246/3488870 Jun 12 16:20:59 WantToCode: check your debug settings on the device Jun 12 16:22:51 should I look for something specifically? Jun 12 16:23:16 I keep getting java.lang.IllegalStateException: android.os.DeadObjectException in YouTubePlayerView Jun 12 16:28:28 http://phandroid.com/2014/06/12/google-quantum-paper-android-ios/ Jun 12 16:28:41 this makes me nervous Jun 12 16:29:25 "The goal is to make all Google apps have the same user interface and experience on the web, Android, iOS, and any other platform." Jun 12 16:29:35 sounds great if you want to get rid of android and have everyone use the web instead Jun 12 16:29:49 I don't think anyone wants to get rid of Android Jun 12 16:29:54 And I thought cards were introduced to do something like this. Jun 12 16:30:35 What do you think of this new design? Yay or nay? : Nay Jun 12 16:30:45 Big Nay Jun 12 16:31:18 Leeds judging by the way google has been half assing their platform for the last 5 years, i thinnk google does really ! Jun 12 16:31:40 you can't tell me they would rather not have a single stack that worked for web and mobile Jun 12 16:32:26 although wearables is tricky, might have to keep something around for that Jun 12 16:33:17 I think it's clear that you can't do a general-purpose 'native experience' stack like that Jun 12 16:33:25 If I only want something to occur when a fragment is visible to the user, is the best place for this in the onResume() lifecycle method? Jun 12 16:37:03 Has anything new come up on listview reordering? Jun 12 16:39:34 g00s, Leeds, WantToCode whatever haters, I like it, haha Jun 12 16:39:52 mattblang seems like most commenters liked it Jun 12 16:40:00 as you all know, i'm just weird Jun 12 16:40:51 but i'm guessing again that this means i need to include a whole new fuckton of drawables in drawable-xdpi-v20 or something Jun 12 16:40:58 g00s haha Jun 12 16:41:20 you know, because now we use dots in overflow, but previously squares Jun 12 16:41:59 hi all Jun 12 16:42:51 can any1 tell me which will be the best android game engine to use? Jun 12 16:45:35 mattblang WantToCode more here http://www.androidpolice.com/2014/06/11/exclusive-quantum-paper-and-googles-upcoming-effort-to-make-consistent-ui-simple/ Jun 12 16:45:55 "Along with this release, we have reason to expect a new set of guidelines called - appropriately - the Quantum Paper Spec, which will explain the overall approach and best uses for the design elements available." Jun 12 16:46:02 so new design guideliens Jun 12 16:46:44 Its getting sooo flat, it would soon become weird. Otherwise it would suddenly become 3D again.. Jun 12 16:47:13 WantToCode I have to admit though, i really dig the Windows flat look. Of course nobody uses Windows Jun 12 16:47:13 i have a listview and an arrayadapter and it's all working as it should Jun 12 16:47:21 how can i link other layouts to the items? Jun 12 16:47:26 g00s thanks a lot for the link! reading now Jun 12 16:47:27 do i use onclicklistener? Jun 12 16:47:39 "You wouldn't be mistaken to think of Quantum as a sort of broad-sweep replacement for Holo, but it's even more powerful than that. The framework will include interface, motion, and interaction (as stated before) on all platforms, making for not just clearer and more consistent UI but also a more consistent user experience." Jun 12 16:47:44 wow, this is kinda big then Jun 12 16:48:06 can u help me with one question? Jun 12 16:48:09 which will be the best android game engine to use? Jun 12 16:50:01 I like Holo Jun 12 16:50:23 That other design is not bad though Jun 12 16:51:26 hello , i have exact same version of adb in windows and linux , ( 1.0.31 ) in windows i can get shell , but in linux i can't , what is problem ? ( target phone is galaxy note 3 with android 4.4.2) Jun 12 16:52:02 g00s, WantToCode is it sad that what made me the happiest in that article was seeing a larger triple line icon (for nav drawer). i hate how the current one isn't more pronounced Jun 12 16:52:04 drivers Jun 12 16:52:36 haha me too. I really liked it. and that switch too Jun 12 16:52:39 autrilla: i dont think so , i have media access on devices , ( can write read file ) Jun 12 16:53:14 weox, check your driver on Windows' device manager Jun 12 16:53:23 You'll see it's composite adb interface or something like that Jun 12 16:53:38 Plug your device onto another Windows computer, but without any Android dev tools Jun 12 16:53:44 And it'll use another driver :P Jun 12 16:54:04 I guess it's time to increase the bounty on SO for the draggable listview items thing Jun 12 16:54:17 50 was not enough Jun 12 16:54:28 autrilla i was just updating my android 2 app for Holo :P Jun 12 16:54:38 Android 2? Jun 12 16:54:44 now i need to update for Quantum ! Jun 12 16:54:46 froyo? Jun 12 16:54:49 yeah Jun 12 16:54:57 That's kinda outdated Jun 12 16:54:59 Just kinda Jun 12 16:55:05 well the strategy did pay off :D Jun 12 16:55:32 I'm still trying to release my first app Jun 12 16:55:51 All these little things make me struggle Jun 12 16:56:02 indeed Jun 12 17:02:20 which will be the best android game engine to use? Jun 12 17:04:59 There's nothing recent on listview drag reordering :/ Jun 12 17:07:15 autrilla yeah its still a pain :) Jun 12 17:07:40 And it's a core part of the app I'm building... Jun 12 17:07:53 autrilla did you see the devbytes thing? Jun 12 17:08:04 g00s, yep Jun 12 17:08:07 I modified it a bit Jun 12 17:08:15 http://stackoverflow.com/questions/23710029/ Jun 12 17:08:18 But... it doesn't work Jun 12 17:11:21 one nice feature of WP is that you can have it prevent apps working in the background if they haven't been used for a time, i think the default is 2 weeks Jun 12 17:11:40 you can also just manually say 'this app is not allowed to do background stuff' Jun 12 17:25:30 Hey, does anyone happen to have any opinions on Otto usage in this speakerdeck? https://speakerdeck.com/kevinmcmahon/event-aggregator-pattern-featuring-otto Jun 12 17:26:58 particularly curious about the last slide of code and the BusProvider code Jun 12 17:27:11 what about it? Jun 12 17:27:21 bus provider is just singleton pattern Jun 12 17:27:27 ok Jun 12 17:27:47 last slide of code just makes sure posting happens from the main thread Jun 12 17:28:13 is the last slide something that's required on android? Jun 12 17:28:18 no Jun 12 17:28:25 is there a danger not doing that? Jun 12 17:28:30 no Jun 12 17:28:31 ok Jun 12 17:29:34 I've been playing around with using the bus as a dagger injection, but every time I do, something feels off or it won't work for what I'm doing Jun 12 17:29:40 is there a way to get billing cycle usage through an API? Jun 12 17:29:50 seems like the singleton pattern is a more appropriate one for the event bus Jun 12 17:30:06 Dagger has a Singleton annotation Jun 12 17:30:30 autrilla: from what I've seen the @Singleton is in javax Jun 12 17:30:40 at least that's what studio uses Jun 12 17:30:43 And Dagger uses it Jun 12 17:30:46 right Jun 12 17:31:28 how would you get the dagger-provided singleton when I might not have a context with which to get the app to do injecting? Jun 12 17:31:52 why do you need a context? you just need a reference to the ObjectGraph Jun 12 17:32:05 @Provides @Singleton Bus provideBus() { return new Bus(); } Jun 12 17:32:21 MyApp.get(iDontHaveAContext).inject(this) Jun 12 17:34:44 you get the object graph from the application, you get the application from the context Jun 12 17:34:56 or am I missing something important? Jun 12 17:34:56 Exactly Jun 12 17:35:34 so with injection, I can't use the bus unless there's a context available Jun 12 17:35:51 with the singleton pattern in that deck, no context is required, right? Jun 12 17:36:53 No clue, JakeWharton will probably know it Jun 12 17:37:15 You don't need context for the singleton, that's right Jun 12 17:38:02 You can keep the ObjectGraph in a singleton pattern container Jun 12 17:38:32 same pattern as BusProvider? Jun 12 17:40:54 Sure. Or in a static field somewhere. Jun 12 17:40:58 It's just an object Jun 12 17:41:27 Is there a way to refresh a variable injected with dagger? Jun 12 17:41:43 Refresh? Jun 12 17:41:48 Use a Provider Jun 12 17:42:20 or is that data only available through the TrafficStats? Jun 12 17:44:08 I'll try the provider out.. Jun 12 17:50:42 provider out? Jun 12 17:54:01 hey guys, I'm having an issue with the activity lifecycle. If I press the android back button or the app's backup button, the activity gets destroyed. But if I click on a button on the screen that starts another activity, the original activity only stops and doesn't call onDestroy(). How can I enforce it to call onDestroy() if I press this button? Or should I not go against the lifecycle like that? Jun 12 17:54:35 how many versions back do you guys recommend I should support when making a new app? Jun 12 17:54:52 15+ Jun 12 17:55:13 helichopter: don't bank on onDestroy() Jun 12 17:55:17 ok, nice Jun 12 17:55:56 Spiff_no: API 15+ is 85% of the users globally and it's 100% of the users globally who are actually worth supporting Jun 12 17:56:59 Why don't my list items drag? http://pastebin.com/pqtus46v Jun 12 17:57:06 JakWharton: sorry, what do you mean? I'm taking over on an app that initializes an activity's views in the onCreate method using the extras from the previous activity. If it only onStop()'s, it doesn't update the views. So should I instead change how the activity handles variable data? Jun 12 17:57:07 thanks :) its nice you are patient with me, Im now embarking on making my first ever android app ;) Jun 12 17:57:30 and no, it aint gonna be another fart-app ;) Jun 12 17:57:32 JakeWharton, why 15 and not 14? Jun 12 17:57:40 because nobody uses 14 Jun 12 17:57:59 And... what does 15 add to 14? Jun 12 17:58:13 http://developer.android.com/sdk/api_diff/15/changes.html Jun 12 17:59:12 high level: http://developer.android.com/about/versions/android-4.0.3.html Jun 12 18:00:58 JakeWharton: I just threw finish() in after a call to start the new activity. It worked, but is this a bad idea? Jun 12 18:01:22 that's fine so long as you're okay with pressing back not going back to the old activity Jun 12 18:01:25 I wonder if there are a lot of bots here, every time you post a pastebin link it gets loads of hits Jun 12 18:02:42 JakeWharton: okay yeah in this case I think that's actually okay. Thanks for the help Jun 12 18:05:27 Does anyone know of any open source app that does listview dragging with a drag handle? Jun 12 18:05:53 autrilla isn't there code for the devbyte article ? Jun 12 18:06:03 i thought it was on github or something Jun 12 18:06:04 g00s, which is just what I use Jun 12 18:06:11 oh :| Jun 12 18:06:11 g00s, article? It's a video Jun 12 18:06:14 yeah Jun 12 18:06:19 There was a zip on the description Jun 12 18:06:22 That's what I use Jun 12 18:06:52 hey i have a button in a custom listitem. how do i bind an onClick event to them? Jun 12 18:06:54 I made a small modification though, I changed the onLongItemClickListener from the ListView to the Adapter and I post an event with Otto Jun 12 18:08:15 C'mon, 120 views! Someone must know the answer :p Jun 12 18:09:35 oooh, Android Studio is buggy.. Trying to open my layout file, freshly generated by the app, but no.. NullPointerException: null nice.. Jun 12 18:10:00 what IDE do you recommend? Jun 12 18:11:45 IDEA Jun 12 18:16:38 Spiff_no I am happy with Android Studio. which version are you on Jun 12 18:16:51 Got the latest one... Jun 12 18:17:02 maybe I should not update.. Jun 12 18:17:29 Spiff_no I think you can specify the different channels. I personaly am on 0.6.0, which is the latest canary. I haven't had a problem yet. Jun 12 18:18:24 I want to capture a few pictures with the camera and then immediately send them to a server for processing, is saving them using MemoryFile a good idea? Jun 12 18:18:29 Ok.. I just installed the update, then downloaded everything from the latest down to build 15 Jun 12 18:18:44 and then started a new project.. Jun 12 18:19:00 and it will just not open the activity_main.xml file Jun 12 18:19:23 getting a NullPointerException: null each time I try to open it Jun 12 18:19:45 I have not modified a single line yet in the generated project... Jun 12 18:20:43 What would be a better backend than Parse.com for scrapping rss file for titles and links? I need to quickly shift my cloud code (written in JS right now). My Parse.com server is stuck for 10 days now and the support is not helping. Jun 12 18:20:47 So Im just wondering now if I should try another IDE instead... Jun 12 18:21:22 JakeWharton yeah, just an FYI, I checked our app's analytics. it looks like 5.1 % are coming from 2.3.6, 10.3 percent from other. the rest is 4.0.4 + Jun 12 18:21:27 WantToCode: run your own backend ;) Jun 12 18:21:47 JakeWharton so what you said is almost exactly right Jun 12 18:21:59 nice. that matches the platform dashboard closely Jun 12 18:22:08 is it possible to create a fragment and have it affect another fragment? in an activity Jun 12 18:22:35 could somebody tell me please, where is it safe to cann debug here? http://pastebin.com/V29J4UMR Jun 12 18:22:48 @Spiff_no, I dont have the knowledge for it right now, and time is running out. Is there any Backend I can look into where I can shift my code. Jun 12 18:23:02 cann=call Jun 12 18:23:27 I tried calling it from onCreate but that NPEd Jun 12 18:24:36 WantToCode: Appcelerator and applicasa? Jun 12 18:25:36 http://www.kinvey.com Jun 12 18:25:58 Thanks, I'll look into all three. Jun 12 18:26:06 I used PHPfog, or appfog.com Jun 12 18:26:41 I dont know the scriptinglanguages you are familiar with, so I cant really recommend you something.. Jun 12 18:27:06 Im a php nut, so I wrote it myself instead of depending on a third party.. Jun 12 18:27:27 I would say, I am "familiar" with only JavaScript if it counts, I learnt it while using Parse.com only Jun 12 18:28:34 so you need a point and click back-end.. uuh.. well, the easier they are, the more they cost.. Jun 12 18:28:47 I should make a draggable ListView library. When I fix mine. Jun 12 18:29:14 @autrilla, yes and I'll use it in my next project :P Jun 12 18:29:39 Well first I'll have to fix mine :/ Jun 12 18:29:47 If I EVER manage to fix it Jun 12 18:29:52 autrilla what do you mean by draggable Jun 12 18:30:05 mattblang, draggable listview items Jun 12 18:30:12 @Spiff_no - I want it as an interim solution for a few month until I learn Python (I guess that's needed) to build me own backend Jun 12 18:30:20 autrilla oh, got ya. cool Jun 12 18:30:54 WantToCode: do you have a live app with users depending on the back-end right now? Jun 12 18:31:13 WantToCode if you know javascript you could try Node Jun 12 18:31:37 ah, forgot about node.. I second that.. Jun 12 18:31:49 I have a ready app which I could release as soon as my server is up Jun 12 18:32:03 I have my code in JS only Jun 12 18:32:31 not afraid your source code will be stolen? Jun 12 18:32:46 go make you a node api using cloud9 ide, throw it on heroku Jun 12 18:33:08 ^ this sounds intimidating. Jun 12 18:34:05 @mattblang, is it easier than it sounds? Jun 12 18:34:34 WantToCode: http://nodetuts.com Jun 12 18:35:14 WantToCode it is. cloud9 will generate a starter project for you. node has taken off so much in the last few years there is a lot of help to be had online and in the IRC. heroku is pretty simple, and usually has good instructions. (https://devcenter.heroku.com/articles/getting-started-with-nodejs) Jun 12 18:36:22 hmm Thanks both of you. I'll get onto this. So just later on move my current JS code in there somehow? Jun 12 18:37:07 WantToCode also with heroku you can throw on free tier databases that will scale up. never used heroku for anything besides the free stuff, so can't necessarily comment on how well it scales up. Jun 12 18:37:13 WantToCode what exaclty is your current JS? Jun 12 18:38:08 Currently It picks up RSS url from a data table, and scrap the title and link and save them in another table Jun 12 18:38:10 thats it Jun 12 18:38:18 Has anyone here tried out the new Android Runtime (ART) yet on a 4.4 device? Jun 12 18:38:37 I've heard it's still super buggy so I don't think I want to try Jun 12 18:40:38 Hm, the compiler is complaining that I am passing an integer into View.setVisibility().. an integer value that I got from either View.VISIBLE or View.GONE.. So this sort of thing _won't_ work? Jun 12 18:41:02 Integer viewstate = View.GONE; someView.setVisibility(viewstate); Jun 12 18:42:42 That's just an example, where I'm really getting the int value from is a Map. The key being the view, the value being the visibility the view should have. Jun 12 18:45:27 highcup "Integer" is the integer class Jun 12 18:45:38 View.GONE gives you a primitive int Jun 12 18:45:53 You wante "Integer viewstate = new Integer(View.GONE);" Jun 12 18:46:27 nooo Jun 12 18:46:41 java will auto-box from int to Integer Jun 12 18:46:48 oh Jun 12 18:46:57 weird Jun 12 18:47:46 Hmm. Maybe I'm going about this wrong then. Jun 12 18:48:00 someView.setVisibility() might not auto-unbox? Jun 12 18:48:10 Since the Map<> needs non-primitive generics. Jun 12 18:48:21 it will Jun 12 18:48:41 well then there is no problem Jun 12 18:48:46 :D Jun 12 18:51:53 Hm, so if I want to change the visibility of elements within a fragment based on some sort of arbitrary state, a Map with the views as keys and their desired visibility as the value isn't the way to go about it? Jun 12 19:00:08 I have no idea what your code looks like so I couldn't tell you Jun 12 19:02:46 any better system to canceling Toasts than keeping a reference to them to cancel in onPause? Jun 12 19:04:34 why should one want to cancel a toast? Oo Jun 12 19:05:01 use crouton? Jun 12 19:05:40 yiati: here's an example https://gist.github.com/anonymous/0c26fc8135f7d25e542f Jun 12 19:05:56 It's bad.. Jun 12 19:06:01 danijoo well, if the user sees a toast about how many results were in the list but immedietly leaves the screen id on't want it to stay Jun 12 19:06:08 danijoo kind of an edge case I guess Jun 12 19:06:18 I wanted to send "pairs.getValue()" into setVisibility(), but the compiler complained. Jun 12 19:06:32 yeah but it disapears after a very short time anyway. Jun 12 19:06:54 could somebody tell me please, where is it safe to call the function named debug here? http://pastebin.com/V29J4UMR Jun 12 19:07:37 jamesson, on onCreateView() Jun 12 19:08:27 highcup: That's not necessarily bad, what's the issue? Jun 12 19:09:06 Ah I see above Jun 12 19:10:16 autrilla: thank you very much. Now how may I call it to avoid the Eclipse error "Cannot make a static reference to the non-static method debug(String) from the type MainActivity"? Jun 12 19:10:57 Hello, anyone know a way to get the contact id of the owner of the device? Jun 12 19:10:59 that's not an eclipse error Jun 12 19:11:05 that's a learn java error Jun 12 19:11:08 pfn lol Jun 12 19:11:13 lasserix, there's a profile id Jun 12 19:11:17 lasserix, just use that Jun 12 19:11:30 how can i link profile id to contact id? Jun 12 19:11:31 yiati: Yeah it would be nice to just call setVisibility( pairs.getValue() ); // :( Jun 12 19:11:37 highcup: Yeah there shouldn't be any issue with that Jun 12 19:11:46 unless you are using Java 1.4 Jun 12 19:12:04 hey guys, I am wanting to make personal app to set my ringtone volume at certain times of the day Jun 12 19:12:22 The database uses contact id as the primary key, so i need to link the profile id via its contact id... Jun 12 19:12:44 jamesson your debug functino will need to be static also. if you think about it, static means that there will only be one instance of that function across all objects of that type. if you access a non static function from it, how would it know which object to use? Jun 12 19:13:32 mattblang: ould you explain more please? Jun 12 19:13:39 lasserix, it's a contact Jun 12 19:14:00 you mean the _id of the profile is a contact id? Jun 12 19:14:08 jamesson http://stackoverflow.com/a/3903551/1747491 Jun 12 19:14:21 not sure about that, but in any case, just retrieve the profile contact, and then reference the corresponding contact Jun 12 19:14:39 Why don't my list items drag? http://pastebin.com/pqtus46v Jun 12 19:15:38 mattblang: also, adding keyword static to declaration of deug resolves the issue, but now the line "String foo = "foo"" is unreachable Jun 12 19:16:00 debug=debug Jun 12 19:16:13 jamesson, time to learn java Jun 12 19:16:17 and what static means Jun 12 19:17:51 pfn: sorry to bother you some more, can you elaborate with some code? Jun 12 19:17:57 no Jun 12 19:18:25 well, voxitoki has an example of reading profile data, I suppose you can look at that Jun 12 19:18:49 how do I use adb to view my logcat but have the timestamp printed? Jun 12 19:18:51 hello jesusfreke Jun 12 19:19:00 DammitJim, look at the flags for logcat Jun 12 19:19:46 thanks Jun 12 19:19:47 got it Jun 12 19:20:05 pfn ha ha i was just about to make exactly this project ;p Jun 12 19:20:07 cool Jun 12 19:20:15 now, is there a different way to get mobile data usage besides using TrafficStats like getMobileRxBytes()? Jun 12 19:20:27 mattblang, if I use Java on Herkou and use XMLPullParser, wouldnt it be something similar? https://devcenter.heroku.com/articles/getting-started-with-java Jun 12 19:20:44 pfn: ty that stackoverflow explains quite well. But could you please tell me what the error "unreachable code" means? Jun 12 19:21:04 hey guys.. I need some guidance.. I think I am getting something wrong. I am working on this app that uses a Nav Drawer.. in other apps, I just relied on addToBackStack with no problem.. In this one however, I need something else, because if user navigates deep into item 1, then open de drawer go to item 2, then go back drawer item 1, it must be in the last activity they had open, with the proper fragments if they go back Jun 12 19:21:45 one approach could be to use an activity for each menu item with singleTask flag for each item Jun 12 19:21:57 does that approach make sense? Jun 12 19:22:01 n/m it was after return state,emt Jun 12 19:29:27 Since I updated android studio to the new version I'm forced to update the build tool version to 19.1.0 for all of my libraries, since some of them are submodules of public git repositories that is not an option for me. is there a way to make my stuff run with slightly older versions? Jun 12 19:31:21 WantToCode you could definitely do some Java on Heroku for a backend as well. what does the XMLPullParser do Jun 12 19:32:46 You can scan for tags in the xml, get data from it and use it somewhere. Before using Parse.com I used it to parse xmls and save the link and title in SQLite DB Jun 12 19:34:07 WantToCode so what exactly do you need to do on the backend? Jun 12 19:34:40 Syzygy_: You can install a slightly older version of Android Studio Jun 12 19:34:57 as a separate install Jun 12 19:35:48 any other option? besides forking the all repositories and updating the build tool version? Jun 12 19:36:04 from Table1 of say 50 rows, in which 1 row contains two integers and one url string, read one row and parse it to get the link and title, save it in Table2. Do this for all items in Table1 Jun 12 19:36:10 Just don't use libraries not in maven central Jun 12 19:36:29 SimonVT, like the facebook library? sounds like a plan. Jun 12 19:36:34 Syzygy_ not that I know of Jun 12 19:38:23 jamesson, learn java Jun 12 19:41:14 How would you align 2 buttons to the center in a relative layout? Jun 12 19:42:59 lots of ways Jun 12 19:44:01 But what is a "good" way`? Jun 12 19:44:28 I put it inside a new relative layout and did gravity center Jun 12 19:44:34 yuck Jun 12 19:45:05 hey , general question: how do i load preferences from a renderer Jun 12 19:45:28 same procedure as from a settings activity? Jun 12 19:45:53 thanks in advance for your help Jun 12 19:50:59 I attempt to bind to a service in my Fragment's onResume like so: getActivity().bindService(bindService, serviceConnection, 0); Jun 12 19:51:30 But when the activity exits, if the service had never been started after that, I get an error telling me a serviceconnection leaked Jun 12 19:52:05 note: I don't want the bindService call to actually start the service. The service in this case should only be toggled by a Switch in my Fragment. Jun 12 20:02:04 fuck it,i will just implement hard-coded application defaults Jun 12 20:04:40 Isn't it a good idea to not show ads if user is on mobile network? Jun 12 20:04:57 Or should that be the users responsibility? Jun 12 20:05:09 the traffic isnt that big Jun 12 20:05:12 ah, okay Jun 12 20:07:02 it seems less risky that way overall Jun 12 20:12:10 is there any way to apply the out of the box functionality that a list item has for changing color when clicked to an arbitrary layout that isn't in a list view? Jun 12 20:15:14 android:layout_below="@+id/toggleButton" or android:layout_below="@id/toggleButton"? Jun 12 20:16:11 Shouldn’t there be an API level 20 for 4.4.3 in my SDK? I’m not seeing it. Jun 12 20:16:47 no, why would there be? Jun 12 20:16:59 API level didn't change. Jun 12 20:19:25 http://bgr.com/2014/06/12/android-5-0-teased-in-google-now/ Jun 12 20:19:39 5.0 is being teased in Google Now World cup easter eggs Jun 12 20:23:36 * SpeedEvil wishes it wasn't likely to be a bag of shite in many ways. Jun 12 20:27:37 SpeedEvil: are you OK? Jun 12 20:28:28 JakeWharton: I want to thank you personally for how awesome Butterknife is Jun 12 20:30:46 glad you find it useful Jun 12 20:32:58 is there any way to simulate bad network conditions on my android device? Jun 12 20:33:39 whomp: I'm not aware of a way other than limiting it through your router, but the emulator does let you simulate different network speeds if I remember correctly. Jun 12 20:34:02 hello guys, any of you used SQL Asset Helper? I have a question about it. Jun 12 20:34:27 JavaDog, ty :) Jun 12 20:34:42 Sure ^^ Jun 12 20:34:58 any of you used SQL Assets helper? Jun 12 20:39:43 how do I determine what code my activity was started with? startActivityForResult(intent, XXX) <- i want to get XXX int he statrted activity Jun 12 20:40:15 colintheshots: Nope, no API level 20 yet http://developer.android.com/tools/revisions/build-tools.html Jun 12 20:40:51 I'm trying to avoid having to use a bundle, and hoping there is a getStartCode() or something Jun 12 20:42:29 it's rather silly to launch somethign ith a code, then have to maintain value in the bundle, Jun 12 20:42:38 why Jun 12 20:44:04 ^ @Scor1us Jun 12 20:44:12 @Scorp1us Jun 12 20:44:38 well, I call startActivityForResult(intent, MediaManagerActivity.GET_MORE_MEDIA); Jun 12 20:45:20 then something in MMA should be able to get what the request code Jun 12 20:46:02 if they have that, then I don't have to worry about putting something in a bundle, and handling the instances it's not there, and so on and so forth. Jun 12 20:48:55 You should use a bundle with bundle.putInteger("request_code", MediaManagerActivity.GET_MORE_MEDIA) and add the bundle to the intent with intent.setArguments(bundle) if you want to access that variable Jun 12 20:51:48 yeah, that's what I want to avoid Jun 12 20:52:10 intent.putExtras Jun 12 20:52:12 * Jun 12 20:52:15 That's the way you do it Jun 12 20:52:35 yeah, thanks. Jun 12 20:53:31 hey so I'm trying to hide the status bar by dimming it like so --> http://pastebin.com/EQ8uRqVV Jun 12 20:53:33 but everytime I touch the screen it comes back on again Jun 12 20:53:38 how do I keep it off? Jun 12 20:53:52 I'm in android 4.1 on a cheapy kocaso tablet Jun 12 20:54:07 yiati: can i notify a service in this way Jun 12 20:54:12 How would you pass an integer to an other activity when using startActivity? Jun 12 20:55:01 intent.putExtra() Jun 12 20:55:06 Kake: intent.putExtra() Jun 12 20:55:18 really shouldnt be asked here Jun 12 20:55:23 I mean come on.. Jun 12 20:55:31 I have too much logic to put it after every interaction Jun 12 20:55:37 half a google search would produce 10,000 results for that Jun 12 20:55:47 I just want to LISTEN to all user interaction Jun 12 20:55:54 Kake_Fisk: startActivityForResult provides a request code Jun 12 20:55:58 then dim the screen after every one Jun 12 20:56:20 I don't think it is unreasonable to have an activity get the request code from that. Jun 12 20:56:57 If there was getRequestCode() on the activity, then you could just use that. But there isn't so you have to muck about with bundles. Jun 12 20:57:32 You've got to handle if the value exists in the bundle, and maintain it seperately in the bundle. Jun 12 20:58:29 if (getExtra("requestCode") != null) ... Jun 12 21:00:49 thanks Jun 12 21:07:04 Is there an easy way to center all content of a relativelayout vertically? Jun 12 21:08:02 ive got this button which is a linear layout made up of the left icon side, and the right text side (http://i.imgur.com/Yg8XVBW.png). im trying to figure out how best to make it change color on press, like a list item does. any ideas? should I maybe prerender the entire button instead of trying to draw it in a layout? Jun 12 21:08:32 android:layout_centerVertical="true" Jun 12 21:09:09 In the relativelayout tag or in all the child tags? Jun 12 21:09:14 Could someone explain to me how the following code produces a nullpointer? if(serviceConnection != null) { getActivity().unbindService(serviceConnection); } Jun 12 21:09:25 put a setBackgroundDrawable on the buttons onclick Jun 12 21:09:42 Note: Only causes the NPE if i leave the activity, come back, and then disable the service (which runs this code) Jun 12 21:09:47 JavaDawg more information needed Jun 12 21:11:19 RawContactsEntity page says data_id will be null if there are no data rows associated, but it's a long, so does that mean c.getLong(data_id) returns 0 when its null? Jun 12 21:19:29 Hi, i have problems playing a 8bit wav file on an android app using AudioTrack. I read the wav file into a byte array using fileinputstream and then i want that byte array to convert to a short array so it can be played by AudioTrack.write Jun 12 21:19:45 but my conversion of every single byte into a short is not working properly (i can hear the melody but there is alot of noise) Jun 12 21:21:39 tffu: doesn't AudioTrack have a method that uses a byte[]? Jun 12 21:22:23 tffu, how do you convert your bytes into shorts? Jun 12 21:22:40 yes it does, but for its easier cause i use shorts for 16bit wav files Jun 12 21:23:33 but you just said 8bit wav file? I'm confused Jun 12 21:23:48 for every byte i do: shortBuffer[i] = (short)(((byteBuffer[(i*2)] & 0xFF) << 8) | (byteBuffer[(i*2+1)] & 0xFF)); Jun 12 21:23:55 is accept both as input Jun 12 21:23:58 i* Jun 12 21:24:56 Is there an easy way to vertically center everything inside a relative layout? Jun 12 21:25:35 Do I have to put the content inside another container with warp_content before I can center it? Jun 12 21:25:45 greetings guys Jun 12 21:26:11 i am having difficulty understanding how I can create two sets of icons for my app and have android pic the appropriate icon Jun 12 21:26:12 tffu, I haven't much experience in audio programming but aren't you just combining two samples into a single new sample this way? Jun 12 21:26:15 based on the selected theme Jun 12 21:26:26 i cant seem to find this referenced anywhere, perhaps I am overlooking something Jun 12 21:26:57 well if i do: shortBuffer[i] = (short)(((byteBuffer[(i)] & 0xFF) << 8) Jun 12 21:27:05 its running twice as slow Jun 12 21:28:18 ok, did you try to swap the two bytes? Jun 12 21:29:18 xximjasonxx, http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html might give you some hints Jun 12 21:29:54 EPG, actually found an SO article Jun 12 21:30:00 Could someone explain to me how the following code produces a nullpointer? if(serviceConnection != null) { getActivity().unbindService(serviceConnection); } Jun 12 21:30:02 always seem to ask one Google search too soon *sigh* Jun 12 21:30:20 xximjasonxx, ok, could you post the link to it? Jun 12 21:30:22 JavaDog, what does getActivity return? Jun 12 21:30:24 If I omit the if statement, the app also crashes on exit with a serviceconnection leaked error Jun 12 21:30:26 http://stackoverflow.com/questions/13735675/change-drawable-based-on-theme Jun 12 21:30:53 xximjasonxx: This is within a fragment's onPause, so it returns the Activity the Fragment is contained within Jun 12 21:31:02 and you have confirmed that? Jun 12 21:31:40 test Jun 12 21:32:20 EPG, i did it hardly makes any difference Jun 12 21:32:33 I suppose it's worth checking that the activity isn't null Jun 12 21:32:49 JavaDog, yes Jun 12 21:36:11 EPG: xximjasonxx: modified to: if(getActivity() != null && serviceConnection != null) { getActivity().unbindService(serviceConnection); } and now I just get "java.lang.IllegalArgumentException: Service not registered" Jun 12 21:36:29 is your service registered in the Manifest? Jun 12 21:37:13 Yup. It runs fine normally, this just happens when I'm leaving the activity Jun 12 21:37:25 leaveing the activity while the service is NOT running* Jun 12 21:37:31 leaving, even Jun 12 21:37:42 JavaDog, so you aren't bound to the service? Jun 12 21:38:08 technically, services run in the same memory space as the activity, hence they are joined at the hip as it where Jun 12 21:38:15 so if your activity is gone, so is the service Jun 12 21:38:29 It's a started service that I bind to after starting Jun 12 21:38:44 I'm not at that point, no. I attempt to bind using this statement, which as I understand it puts out a "request to bind" which is fulfilled as soon as the service is started: getActivity().bindService(bindService, serviceConnection, 0); Jun 12 21:39:17 I'm implementing an activity which is just sort of a service "control panel" Jun 12 21:39:49 Bindind shouldn't start the service. Only the on/off switch should do that, and binding/unbinding is only involved when the activity is launched/closed Jun 12 21:40:01 binding* Jun 12 21:41:53 so based on your analysis, which value is null? Jun 12 21:41:57 getActivity()? Jun 12 21:42:03 It seems that way Jun 12 21:42:29 theory: are you perhaps pausing the applicaiton BEFORE the binding completes, since this is a request for binding only? Jun 12 21:43:03 Yes, that's what's happening. I just want to revoke my "request" to bind if the service didn't end up being started Jun 12 21:44:18 there should be a way to know if the binding completed successfully and therefore would need to be unbound, correct? Jun 12 21:44:56 in non-android java, what's the most straightforward way to pass messages between threads? Jun 12 21:44:59 The bindToService command returns a boolean indicating whether the bind was successful, but even if the service hasn't started that return value is still true. Jun 12 21:45:12 it doesn't seem like i can use a Handler like in android Jun 12 21:45:36 Mango_Man, what does Google say? That should be a very well covered topic I would think Jun 12 21:46:08 JavaDog, is there a way for the Service to know that a process is binding to it? Jun 12 21:46:14 or has bound to it rather? Jun 12 21:46:18 JavaDog, what about onServiceConnected()? Jun 12 21:46:55 xximjasonxx: I believe there's a method you can override to run some code when that happens, yes Jun 12 21:47:02 xximjasonxx: yeah my google fu is failing me. i'll search a bit more Jun 12 21:47:35 EPG: In onServiceConnected I set a boolean, serviceBound = true; however checking that value in my if statement doesn't prevent crashes, it seems Jun 12 21:48:16 I am having some issues submitting a patch, repo upload fails Jun 12 21:48:20 My app is open-source if you care to look at the whole code. Let me push my changes Jun 12 21:48:24 JavaDog, http://developer.android.com/guide/components/services.html read the paragraph on Creating a Bound Service Jun 12 21:48:42 in particular the second paragraph of that section Jun 12 21:48:46 something about raise GitError('remote %s has no review url' % branch.remote.name) error.GitError: remote aosp has no review url Jun 12 21:49:23 I think that may be what you are running into Jun 12 21:49:57 liam-kelly, did you follow these steps: http://source.android.com/source/submit-patches.html ? Jun 12 21:50:18 Yes, I did Jun 12 21:51:41 https://github.com/culmor30/Bluetooth-Proximity-Lock/blob/master/Bluetooth%20Proximity%20Lock/src/main/java/com/javadog/bluetoothproximitylock/BluetoothFragment.java#L221 Jun 12 21:52:25 Probably should have linked this line actually https://github.com/culmor30/Bluetooth-Proximity-Lock/blob/master/Bluetooth%20Proximity%20Lock/src/main/java/com/javadog/bluetoothproximitylock/BluetoothFragment.java#L176 Jun 12 21:52:46 wow, google+ stories are awesome Jun 12 21:53:00 JavaDog, at which line is the exception? Jun 12 21:53:09 178 Jun 12 21:53:35 Although as it is now, it's not a NPE anymore, but a "serviceconnection leaked" error Jun 12 21:57:15 JavaDog, same line? Jun 12 21:58:11 No, it just spits out "serviceconnection leaked which was originally bound here: [with a link to line 170]" Jun 12 22:02:04 JavaDog, when does the error occur? Jun 12 22:03:05 then unbindService properly Jun 12 22:03:09 so you don't leak the serviceconnection Jun 12 22:03:10 Enter app > start service > leave app > enter app > stop service > leave app > crash on exit Jun 12 22:03:21 ok Jun 12 22:03:28 what pfn said Jun 12 22:03:28 and I was incorrect, the error I'm getting now is "service not registered" Jun 12 22:03:42 then don't unbind a service that you didn't bind in the first place Jun 12 22:03:55 I'm not, as far as I can tell Jun 12 22:03:59 I have a Color variable, anyone know of how I can check if its "too bright" ? I want to do something if its brighter than a certain value (say a Color). Jun 12 22:04:57 JavaDog, start with the example which xximjasonxx linked Jun 12 22:05:17 serrghi, do some math Jun 12 22:06:00 pfn: thanks Jun 12 22:06:18 serrghi, define "too bright" Jun 12 22:06:27 break it into the rgb components and check to see if each one is greater than Jun 12 22:06:32 assuming that's the basic gist you want Jun 12 22:06:59 either that or convert to HSL and compare L values Jun 12 22:07:28 nick998: http://stackoverflow.com/a/4112657/1229735 Jun 12 22:07:35 I got it. I just wasn't checking the right things, this is what I needed: if(getActivity() != null && serviceBound) { //unbind } Jun 12 22:07:55 hm, "too bright" is brigther than the color Ive defined (say a specific type of gray) Jun 12 22:08:04 thanks for the help, all Jun 12 22:08:04 hi, i am trying to modify notifications for an existing project, i found where the persistent notification is created with Notification.Builder but i dont see any place where a .cancel() is called Jun 12 22:08:20 what is too bright for 0xff0000, is 0x00ff00 brighter? Jun 12 22:08:23 relative luminense i guess Jun 12 22:08:29 serrghi, convert to HSL Jun 12 22:11:15 serrghi, also, would 0xff0000 be brighter than 0x111111 if you're just doing a dumb r/g/b comparison Jun 12 22:11:50 ill look into HSL (never heard of) Jun 12 22:12:05 if a custom notificaiton is created using a RemoteView, does handling the expanded version of the notification need to happen within that class? Jun 12 22:12:13 RemoteViews** Jun 12 22:12:18 serrghi, it's simple math Jun 12 22:12:30 What im trying to do basically is, im getting the average color of a image, and using it in my layout. If the color is too bright, i either need to use a different color, or change the texts that are on top of it to a darker color Jun 12 22:12:32 heater89, bigContent is a separate remoteview Jun 12 22:12:37 pfn: ok :) Jun 12 22:12:45 serrghi, hsv, hsl, whatever, try both Jun 12 22:13:13 hmm, I need to bike to the coffee shop and buy some beans Jun 12 22:13:23 pfn: so essentially I am going to need two separate layouts, one for the collapsed view and one for the expanded view? Jun 12 22:13:32 heater89, yes Jun 12 22:14:15 * pfn coffee run & Jun 12 22:14:48 pfn: alright, thanks Jun 12 22:25:45 Anyone here ever develop a custom camera preview? Jun 12 22:25:58 or rather an application with a camera preview Jun 12 22:27:34 ure Jun 12 22:27:36 once ... then we agreed we wouldn't try doing that again Jun 12 22:30:00 It's rather difficult to debug an application when you aren't sure if the bug is in the testing environment or in the application Jun 12 23:03:46 i want to make a soft number keypad for my app. is the best way to use the Dialog class and just have buttons with each number on a button listener? Jun 12 23:17:43 why not just use the keyboard with numeric input? Jun 12 23:21:46 because it is slow Jun 12 23:21:48 and smal Jun 12 23:22:10 and shows letters first as default Jun 12 23:22:18 In Android Studio. How do I refresh the cached drawable files in the layout editor? Jun 12 23:22:47 is there a refresh button? :) Jun 12 23:23:08 you mean like gradle sync? Jun 12 23:23:41 I don't think gradle sync worked Jun 12 23:24:07 But there was a refresh button, lol Jun 12 23:27:55 Anyone know the best way to compare the contents of two stringbuilders without invoking toString? Jun 12 23:29:59 is this a reliable way of testing if one has internet access —> http://stackoverflow.com/questions/4238921/android-detect-whether-there-is-an-internet-connection-available/6987498#6987498 Jun 12 23:36:37 jaspertheghost: http://pastebin.com/ZMjp8KgW Jun 12 23:36:52 here's what i use to check: returns true if cell or wifi is available Jun 12 23:38:29 what if ur connected to a wifi access point with no internet Jun 12 23:40:48 what are you trying to check specifically? Jun 12 23:41:13 if one is connected to the internet with 100% certainty Jun 12 23:42:54 you can use an HttpURLConnection Jun 12 23:42:55 http://stackoverflow.com/questions/9570237/android-check-internet-connection Jun 12 23:43:09 4th answer Jun 12 23:43:57 thanks Jun 12 23:45:28 remmber to wrap it in an async task tho Jun 12 23:46:45 I'm looking for a way to use build tools other than the one specified in a build file. I'm having an issues with a submodule of a library that I can't modify that's running an outdated version. Jun 12 23:51:03 lasserix / jaspertheghost : I'd look instead into the walled garden checking. There's an example on stack exchange as well; either call your own generate_204 or call googles. Doing a simple return code 200 check won't tell you if you're captive portaled. (unless that's in the list and I missed it) Jun 12 23:51:21 lasserix … i want to call it before i launch a webview with a url Jun 12 23:51:41 say i'm using an immutablemap from guava. if i iterate over that map, but add/remove items during iteration, is that iteration guaranteed to be a snapshot of the map *before* i started iterating? Jun 12 23:51:43 also im going to link back to it in the webview by a jsinterface Jun 12 23:51:53 is that kosher (so i wont be using async) Jun 12 23:51:57 dragorn: ahh thanks --> http://stackoverflow.com/questions/13958614/how-to-check-for-unrestricted-internet-access-captive-portal-detection Jun 12 23:52:25 lasserix: yeah that looks like it. Jun 12 23:52:29 jasper: can't you simple do if connected, then see if the webview returns null text? Jun 12 23:53:25 The 204 check is useful b/c no captive portal rewrite should return the 204 status code (either 200 or 302 usually) Jun 12 23:53:44 i was going to ping my server and check for the word green … same diffeerence right? Jun 12 23:53:45 you can probably figure out how to do a 204 check in embedded JS. Dunno. I don't care about running code in a webview. :) Jun 12 23:56:43 Anyone know where there is a full listing of vnd.android.cursor.item/*? Jun 13 00:02:13 immutable data structures are pretty darn cool Jun 13 00:02:54 whys that Jun 13 00:07:16 NetworkOnMainThreadException Jun 13 00:07:25 w00t Jun 13 00:07:33 not woot :( Jun 13 00:08:30 use an asynctask(loader) or something Jun 13 00:11:30 but i do want to block the UI thread how do i do that? i want to wait till it returns true or faqlse Jun 13 00:12:09 why do you need to 'block' it ? Jun 13 00:13:09 i dont wanna run the following commands until it returns true or false my function that does the nwrwork stuff returns true or false* Jun 13 00:15:49 ill use global var i guess Jun 13 00:15:57 and check for that and sleep(1000) in between Jun 13 00:43:31 How can I horizontally center a RealtiveLayout? Jun 13 00:45:17 android:layout_centerHorizontal="true" Jun 13 00:45:21 thanks Jun 13 00:53:14 how can i pass a variable to a new runonUiThread(Runnable() { ... Jun 13 00:55:09 nvm Jun 13 01:00:50 hi , I want to add few contact from my app in android contact book , with my app icon , like skype , whatsapp ,etc do in android Jun 13 01:01:00 what should i know to do these changes ? Jun 13 01:01:09 I mean any refrence ? Jun 13 01:01:21 is contacts provider is the right thing for this ? Jun 13 01:05:41 ok so im getting a line back from reader.readline which reads data from a webserver when i toaast the output it says GREEN Jun 13 01:05:47 but when i do if (line == "GREEN") { this does not return true Jun 13 01:06:07 .equals Jun 13 01:06:18 .contentEquals will that work? Jun 13 01:06:56 yep that works Jun 13 01:08:20 anyone please explain or guide me ? Jun 13 01:08:21 please Jun 13 01:13:00 chinu yeah Jun 13 01:13:04 look at rawcontacts Jun 13 01:13:08 rawcontactsentity Jun 13 01:13:51 lasserix :i want a contact sync like whatsapp , skype in my app as they make there app icons in the android native contact Jun 13 01:14:07 oh Jun 13 01:14:12 so look up syncadapter Jun 13 01:14:15 contacts tutorial Jun 13 01:14:54 i just want like , if i had 2 contact in my app they should also shown in the android native contact app and as well with my app icon Jun 13 01:15:31 oh so you need to insert rawcontacts Jun 13 01:15:40 look up how to insert contacts via rawcontacts Jun 13 01:16:01 thanks man for guiding me to a direction now Jun 13 01:21:10 AS update Jun 13 01:21:50 g00s: btw 0.19.1 was released 7 hours ago :P Jun 13 01:21:59 yeah got that :D Jun 13 01:22:23 they added pretty pictures to the new project wizard Jun 13 01:22:33 Does anyone have any resources to working with XML in Android? I am trying to make some heavily custom designs but am unsure of things like current design standards and how to even start (aside from laying a page out) Jun 13 01:24:00 bankai_au did you read about Quantum and the new android design coming up ? Jun 13 01:24:09 Quantum Paper or whatever Jun 13 01:26:21 how does one back up a non-determinate quantum computer? Jun 13 01:28:02 very... very... carefully. Jun 13 01:28:09 yah ... google doesn't know either .... ;) Jun 13 01:31:40 Hey guys I am wanting to set up a scheduled event everyday @ 8 am and at 10:30 pm, I have my calender set at the specific times I want my certain part of the code to execute, but I am not sure how to proceed from here. Jun 13 01:36:47 Leeds are you using that neovim thing or the old one ? Jun 13 01:36:57 there is only vim Jun 13 01:37:00 capella, AFAIK the real use-case for quantum computers is NP problems. Jun 13 01:37:53 They're basically lucky machines. Jun 13 01:38:07 i think writing android apps is NP hard Jun 13 01:38:24 g00s, that doesn't make any sense. Jun 13 01:38:34 josaphat just joking ! Jun 13 01:38:40 g00s, I know! :D Jun 13 01:39:11 People hate it when you accept their jokes as if they weren't. Jun 13 01:39:18 I find it hilarious Jun 13 01:39:39 So, we agree writing Android apps shouldn't be so (NP) hard .... and being obtuse is sometimes confusing :) Jun 13 01:40:59 I don't know. I just started tinkering with android this week and I've found that I can help a lot of people just because I know how to rtfm Jun 13 01:41:42 the android programmer guide is pretty good Jun 13 01:41:49 the javadoc … not so much Jun 13 01:41:51 Heh - you mean there's Android OS source code on my machine and I can read how thread concurrency works? Jun 13 01:43:01 The javadoc isn't very helpful if you want to learn the real art of programming: design. Jun 13 01:43:10 I thought announcing oneself as a newbie and asking what to do next was the method Jun 13 01:43:27 But it's really helpful when someone asks "How do I remove everything from a listview?" Jun 13 01:44:47 Well... doo doo doo doo doo ... let me google that for you. "List View... adapter... usually arrayadapter..." Cool. Let me look up arrayadapter... Jun 13 01:44:58 And suddenly you know that you just call clear(). Jun 13 01:45:17 * capella crosses fingers ... time to re-try building Servo for Android ... Jun 13 01:45:25 these days, there are a lot of books and good resources on android Jun 13 01:45:39 pretty hard to get lost in the weeds unless you're lazy Jun 13 01:45:51 * capella oh forgot rust first ... this is gonna take some time Jun 13 01:46:05 but still, there are areas not well documented even in the books, like 2d graphics, canvas, writing custom viewgroups, etc Jun 13 01:46:50 sounds like with Polymer / Quantum there are going to be lots of big changes Jun 13 01:50:11 I watched part of a video about that. I don't know how I feel about it. Jun 13 01:50:11 if i want multiple buttons in a notification, do i create an intent for each one? Jun 13 02:36:50 could somebody please suggest the source of the npe here? http://pastebin.com/zPNysj7E Jun 13 02:38:14 jamesson: provide a stack trace of the npe occurring Jun 13 02:38:48 dragorn: sorry for my ignorance, this is from logcat? Jun 13 02:39:05 yes Jun 13 02:39:21 that will tell you exactly what line the NPE is caused by Jun 13 02:40:19 is there a way to automatically start a service right after an app is installed? Jun 13 02:40:50 that would probably be a security issue, i'm guessing not Jun 13 02:40:55 DammitJim: arguably you could subscribe to some sort of broadcast receiver that triggers you Jun 13 02:41:03 but it sounds like moderately antisocial behavior Jun 13 02:41:24 typically you'd expect the user to run you, plus subscribe to onboot for the future Jun 13 02:41:40 good evening dragorn Jun 13 02:41:41 thanks for your feedback Jun 13 02:41:59 DammitJim, not unless you can get the user to automatically click your app icon Jun 13 02:41:59 it also wouldn't be wholly deterministic; you'd have to get something like wifis tate change, or screen state change, or something Jun 13 02:42:07 g00s: cheers Jun 13 02:42:23 this is strictly for rooted phones that a company controls (leases them) Jun 13 02:43:11 if you control everything about the phone you could embed a helper app Jun 13 02:43:19 which watches the app install broadcast Jun 13 02:43:23 and fires your second app Jun 13 02:43:29 dragorn: http://pastebin.com/Xn04gRsB Jun 13 02:43:43 is there harm in not creating a separate thread for a web call in an android service? Jun 13 02:43:58 yeah, that makes sense dragorn Jun 13 02:44:05 jamesson: so, line 92. Jun 13 02:44:27 dragorn: code or trace? Jun 13 02:44:31 jamesson: i'd assume you're calling debug() before either a) expanding your view or b) finding debugview Jun 13 02:44:34 jamesson: read your trace Jun 13 02:44:51 jamesson: specifically the "caused by:" line Jun 13 02:44:56 anyone know how apps like apollo add the notification close button? Jun 13 02:45:08 DammitJim: You need to do all network IO on its own thread Jun 13 02:45:17 dragorn: gotcha Jun 13 02:45:25 DammitJim: (really, any blocking operations) Jun 13 02:45:47 DammitJim: In modern (4.x + ?) it will explicitly kill you if you do network io on your UI thread Jun 13 02:46:05 DammitJim: a service is sort of on your main thread Jun 13 02:46:25 DammitJim: so you're definitely a lot safer calling it in its own IO thread Jun 13 02:47:07 dragorn, thanks Jun 13 02:47:15 that puts a fork in it! Jun 13 02:48:17 oh wow.. I just realized that it was set to its own thread LOL Jun 13 02:48:23 I guess I was doing it right from the beginning Jun 13 02:48:26 well, your work is already done then Jun 13 02:48:58 lastly, there is no way to get wifi data usage, right? Jun 13 02:49:10 I can only kinda guestimate by using TrafficStats? Jun 13 02:50:47 per app or total Jun 13 02:53:38 dragorn: at 78 I inflate rootView. at 80 I initialize debugView as rootView.findViewById(R.id.mainText);. The only thing I can think of is that the initializetion fails without error Jun 13 02:53:43 dragorn, total Jun 13 02:53:59 I basically want to know how much wifi the user is using, and how much cell Jun 13 02:54:24 DammitJim: you can probably parse /proc/net/dev Jun 13 02:54:34 really? Jun 13 02:54:38 don't see why not Jun 13 02:54:47 it shouldn't require any special permissions Jun 13 02:54:55 and apps aren't chrooted or blocked from looking in /proc Jun 13 02:55:20 bet you can just open it like a file and read it into a stream Jun 13 02:55:46 how much do we know about the accuracy of this data? Jun 13 02:56:16 dragorn: was I wrong about anything I said? Jun 13 02:56:21 jamesson: you call debug() in oncreate and never assign anything to debugview Jun 13 02:57:12 DammitJim: kernel byte counters, should be accurate Jun 13 02:57:19 DammitJim: w/in any reasonable definition of accurate Jun 13 02:57:21 nice Jun 13 02:57:41 of course, those get cleared upon reboot, righ? Jun 13 02:57:43 right* Jun 13 02:57:54 DammitJim: I mean, I dont' recall offhand where those get incremented and if you can have pending skbuff data waiting to be flushed Jun 13 02:58:02 dragorn: sure I do, at line 80 Jun 13 02:58:17 oh, I'll have to read about skbuff Jun 13 02:58:27 DammitJim: kernel byte buffers Jun 13 02:58:35 DammitJim: far outside your control as an app Jun 13 02:59:08 DammitJim: and yes, those stats get cleared on reboot. They may also get cleared if a network module gets unloaded, but I don't think android does dynamic lkm loading of the wifi module Jun 13 02:59:23 cool Jun 13 02:59:29 dragorn: right? **** ENDING LOGGING AT Fri Jun 13 02:59:59 2014