**** BEGIN LOGGING AT Mon Aug 19 02:59:59 2013 Aug 19 02:59:59 north of $100 is too much for me Aug 19 03:00:03 i don't see the point Aug 19 03:00:04 last time we got the JR pass, because we did Tokyo/Nagano/Kyoto in one trip, so there was no worry about balance... time before, we were just in Tokyo, so we used a card Aug 19 03:00:08 that's *HKD* Aug 19 03:00:26 US$80-$90 or so Aug 19 03:00:35 ok Aug 19 03:00:39 that's not so bad Aug 19 03:00:55 i don't see the point of spending so much Aug 19 03:01:06 you don't get much in HK for that much... Aug 19 03:01:06 you sped all of 8 hours in the hotel room alseep Aug 19 03:01:10 then you go out Aug 19 03:01:22 no, you don't Aug 19 03:01:37 i stayed in kungching (?) mansions Aug 19 03:01:45 that was pokey Aug 19 03:01:48 it's also about location - if you're on a short trip, and we usually are because my gf is a local, on local employment terms, meaning 5 days leave per year Aug 19 03:01:50 chungking Aug 19 03:02:01 the notorious Aug 19 03:02:06 so i hear Aug 19 03:02:14 5! Aug 19 03:02:15 wow Aug 19 03:02:45 I get 27 Aug 19 03:03:00 plus 10 sick day I guess (which accumulate) Aug 19 03:03:26 I'm still always somehow in negative leave :D Aug 19 03:03:37 she also gets 2 weeks at chinese new year, when her company closes down for the holiday Aug 19 03:03:47 yeah HK have hepas of public hols! Aug 19 03:03:52 but it's not always a great time to travel, middle of winter, expensive in a lot of asia because it's holiday season Aug 19 03:04:09 we generally do longer trips then - did a week in Italy, week in UK last year Aug 19 03:04:25 very nice Aug 19 03:04:40 you know it's not winter everywhere :p Aug 19 03:04:54 got to go see a man about some python, but before that... to be honest, I'm old enough, and I work, occasionally, for my money - I'm happy to spend a reasonable amount on my travel Aug 19 03:05:32 I save, I don't have any kids or other dependents... I don't feel the need to stay in a crappy guesthouse to save some money... I don't mean luxury resorts - although they are very nice sometimes - but just... not crappy Aug 19 03:05:51 wabz: keep meaning to go back to Oz, yeah... SA and SA are a long way and expensive Aug 19 03:06:02 that is, Africa and America Aug 19 03:07:07 * Leeds -> cheap non-private non-reservable conference room, aka Starbucks Aug 19 03:15:21 heh Aug 19 03:18:33 How can I use "?android:selectableItemBackground" in apis pre-11 Aug 19 03:22:06 Otherwise nav drawer highlighting doesnt work. Aug 19 03:36:39 nevermind, got it Aug 19 03:49:24 alex_PP saw this pic the other day, notice the other guy in there with a tripod http://kordan.35photo.ru/photos/20130812/563396.jpg Aug 19 03:52:00 oh man i'd be pissed :P Aug 19 04:34:15 g00s, where is that? Aug 19 04:34:25 looks like terragen :P Aug 19 04:38:06 alex_PP not sure, here is another one Aug 19 04:38:19 http://1x.com/images/user/7a67ab8eeae235a5bec3268e40888a51-hd4.jpg Aug 19 04:38:24 reddit Aug 19 04:38:38 earthporn Aug 19 04:38:55 ok,so anyone know where line number setting is in AS ? Aug 19 04:50:06 nm, got it Aug 19 05:02:30 lol, in the mac AndroidStudio bundle, there is a copy of eclipse.app Aug 19 05:07:25 weird Aug 19 05:07:35 maybe for MAT? can you even access MAT from Android Studio? Aug 19 05:32:01 kevinb its in the Monitor app Aug 19 05:34:01 Hi guys, I have an existing site made using Wordpress and WooCommerce, I wan't to make an native android app, I wan't to use Phonegap, I just wanna fetch data from the website from my android app, is there any easy or better idea? Aug 19 05:37:53 lint tells me various class references from within layout xml files are missing but they are in external lib projects and everything compiles fine and everything works at runtime. Aug 19 05:38:01 why is that? Aug 19 06:11:35 hey guys Aug 19 06:12:07 is this place for official android app development? Aug 19 06:12:18 or just general android app dev Aug 19 06:12:58 I have this issue trying to make my app multithreaded. it works before i started implementing asynctask Aug 19 06:13:07 http://pastebin.com/tK1iCx3v Aug 19 06:13:22 I get an error at the first onPostExecute line Aug 19 06:13:30 anyone have the time to have a look? Aug 19 06:14:09 gah, my eyes are bleeding Aug 19 06:14:25 mine too ;_; Aug 19 06:14:34 start over again from scratch Aug 19 06:14:45 why? Aug 19 06:15:58 I checked all the params that are being passed, they all seem fine Aug 19 06:16:22 I get this in the debugger: 08-19 01:42:33.958: E/AndroidRuntime(2034): java.lang.NullPointerException Aug 19 06:16:37 08-19 01:42:33.958: E/AndroidRuntime(2034): at org.me.myandroidstuff.DisplayWeatherActivity$DownloadRSS.onPostExecute(DisplayWeatherActivity.java:299) Aug 19 06:16:52 that's the first error Aug 19 06:19:02 the non-multithreaded version doesnt return an empty vector, so I don't know why it's giving me that error Aug 19 06:22:54 anyone around with a good understanding of current libc implementation? I'm trying to do something a bit unorthodox - make an in-memory linker from bionic, and i'm running into symbol resolution issues in the linker. Aug 19 06:23:14 Hello Aug 19 06:23:15 I have a tablet and everytime I go to an app that needs me to sign in it takes me to a page that cannot be displayed. Is there a way around this Aug 19 06:23:49 ok I think i've got it Aug 19 06:27:14 thanks guys for looking anyway Aug 19 06:27:19 I figured out what the problem is Aug 19 06:28:18 the onPostExecute method required a parameter but it wasnt recieving one from the doInBackground process due to a missing condition Aug 19 07:05:12 Hi all, last week i put my app in the play store and it's using the google maps. If i debug my app, the google maps are visible but inside the app from the store, the maps aren't loading, how can i fix this? Aug 19 07:07:18 I have a tablet and everytime I go to an app that needs me to sign in it takes me to a page that cannot be displayed. Is there a way around this Aug 19 07:13:24 LLckfan: Get in on a network? Aug 19 07:28:31 If you update your app for the store, how can you specify a version nr. eq: V1.0.1 ? Aug 19 07:37:33 FrancescoV: android:versionName in the manifest. Aug 19 07:38:21 FrancescoV: Just remember this has nothing to do with android:versionCode which needs to be an increasing integer. Aug 19 07:39:31 kjeldahl, I have put them both in the manifest, tnx :) Aug 19 07:56:59 good morning Aug 19 07:58:35 hello I have started this discussion on stack overflow. http://stackoverflow.com/questions/18298895/thoughts-of-the-design-and-development-in-an-android-environment But it was closed since it's not supposed to be a platform for discussion. However I would like to have some reaction on it. Maybe you guys can give me your 2 cents about it. Thanks Aug 19 08:06:53 Geya guys, quick question - would anyone be familiar with a simple code example / library that allows the addition of an edittext with tag-like features? Aug 19 08:06:58 Heya* Aug 19 08:07:27 Similar to the contacts input box that comes with the official sms application Aug 19 08:14:09 Tee_Pee: You mean this? https://plus.google.com/+RomanNurik/posts/WUd7GrfZfiZ Aug 19 08:15:29 yeah that's the one Aug 19 08:16:24 simple though, this class is not... oh well Aug 19 08:17:00 Yeah, unfortunately it's all I've been able to find Aug 19 08:17:04 hey guyshttps://gist.github.com/Nyceane/06987d887f985d7e926d Aug 19 08:17:07 why does this not work? Aug 19 08:19:36 guys? Aug 19 08:20:09 the alpha works, but the transition does not Aug 19 08:20:29 I'm using Zbar for qr scanning, on the phone, the camera preview is in good resolution, but on my tablet, it's a low resolution, how can i fix this? Aug 19 08:27:49 hello guys - im working on some pinch zoom function for Android. - i am using a SimpleOnScaleGestureListener however. Even though my listener object is initialized whenever i pinch zoom the overridden methods (onScaleBegin, onScale and onScaleEnd) is never called. Any ideas ? Aug 19 08:28:39 I have a tablet and everytime I go to an app that needs me to sign in it takes me to a page that cannot be displayed. Is there a way around this Aug 19 08:52:16 after changing package name of my application, GCM stops working Aug 19 08:52:26 I no longer receive gcm messages Aug 19 08:52:33 any reason for that? Aug 19 08:53:02 Did you update the manifest with the proper name of your receiver? Aug 19 08:53:16 yes Aug 19 08:53:39 Hey I have an activity which starts another similar looking activity, can I disable the transition animation that happens when it starts the second activity? (Android 4.0+) Aug 19 08:54:30 zhulikas: Did you change the signing cert as well? Aug 19 08:54:41 LLckfan: that's a question for #android, please do not ask it again here Aug 19 08:54:55 huh Aug 19 08:54:59 you mean the keystore file? Aug 19 08:55:00 Ankhwatcher They no answer Aug 19 08:55:02 hello I have started this discussion on stack overflow. http://stackoverflow.com/questions/18298895/thoughts-of-the-design-and-development-in-an-android-environment But it was closed since it's not supposed to be a platform for discussion. However I would like to have some reaction on it. Maybe you guys can give me your 2 cents about it. Thanks Aug 19 08:55:40 zhulikas: Is the app signed the same way with the same cert (call it keystore if you want)? Aug 19 08:56:03 jigal1: there's an Android Google User group which would welcome your discussion, why not go start your topic there? Aug 19 08:56:04 kjeldahl, It is signed with the same certificate, located in the same keystore. Aug 19 08:56:21 jigal1: or try the Android Developer community on Google+ Aug 19 08:56:45 kjeldahl, should I recreate certificate or what? Aug 19 08:57:17 zhulikas: Sounds like it should work then. You could check logcat and see if it barfs when trying to deliver to your app (not finding the receiver). But if the message is never sent to your device, then that will not help you. Aug 19 08:57:51 damn it. Aug 19 08:58:15 zhulikas: The cert probably does not matter, except at your server end (which is probably not relevant here). How are you sending your message, you're sure you're sending it correctly? Aug 19 08:58:43 I have a GCM registration id and google api console API key Aug 19 08:58:43 zhulikas: And that your register_id is correct (and valid)? Aug 19 08:58:45 in the server Aug 19 08:58:48 Hello Aug 19 08:59:26 zhulikas: And you've verified the registration_id is "current" on your device, just in case? You could invalidate and get it again and see if that helps (shouldn't but..). Aug 19 09:00:50 kjeldahl, thank you! Aug 19 09:01:14 I have done something else and reverted git repository changes, which in turn changed project id I use when registering for GCM Aug 19 09:02:24 zhulikas: That explains it, yes. :-) Aug 19 09:04:34 Ankhwatcher: ok which one is more active? Aug 19 09:06:12 hmm, I'm having issues unparcelling a nested parcel. Specifically, at the third level, there's an array of (parcelable) objects that end up being set to null. Aug 19 09:06:23 jigal1: beats me: https://groups.google.com/forum/#!forum/android-developers https://plus.google.com/communities/105153134372062985968 Aug 19 09:06:26 (when read in with createTypedArray) Aug 19 09:07:49 Ankhwatcher: tnx Aug 19 09:08:34 said array is of the correct length, albeit filled with nulls. Aug 19 09:12:44 specifically, why am I getting the results of newArray Aug 19 09:12:53 without the actual contents of it replacing the nulls Aug 19 09:13:03 within a Parcelable object. Aug 19 09:44:29 Hi, am I okay to ask a stupid newbie question about drawer-navigation and intents here? Aug 19 09:45:39 don't ask to ask is general rule Aug 19 09:47:57 Ah, sorry. well the question: Assuming I have an app with several activities which open through intents, and I want to move it to drawer navigation. How should I do this, keep the activities similar and have them inherit from a base class activitiy which has the draw menu setup. Aug 19 09:48:39 Or I could move them all into one activity and just change the non-drawer fragment, losing me intent based navigation (as far as I know) but meaning that I don't have to recreate the menu all the time Aug 19 09:53:21 Are there any nice chat-based (e.g. Facebook messenger like) ListViews out there short of doing my own with stackFromBottom and setSelectionFromTop (for scrolling)? Looked into CWAC's Endless listview which is ideal, but it doesn't support reversals typically found in chat lists Aug 19 09:55:17 does anyone know what method is being called when i zoom on my android device? I figured it was onTouchEvent - however it does not appear to be Aug 19 09:55:24 Djehngo: well if you have the drawer it seems logical to replace the content not to have a whole new activity that creates the same drawer , to me at least. Aug 19 09:55:57 Thank you Flozzo, I will do it that way then. Aug 19 09:59:29 not to say you couldn't just launch activities, but I highly doubt its the best way to go about it Aug 19 10:02:24 tnzr: yes it is horizontal LL with 3 views, will try that [/late] Aug 19 10:02:26 hey, Aug 19 10:02:38 i want to translate my app to chineese Aug 19 10:02:45 and i tried to use Google Translate Aug 19 10:02:57 the problem is that i can't copy it to my strings.xml Aug 19 10:03:27 i think it is beause the unicode(i'm using utf-8) wich unicode is chineese? Aug 19 10:07:25 any idea? Aug 19 10:08:07 What happens when you try to copy them to strings.xml? Aug 19 10:08:35 i see a wierd square Aug 19 10:08:37 是 Aug 19 10:08:41 lol here it's working Aug 19 10:08:56 wierd thin square Aug 19 10:09:01 Anyone willing to discuss abt Wifi Direct for a minute? Aug 19 10:09:27 elichai2: I would look at your editor Aug 19 10:09:50 i tried to paste it with notepad++ too Aug 19 10:09:52 same thing... Aug 19 10:09:59 and notepad Aug 19 10:10:32 Possibly it's not configured to edit files in utf-8, possibly the font it is using doesn't suport Chinese characters, possibly your system doesn't support fonts that will display them Aug 19 10:11:06 which font is supporting chinese? Aug 19 10:12:19 elichai2: Not sure, I'm not on windows Aug 19 10:13:40 Anyone be able to help me out on this one? http://stackoverflow.com/questions/18310307/findviewbyid-in-dialogfragment-returns-null-on-2-3-3-devices Aug 19 10:13:43 tried to change to a chinese font, still same problem Aug 19 10:13:54 how can i change font in Eclipse? Aug 19 10:14:51 Completely lost, after inflating a layout and getting the view, I seem to be getting NullpointerExceptions from the view.findViewById only on 2.3.3 and only in MY app... Aug 19 10:16:38 Flozzo: I had something similar Aug 19 10:17:03 manage to fix it? Aug 19 10:17:17 Anyone willing to discuss abt Wifi Direct for a minute? Aug 19 10:17:30 In my case I had multiple view-types in a list, and findViewById was failing because it was passed in the wrong view type Aug 19 10:18:23 In your case I would check that mMonthAndDayView actually exists Aug 19 10:18:37 it doesnt Aug 19 10:18:46 modified the code to check it Aug 19 10:20:29 Hmm, is there any way to check the status of the view before you do findViewById? Aug 19 10:20:50 Check that the correct view has been inflated, check that the view has inflated properly etc etc? Aug 19 10:20:53 my thoughts were that maybe the layout was never inflated, wasn't sure how to check though Aug 19 10:21:08 or never inflated properly at least Aug 19 10:21:41 can I connect to a wifi access point (wps) without the involvement of the user at all if I know the psswd and ssid beforehand Aug 19 10:22:59 Flozzo: That sounds like a good line of enquiry, I'm afraid I don't how to do that though Aug 19 10:24:37 hmm actually Aug 19 10:30:02 ok wtf. Aug 19 10:30:54 if I just return the View without actually initialising the other variables, to see what it looks like, I get the outline of a different library's picker.... Aug 19 10:32:58 Flozzo: Maybe an id clash somehow? Aug 19 10:33:34 what I thought, but why would it work on 4.0+ but not 2.3.3 Aug 19 10:33:44 Still, that's interesting, and you are a step closer to the root cause Aug 19 10:34:02 Dunno, maybe they changed the way ids are generated/resolved at some point? Aug 19 10:35:22 turns out there is a layout with the same name in a different library... Aug 19 10:35:38 that's also been used, let's see if this changes stuff Aug 19 10:36:32 F*ck me, that actually fixed it... Aug 19 10:36:34 cheers mate Aug 19 10:39:01 Ha I am not sure I did anything, but I am glad you have it sorted :) Aug 19 10:41:21 Well neither am I but at least you provided input :) Aug 19 10:49:29 how can i creat an Admob ad above an AlertDialog? (i've got an AlertDialog that pop-uping once a day with some info and i want to put Ad above it) Aug 19 10:58:20 any idea?plz? Aug 19 11:00:28 Hi guys. Installed the SDK and eclipse plugin - However I'm experiencing the classic issue of no R.java file being generated! The thing is, it's with a new project... Aug 19 11:00:48 Complete beginner with Android, but not with Java and iOS Aug 19 11:00:50 maybe Error in res folder somehow Aug 19 11:01:13 and try to click Project>Clean Aug 19 11:01:16 elichai2: How could I pinpoint one? It's a completely new project Aug 19 11:01:20 elichai2: yeah I have Aug 19 11:01:24 Didn't fix it! Aug 19 11:01:51 jonno11, idk, how the R file missing if it's new project?! Aug 19 11:02:05 elichai2: Exactly Aug 19 11:02:14 jonno11: R.java is generated late in the compilation - so it won't be there if you haven't built, and it won't get generated if you have a compilation error Aug 19 11:02:33 Leeds: Before linking? Aug 19 11:02:44 is your only error the lack of R? Aug 19 11:02:49 The build fails because it can't find the R.java Aug 19 11:03:15 is that the only error? Aug 19 11:03:23 Weirdly, I just built to check Aug 19 11:03:25 * Leeds doesn't use Eclipse, don't know where errors get displayed Aug 19 11:03:33 if it's a new project try to create a new one and see if it still giving the same error Aug 19 11:03:37 but it's generated one? Aug 19 11:04:10 good, glad I could fix that for you :) Aug 19 11:04:19 Leeds, elichai2: Cheers guys! Aug 19 11:04:28 Leeds: Out of interest, what do you use? Aug 19 11:04:32 IDE-wise Aug 19 11:04:36 no IDE Aug 19 11:04:41 vim, ant, adb Aug 19 11:04:52 fair enough Aug 19 11:04:56 sounds pretty awkward ;) Aug 19 11:05:13 I get the ant, dab bit though Aug 19 11:05:15 occasionally leads to much swearing, mostly leads to much productive muscle memory Aug 19 11:05:18 adb* Aug 19 11:05:19 does vim have any completion capabilities for java class names, methods, shortcuts to help, etc. Aug 19 11:05:30 ^ This is the thing I would miss the most Aug 19 11:06:00 I once tried to write some code in C# in vim using mono and I found it took like hour to do even the simplest thing because it was so hard to collect the information required to use the various classes. Aug 19 11:06:02 there are various plugins - I've just started investigating them, after doing Android stuff on and off for almost 5 years :) Aug 19 11:06:25 I wish Sublime Text 2 was as good at completion as eclipse Aug 19 11:06:39 and in c# you can just write 'var' and hope that it works out in the end, let the compiler figure out what a method returns. Aug 19 11:06:56 of course when it doesn't, you actually have to work it out yourself and that's much fun :-p Aug 19 11:07:41 Now my emulator isn't starting :( Aug 19 11:09:19 man I'd really like if they had done the R as enum too. It would be lovely to not be able to confuse layout int for where id int must go, and so on Aug 19 11:10:19 not that it happens all that often but still Aug 19 11:11:23 I'm pretty sure the performance tips doc *used to* say that Enums are slow Aug 19 11:11:36 they can't be slow for this particular case. Aug 19 11:12:09 how could they be? R.layout.foo is just an object if it was a static 'enum layout { foo }'. All that ever needs to happen is that you have some means to lookup the actual underlying resource. Aug 19 11:12:23 jonno11, what? Aug 19 11:12:26 Enums are slow? o_O Aug 19 11:12:35 which can't be that difficult. After all, enums have an integer value, and looking that up is one method call away. Aug 19 11:13:06 how can i creat an Admob ad above an AlertDialog? (i've got an AlertDialog that pop-uping once a day with some info and i want to put Ad above it) Aug 19 11:13:13 elichai2: On OS X, "ERROR: no search paths found in this AVD's configuration. Aug 19 11:13:13 Weird, the AVD's config.ini file is malformed. Try re-creating it." Aug 19 11:13:38 I understand the "enums are slow" for argument like int-or X | Y | Z. If you do this by EnumSet you're going to have a pretty bad time, I'm sure. Aug 19 11:14:00 But it's not working in eclipse at all, I'm assuming it's the same as running `emulator` Aug 19 11:14:01 dont know how to fix that... srry Aug 19 11:14:02 that is why you should have setX(true), setY(true), setZ(true) kind of methods so that you could manipulate booleans independently rather than work with some crap like EnumSet. Aug 19 11:14:06 thy google it Aug 19 11:15:05 in fact, getting rid of or'ing ints would add quite a bit of clarity throughout the API... and using enums where choices are exlusive would prevent a whole class of bugs Aug 19 11:15:09 *sigh* Aug 19 11:23:38 alankila: i like the C# approach to bitfield enums more than the java approach Aug 19 11:24:35 I do not remember what the approach is/was personally. Aug 19 11:24:51 you use FlagsAttribute with the enum, and then you can use ordinary bit operations Aug 19 11:25:13 no one knows? Aug 19 11:26:40 alankila: so something like [Flags] enum Whatever { A, B, C } and then Whatever w = Whatever.A | Whatever.C; if (w.HasFlag(Whatever.A)) ... do stuff .... Aug 19 11:27:02 erm, you need to specify the enum values though in that case Aug 19 11:27:20 so A = 1, B = 2, C = 4... Aug 19 11:30:00 OK. Aug 19 11:30:21 though are you sure that's how it works? If it's object-based it might be doing something expensive like a Set behind the scenes Aug 19 11:30:38 ah no Aug 19 11:30:43 I see [Flags] and understand Aug 19 11:31:22 yeah, that's not a bad approach at all. I wasn't aware of this, either. Aug 19 11:32:02 the most important thing is that the compiler (or runtime) can turn this nice symbolic expression into ANDs and ORs of constants. Aug 19 11:34:13 thus giving a fairly good type safety and readability, and the performance equal to having ints instead. A simpler language like java has to throw the additional type safety away, it must represent the enum by int at the source code level. Aug 19 11:37:02 alankila: C# even specifies that the default underlying type for enums is an int Aug 19 11:37:09 how can i creat an Admob ad above an AlertDialog? (i've got an AlertDialog that pop-uping once a day with some info and i want to put Ad above it) Aug 19 11:37:24 alankila: (which you can override if you want) Aug 19 11:37:49 hrnt: oh? Well, that's pretty nice Aug 19 11:48:51 https://gist.github.com/tskulbru/09f5b4b12b08179d2ee9n Aug 19 11:56:07 Hello guys Aug 19 11:56:47 I'm trying to get into Android Dev. I'm just trying to test/install the hello world.apk via usb onto my device, however it keeps timing out? Aug 19 11:57:58 In fact, in Android Device Chooser, it's showing the target as "unknown" and "offline" half the time. Aug 19 12:00:56 has it ever worked Aug 19 12:01:07 what device Aug 19 12:01:11 what type of computer Aug 19 12:01:23 have you turned on the juicer? Aug 19 12:04:40 mikedg, I've never gotten it to work Aug 19 12:05:31 mikedg, Juicer? Win7_64 (powerful) with SG4 with plenty of memory, Rooted, but no major edits to the firmware/software Aug 19 12:05:54 mikedg, I've restarted the adb server, restarted the device, etc, not the computer Aug 19 12:05:57 have you ever authorized the computer? Aug 19 12:06:09 when you try to initially adb connect, you should get a popup on your device Aug 19 12:06:20 mikedg, I did get an authorization error ealier, but no, no authorization dialogues Aug 19 12:06:23 if you denied it, i think you might get stuck in that state Aug 19 12:06:25 or prompts Aug 19 12:06:38 what version of android on the sg4? Aug 19 12:06:48 It's possible I denied it months ago or something. 4.2 Aug 19 12:07:07 try going into developer options and revoking auhtorizations Aug 19 12:07:34 revoke usb debugging authoriations Aug 19 12:07:42 I don't see anything that suggests authorization involvement Aug 19 12:08:18 mikedg, disable udb debugging? I've reset that several times. Aug 19 12:08:46 oh i guess that was introduced in 4.2.2 Aug 19 12:09:26 mikedg, I'm on 4.2.2 Aug 19 12:10:05 should be htere then, right below the checkbox for usb debugging Aug 19 12:10:08 unless samsung removed it Aug 19 12:10:11 that would be sily though Aug 19 12:10:53 not there Aug 19 12:11:24 Usb debugging, include bug report option in power menu, allow mock locations, select app to be debugged, wait for debugger (greyed out) and verify apps via USB Aug 19 12:14:40 hmm Aug 19 12:14:50 not sure what else it might be Aug 19 12:14:57 maybe wait until someone with an s4 in hand gets on Aug 19 12:15:05 if it's windows, it ight be driver issues Aug 19 12:15:29 mikedg, I've reinstalled drivers Aug 19 12:24:43 also, if you guys want 50GB for dropbox free, I have a way to enable it. :P Aug 19 12:28:27 * SpeedEvil looks at his 488k upload, and declines. Aug 19 12:30:07 * Leeds looks at his gigabit down, and declines :) Aug 19 12:32:27 * mikedg looks in his pants and declines Aug 19 12:32:58 any of you have the S4 play edition and should i get it to replace a nexus 4? Aug 19 12:33:21 HTC One play edition is better. Aug 19 12:33:50 I have one of each. The S4 has been giving me issues. I get sound only out of one ear now. Aug 19 12:36:13 michaelnovakjr: but that should be warranty no? Aug 19 12:37:01 sure. but still not great that it doesn't work. Aug 19 12:37:07 HTC One has been solid for me. Aug 19 12:37:39 it only has 2 buttons, no? Aug 19 12:38:03 yes. it uses the actionbar overflow. Aug 19 12:38:29 Hi everyone, I have a question and I need to know if it´s possible to do. I have application that runs another´s Activity´s applications, by the way, my architecture is based on plugins, so I need to know if is possible to run another activity from external jar in the same activity in my application. Aug 19 12:38:30 has that been a problem? Aug 19 12:39:17 hey guys, does anyone know why my eclipse device chooser only shows my device as offline? SG4 Aug 19 12:39:24 funkbox: nope, especially when coming from a Nexus 4. Aug 19 12:39:49 michaelnovakjr: so worth the price as an upgrade from a n4? Aug 19 12:39:54 in the non-Play version, the 4.2.2 update lets you set long-press-Home as menu, which makes the black bar go away Aug 19 12:40:14 Leeds: which black bar Aug 19 12:40:29 michaelnovakjr: the onscreen menu button Aug 19 12:40:45 apps with low target sdk you get a massive black bar on bottom. bloomberg does that i think Aug 19 12:41:00 ah. right. haven't come across that yet. Aug 19 12:41:31 i also really like the swipe up for google now on n4. i use it all the time Aug 19 12:42:55 so much money though, not sure if worth the cash Aug 19 12:43:53 Hi everyone, I have a question and I need to know if it´s possible to do. I have application that runs another´s Activity´s applications, by the way, my architecture is based on plugins, so I need to know if is possible to run another activity from external jar in the same activity in my application. Aug 19 12:44:39 anyone? Aug 19 12:44:49 Normando: what kind of plugins? that sounds like a very bad idea Aug 19 12:45:05 like android plugins Aug 19 12:45:07 and also, no Aug 19 12:45:09 Normando: I think you are getting quite mixed up in your terminology... Aug 19 12:45:20 Leeds: why? Aug 19 12:45:36 if i wanted plugins i would give them a very tightly controlled API Aug 19 12:45:51 Leeds: sorry my english, I´m from Brazil Aug 19 12:46:53 funkbox: the problem is, I have Android application that´s runs anothers Android applications Aug 19 12:47:05 now my SG4 is failing the ATT software update, wtf Aug 19 12:47:24 this is near stock, just rooted. no reason anything should be difficult on it Aug 19 12:48:00 funkbox: Recently I do a command that run another Android application from external jar (android application too) Aug 19 12:48:02 Hey! I'm working with Google Maps and want to center the map on the user's location on app start. To accomplish this, I've implemented LocationListener's onLocationChanged and center the camera in that method. But even though my location isn't changing, this method seems to get called constantly so that the view is always centered and I can't even move or zoom the map. Any ideas? Thanks. Aug 19 12:48:08 cluelessperson: well there you go Aug 19 12:48:09 it's rooted Aug 19 12:48:14 things are changed, and you don't know what Aug 19 12:48:33 mikedg, I've been able to install updates before. Aug 19 12:48:46 then you dont need to update if youve installed this update before Aug 19 12:48:58 I haven't installed this one, just others. Aug 19 12:49:09 this one is different then Aug 19 12:50:01 funkbox: my ideia is, draw activity from external jar to have specific format, giving the impression that it would be the application screen in the same activity Aug 19 12:50:54 understood? Aug 19 12:52:01 Eclipse is showing my phone as offline, and even when it was "online" the apk fails to install on the device. Aug 19 12:52:33 target "unknown" and state "offline" Aug 19 13:10:18 am I understanding correctly, that for development with the youtube api i cant use the emulator as there is no youtube installed on it? Aug 19 13:24:18 im doing a pinch zoom function - and using the simpleOnScaleGesturelistener - and overriding the methods (onScaleBegin, onScale and onScaleEnd) - but they are not called even Aug 19 13:24:20 any ideas ? Aug 19 13:26:49 i am using the scalelistener on the onTouchEvent whenever mode changed to pinch - but still the methods are not called Aug 19 13:26:52 yolotrolo: maybe your gesture listener is not getting any events Aug 19 13:27:05 well the ontouchevent gets called then? Aug 19 13:27:20 yes that event gets called Aug 19 13:29:13 you mean scalegesturedetector though? Aug 19 13:29:24 scalegesturedetector takes a scalegesturelistener as argument Aug 19 13:29:56 I've done this once personally and I remember it worked just fine Aug 19 13:30:05 hmm Aug 19 13:30:34 i have a scaleListener class that extends SimpleOnScaleGestureListener Aug 19 13:30:52 yes, that's fine... but do you also have scalegesturedetector somewhere? Aug 19 13:31:09 no i didnt use that yet Aug 19 13:31:23 well how did you integrate this then? Aug 19 13:32:13 totally forgot about the scaleGestureDetector Aug 19 13:32:34 i do use it as a parameter to the methods Aug 19 13:33:30 yes anyway you're supposed to call the SGD's onTouchEvent from your view's onTouchEvent, and it should then, if appropriate, produce events on the ONGL api Aug 19 13:33:38 ONSGL even Aug 19 13:33:50 fuckit never mind Aug 19 13:34:34 the API isn't very good. IIRC the iOS api was far more intuitive to work with Aug 19 13:34:59 glad to hear that :) i am having a bit of trouble getting this to work hehe Aug 19 13:36:34 im doing this on my onTouchEvent - http://pastebin.com/sTVTAfkz Aug 19 13:36:37 for instance if you have to have a scalegesturedetector, why can't that class have a couple of abstract methods that trigger when the scale events occur Aug 19 13:37:02 would be one object less and no callback crap Aug 19 13:37:28 ew. Aug 19 13:37:34 ew ? :D Aug 19 13:38:02 you're trying to duplicate some of the logic that these detectors already do Aug 19 13:38:37 you mean the getPointerCount? Aug 19 13:38:42 I believe the intention is something like if (scaleGestureDetector.onTouchEvent(me)) { return true; } where the idea is that if the onTouchEvent returns true it is because it has determined that scale gesture is being performed Aug 19 13:39:30 now there's a problem if you have multiple gesturedetectors in a chain though because whoever FIRST returns true should get the rest of the event stream Aug 19 13:39:39 but in case you have only one, you can do this Aug 19 13:40:03 well none of the gestiredetectors gets called Aug 19 13:40:15 you're just doing it wrong Aug 19 13:40:21 but your basic code or approach is already suspect Aug 19 13:41:45 anyway the approach -- near as I can tell from the documentation -- is that you try all your gesturedetectors in a chain, and if ANY one of them ever returns true, you set up a member to point to that listener, and you need to check as the first thing in that onTouchEvent if this variable has been set Aug 19 13:41:53 if yes, pass all the motionevents to that detector and to nobody else Aug 19 13:42:08 and if the motionevent is ACTION_CANCEL or ACTION_UP, then clear that member variable Aug 19 13:43:03 so whenever any one of the gesturedetectors expresses interest, then whoever first reports true gets the rest of the stream. In case where the events are such that they don't actually conflict, then I guess you can just try them in sequence and quit as soon as any one of them says it handled it Aug 19 13:43:39 like scale always needs 2 fingers and fling just one, so there's no conflict Aug 19 13:44:02 Hi. I need help with accessing notification contents in 4.3. I am trying to get details of notification posted using notificationlistenerservice. Aug 19 13:45:17 in fact maybe there's a simplification. Perhaps onTouchEvent stream to a detector can stop as soon as the gesturedetector returns false, after which point you can start accepting gestures generally. That would be simpler/cleaner Aug 19 13:46:03 so it looks something like this: if (activeDetector != null) { if (! activeDetector.onTouchEvent(me)) { activeDetector = null; } return true; } and then you test all your detectors if any one of them expresses interest and if yes, set it as activeDetector. Aug 19 13:47:15 my thinking is that if android was sanely designed it would do this for you, like iOS does. You just listen to the events, you don't set this bullshit up yourself Aug 19 13:49:06 the android way is certainly more flexible but also more error prone. You're likely to get this wrong. Aug 19 13:51:03 thanks alot alankila - ill get back in case i run into issues Aug 19 13:54:34 hi, are there anything already built-in in Android that tells me that I walked let say 50 meters? or I need always to ask GPS for a new position ? Aug 19 13:55:04 daivyk: I believe you should ask gps for position at some frequency. Probably doesn't have to be very great. Aug 19 13:59:02 and iirc gps returns latitude, longitude and height, so the transformation to 3d coordinates should be done for reliable results. Aug 19 13:59:32 the reason is that the closer to poles you are, the less real distance change in longitude represents Aug 19 14:01:47 alankila: how can I ask Android for a new position without draining so much battery? I know that GPS uses a lot, maybe using cell antenas ? Aug 19 14:01:49 ... I can't seem to find a class that would do this conversion right away though. There's probably one. The height in particular is generally calculated against an approximation of Earth geoid Aug 19 14:01:50 and you're basically doing great circle math. if you really care, the earth isn't round, it's an oval Aug 19 14:02:19 However the term you want to look for is 'geofence'. I don't know if there's support in android for it or if people just implement their own though Aug 19 14:02:57 Your real problem is going to be 50 meters is below the reasonable expectation for tower-based positioning, so the only way you're going to get it is to leave the gps on for the duration of time you care about Aug 19 14:03:04 daivyk: well, the precision is an issue. You need GPS and have to wait for a bunch of satellite fixes to get good if you want to determine position at some reliability Aug 19 14:03:10 and even then if they've got a crappy lock you're going to see some wobble Aug 19 14:03:31 I do not think that the cellular towers ever provide resolution better than a few hundred meters Aug 19 14:03:54 alankila: Unlikely anyhow, except in a very urban area Aug 19 14:04:16 hm yeah there's population density that controls it Aug 19 14:04:25 humm.. but A-GPS solves this problems no? if you cannot get 3 sat locked Aug 19 14:04:25 and expected average usage of cell phone per person Aug 19 14:05:13 daivyk: agps helps the initial seed, depending on gps coverage it can still take a while to lock, a while longer to lock w/ any real precision, and then you have to keep it on Aug 19 14:05:16 I do not really know how good AGPS is. It's in general enabled by default. Now if someone is walking, they can walk 50 metres in less than a minute, so I figure you have to have GPS on pretty much constantly if you want to track position at an accuracy Aug 19 14:05:36 alankila: agps just helps bootstrap the gps lock process so they can get a quicker lock w/ a cheaper and shittier radio Aug 19 14:06:06 alankila: afaik it doesn't increase the precision, just decreases the lock time. I could be wrong. Aug 19 14:06:32 * alankila is not sure. AGPS afaik involves things like nearby wi-fi networks to help gaining the initial fix too Aug 19 14:07:01 alankila: well that's a bit of a different trick Aug 19 14:07:09 alankila: that's tower location on a smaller scale Aug 19 14:07:40 alankila: more or less just trilateration via known signal positions (and not even that accurately known, but it averages out since you can do multiple samples) Aug 19 14:07:40 and not only the information about which satellites are likely to be in reception range -- in fact that sort of information should be good for a very long time based on the known kepler orbits of the gps satellites and on the assumption that the phone is roughly in within same 100 km radius at all times Aug 19 14:08:07 alankila: agps seeds a high-precision timestamp and can help reassemble fragmentary signals, and provide satellite position almanacs Aug 19 14:08:33 yes, the exact clock value is of course an issue... Aug 19 14:09:05 alankila: wifi is just trilateration against a database maybe with signal strength thrown in, maybe just overlapping circles Aug 19 14:09:09 and you do have to wait until the GPS satellites send their current exact orbit parameters too, though I'm not sure how much they change from day to day Aug 19 14:09:42 it's probably enough that you need to get that info before you have a good fix Aug 19 14:09:53 my understanding is all they send to end-user units is the timestamp but it's been a while since I've looked at gps internals Aug 19 14:09:58 iirc the data bitrate in the gps signal was quite low, in order of minutes to receive all info? Aug 19 14:10:24 oh, no, it's timestamp and orbital Aug 19 14:10:34 which makes sense, dont' have to reflash all the units for a new sat Aug 19 14:12:09 The one oddity about GPS is that the height -- which should be the quantity most precisely determined -- tends to be the least precise. I once inquired about this from a guy who works with GPS and he said that it's because of inaccuracy in time -- the fact satellites tend to be directly overhead that your device can hear also tends to produce an error in time. Aug 19 14:13:10 anyhow to get more on topic, http://developer.android.com/training/location/geofencing.html Aug 19 14:15:29 ok, thanks Aug 19 14:17:21 anyway when it comes to geofencing, assuming the objective is to detect when user is within a radius of some fixed point, and that's all you have to do, then you can use less fine positioning when you know the user is far away. So the fine location only has to be enabled when user is close, and if you have an estimate for the maximum velocity that user can approach the fence, then you know also the rate when you need new precise fixes Aug 19 14:17:23 how can i use ui designer for making tabs? for me it only shows tab 1 and i don't know how to switch to the others Aug 19 14:18:31 on the other hand if you need precise estimate when user leaves fence, then within that region you need fairly precise measurements. Not good. Aug 19 14:23:29 does anyone here know roughly what package camera flash tools are in the API? Aug 19 14:28:55 android.hardware.Camera.Parameters you mean? Aug 19 14:30:35 Ah, that's the one thanks. was looking in the Camera package for ages Aug 19 14:30:59 good luck getting it to work properly though Aug 19 14:31:22 I heard it was a bit of a hackaround getting it to stay on Aug 19 14:32:02 the problem is the manufaturers hardware-software interface drivers, they all tend to have a mind of their own Aug 19 14:33:08 flash code might work on one device perfectly, but on another one not at all Aug 19 14:33:10 ah right, will probably try the debugging on my nexus 4, i doubt an emulator would be any use at all for this Aug 19 14:34:27 if i'm doing to a view "android:layout_toLeftOf="@+id/OtherView" it will be with the same distance from the Top too? Aug 19 14:35:03 i mean it will be in the same height too? Aug 19 14:36:03 the performance of loading image from id equals the loading Image from filepath ? Aug 19 14:37:23 JamoBox: good luck :) Protip: zxing does have some code to get the flash working -> https://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/camera/ Aug 19 14:37:38 if i'm doing to a view "android:layout_toLeftOf="@+id/OtherView" it will be with the same Height? Aug 19 14:37:49 *they will be Aug 19 14:38:46 any app to recomend for Android RAM memory booster? Aug 19 14:39:17 yoao! Aug 19 14:39:24 thanks pduin :) Aug 19 14:39:39 ReGiStRaS: Big Floppy Memories v1.0 Aug 19 14:39:44 ReGiStRaS, WTF between this and developers?! Aug 19 14:39:46 don't get 2.0, it's overrated and expensive Aug 19 14:39:59 Ok so, fun times Aug 19 14:40:21 I've been sitting in this channel for nearly a year, asking questions and getting help Aug 19 14:40:26 I think it's time to give something back Aug 19 14:40:34 if i'm doing to a view "android:layout_toLeftOf="@+id/OtherView" they will be with the same Height? Aug 19 14:41:25 I've spent a good part of the morning trying to find an implementation of a "chip text view", you know, those that show contacts, tags etc. as grouped entities inside of the input field Aug 19 14:41:30 Well, couldn't find one. Aug 19 14:41:41 So I did my best to code a simple and clean solution for it myself Aug 19 14:41:47 it's not much, but it might be useful to someone Aug 19 14:42:04 elichai2: Not necessarily Aug 19 14:42:22 but that what happening to me :( Aug 19 14:42:41 i'm trying to put an numberpicker next to a textView Aug 19 14:42:54 http://pastebin.com/8qrM1CZ8 Aug 19 14:43:14 elichai2: What are the heights of the two things next to each other Aug 19 14:43:43 Drawbacks: Currently, the only way to delimit different chips is via comma Aug 19 14:43:49 no other characters will work Aug 19 14:44:08 here what i tried to do: Aug 19 14:44:11 yiati, http://pastebin.com/yd0pBgWT Aug 19 14:44:17 as I add this to my owwn components library I'll be expanding that to be flexible Aug 19 14:44:19 and they still at the same Height Aug 19 14:44:48 furthermore, the tag will always as of now inflate the same layout. Same thing as before, it's a quick fix but one for which I don't have time now Aug 19 14:45:31 lastly, one additional method that is needed for it to work is from a utility class of mine: http://pastebin.com/yQvYnu6N Aug 19 14:45:41 It's quite handy as it allows you to turn any view into a bitmap Aug 19 14:46:00 elichai2: You told both of the TextViews to wrap their content heightwise. Therefore they are going to be the same height if they have the same number of rows of text, and the text is styled with the same height Aug 19 14:47:04 yiati, so what i need to change that the TV will be at the middle of the NumberPicker? Aug 19 14:47:13 Tee_Pee: might consider throwing that on github w/ an example Aug 19 14:48:03 My workday ends in 13 minutes. Aug 19 14:48:12 Tomorrow sounds like a good time :P Aug 19 14:49:55 elichai2: Why do you want it smack dab in the middle? Then you won't be able to see the contents of the NumberPicker Aug 19 14:50:13 i didn't meant on it Aug 19 14:50:27 i meant middle by height Aug 19 14:50:43 but it will me "LeftTo" the NumberPicker Aug 19 14:53:11 elichai2 maybe try layout_alignbaseline? Aug 19 14:53:50 but to leave "android:layout_height="wrap_content" the same? Aug 19 14:54:54 i guess Aug 19 14:55:34 one thing to note, are you looking at how this layout looks on a phone or emulator? or in eclipse's layout designer Aug 19 14:56:02 because the layout designer is really bad at numberpickers in my experience Aug 19 14:56:51 but alignbaseline should line up their text Aug 19 14:57:16 on my phone Aug 19 14:57:41 now it's just crashing :( i'm trying to read the LogCat Aug 19 14:57:46 :( Aug 19 14:59:11 hmm, how do I make my listview scroll when I change its adapter (in an appwidget) Aug 19 14:59:16 is a NotificationListenerService the only way to get at the notifications, or is there a mechanism to query the currently active notifications that doesn't involve keeping records of which ones are currently active or inactive? Aug 19 14:59:17 scrollToPosition doesn't seem to take effect Aug 19 15:00:23 er, setScrollPosition Aug 19 15:01:40 here is my logcat: http://pastebin.com/LndS4s6v :( Aug 19 15:03:47 elichai2: It says what's wrong at the very top. "java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.NumberPicker" Aug 19 15:03:58 yes but why? Aug 19 15:04:47 elichai2: Because TextView cannot be cast to NumberPicker Aug 19 15:04:59 Look at line 15 in your MainActivity Aug 19 15:05:05 hi all. Aug 19 15:05:42 I would like to make an app' able to logout my user automatically after xx minutes. I just want to know if Services are the good choice ! :) Aug 19 15:05:44 yiati, here: NumberPicker np = (NumberPicker) findViewById(R.id.numberPicker1); Aug 19 15:06:06 mithrop, log out from what? Aug 19 15:06:47 elichai2, I am logged in inside my app. you can consider that I want that my app made some action and start a new Activity after xx minutes. Aug 19 15:07:29 elichai2: So your logcat is telling you that that exact line is trying to incorrectly cast a TextView to a Numberpicker. Logcat doesn't lie. Check which layout file you are loading up in MainActivity, and checkout the id's in the layoutfile that it loads Aug 19 15:08:50 mithrop: Instead of doing a service you could just store some kind of timestamp. If they happen to close the app, then open the app back up check the timestamp to see if they need to log in again Aug 19 15:09:02 mithrop: Nice and light Aug 19 15:09:31 even if they don't close the app, they should login again. Aug 19 15:09:36 yiati, here is my layout: http://pastebin.com/yd0pBgWT Aug 19 15:09:38 it's about 15 minutes of inactivity Aug 19 15:09:52 even if you have the activity at the foreground. Aug 19 15:09:58 mithrop, yea do what yiati said, and u can even use coockies Aug 19 15:10:04 mithrop: Okay well check for it every 15 minutes while the app is in the foreground. No need for a Service for that Aug 19 15:10:16 if you set a margin and a layout width / height in code, is this in px or dp? Aug 19 15:10:36 yiati, all my activity should implement this checking process ? Aug 19 15:10:59 mithrop, try something like this: http://stackoverflow.com/questions/5297925/how-to-implement-cookie-in-android-application Aug 19 15:11:01 FrancescoV: You can do either, but DON'T use px for this. Use dp. By default it's dp Aug 19 15:11:42 yiati, any idea? Aug 19 15:11:46 yiati: both? (margin & width/height) ? Aug 19 15:12:24 elichai2: What does your MainActivity look like? Aug 19 15:12:45 FrancescoV yes Aug 19 15:13:22 FrancescoV: Yep, you should only ever use sp for font, and dp for everything else Aug 19 15:13:28 elichai2, thank you very much but I should logout even if the user doesn't make a request to a server. Aug 19 15:13:42 even if he doesn't make any action at all Aug 19 15:14:21 yiati, here: http://pastebin.com/fysaV8dD Aug 19 15:15:23 mithrop, just register to AlarmManager when he log-in to 15mins from the moment he log-in and when the AlarmManager calls log him out Aug 19 15:16:09 aaah :D so I can use AlarmManager. this one doesn't need any Activity reference, isn't it ? Aug 19 15:16:10 elichai2: And the layout file you posted earlier is called activity_main.xml? Aug 19 15:16:19 yep Aug 19 15:18:21 elichai2: Have you cleaned your project? Aug 19 15:18:45 trying now Aug 19 15:19:06 lol fixed it hahahaha Aug 19 15:19:16 now for my previous problem :) Aug 19 15:19:53 how i make the TextView to be at the middle of the NumberPicker Hight(not on it, next to it) Aug 19 15:21:23 http://stackoverflow.com/questions/10400348/android-relativelayout-align-center-of-one-view-on-top-right-corner-of-another-v Aug 19 15:21:48 relative layout and then set it to left-right in align component Aug 19 15:22:11 will move to right side, then just center it in parent vertical Aug 19 15:22:54 so to seperate them in to two diffrents LinearLayouts? Aug 19 15:23:33 I would toss them both into the same relative layout Aug 19 15:23:58 that what i'm doing now Aug 19 15:24:08 or you could do a horizontal linear layout and then just center the textview Aug 19 15:24:14 here is my layout: http://pastebin.com/yd0pBgWT Aug 19 15:25:25 you want the text view to be centered and to the right of the number picker? Aug 19 15:25:56 yep Aug 19 15:26:30 that it will look good (in the TV it will be something like "Choose number:") Aug 19 15:26:39 wrap both elements in a linear layout with horizontal orientation and set height to wrap content and add your margin there (instead of the seperate elements) and then set the textview to be center vertical Aug 19 15:27:03 i want to make a tabbed activity so i used action bar with fragments, however, i'm using a webview in one of the fragments that i want to maintain its state when switching to other tabs, how can i achieve that? Aug 19 15:27:10 jonc, can u show me how plz?(i'm not so good in xml) Aug 19 15:27:35 learning and dicking around with it will help far more than me just giving it to you Aug 19 15:27:45 you'll learn a lot of things just by playing with it Aug 19 15:28:58 so to put any one of them into a diffrent Liner Layout (and them into the Realitve Layout?)? Aug 19 15:30:43 put both into the same linear layout Aug 19 15:30:48 and set the orientation to horizontal Aug 19 15:31:18 http://developer.android.com/guide/topics/ui/declaring-layout.html side bar has a decent overview of what each layout can accomplish Aug 19 15:36:06 hello. could sb just briefly explain to me how the addresses in /proc/iomem relate to the addresses I see in dmesg under "Virtual kernel memory layout"? Aug 19 15:36:20 no Aug 19 15:36:29 try #linux Aug 19 15:36:42 ok Aug 19 15:37:50 so i asked this the other day but I'll give it another shot - is anyone a) using the usb api and b) found any way to get at the bcdDevice enumeration field, which doesn't appear to be directly exposed Aug 19 15:50:05 hmm, how do I make a copy of a layout (in xml) but only change 1 attribute? Aug 19 15:50:08 this seems kinda painful Aug 19 15:52:59 Styles? Aug 19 15:53:08 Define the value in values/? Aug 19 15:53:55 Define that view in its own file and include it? Aug 19 15:54:03 ^ Aug 19 15:55:12 Hello I want to do a get request to my local development environment. I have edited my host file to 10.0.2.2 sitename but still it doesn't let me connect to my local environment Aug 19 15:55:17 any ideas? Aug 19 15:57:22 SimonVT, probably that last bit, but still painful Aug 19 15:57:33 since that still means I need to have a separate layout file that is largely duplicate Aug 19 15:57:44 SimonVT, styles doesn't really help Aug 19 15:58:08 I'm just programmatically wanting to change from setStackFromBottom on a listview from true to false/vice versa, but it must be done in xml only Aug 19 15:58:15 ... Aug 19 15:58:20 * pfn kicks RemoteViews Aug 19 16:00:55 or at least when I tried to setBoolean it was a no-go Aug 19 16:02:05 So in https://plus.google.com/+AndroidDevelopers/posts/4Yhpn6p9icf?partnerid=gplp0 people are having the same issue that I have. The problem is that whenever I include com.android.support:support-v4:18.0.0 Android Studio throws lots of "Could not resolve X" messages for any support library calls even though it builds and runs fine. AS is just having issues. Someone in the comments of that post had an answer, but I can seem to find the setting Aug 19 16:02:05 they are talking about. Renê Köcher said "[EDIT - solved] apparently it's vital to add '.aar' to the registered archive types in Android Studio settings. Why isn't this by default?" Aug 19 16:02:57 Do you guys know where this .aar registered archive types setting is? Aug 19 16:03:49 Hello. Does anyone know how the renderescript bytecode is packaged into the apk? Aug 19 16:04:08 pfn, the setStackFromBottom method in listivew doesn't work? Aug 19 16:04:18 mmathis, no, RemoteViews Aug 19 16:04:22 oh Aug 19 16:04:41 most of the methods aren't remotable Aug 19 16:04:59 jigal your best bet is probably 127.0.0.1 as your site name Aug 19 16:05:05 I've decompiled an apk I made but it's still not clear where the rs cole resides. Aug 19 16:05:09 so I really have no control over my list's scroll position Aug 19 16:05:12 which is pretty irritating Aug 19 16:05:36 pfn: Why can't you do includes? Aug 19 16:05:48 s/cole/code/ Aug 19 16:05:57 yiati, how am I going to make an include that changes a single attribute without having to rewrite the entire layout? Aug 19 16:06:39 pfn: Just have one parent layout minus the view you need change an attribute in, then have different .xml files for each of the different types of views Aug 19 16:07:05 huh? Aug 19 16:07:19 pfn: include Aug 19 16:07:25 and how does that parent layout select which xml to include Aug 19 16:08:09 this is all getting sent to remoteviews Aug 19 16:08:17 so it cannot be selected from code, just a resid Aug 19 16:08:19 Well you're going to have to specify it one way or another, whether it's in the code or in the layout Aug 19 16:08:44 pfn: I think you know the answer, I don't think you want to admit it Aug 19 16:09:11 admit what? Aug 19 16:09:19 the answer is: need to reduplicate the entirety of xml Aug 19 16:09:25 which is irritating Aug 19 16:09:46 and in code is not an option for this Aug 19 16:09:46 pfn submit a patch :) Aug 19 16:10:06 well, I suppose I can include 2 listviews, and then have to select which one is visible from the remoteviews Aug 19 16:10:13 g00s, I don't care enough to Aug 19 16:10:28 uglify my layout some more... Aug 19 16:11:40 pfn: I would still do includes if I were you Aug 19 16:11:51 the includes are not helpful Aug 19 16:11:58 yes they are Aug 19 16:12:04 explain why they are helpful Aug 19 16:12:12 cut down on copy paste Aug 19 16:12:14 duplicate of entire parent-hierarchy + include of one changed Aug 19 16:12:19 which is what you are looking for Aug 19 16:12:31 or include entire hierarchy with 1 change Aug 19 16:12:34 there isn't really any other option Aug 19 16:13:37 I guess the only real good option is to use a style attribute Aug 19 16:13:43 and use that in conjunction with includes Aug 19 16:13:44 meh Aug 19 16:14:08 what would you recommend to store api keys for services like youtube or google maps in a way that doesnt interfere with SCM? Aug 19 16:14:41 ohcibi: res/values/keys.xml which is ignored by SCM, or have it as a build-time variable in the build system Aug 19 16:15:05 +1 to res/values/keys.xml Aug 19 16:15:18 yep.. i'll also go for that... thanks Ge0rG Aug 19 16:15:23 wow, remoteviews is dumb Aug 19 16:15:30 gives you all these setXXX methods Aug 19 16:15:48 but only like 15 methods in all of the View hierarchy can be called with those setXX methods Aug 19 16:16:04 with zero documentation of which ones can and can't be called Aug 19 16:17:13 mmathis, yes, it's terribly dumb Aug 19 16:17:34 basically, gotta git grep -A1 RemotableViewMethod Aug 19 16:17:36 is it safe to store a res/values/key.xml.example or does it break deployment or anything? Aug 19 16:17:38 to determine what you can call Aug 19 16:18:00 what is the point of remoteview? Aug 19 16:18:02 widgets? Aug 19 16:19:08 widgets, notifications primarily Aug 19 16:20:28 ohcibi: you might want to store it outside of res Aug 19 16:20:42 ohcibi: I'm using a version.xml.tpl template for res/values/version.xml Aug 19 16:21:03 k, i'll put it in to the root directory and write instrictions into the readme Aug 19 16:22:51 ugh, I can't set the attribute in xml either Aug 19 16:22:55 ok, I fail Aug 19 16:23:13 includes are a no go... Aug 19 16:26:01 pfn: You could always just make each independent layout file, and if you have time come back and try to work with optimizing the monstrosity of RemoteView structure :P Aug 19 16:27:31 yiati, yeah, not cool Aug 19 16:27:56 pfn: Functionality takes precedence Aug 19 16:28:48 jonc, here? Aug 19 16:29:30 !seen jonc Aug 19 16:32:05 jonc, i gaved up! Aug 19 16:34:43 I forget, if I set a style on a parent view, does it propagate down to its children? Aug 19 16:34:50 using styles fails for me if it doesn't :( Aug 19 16:35:38 08-19 09:35:06.893: W/AppWidgetHostView(24100): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.include" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]] Aug 19 16:35:39 heh Aug 19 16:35:45 so much for using includes Aug 19 16:36:50 yeah, I'll just include 2 of the same view and select its visibility, that'll work better Aug 19 16:39:36 http://stackoverflow.com/questions/18318812/make-a-view-next-to-another-and-at-the-middle-of-its-height Aug 19 16:40:38 one linear layout contains both views Aug 19 16:40:44 one item matches height of containing linear layout Aug 19 16:40:52 other item center_horizontal Aug 19 16:41:09 why linear layout? what wrong with realitive layout? Aug 19 16:41:53 Nothing's wrong with it. LinearLayout just does a bit more work for you Aug 19 16:42:10 Especially with centering Aug 19 16:42:54 well, using a relativelayout is possible, too Aug 19 16:43:12 pfn, how? i tried everything!! Aug 19 16:43:22 Went to grab lunch Aug 19 16:43:36 elichai2, one view layout_centerVertical="true" Aug 19 16:43:42 and the other match_parent Aug 19 16:43:50 but you shouldn't use a relativelayout unless your layout is pretty complex Aug 19 16:43:56 and using it would allow you to cut down on view hiearchy Aug 19 16:43:58 hierarchy depth Aug 19 16:46:09 elichai2, have the linear layout's height be wrap_content, then have the textview centered in parent Aug 19 16:46:16 that should be all you have to do Aug 19 16:46:58 as long as the linearlayout's orientation is set to horizontal Aug 19 16:47:17 centered vertically in parent* Aug 19 16:47:43 i did some changes but now the TextView is too low Aug 19 16:48:23 * pfn headscratches Aug 19 16:49:07 make that bad boy higherrrrrrrr Aug 19 16:49:24 elichai2, screenshot and pastebin your xml Aug 19 16:49:51 it seems to be a http error Aug 19 16:50:54 you know what, no it's great thanks!! Aug 19 16:51:00 got it working? Aug 19 16:51:12 yeppp Aug 19 16:51:16 alllright Aug 19 16:51:30 i added: Aug 19 16:51:30 android:layout_alignTop="@+id/numberPicker1" Aug 19 16:51:31 android:layout_alignBottom="@+id/numberPicker1" Aug 19 16:51:31 android:gravity="center_vertical" Aug 19 16:52:03 that works, too Aug 19 16:52:09 why can't i do wget on my adb shell? Aug 19 16:52:24 because you don't have it installed? Aug 19 16:52:26 how do I download the android 4.3 source code? Aug 19 16:52:29 jigal: Did you ask it nicely? Aug 19 16:52:51 yiati: i asked wget but it answerd rude ;-) cannot find command Aug 19 16:52:52 lol Aug 19 16:53:12 but anyway do i need to install it one way or another? Aug 19 16:53:55 ok, got it. repo intimidated me for a second Aug 19 16:57:34 one last question Aug 19 16:57:51 is it legal to put Admob Ads in two Activities at the same App? Aug 19 16:58:30 2yes Aug 19 16:58:41 and more? Aug 19 16:58:48 Hello there! Aug 19 16:59:13 elichai2: why wouldn't you be able to? But anyway, consult the admob ToS Aug 19 17:00:13 idk i just want to sure Aug 19 17:00:45 I need a way to import some user chosen images into my app. I only know the most basic things about sharing intents (like that you can send text and the user can then choose an app that can do something with the text). Is it possible to broadcast "I want one or more images" and make a dialog appear where the user can choose between, say, dropbox, file system, camera, galerie etc.? Aug 19 17:01:29 I'm not sure what to google here. What is this "reverse sharing" called in Android? Aug 19 17:03:09 I would think that you need a "file import" intent, or something like that. Aug 19 17:03:27 oh god, I created resources with the name and I thought it was a resource merging bug that was blocking my build Aug 19 17:03:37 Well, "file import" is too specific for my case. If the image comes from dropbox or from the camera, it's not necessarily a file. Aug 19 17:03:40 stupid font didn't differentiate capitalized vs. not clearly enough Aug 19 17:04:03 good afternoon chaps Aug 19 17:04:44 RedNifre: I'm sure there's an intent that brings up all file-handling apps (file browsers, cloud storage apps, etc), and I would think it's an "open file" intent, though I can't be sure. Aug 19 17:06:09 RedNifre: Intent.ACTION_PICK, generally Aug 19 17:06:11 Perhaps it would require building a list of supported file types that would include *everything*? Aug 19 17:06:43 Thanks. I guess finding a list of image file extensions is easy enough. Aug 19 17:07:23 I checked some twitter apps and none of them seem to do that. They only offer "galerie import" and "take a photo", which is a bit discouraging. Aug 19 17:07:37 but I'll check out Intent.ACTION_PICK first, thank you very much. Aug 19 17:08:10 (But I guess this won't work for apps that allow creation of images on the fly, like photos or drawing programs?) Aug 19 17:08:55 Ideally, the user could just add an image by clicking "+" in my app, choose his sketch app, draw something, and when he's done that image gets send to my app. Aug 19 17:11:51 Hello guys, i need some help. I was wondering if its possible to get the region of a image that you set in XML so you can use for onTouchListener with the Region.contains() method? Aug 19 17:34:05 What about Android Studio? Is it possible to create a serious app with it? Aug 19 17:34:25 RedNifre: yes Aug 19 17:34:28 RedNifre i hope my app is serious, so far its ok Aug 19 17:35:02 I hope my app is taken seriously, it involves adding mustaches to faces. Aug 19 17:35:39 snooplsm sounds like an enterprise application :) Aug 19 17:36:07 Sounds serious enough. I'm currently checking out the details, any luck with git or maybe even github integration? Aug 19 17:36:14 a plugin to the resource allocation system maybe Aug 19 17:36:16 Hi, does anyone in here know if there's a way to run ROMs on a device containerized - like a chroot or openvx/lxc/docker Aug 19 17:36:17 or as a relatively clueful person how might I go about developing such a utility Aug 19 17:36:27 *openvz Aug 19 17:36:42 g00s: could you elaborate? Aug 19 17:37:08 Andrevan i haven't messed with docker yet Aug 19 17:37:24 g00s, or how about a virtual machine? Aug 19 17:37:55 may as well use something like genymotion , which is an x86 image in vbox i /think/ but not sure Aug 19 17:38:28 so vbox runs on android? do you just run it headless and connect via VNC or an Xserver? Aug 19 17:38:56 no, ok - i have no idea what you are trying to do. this channel is for app development though Aug 19 17:39:00 maybe the key is run the VNC client or X client on the device, then connect to the headless vbox? Aug 19 17:39:12 Hmm... I took a closer look at the available intents and it looks very grim. It seems that there's a lot of "I have this and I want anyone do something with it", but no "I need content of type X, please give it to me". Aug 19 17:39:29 fair enough, I would like to develop an app to do this, but it's kind of a dev ops/android unix question Aug 19 17:39:45 This confirms my experience, I've seen many apps where you can share content easily with other apps, but I don't remember ever seeing an app that can pull in content dynamically. Aug 19 17:40:16 All cases I remember were of the type "You can import from dropbox, gallery, or photo app, but from nowhere else". Aug 19 17:40:22 is there a document somewhere explaining how android systems differ from your typical unix Aug 19 17:40:41 Has anyone ever seen an app that can retrieve media from whichever media app that's currently installed? Aug 19 17:41:08 I'm afraid that there's no "reverse share", but I hope somebody could prove me wrong :/ Aug 19 17:41:53 btw g00s, genymotion is backwards, it seems to be an android device image for desktop virtual boxes Aug 19 17:42:03 what I want to do is run a virtual system on my phone and connect to it with a thin client Aug 19 17:42:23 you're probably better of using ubuntu phone with lxc support Aug 19 17:42:33 what's a thinner client than a phone? A smartwatch? Aug 19 17:42:36 right if that ever gets made g00s Aug 19 17:42:42 Andrevan: there have been a few attempts to do sandboxing on Android - from vmware and Samsung, at least Aug 19 17:42:48 RedNifre: or google glass, or an arduino Aug 19 17:43:04 RedNifre, ideally, another phone Aug 19 17:43:18 Leeds: right, ok, but it's all corporate stuff? I assume they don't release the code for me to play with Aug 19 17:43:26 correct Aug 19 17:43:46 but the idea of the container is that you can migrate it, so i'm guessing Andrevan wants to do that Aug 19 17:43:52 well yes Aug 19 17:43:55 that makes it much easier Aug 19 17:43:58 it's on the kernel level Aug 19 17:44:01 insta device support Aug 19 17:44:35 This sounds very interesting, since I can't think of a use case for this quickly. Will it be available to the public, or are you doing this for company internal phones only? Aug 19 17:44:49 so far it's a project Aug 19 17:45:00 I'd rather keep it open source but it may lead to a company someday Aug 19 17:45:31 I saw a presentation from a local company here in HK which was planning a 'personalities' type of thing Aug 19 17:46:07 yeah I mean Aug 19 17:46:08 as a business Aug 19 17:46:10 it's a great idea Aug 19 17:46:14 for corporate use etc Aug 19 17:46:16 security and whatnot Aug 19 17:46:25 but I'm more interested in the technical aspect at the mometn Aug 19 17:47:27 what it comes down to is, does the android linux kernel have support for this kind of containerization because if not, it won't really work out Aug 19 17:47:56 well we need a 3.8 kernel for one Aug 19 17:47:59 almost certainly not Aug 19 17:48:02 hey guys is there an easy way to get the region (for use in OnTouchListener Region.contains() ) from a drawable image? Aug 19 17:48:26 Does it need to run on every device? If not, you could modify CyanogenMod, maybe? Aug 19 17:48:32 https://android.googlesource.com/kernel/common/+/experimental/android-3.8 might work Aug 19 17:48:43 RedNifre, yeah I mean it probably ends up looking like a custom rom mod Aug 19 17:48:49 or at least a custom kernel Aug 19 17:49:09 but I don't currently have the expertise to develop something like that Aug 19 17:49:11 I still can't think of a usecase for this. Can you give me a hint? Aug 19 17:49:34 RedNifre, there are a lot, but it's basically a way to provide phone images for corporate use Aug 19 17:49:37 ie Aug 19 17:50:23 Maybe I missunderstood. Why would you run a phone OS in a VM on a phone and connect to it from another phone? Aug 19 17:50:24 let's say I'm a company and I have consultants coming in doing work with sensitive data Aug 19 17:50:45 instead of storing data on the phones themselves Aug 19 17:50:55 you have a server which runs virtualized phone images Aug 19 17:51:01 and the phones connect to them Aug 19 17:51:15 Right. That makes sense to me. I thought you wanted to run the VMs on phones, too. Aug 19 17:51:30 well that's the easiest way to distribute the client software that connects to the server ie Aug 19 17:51:38 the phones run a custom linux version in a VM Aug 19 17:51:46 which is more secure because it's modular and sandboxed Aug 19 17:51:55 and it will be destroyed easily, remotely Aug 19 17:52:09 so basically the client image and the server image are a piar Aug 19 17:52:10 pair* Aug 19 17:52:20 and uniquely exist with keys for each otehr Aug 19 17:53:07 That makes no sense to me. Why not have the client on Google Play, first show the consultants a QR code to get the app, then a second QR-Code that makes the app connect to the company server? Aug 19 17:53:13 that being said it might be possible, as you mention, to do this with only server virtualization or containerization Aug 19 17:53:20 how can i create another app that will be a lisence like Titanium Backup does? Aug 19 17:53:28 haha well first of all QR codes are stupid Aug 19 17:53:30 no offense Aug 19 17:53:45 but anyway the point is, we want to also control the software on the phone itself Aug 19 17:53:55 but allow people to use their own devices Aug 19 17:54:05 which have to provide a sandboxed area for secure data Aug 19 17:54:31 wait... isn't that backwards? I thought the outside of a sandbox is safe from what's inside, but not the other way around? Aug 19 17:54:46 well there are outer and inner sandboxes but you're right Aug 19 17:54:49 it has to go both ways Aug 19 17:55:44 Hey guys. Just wondering if calling Typeface.createFromAsset creates a new instance of the font every time, or if it caches Aug 19 17:55:50 I'm not convinced that having the client in a VM is meaningfully more secure that having it as a regular app. Aug 19 17:56:09 ...but I don't know much about virtualization, so don't listen to me ;) Aug 19 17:56:18 well for one thing, we couldn't distribute the app using the store, it would have to be an apk through unknown sources or whatever Aug 19 17:56:21 I am calling it when initializing the views for a bunch of rows in a list. If it isn't caching, then I could just store the typeface somewhere else Aug 19 17:56:21 but aside from that Aug 19 17:56:31 Why not? Aug 19 17:56:55 well this creates an opportunity for a credential-less security domain Aug 19 17:57:14 your app is uniquely generated with an ssh key which can only connect to your unique phone image Aug 19 17:57:26 when either is destroyed, the other is useless Aug 19 17:57:31 mainly the server gets destroyed Aug 19 17:58:18 um, I suppose you could distribute the app and just download the key and put it somewhere Aug 19 17:58:20 hey, i want to make an Pro app but i don't want it to be a seperated app, i want it to be a "Pro Key" App like Titanium Backup, how can i do it? Aug 19 17:58:43 I'm not clear on whether apks can access config files in user space but I assume they can? Aug 19 17:59:20 elichai2 I'm not sure this is the best way to do it, but you could have the normal app broadcast a special intent and have the key app answer correctly. Aug 19 17:59:20 Andrevan ideally, i wonder if in a perfect world, the ultimate phone would be open hardware, open baseband firmware, and something like CoreOS / containers Aug 19 17:59:28 g00s, yeah that would be awesome! Aug 19 17:59:34 or maybe it's possible to check whether the key app is installed? Aug 19 17:59:46 RedNifre, so what is the best way? Aug 19 17:59:47 I mean trivially there are a lot of use cases for containerization if you use the same phone to connect to itself Aug 19 17:59:52 ie if I want to just try out a different OS Aug 19 18:00:05 it's probably even possible to run iOS in a contianer if the kernel will work Aug 19 18:00:09 elichai2 since this seems to be something a lot of apps are doing, I guess it's possible to find the perfect answer via google. Aug 19 18:00:27 unless you are lucky and there's somebody here who already did this. Aug 19 18:00:32 But I don't like the idea anyways. Aug 19 18:00:40 since it's linux deep down somewhere... Aug 19 18:00:40 I think... Aug 19 18:00:40 or maybe that was some weird BSD fork Aug 19 18:00:43 It might be more successful to sell the key as an in app purchase Aug 19 18:00:52 in app purchases got a lot easier in a recent update. Aug 19 18:00:52 RedNifre, yes, but i don't know how to explain this to google :) Aug 19 18:01:06 RedNifre, but what if he will un-install the app? Aug 19 18:01:24 and then re-install? Aug 19 18:01:37 I'm not sure but I think that in-app purchases done through google are stored on the google servers. Aug 19 18:01:55 (haven't used in app purchases yet) Aug 19 18:02:27 RedNifre, i think that in-app purchase are for one time use Aug 19 18:02:59 Andrevan: iOS is BSD based Aug 19 18:03:09 Andrevan what's the problem with QR-codes, why might it create a credential-less security domain and what's the problem with having the client as a playstore app? Aug 19 18:03:31 elichai2 http://stackoverflow.com/questions/3062946/how-can-i-use-the-paid-version-of-my-app-as-a-key-to-the-free-version Aug 19 18:03:57 RedNifre: QR codes are silly, the whole idea of using a phone camera to encode data is more of a curiosity than anything Aug 19 18:04:05 well the camera doesn't encode it but Aug 19 18:04:13 using bar codes to encode data readable by a camera Aug 19 18:04:27 I see them in the subway sometimes and laugh. Aug 19 18:04:36 (no internet down there) Aug 19 18:04:41 :D Aug 19 18:04:53 But they don't need internet in your case. Aug 19 18:05:06 that's true Aug 19 18:05:14 but the point is that using the camera is unnecessary Aug 19 18:05:21 we can just download a file from a URL Aug 19 18:05:32 Giving the SSH keys to the consultants in QR code form so that they can scan it with the client app from the play store seems convenient. Aug 19 18:05:57 well, it's a fun idea certainly Aug 19 18:06:00 ah, I forgot... SSH keys are large, right? Aug 19 18:06:26 I think that would be feasible thogh Aug 19 18:07:11 it's a fun idea for a multi factor auth Aug 19 18:07:28 But maybe I missed something in your plan for this. So you would tell the consultants to activate non-store apks, send them the apk via mail/nfc/anything and it would already be pre-configured for them? Aug 19 18:07:52 I believe a qr code can store 1k + bytes Aug 19 18:07:54 something like that Aug 19 18:08:10 hmm Aug 19 18:08:15 the thing is, what we would probably end up with in that scenario RedNifre Aug 19 18:08:17 I guess I'll be happy with my digets like this Aug 19 18:08:22 How do you make sure that only the consultants get the right apk/vm? Aug 19 18:08:22 widgets Aug 19 18:08:33 would be some kind of distribution/repository app that downloads apks Aug 19 18:08:41 and maybe that one would come with the QR code Aug 19 18:09:03 because one of the aspects is pushing out updates Aug 19 18:09:12 but the updates are sensitive Aug 19 18:09:17 so we can't use the store for that bit Aug 19 18:09:51 How does the consultant and only he get the right app / vm? Aug 19 18:10:04 well it's generated once and uniquely Aug 19 18:10:31 so if the wrong person got it, he'd have a broken one forever Aug 19 18:10:39 and then we would see the error or whatever and erase that Aug 19 18:10:42 on the server Aug 19 18:10:58 mmathis, i will try this: http://stackoverflow.com/questions/8034683/licence-check-for-a-pro-key what i need to put in the lisence key app? Aug 19 18:10:59 ... I guess you take the consultant's phone, maybe use the MAC adresses for a hash, connect it to your pc and transfer the custom apk to it via cable? Aug 19 18:11:02 it wouldn't be too different from like an activation process Aug 19 18:11:09 a la windows or carriers Aug 19 18:11:52 haha you love the 20th century physical tech RedNifre Aug 19 18:11:55 well, for windows it's "simply install this publicly available thing, then type in the code you have on a piece of paper" which seems to be closer to my "get it from the playstore, scan the qr code" idea. Aug 19 18:11:56 no wires no cameras :) Aug 19 18:12:18 ideally the way it works is Aug 19 18:12:30 consultant opens the app, answers some kind of multi-factor challenge, and gets a key Aug 19 18:12:42 wait, you missed the first steps. Aug 19 18:12:59 start with "the consultant visits and has nothing on his phone yet" Aug 19 18:13:18 you could have a QR code that you email along with the APK Aug 19 18:13:19 so going with your idea, consultant downloads the "public app" and uses that to get the "private app" Aug 19 18:13:33 they have to scan the qr code from the email to unlock the app Aug 19 18:13:43 yeah that would work too Aug 19 18:13:53 make them 1 time use codes that are generated when you send the email Aug 19 18:13:55 no, because you can't scan the code when you read the mail on your phone ;) Aug 19 18:14:10 allow them to save the image and just use that instead Aug 19 18:14:17 instead of scanning it Aug 19 18:14:18 how exactly does the consultant get the private app from the public app? Aug 19 18:14:20 haha yes which is why QR codes are silly, I'm substituting QR here for just download it with the key Aug 19 18:15:22 Hello, I'm Bob the consultant. I just installed the public app from the playstore. What should I do next? Aug 19 18:15:32 RedNifre, this isn't really important, some combination of security challenges and whatnot Aug 19 18:15:43 maybe we got the MAC of the phone in advance like you said, that's part of it Aug 19 18:16:02 I have no idea elichai2 Aug 19 18:16:02 let's assume we can secure an android app, that's not as much waht I'm interested in Aug 19 18:16:21 Mh, I guess I'm too much of a HCI / usability person, so I'm drifting to that topic all the time ;) Aug 19 18:16:31 I was just hoping to get yous tarted in the right direction Aug 19 18:16:44 the hard part is to connect to the virtual environment in the cloud Aug 19 18:16:52 instead of a qr code just mail the apk with a 1 time use authentication code Aug 19 18:17:28 and register the mac or device token on your server, check that anytime the app launches to determine if it is a registered device or needs autheticated Aug 19 18:17:51 so basically the phone app, after security, is some sort of X client or VNC system, connecting to a phone image Aug 19 18:18:00 now do we have to worry about resolutions and stuff Aug 19 18:18:06 maybe we send that along and do it on the server Aug 19 18:18:26 Yeah, something like that. I'm not convinced that having a separate private app or VM is better than having a public app that gets configured with private credentials once. But I'm not an expert on this. Aug 19 18:18:50 well ultimately we need a way to "self-destruct" and not leave data behind Aug 19 18:19:01 think of it as Snapchat that actually works Aug 19 18:19:31 VNC doesn't leave data behind and I think a public app would be just as good at self destruction as a private app or VM. Aug 19 18:19:53 sure VNC works but then it needs to connect to something Aug 19 18:20:22 Yes, to the VMs on the company servers? Aug 19 18:20:43 right so that works, I thought you were saying no need for VMs on the servers Aug 19 18:21:07 No, I meant no need for VMs or custom compiled apps on the phone. Aug 19 18:21:29 Just one public app that somehow gets a private configuration to connect to the VMs on the servers. Aug 19 18:21:36 yeah I think it's possible without that bit Aug 19 18:21:39 but a lot less cool :) Aug 19 18:22:58 And yes, I DO love QR codes :) I'd love to go to a company as a consultant and have them welcome me with "we use this private app, take this piece of paper with the installation instructions" and that paper just says "Get this app [play store QR code] then start it and scan this code [config QR code]". Aug 19 18:23:26 I admit they are somewhat satisfying to scan Aug 19 18:23:59 ...and then I'm connected without having to change my configuration to allow untrusted apk installs or any of that technical stuff. Aug 19 18:24:00 at this point physical media are cheap enough that we can just give them an sd card or usb drive Aug 19 18:24:12 how do i put those into my phone? ;) Aug 19 18:24:48 well if there's really no way to do that... put it on your PC and send it over the LAN Aug 19 18:25:15 That sounds complicated, especially since I don't carry a PC around (only a tiny bluetooth keyboard). Aug 19 18:25:49 anyway, if we had 2-way containerization, it would be even simpler Aug 19 18:25:50 The problem with QR codes is that most people don't know what to do with them, or can't grasp what they do. Aug 19 18:26:17 agreed that many people use them for no apparent reason Aug 19 18:26:37 I agree. Aug 19 18:26:38 in this case it makes sense on some level Aug 19 18:27:09 but I still prefer to do the entire thing virtually Aug 19 18:27:49 and when I get an email with a QR code in it, it's just, ugh Aug 19 18:27:52 esp if reading on the phone Aug 19 18:27:56 You could also send them an unsecure mail with the playstore link and the configuration as a special link like andrevan://base643oueheu and have the installed app process intents in the "andrevan" protocol. Aug 19 18:28:08 I like that idea Aug 19 18:28:14 I think that QR codes should only exist on paper (mostly). Aug 19 18:28:37 I think the much-vaunted paperless future that never happened is actually here pretty soon Aug 19 18:28:49 rewriteable cheap e-ink is on the horizon Aug 19 18:28:59 I agree and I'm actively working towards that goal. Aug 19 18:29:13 you are? cool Aug 19 18:29:14 how so Aug 19 18:29:19 I'm currently planning to write an app that will replace one of the last remaining uses I have for paper :) Aug 19 18:29:54 btw, apparently android supports cgroups Aug 19 18:29:57 No, I won't wipe out paper completely. Just for one specific use case I have. Aug 19 18:29:58 afk Aug 19 18:32:25 is there a version of android-dev that's about the systems development stuff as opposed to consumer apps Aug 19 18:32:36 or anyone ever use https://android.googlesource.com/kernel/common/+/experimental/android-3.8 ? Aug 19 18:34:09 Andrevan i think there is a google group for platform dev Aug 19 18:34:28 Andrevan: Yeah, it's called Linux. ;-) Aug 19 18:36:13 kjeldahl: haha, but I mean that kernel... Aug 19 18:39:30 Andrevan also there is a embedded android book from oreilly Aug 19 18:39:57 I suppose that's where to go Aug 19 18:40:07 which is probably instantly out of date, but google seems to have a culture of non-documentation, so you gottta take what you can Aug 19 18:40:18 sigh Aug 19 18:47:07 So i was reading the deprecation notice on http://developer.android.com/reference/android/os/PowerManager.html#FULL_WAKE_LOCK since this has been deprecated is there an alternative way to turn the screen on if it's off because FLAG_KEEP_SCREEN_ON won't do that Aug 19 18:52:21 http://stackoverflow.com/questions/18320584/license-key-as-an-external-app Aug 19 18:52:22 maybe FLAG_TURN_SCREEN_ON? Aug 19 18:53:04 mmathis: yep that'll probably do it, thanks, not sure how i missed that one Aug 19 19:05:16 Andrevan, the people in #cyanogenmod might be able to point you in the right direction. Aug 19 19:12:11 Anyone could advise how should I bootstrap a new gradle android project? is there a CLI command to generate the gradle.build and directory structure? Aug 19 19:14:51 Anyone know how to help AS know that com.android.support:support-v4:18.0.0 does exist and that it is working correctly? Aug 19 19:15:30 Hey, canvas.translate(x,y) moves the current content of the canvas in x,y pixels? I'm trying to create a simple animation, i drawText() on the canvas and then I run translate(i,0) but i get weird results... Aug 19 19:17:31 hi Aug 19 19:18:39 I am trying to extract config file from my xperia V (lt25i). I'm going ahead so: I connect the smartphone at pc (with debug mode), then into terminal i digit: Aug 19 19:18:52 adb pull /proc/config.gz but i visualize this error: remote object '/proc/config.gz' does not exist Why? Aug 19 19:19:29 Fra87 , please see topic. thanks Aug 19 19:20:18 where i see? Aug 19 19:20:32 <|0xD34D|> Fra87: head over to #android-root for kernel/root related stuff Aug 19 19:21:12 ok thank Aug 19 19:21:15 finally Aug 19 19:21:37 @yiati Yes Aug 19 19:21:42 what i do to send private msg? Aug 19 19:22:01 burgalon: What did you do? I can't seem to get it to work Aug 19 19:22:12 @yiati go to your Android sdk setup and add under extras/Android Support Repository Aug 19 19:22:56 i solved bye Aug 19 19:24:12 burgalon: So under Project Structure, I go to Platform Settings, click on the plus icon, and navigate to the Extra folders? Aug 19 19:24:23 @yiati Aug 19 19:24:44 @yiati no… in Android Studio click the android icon at the top... Aug 19 19:25:01 this should open the android sdk manager Aug 19 19:25:29 http://www.htcdev.com/images/uploads/devcenter/sdkmanager.png Aug 19 19:25:36 bugalon: Oh you want me to open the sdk manager, and download it. I already have it downloaded Aug 19 19:25:51 yes Aug 19 19:25:51 As I mentioned before I already have everything building and running fine Aug 19 19:25:54 arrg Aug 19 19:26:01 Android Studio is just freaking out Aug 19 19:26:33 @yiati so your problem is that the project is building on command line but not on Android Studio? Aug 19 19:26:47 It will even build in Android Studio Aug 19 19:26:52 and on the command line Aug 19 19:27:00 so? Aug 19 19:27:03 what's the issue? Aug 19 19:27:17 The visual editor is showing hundreds of "cannot resolve x" where x is some support library funciton Aug 19 19:27:23 oh Aug 19 19:27:39 Which is extremely distracting, and doesn't allow me to use intellisense/autocomplete Aug 19 19:27:51 It's just some kind of AS issue :P Aug 19 19:28:05 basically, the libraries that are imported by gradle should be showing in your Project pane under External Libraries Aug 19 19:28:23 They are :P Aug 19 19:28:26 lol Aug 19 19:28:45 well… not sure Aug 19 19:28:48 then Aug 19 19:28:55 Nor am I Aug 19 19:28:56 so maybe you could help me :) Aug 19 19:29:13 do you know how to bootstrap an Android gradle project from CLI ? Aug 19 19:29:28 I opened a bug for my problem a while ago https://code.google.com/p/android/issues/detail?id=59080 Aug 19 19:29:47 I don't know what bootstrapping is lol Aug 19 19:30:02 starting Aug 19 19:30:05 initializing Aug 19 19:30:10 creating a new project Aug 19 19:30:53 similarly to maven having "mvn archetype:generate...." Aug 19 19:31:08 how do I generate the gradle wrapper script? Aug 19 19:34:37 we didnt start the fire Aug 19 19:34:40 it was always burning Aug 19 19:35:00 Type gradle wrapper Aug 19 19:36:27 @SimonVT thanks! Aug 19 19:36:28 Is there any way to see if the camera flash is working on an emulator? Aug 19 19:37:03 if not, could anyone advise me on where I could get nexus 4 driver for windows 7? I've looked all over, including lg's website and can't see one Aug 19 19:40:07 Just use the one in the sdk Aug 19 19:41:19 SimonVT: I'm using that emulator, my app runs fine on the virtual device, but there is no indication on wether or not the flash actually works Aug 19 19:41:36 I meant the driver in the sdk Aug 19 19:41:40 It works fine for nexus 4 Aug 19 19:43:10 Where is it located in the sdk manager? I can't seem to see it anywhere obvious Aug 19 19:43:48 In extras iirc Aug 19 19:44:03 Provided you downloaded it Aug 19 19:44:37 ah, I see it; need to update it thanks Aug 19 19:46:26 Could building a 4.2 app on an android 4.3 device be a potential reason fo the crash at startup of he app? Aug 19 19:47:02 I hope samsung releases a Galaxy Note Watch Aug 19 19:47:10 something like a 3.2" screen for my wrist Aug 19 20:01:54 JamoBox: what do you mean? Are you building the application on the device? Aug 19 20:04:29 installing, sorry Aug 19 20:04:42 RyanM: Aug 19 20:05:02 ah. that's probably not the issue. Android apps are (generally) backwards compatible across Android versions Aug 19 20:05:23 Ah, just can't figure out what it would be Aug 19 20:05:41 rather, later versions of Android will generally run apps targeted at previous versions just fine. Aug 19 20:06:34 I guess that makes a lot of sense. I would think my error was a hardware issue, bu the app doesn't try and access the flashlight until the button is pressed, so I can't see why that would be he problem Aug 19 20:14:18 what is a graphically appealing way to list a bunch of stuff in Android? Aug 19 20:15:24 listview ? Aug 19 20:20:26 JamoBox: You should check logcat to see why it crashed. Aug 19 20:21:22 anyone know how to get a region out of a drawable buton? so that i can use onTouchListenr region.Contains() ? Aug 19 20:22:03 thanks bankai_ Aug 19 20:28:48 RyanM: that's the issue, it doesn't crash on the emulator; and the nexus 4 isn't listed in the devices menu when connected via USB Aug 19 20:29:31 I also tried on a gemini tablet and it crashed at the same point as on the nexus Aug 19 20:29:41 but I have no way to see the logcat output on them Aug 19 20:30:50 JamoBox: Long shot, but try changing the way it's connected via USB from "Media" to "Camera" or vice versa Aug 19 20:30:50 alternately... Aug 19 20:30:50 have you enabled USB debugging on the N4? Aug 19 20:31:12 (i.e, is the USB debugging icon appearing when it's plugged in?) Aug 19 20:44:55 RyanM: Thanks for the suggestions, I've just attempted that, it listed 2 nexus 4 devices when installing the drivers, one was successful and he other wasn't Aug 19 20:45:35 nethertheless, the device is still not listed on the device chooser Aug 19 20:45:57 and USB debugging is on, yes Aug 19 20:54:51 JamoBox: perhaps try rebooting your computer and turning USB debugging off and back on Aug 19 20:55:07 I've had luck with both approaches Aug 19 20:55:10 but he's d/ced. Aug 19 20:58:27 To change the default accent colours, are there some properties that I could override, or do I manually have to set all of the colours? Aug 19 20:59:22 (For instance, tab underlines, row selections, button presses) Aug 19 21:01:44 Looks like I found an answer: Aug 19 21:01:46 http://www.therealjoshua.com/2012/01/styling-android-with-defaults/ Aug 19 21:04:45 JamoBox: perhaps try rebooting your computer and turning USB debugging off and back on Aug 19 21:04:47 I've had luck with both approaches Aug 19 21:05:03 that's what I just tried, still nothing though Aug 19 21:05:15 although, somehow after that reboot it won't work on the emulator too now Aug 19 21:05:28 which I guess to an extent is good thing, as I can see the logcat errors Aug 19 21:06:06 is there some way to select all checkboxes inside a linearlayout ? Aug 19 21:10:14 I'm trying to get my users to sign up for my app's community, what is the best way to do this? Aug 19 21:16:20 Is there any reason why "private final ToggleButton toggle = (ToggleButton) findViewById(R.id.toggleFlashButton);" would be null? apparently that's what the error is Aug 19 21:16:38 R.id.toggleFlashButton is present in the xml Aug 19 21:17:07 Is the hint on an EditText supposed to display again if I set the text to empty string ""? Aug 19 21:26:38 Hi there, if I store an object in a static field in a MainActivity, and MainActivity starts a new activity, will the second activity be able to access the static fields of the MainActivity? Aug 19 21:27:45 yes Aug 19 21:27:52 but it's probably bad design Aug 19 21:28:13 hi, in a TextView how can I format my text nicely with newlines and paragrphs ? Aug 19 21:28:37 it seems not t accept html tags in text? Aug 19 21:28:49 or at least not when I use linkify Aug 19 21:30:59 Xabster, I'll try it then I guess. The problem is that I have an object containing the current user's API keys for my app, and I'm getting a bit tired of passing everything in the constructors. Activity contains a Fragment which contains a ViewPager whose views contains ListVIews which contains data which the user can edit in a new Activity. It's a real pain :/ Aug 19 21:31:27 I see, perhaps a singleton pattern Aug 19 21:35:02 can I not just use html markup to format text in views? Aug 19 21:35:34 just a
would be useful Aug 19 21:38:40 robin_sz, http://www.chrisumbel.com/article/android_textview_rich_text_spannablestring <- have you looked at something like that? Aug 19 21:42:55 in studio/gradle, how long does it take to build a simple test project (one class)? here it's taking more than 20s, less than 30s, if not the first build. Aug 19 21:43:25 more the 1:30 if the first build Aug 19 21:43:35 first build is always slow Aug 19 21:43:40 rather, first time using gradle Aug 19 21:43:44 core 2 duo 2.6GHz with 4GB RAM Aug 19 21:44:07 few processes running Aug 19 21:46:18 I'm having trouble with a layout that should be a no-brainer (and evidently I have no brain). I simply need a textview to be centered horizontally and immediately on top of an imageview which is centered horizontally and vertically and then another textview centered horizontally and immediately below the imageview. I've tried with a relativelayout but for some reason I'm just not able to get things to align. Any recommended sites for Aug 19 21:46:19 layout examples? Aug 19 21:46:21 Xabster, Yup, just tried it, doesn't work. It's possible to have MainActivity being unloaded and messes up my app. Right then, I will rebuild it from serialized every damn time I need it using shared prefs Aug 19 21:46:43 Java/Android is so complicated coming from a C++ developer :( Aug 19 21:47:53 zanberdo, RelativeLayout with one TextView over ImageView and another TextView under it? Aug 19 21:50:28 Max-P, yes, that's what I have been trying to get to work correctly. Aug 19 21:52:11 I have a bluetooth problem and i don't know enough about bluetooth to figure out what's going on. I'm trying to write an app to do speech recognition while itnerfaced with my car', AudioManager.startBluetoothSco() puts the car into 'voice recognition active' mode but AudioManager.stopBluetoothSco() doesn't then take it out again, though does seem to have an audible effect Aug 19 21:52:35 zanberdo, Aug 19 21:53:05 I can post a complete example to pastebin if needed Aug 19 21:54:55 Max-P, thank you, but don't spend too much time on it just yet. I'm actually solving two separate issues so I don't want to muddy the waters. Let me give what you've suggested a try and let me see what happens. I'll report back Aug 19 21:56:36 Is there a way to disable clicks in a numberpicker Aug 19 21:59:59 Nvm, found what I needed here --> http://stackoverflow.com/questions/8854781/disable-soft-keyboard-on-numberpicker Aug 19 22:10:22 Okay, going to solve my own problem with a singleton that reloads its data from storage if needed when I change activities. Thanks for the tip Aug 19 22:15:12 weird Aug 19 22:15:20 my thing is busted Aug 19 22:17:25 Anyone heard of a place called Maven Alpha? Aug 19 22:25:37 I have some relatives here in Brazil that live in a small town where there is a place named Facebar Aug 19 22:26:29 In the same town there is a computer store named Linux Computers Aug 19 22:55:37 A ScrollView is changing the height of my RelativeLayout Aug 19 22:55:49 The RelativeLayout fills the screen by itself Aug 19 22:56:25 Then when I wrap it with a ScrollView with layout_height="wrap_content" the height of the page becomes significantly longer than the page Aug 19 22:56:45 http://i.imgur.com/xVyoSl.jpg Aug 19 22:58:15 Anybody got an answer as to the pros and cons of using XML or JSON for web data transfer (from web database to app)? Aug 19 23:01:15 json is easier to read imo Aug 19 23:01:24 Anthaas: From a front end developers pov, not much. The only difference is the availability of libraries to parse it. I feel like JSON has the best support. Aug 19 23:01:35 I agree it's easier to read as well Aug 19 23:01:36 Anthaas: use protobuf (or one of its competitors) Aug 19 23:01:45 you don't need to read wire formats Aug 19 23:01:54 org.json, and GSON Aug 19 23:02:06 I find XML more often as I find it easier to read, and maintain. What is the speed difference? Aug 19 23:02:11 not to mention Jackson json parser Aug 19 23:02:33 JSON is easier to parse Aug 19 23:03:15 Easier or quicker? Aug 19 23:03:29 Is there a significant time different in download and parse speeds? Aug 19 23:04:14 minified XML is larger than minified JSON, which is larger than a protobuf Aug 19 23:04:28 XML is IMO horrible but some people like it :-) Aug 19 23:05:03 json seems easier than protobuf if size and all that isnt critical to your app Aug 19 23:05:09 Cool, but is there a significant time difference? Aug 19 23:05:15 I think that is really all I am after Aug 19 23:05:22 I have a framework I have made which handles XML for me Aug 19 23:05:26 between json and xml i dont think its significant Aug 19 23:05:30 Cool Aug 19 23:13:03 Is passing in "getApplicationContext()" as the first parameter to a new Intent which is used to launch a second activity better than passing in "FirstActivity.this"? Aug 19 23:13:08 Doesnt that help prevent memory leaks? Aug 19 23:13:49 i.e. is new Intent(getApplicationContext(), SecondActivity.class) better than new Intent(FirstActivity.this, SecondActivity.class) ? Aug 19 23:14:36 Anthaas: doesn't really matter in that case. You should only worry if you're doing long-running operations requiring a Context. Aug 19 23:14:37 It doesn't matter. The context should be stored as part of the intent, so it's not like it's going to hold a reference to FirstActivity and keep it from being GC'd Aug 19 23:14:43 err Aug 19 23:14:52 the context *shouldn't* be stored as part of the intent Aug 19 23:15:39 RyanM: Do you have an example so I might understand what you mean better, can you elaborate? Aug 19 23:19:01 what does rendering mean in programming language? Eng isnt my 2nd langue ;/ Aug 19 23:19:47 newbieto: drawing Aug 19 23:20:04 drawing on the screen Aug 19 23:20:10 Anthaas, it makes no difference Aug 19 23:20:27 the context value passed to new Intent is not referenced Aug 19 23:20:48 the context is only used for name resolution, then it's discarded Aug 19 23:30:04 hey guys, I'm creating an application that needs to listen for UDP connections. I know android has it's own Async / concurrently practices... what method would you advise me use? Native Thread, something else? Aug 19 23:30:35 s/concurrently/concurrency/g Aug 19 23:31:13 there's no such thing as a udp connection Aug 19 23:31:27 funkbox, I'm aware Aug 19 23:31:31 UDP packets, then Aug 19 23:31:32 Thanks JesusFreke Aug 19 23:31:43 UDP traffic if you must Aug 19 23:31:48 i'd probably set up a thread in the background Aug 19 23:32:00 funkbox, just a regular Thread? No android-specific stuff? Aug 19 23:32:16 nah, processing should be pretty straightforward right ? Aug 19 23:32:40 you might need to grab a handler on the main ui thread on which to post callbacks but that's 'bout it Aug 19 23:33:05 that's what I thought Aug 19 23:33:06 thanks bud Aug 19 23:33:42 i'd probs put the main logic into a vanilla java library to help with the compile/test cycle Aug 19 23:34:10 that's exactly the plan. What about `Looper` ? Aug 19 23:34:29 oh nevermind. Aug 19 23:34:42 a looper is the message loop. Aug 19 23:35:24 right right. Thanks bud Aug 19 23:35:32 cheers Aug 19 23:36:56 Anthaas: For example, if you're doing some web requests on a background thread that need a Context, you should use the Application context for that. Aug 19 23:37:20 * pfn posts a new qicr update Aug 19 23:37:35 hmm Aug 19 23:54:21 huh, which flags do I need to start an activity (dialog-based) that will show up above a different task stack? Aug 19 23:54:52 FLAG_NEW_TASK? Aug 19 23:55:07 or there's a way to set the association; hmm, what was it? Aug 19 23:55:16 android:taskAffinity=":pfn" or something Aug 19 23:55:18 I just want it to appear as an overlay and go away Aug 19 23:56:05 for some reason, when I do FLAG_NEW_TASK | FLAG_EXCLUDE_FROM_RECENTS; if I'm in another app, it takes me to the homescreen first Aug 19 23:59:56 hmm, is the answer to use a Window overlay instead of an Activity then... Aug 20 00:08:54 http://stackoverflow.com/questions/18324584/android-bluetooth-sco-with-nissan-car-radio /plugging my SO question :P Aug 20 00:12:01 oh, android:allowTaskReparenting maybe Aug 20 00:12:26 hmm, nope Aug 20 00:21:24 am i missing something or do static layouts completely fail on gingerbread when trying to draw text on a canvas?.. Aug 20 00:22:11 http://pastebin.com/ZxEQvQ95 Aug 20 00:22:28 breaks long lines into multiple lines successfuly on everything > 2.3 Aug 20 00:22:34 but on gingerbread it just fails... Aug 20 00:22:48 adn doesnt break it, causing text to go off screen Aug 20 00:22:48 :/ Aug 20 00:37:08 if in an AsyncTask doInBackground returns null will onPostExecute() be called? Aug 20 00:37:25 yes Aug 20 00:38:13 thx Aug 20 00:56:51 Is it possible to launch another app from you as a child? Aug 20 00:57:38 R0b0t1: define "child" Aug 20 01:01:07 RyanM, spawned from you Aug 20 01:03:05 It is possible to launch another application from yours, yes. Just create an Intent with one of the application's activities as the class name, then call startActivity with that Intent Aug 20 01:07:01 Will that process have mine as a parent? Aug 20 01:07:14 R0b0t1: No Aug 20 01:07:59 Is there a way to do so? Aug 20 01:08:08 R0b0t1: Why do you want to? Aug 20 01:09:16 To provide a wrapped interface to an app, like a JGlassPane Aug 20 01:09:20 so he can claim a dependent Aug 20 01:12:52 I've never heard of a JGlassPane, but I don't think running an app as a child process is going to help you wrap their UI Aug 20 01:13:38 It would allow me to intercept events before it is passed to them Aug 20 01:13:44 No it wouldn't. Aug 20 01:13:58 Why? Aug 20 01:14:39 First question, is the app you're trying to wrap your own app? Aug 20 01:15:02 Not necessarily, but that could be the case Aug 20 01:15:23 If not, the apps aren't even being run by the same user ID. Aug 20 01:16:00 Damn Aug 20 01:16:24 Is there a way to, assuming I force an app to be run under a certain userid? Aug 20 01:16:47 you can't force an app to run under a certain uid Aug 20 01:16:57 Why? Aug 20 01:17:03 because it doesn't work that way Aug 20 01:17:24 Why can't I make it work that way? Aug 20 01:19:13 because it's a bad idea and you should feel bad Aug 20 01:19:36 What you think is a good security decision looks to me like user hand-holding. Aug 20 01:19:53 In which case, that's fine, as long as if I desire to do otherwise it is possible. Aug 20 01:20:07 R0b0t1: users need hand holding Aug 20 01:20:12 that's how sandboxing works Aug 20 01:20:19 every app runs under their own uid Aug 20 01:20:45 Users need handholding as long as they aren't asking the tricky questions Aug 20 01:21:03 looks like I asked a tricky question, so why should I be told "no" if I know the reasons the previous system was set up? Aug 20 01:21:33 R0b0t1: "no" because it's the way it works. it works that way for security. Aug 20 01:22:18 There's a difference between "that's the way it works" and "you can't change the way it works, even if you are making an informed decision" Aug 20 01:22:20 which one is it? Aug 20 01:22:36 the latter, Aug 20 01:22:51 i think traditionally in OS design, security was more about protecting users from other users, now its more about protecting apps from other apps. Aug 20 01:22:53 i don't even know how informed your decision is, but you can't change it Aug 20 01:23:09 So Aug 20 01:23:17 well you can Aug 20 01:23:18 fork android Aug 20 01:23:24 if I am going to beat my system over the head, drag it out to the docks, and dump it in the ocean Aug 20 01:23:26 how would I do that Aug 20 01:23:43 g00s: yes but there is utility in program interaction not mediated by OS Aug 20 01:23:51 for example, if you want to do something the designers didn't think of Aug 20 01:24:58 why do you want to do this ? Aug 20 01:25:28 To provide a wrapped interface to an app, like a JGlassPane Aug 20 01:25:36 Preempt UI interaction, modify it, spit it back out Aug 20 01:25:44 yeah bad idea Aug 20 01:25:47 To you Aug 20 01:25:54 sure Aug 20 01:26:04 what am i reading... Aug 20 01:26:10 on mobile such things don't work. Aug 20 01:26:23 hey all Aug 20 01:26:24 There's a difference between being security conscious and getting in the way Aug 20 01:26:38 theres also a difference between a good idea and bad idea Aug 20 01:26:40 :-) Aug 20 01:26:42 http://pastebin.com/R9WEF8gQ Aug 20 01:26:56 funkbox, so, yeah, we shouldn't run non-public-cert signed apps on our computers 'cause they could have malicious code in them, right? Aug 20 01:27:04 yes Aug 20 01:27:08 ... Aug 20 01:27:11 can anyone tell me why I get a null pointer exception for my spinner despite when I hover over it on eclipse it seems to detect it in my test activity? Aug 20 01:27:30 funkbox: So immediately a lot of programs are ineligible to be run, and you have no free choice to run them, Aug 20 01:27:36 R0b0t1: these are mass computing devices. Aug 20 01:27:38 soulcoder, line of error? Aug 20 01:27:40 because they don't have the $5k to throw at a cert Aug 20 01:27:47 35 Aug 20 01:28:02 does that id line up with your layout? Aug 20 01:28:06 when I hover over it, it seems to detect the spinner Aug 20 01:28:08 yeah it does Aug 20 01:28:16 also import your R please... Aug 20 01:28:25 org.me.myandroidstuff.R.id = insta-cringe Aug 20 01:28:44 funkbox: so are computers, I don't understand why "mass" is a special designation, or why it should be Aug 20 01:28:51 are you sure the null pointer is from spinner and not getActivity() ? Aug 20 01:28:52 :) Aug 20 01:28:58 getActivity has a tendency to return null Aug 20 01:29:15 what do you suggest I do to fix it? Aug 20 01:29:16 There is a difference between providing sane, secure defaults, and the inability to ignore those defaults when required Aug 20 01:29:26 move the code to testSpinner Aug 20 01:29:40 i tried that Aug 20 01:29:41 already Aug 20 01:29:46 same error Aug 20 01:30:04 i would check that youre setting the activity up correctly Aug 20 01:30:32 i checked the manifest file and the target seems to be right Aug 20 01:30:51 youre not following the correct activitymonitor paradigm Aug 20 01:30:53 :-) Aug 20 01:31:39 funkbox: So can I use reflection to invoke an app's entrypoint in a thread? Aug 20 01:31:51 soulcoder: http://pastebin.com/EB6xajZ2 Aug 20 01:31:58 example of grabbing the actvity instance Aug 20 01:32:00 s/(entr*t)/main &/ Aug 20 01:32:02 this is not run in setup by the way Aug 20 01:32:04 its in your test routine Aug 20 01:32:32 I havent used an activitymonitor in the test yet lol Aug 20 01:32:40 it's just imported for the moment Aug 20 01:32:40 ? Aug 20 01:32:51 this is the proper way to grab your activity's instance... Aug 20 01:33:04 you can literally copy and paste it in your test function and it should return the instance Aug 20 01:33:15 of course you need to replace Activity with your activity Aug 20 01:33:37 thanks Pyuruku, I'll give that a shot Aug 20 01:35:24 soulcoder: http://pastebin.com/s1V5X5jt Aug 20 01:35:42 R0b0t1: your app can run only the code declared in your manifest Aug 20 01:36:22 I'm trying to find a suitable means to 'brand' out product. I have created a splash activity which I start from my main activity. However, I need to download the logo that will be used with the splash activity. If I download the logo through a local AsyncTask in the splash activity there is a delay from when the activity loads and when the logo is displayed. Aug 20 01:36:36 zanberdo: "download" ? Aug 20 01:36:44 just ship it packaged with hte app Aug 20 01:36:45 package it in the apk?... Aug 20 01:37:00 ...there is more... Aug 20 01:37:09 ? Aug 20 01:37:37 My thought was to download the logo from the main activity then pass it via an intent to the splash activity. I thought I could start the intent from the AsyncTask defined in the main activity following the download of the logo Aug 20 01:37:49 define "run", funkbox Aug 20 01:37:53 why download the logo at all Aug 20 01:37:53 yes, download. The product can have many different clients registered each with their own logo Aug 20 01:37:56 R0b0t1: you can't touch other apps Aug 20 01:38:03 define "touch" Aug 20 01:38:09 so accept that the image must be downloaded Aug 20 01:38:22 it's small and can be done via an AsyncTask Aug 20 01:38:41 R0b0t1: use reflection to invoke another app's whatevers Aug 20 01:38:42 the problem I face is that I am also launching a new activity once the splash activity has completed Aug 20 01:38:54 wait for your asynctask to finish?... Aug 20 01:38:57 R0b0t1: you can start another app Aug 20 01:39:00 get rid of the splash screen - problem solved ! Aug 20 01:39:17 g00s, please accept this is not an option Aug 20 01:39:36 just have your main activity host a frame layout and swap things Aug 20 01:39:38 zanberdo you may want to acquaint yourself with 2 decades of usability research Aug 20 01:39:57 hey guys Aug 20 01:39:58 ok I just tried that code Aug 20 01:40:02 g00s: i think there might a pointy haired boss involved Aug 20 01:40:04 I got an error on this line: intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Aug 20 01:40:07 does the java vm recognize circular references? Aug 20 01:40:12 same nullpointer exception Aug 20 01:40:18 funkbox :) Aug 20 01:40:18 I have moved the startactivity calls to onPostExecute thinking this would be called only after doInBackground but what I'm finding is that the later activity is started on my splash activity only shows up when I 'back' out of the new (let's call it home) activity Aug 20 01:40:22 funkbox: So I don't get why system defaults can't be overruled in any case whatsoever Aug 20 01:40:25 it's kind of patronizing Aug 20 01:40:29 I had a class with a member object Aug 20 01:40:29 that member object has a listener interface Aug 20 01:40:29 which is the first class Aug 20 01:40:39 g00s, this is not my call. this is the call of the UX. I cannot change this requirement Aug 20 01:40:43 soulcoder: I cant do everything for you :) intent is never defined Aug 20 01:40:53 soulcoder: Intent intent = new Intent(Intent.ACTION_MAIN); Aug 20 01:40:55 Please understand if I could remove this requirement I would. Aug 20 01:41:13 zanberdo: how many clients / are they ever changing? Aug 20 01:41:22 couldnt you just package all of their logos? Aug 20 01:41:34 R0b0t1: yep. Aug 20 01:41:40 omg Aug 20 01:41:42 it worked! Aug 20 01:41:52 soulcoder: and thats what reading the documentation does Aug 20 01:41:54 i am personally all for it. i wish things were even more locked down ios-style. no touchwiz, etc. Aug 20 01:41:56 count the number of DoD bases around the world, multiple by howwever many discrete groups they choose, and add a myraid of private companies as well. answer: lots Aug 20 01:41:57 thank you very much Pyuruku :) Aug 20 01:41:59 you should do that more often soulcoder Aug 20 01:42:08 Pyuruku, no, sadly. I have to do it this way Aug 20 01:42:11 I will do in the future ^^ Aug 20 01:42:13 funkbox: ._. Aug 20 01:42:22 also I'll try not to leave coding till last minute Aug 20 01:42:24 but what if I want to do more with it than use it as a glorified pager-gameboy Aug 20 01:42:50 this is an issue in that android is one of the main, supported computing platforms Aug 20 01:43:08 Pyuruku, can I put that code in setup so I dont have to repeat it? Aug 20 01:43:10 like what? Aug 20 01:43:13 run ubuntu on your phone Aug 20 01:43:14 or it must be within the test function? Aug 20 01:43:16 So putting aside that it's for a splash screen, my basic needs are the same: main activity to spawn some activity which when finishes spawns another activity. Simple enough. Aug 20 01:43:36 soulcoder: no, the proper way to do this is to setup the activity for each test so you have a fresh activity to work with Aug 20 01:43:54 I see Aug 20 01:43:58 activity B can download the image and display it, but the lag is unacceptable (it should render the activity with the image from the outset) Aug 20 01:44:04 so I should create a seperate test class for each test case Aug 20 01:44:14 no, you can have multiple tests in a class Aug 20 01:44:16 Anyone know if the GC recognizes and cleans circular references? Aug 20 01:44:21 in each test function you want to instantiate the activity Aug 20 01:44:29 funkbox: ubuntu for phones is a projected thing Aug 20 01:44:32 it's not real Aug 20 01:44:40 so I was hoping to spawn activity B only after the image was downloaded from activity A and then have activity A spawn activity C when B finishes. Aug 20 01:44:46 Oh ok I understand now Aug 20 01:44:52 zanberdo: thread + .join ?> Aug 20 01:45:00 you dont have to do an asynctask Aug 20 01:45:12 funkbox: additionally you miss out on the functionality geared specifically for android Aug 20 01:45:14 after they login or whatever, spawn a thread to download the image, on your main thread .join it Aug 20 01:45:20 once its done it will join and you can continue Aug 20 01:45:34 just because it is a computing platform for phones does not mean it should pick a system which does not enable user preempting Aug 20 01:45:38 that's... insane Aug 20 01:45:50 make sure to ahve a timeout for your join so the app doesnt hang though Aug 20 01:46:29 or if you know which logo to grab before they attempt to login do it as soon as you know that info Aug 20 01:46:34 and join it after they login Aug 20 01:46:55 zanberdo: ^ Aug 20 01:47:14 fair enough. I have not attempted using a thread or .join. I have no experience with this though. I guess I'll google. I was hoping to find out a few things such as: Should I spawn Activity B from onPostExecute which I presume is called only after doInBackground completes. And if so, I presume I could spawn activity C from onPostExecute once activity B calls finish Aug 20 01:48:08 Pyuruku, ok, good suggestions. conceptually I understand. I have no clue how to execute on that, but I will google Aug 20 01:48:15 its really easy Aug 20 01:48:44 Thread myThread = new Thread(new Runnable(){...}); Aug 20 01:48:47 myThread.start() Aug 20 01:49:02 myThread.join(2000) // timeout for 2 secs iirc Aug 20 01:49:26 funkbox: Okay well can I run something as superuser somehow? Like, in developer options you can enable a thing which will draw touch markings and taps. Aug 20 01:49:35 Pyuruku, so I'd do the download in the run() called by the new thread? Aug 20 01:50:00 seems simple enough. I will give it a go Aug 20 01:50:04 yes zanberdo Aug 20 01:50:38 myThread.setDaemon(true) for background processing if you want Aug 20 01:51:24 R0b0t1: no. Aug 20 01:51:40 well, yes. you can root your phone, voiding the warranty Aug 20 01:51:55 that's not a topic for this channel but is for #android-root Aug 20 01:52:03 * R0b0t1 flips table Aug 20 01:52:09 android devs are insufferable Aug 20 01:54:21 R0b0t1: if android allowed what you're trying to do it'd be a shit platform for users. Aug 20 01:55:53 no Aug 20 01:56:01 that's just untrue Aug 20 01:56:18 I accept what is being done as good in the name of security, but not being able to override it is absurd Aug 20 01:59:39 R0b0t1: i'll get that to serge right away Aug 20 01:59:48 k, thanks brah Aug 20 02:00:14 but really is there any justification for keeping users from what they want to do? Aug 20 02:01:32 if you said: "running with these restrictions will keep you and your data safe and minimize any harm done from non-Play apps" a lot of people would take that blue pill Aug 20 02:02:17 i'm sure at least 5% of card carrying FSF members would Aug 20 02:02:39 but there is very little justification for making such mandatory, because users seeking to do otherwise are either aware of the consequences, or have been so fooled by some external source to continue on regardless Aug 20 02:09:04 the answer is easy, install your own rom and it's no problem Aug 20 02:14:34 hi guys, I have a sort of advanced question. urm I think Aug 20 02:15:01 I have created a service and it all runs wonderfully. I havbe some threadsafe Collections to keep track of the queue etc Aug 20 02:15:16 as public member variables in the service claas Aug 20 02:15:48 my question is this. these hashmaps etc become NULL all the time unless i specify them as static members Aug 20 02:16:00 does anyone know why these references get discarded? Aug 20 02:17:35 because your service exits Aug 20 02:17:51 control your life cycle better Aug 20 02:18:05 what? Aug 20 02:18:36 my lifecycle is fine. I have created the service exactly as documented in the SDK and is instanciated with onStartCommand etc Aug 20 02:18:39 non-bound Aug 20 02:21:46 your life cycle isn't fine then Aug 20 02:21:58 have you ever implemented a service? Aug 20 02:22:02 your references go null because it exits Aug 20 02:22:09 what's a service Aug 20 02:22:27 does someone who is an android programmer know? Aug 20 02:23:01 what's an android programmer Aug 20 02:24:20 anyone? Aug 20 02:25:59 what's an anyone Aug 20 02:27:34 I have a question related to bound services. I have an asynchronous operation being performed in the bound-service that i would like my activity to be noticed when finished. I have read the documentation about service communication and i still think a listener will do the job. But i am new to Android, and would like to hear an expert advice Aug 20 02:28:30 if ipc is involved listeners don't work Aug 20 02:29:17 no IPC, the service run in the same process as the activity. Aug 20 02:29:34 then listeners work just fine Aug 20 02:29:55 not much sense in using bound services if ipc isn't involved Aug 20 02:30:38 pfn, i'm creating a media player. the service is for listening to the music in background. Aug 20 02:30:51 do you still recommend listeners in this scenario ? Aug 20 02:31:14 depends on what you're doing Aug 20 02:31:42 Look at LocalBroadcastManager in the support package Aug 20 02:32:12 much less hassle with binders which I have found problems with if you want startForegound Aug 20 02:32:17 startForegroundService Aug 20 02:32:41 see, that's how to help someone without being a snarky asshole, pfn Aug 20 02:32:46 local broadcasts are great Aug 20 02:33:05 wow, I care Aug 20 02:33:12 not Aug 20 02:33:18 Aparently Aug 20 02:37:12 probablylost also check out otto Aug 20 02:37:57 i think you mean jankalitos, g00s Aug 20 02:38:08 What is meant by context? If I create a Button, it wants a Context as an argument. Aug 20 02:38:28 probablylost no i mean http://square.github.io/otto/ Aug 20 02:39:27 BullShark, a context is any activity or service or application Aug 20 02:39:36 g00s, wrong person Aug 20 02:40:02 huh, oh, i cleared my hostory, sorry Aug 20 02:40:07 *history :P Aug 20 02:40:11 pfn, i am creating the button from the a class that extends activity. then should i put in "this" for context? Aug 20 02:40:28 me, feedly needs to fix their onResume Aug 20 02:40:31 BullShark, yes Aug 20 02:40:35 BullShark, yes Aug 20 02:41:35 g00s, if that was for me what is otto. i can't seem to find any reference Aug 20 02:41:56 otto is an eventbus Aug 20 02:42:13 The website is the reference. Aug 20 02:42:22 much more convenient than using broadcast and listener bullshit Aug 20 02:42:48 at work, we created our own event bus because we didn't know about guava or otto, heh Aug 20 02:42:56 man, I <3 the new chat overlay I have in qicr Aug 20 02:43:02 though, actually, our event bus works slightly differently Aug 20 02:43:06 Hello, trying to do a manual action mode list choice, essentially a single choice. Start the action mode onItemLongClick. However when I close the action mode with done, I can't open it again with a longClick. Not sure why...http://pastie.org/8252031 Aug 20 02:43:19 I released it too soon on play, though, it crashes consistently Aug 20 02:43:35 I have my own eventbus Aug 20 02:43:47 because I can't be bothered with Java syntax Aug 20 02:44:32 JakeWharton: does your Timber library have to used only with dagger & butter knife? Aug 20 02:44:50 No Aug 20 02:45:23 man, android 4.1 notifications are so awesome Aug 20 02:45:32 more apps need to take advantage of them Aug 20 02:45:33 android:id="@+id/b_results" what does it mean if the @ is omitted? Aug 20 02:45:40 nothing Aug 20 02:45:46 it fails Aug 20 02:45:54 How i do without dagger & butter? I dumb Aug 20 02:45:57 unless you specify an integer value Aug 20 02:46:03 pfn -> what if only the + was omitted? Aug 20 02:46:28 then it fails if the id doesn't already exist Aug 20 02:47:03 oh right. that's used for RelativeLayout Aug 20 02:47:07 cooldman224: Pass a reference to DEBUG or RELEASE around. Aug 20 02:48:05 BullShark,? it's used for creating id's, relative layout is irrelevant Aug 20 02:48:58 pfn -> without the +, afaik, it's not creating an id but referencing another one Aug 20 02:49:58 + is create and reference Aug 20 02:50:18 you can always use + as long as it's in your name space Aug 20 02:55:16 JakeWharton: ah got it. And I just need to make my own provideTimber to use BuildConfig.DEBUG Aug 20 02:56:59 fk; macvim can't go fullscreen and back to a normal screen geometry Aug 20 02:58:15 I used http://jgilfelt.github.io/android-actionbarstylegenerator/ to create an actionbar theme.. and everything works great Aug 20 02:58:40 but it didn't cusotomize the ShareActionProvider drop down Aug 20 02:59:08 anyone know of how to do that? I'm using ActionBarSherlock **** ENDING LOGGING AT Tue Aug 20 02:59:58 2013