**** BEGIN LOGGING AT Sun May 05 02:59:58 2013 May 05 03:00:24 jasta: haha, just now trying it? May 05 03:00:48 it's so much better than eclipse May 05 03:00:50 like night and day May 05 03:01:44 not just now, a couple months ago May 05 03:01:49 but yeah, just settling in May 05 03:01:58 its so...like, i just feel like a fool for using eclipse for so long May 05 03:02:49 heh May 05 03:03:54 I think I started using it when I started working on smali May 05 03:04:04 and haven't looked back :) May 05 03:14:28 hey. I'm trying to use Japanese characters in my android opengl application. I don't want to ship a specific font bitmap (extra space requirement). I'm trying to build a bitmap font texture containing only the required characters. is there any known or popular java library to load TTF files (going to use DroidSans) in order to extract the font glyphs? May 05 03:25:57 brx_: still around? May 05 03:26:11 Napalm, ye May 05 03:26:13 just about May 05 03:26:46 brx_: https://gist.github.com/slightfoot/5519582 May 05 03:27:02 im afraid it wont work from xml May 05 03:27:22 Napalm, you rock May 05 03:27:27 i thought the drawable xml supported custom drawables like the layout xml supports custom views... it doesnt May 05 03:27:44 great job man May 05 03:27:44 remove the angle 20 May 05 03:28:24 i will make use of this tomorrow May 05 04:39:54 does anyone know if it's possible to use viewpager without fragments, just using views(linearlayout) instead? May 05 04:49:45 entirely, yes. May 05 04:52:46 Off to cook dinner for the wife. See you all later. May 05 06:14:11 howdy, I am new to working with a canvas... but how can I get my canvas (i.e. invalidate) to refresh every X seconds? May 05 06:15:04 or is it a case of, ask for as much as you would like and the UI manager will try and keep up? May 05 06:28:52 ahhughes: Take a look at the "Snake" sample code May 05 06:54:58 so does anyone know when we might get Expresso? May 05 07:11:26 thanks maslen May 05 07:17:39 Is it possible to get the AttributeSet that is passed in when inflating an XML object, in a different location? May 05 07:33:05 no May 05 07:33:10 what are you trying to do? May 05 07:36:40 JakeWharton: I want the AttributeSet to be accessible to a Service running within another process. Since it's not parcelable, this seemed like my best bet. May 05 07:36:44 hey, why does it require root to capture mouse input for an application? May 05 07:36:57 but why do you want it? what are you trying to actually do? May 05 07:37:43 JakeWharton: To read some UI data, for calculations. But I'm working with strange constraints. May 05 07:38:41 look up all the data in the constructor, store it in a custom class that implements Parcelable, use it when needed May 05 07:39:07 Is there no other way? May 05 07:42:28 what's the deal with the new twitter api? you need to register an app with twitter just to scrape tweets? May 05 07:44:21 just seems weird to me that all the games which want to capture mouse input require root >_>; May 05 07:57:45 Hello, what are your thoughts on AirPush? Worth the risk of bad rating? May 05 07:58:07 not worth it at all May 05 07:58:59 Mmm May 05 07:59:45 there is a tool in system called "sysctl" can it be used to disable turning bluetooth off ? May 05 08:00:23 I have about 11k active installs. Is it possible to earn something reasnoble with that kind of user base, May 05 08:01:06 seem like after I press power button to turn screen off script that uses command "hcitool scan" stops working, because bluetooth somehow stops working and it says: "Inquiry failed: Interrupted system call" May 05 08:02:49 jellybee, and how do you propose to do that by annoying them until they uninstall you? May 05 08:03:33 No. Im asking for an alternative.... May 05 08:04:50 jellybee: depends a lot on your app - and on what you consider reasonable earnings May 05 08:06:49 Leeds. The app is some sort of a calculator, 10$ would be nice May 05 08:07:04 10$ a day May 05 08:07:23 lol May 05 08:07:31 Its beinng used about 2000 times a day May 05 08:08:10 wow, that's an awesome error: "java.lang.IllegalStateException: Could not create an EGL context. eglCreateContext failed with error: EGL_SUCCESS" May 05 08:08:31 ehehe :) May 05 08:16:03 usually a good idea to think about monetization before publishing ;) May 05 08:16:22 which is simple for most of us: make no money May 05 08:16:56 elkng: which version of android ? May 05 08:17:15 g00s: 2.2.1 May 05 08:17:16 embrase yourself May 05 08:17:22 :O May 05 08:17:31 damn dude, at least get 2.2.2 May 05 08:18:01 I tryed some ROMs with 2.3 but there were few problems so I returned to stock 2.2.1 May 05 08:18:48 after all can't you remember those days when 2.2.1 was fresh and shiny, and everyone wanted to get it ? May 05 08:19:04 and now its abandoned, liers May 05 08:19:20 is that a typo for 4.2.2? May 05 08:19:42 actually, i have 2.2.3 - i'm on the bleeding edge May 05 08:20:23 you are the blight of this world, causing all pain and suffering to us poor developers who just want to live in paradise of 4.x+ May 05 08:20:27 shame on YOU! May 05 08:20:34 s/liers/hypocrites May 05 08:21:39 some day everyone would say: person1: I have 4.2.5 person2: damn dude, at least get 8.2.2 May 05 08:22:31 yes May 05 08:22:49 Mavrik: i dont think they include us in the stats any more May 05 08:22:54 and hopefully in the brigter future we will be able to set those laggers on fire without legal reprecussion :P May 05 08:23:06 but every day i visit the Play store to ping google, have to do my part May 05 08:23:11 XD May 05 08:23:29 on fire. May 05 08:42:09 is it possible to use something like a Beagleboard headless (for dev) so that you interact with a window like a normal qemu instance, but your stuff is really running on the hw? May 05 08:43:15 almost like a vnc client May 05 08:43:57 guys, could please help me ? http://pastebin.com/BDnbWkSw May 05 08:44:19 I nullpointerexception at line 38 May 05 08:51:06 heho May 05 08:52:21 Help! I'm trying to pass a Bitmap over an AIDL interface (it implements Parcelable), yet the generated Stub interface complains that "the constructor Bitmap() is not visible" May 05 08:55:49 (It's an android.graphics.Bitmap instance) May 05 08:58:26 this twitter4j thing is bugging the hell out of me, I'm calling getUserTimeline and something bizarre is happening.. the function never returns and the whole thread it's running on just completely dies :| May 05 09:09:43 Is there a common standard as to what you're supposed to do with various "keys" that are used globally across an application ? I'm thinkin specifically of constants that are used when using getArguments().getString(key) or similarily from SharedPreferences May 05 09:10:37 It seems silly to me that if I should decide to change the key at any point i'd have to go through all of my classes and find places where I used this key and change the value of it manually. May 05 09:10:47 Instead of simply having one place where you references said keys. May 05 09:11:13 I don't appear to be getting any output from a RunTimeException that's happening as soon as the app is launched. How can I debug it? May 05 09:11:20 oh wait. How about if I had my keys in R.string ? May 05 09:11:41 I put a breakpoint in my Activities onCreate; no go May 05 09:12:18 What does your logcat say ? May 05 09:12:39 meouw. May 05 09:12:57 logcat is empty May 05 09:13:17 empty logcat means, you have android 4.1+ and you are doing it wrong :) May 05 09:13:32 or, you have one of these chinese devices with disabled logging May 05 09:13:35 I'm using a 2.2 emulator May 05 09:14:33 can you build with twitter4j as a lib project and set breakpoints in their code? May 05 09:15:21 wth, android:allowBackup isn't documented in element May 05 09:15:32 Also, make sure you have internet/whatever other permissions necessary May 05 09:19:47 Still no go, with no output May 05 09:22:49 Hey folks,I'm looking for a site(s) where i can explore different android libs. I use to know 2 but lost their addresses…Any suggestions? May 05 09:34:49 fayimora: http://www.androidviews.net/ May 05 09:34:49 doesn't have much yet, but it seems to be growing May 05 09:38:51 ugh, screw using twitter4j, I'm just gonna make a web request and use Gson to parse the response. May 05 09:46:42 sampullman: looks good…thanks May 05 10:03:24 is there a tutorial on how to make mp3 recorder for android? May 05 10:06:43 Hi all, quick question: I have multiple TextViews within a LinearLayout and all have the textIsSelectable attribute set to try so the text that each TextView displays is selectable, however I can not select the text from all three TextViews in one long click and drag. Does anyone know how I can make the text from all three TexViews selectable using a single long lick and drag? May 05 10:10:32 am I in the correct chat room? May 05 10:41:21 What is wrong with this piece of code? Specifically why doesn't it set the text of my TextView(title) properly? http://pastebin.com/FTc4TLwv May 05 10:42:06 setTitle(String title) simply sets a string which is used in onActivityCreated where I setText(title) May 05 10:58:28 I have the following method which is supposed to create an array of fragments to be used in a view pager. I create instances of the same fragment and simply differentiate between them by putting individual titles on each fragment. The problem is that my setTitle(String s) method doesn't actually set the title of the view properly. May 05 10:58:39 http://pastebin.com/FTc4TLwv May 05 10:58:48 Swiping back and forth in the viewpager will randomly set the title of the second fragment but not on any of the others. I wish I could be more specific but this really seems like odd behavior. May 05 10:59:03 I set the text of my "title" in onActivityCreated. Should I do so elsewhere? May 05 12:00:22 Swiping back and forth in the viewpager will randomly set the title of the second fragment but not on any of the others. I wish I could be more specific but this really seems like odd behavior. May 05 12:00:30 woups May 05 12:00:34 I have the following method which is supposed to create an array of fragments to be used in a view pager. I create instances of the same fragment and simply differentiate between them by putting individual titles on each fragment. The problem is that my setTitle(String s) method doesn't actually set the title of the view properly. May 05 12:00:37 http://pastebin.com/FTc4TLwv May 05 12:09:45 Hi May 05 12:10:00 wikipedia says "Libraries written in C and other languages can be compiled to ARM, MIPS or x86 native code and installed using the Android Native Development Kit.". Tell me please what does it mean? that android can execute x86 instructions on arm? May 05 12:10:41 no May 05 12:11:04 it means you must supply library compiled for proper architecture May 05 12:11:52 wait, is there android for non-arm systems? May 05 12:12:04 yes May 05 12:12:49 so for example this http://www.android-x86.org/ is alternate port or the mainstream one supported by google? May 05 12:13:02 alternate. May 05 12:13:11 afaik there are some atom devices May 05 12:13:25 Yep, some by Intel May 05 12:13:28 XOLO May 05 12:13:48 so google itself develops only arm one, right? May 05 12:17:03 probably google supports mips and x86 too May 05 12:19:37 ok, thank you for help May 05 12:19:40 64 bytes from 141.44.1.1: icmp_req=4226 ttl=49 time=206771 ms May 05 12:21:27 cool timing May 05 12:21:52 no way to irc on that connection :( May 05 12:22:06 is that the mars rover? May 05 12:22:41 "ttl=49", one can assume there were 15, 79 or 207 host inbetween May 05 12:23:03 that is 3G on a train May 05 12:23:22 russian post would just drop that packet May 05 12:23:41 elkng: my ping's default ttl is 64, but you can't know what the evil carrier is doing to my packets on their network May 05 12:23:47 maybe that tor behind proxy :) May 05 12:24:24 oh, traceroute shows 13 hops.. this is my other sim card with not-quite-as-evil carrier May 05 12:42:51 I have a viewpager with 3 fragments that are "identical". All of their views have the same ids and the only way they differ is by the dataset they use. It seems like my application becomes confused by the use of findViewByID() May 05 12:43:34 when using findViewbyID to find a view on Fragment B's onActivityCreated I somehow get a reference to Fragment A's view May 05 12:43:39 Why is this ? May 05 12:47:24 lite_: because are you running fragment2.findViewByID? May 05 12:52:38 You have to call findViewById on the view created by fragment B May 05 12:52:58 Protip: Use onViewCreated, you get the view returned by the fragment as a parameter May 05 13:43:00 hello! I've got a problem about TextView and HTML contents. This is the code: http://pastebin.com/VuzzkAUC - the problem is that paragraphs, new lines and links are being ignored. Any hint? Thanks! May 05 13:50:46 found the problem: put the strings in a CDATA container :) May 05 14:52:04 got a problem about an alertbox this time <.< - the layout is completely messed up! code: http://pastebin.com/9KsvNdTA result: http://pbrd.co/117Rraq - what's wrong with that? I did nothing special! May 05 14:57:14 Is there any other reason why onCreateOptionsMenu will not be invoked on a Fragment even if setHasOptionsMenu is set to true? May 05 14:58:04 alexfu: you should set it in the activity, not in the fragment May 05 14:59:18 elegos: inflate the menu in the fragmentactivity? May 05 14:59:44 alexfu: AFAIK the onCreateOptionsMenu is all about the fragment's container (i.e. activity) May 05 15:00:52 elegos: what's the point of having onCreateOptionsMenu in a Fragment then if the Activities onCreateOptionsMenu is the one being invoked instead? May 05 15:01:32 alexfu: try with setHasOptionsMenu(true) first May 05 15:07:04 elegos: it doesnt work May 05 15:11:28 elegos: oh wait, i forgot to mention, my fragment is a nested fragment. May 05 15:12:37 alexfu: the menu is the ActionBar's one. So you're trying to control it from nested fragments? Never tried that May 05 15:13:10 if it's not working, I'd create a public method to control it accessing the activity directly May 05 15:13:11 Are you using ABS? Menu items in nested fragments aren't supported May 05 15:13:29 elegos: yeah, i just realized that and im pretty sure it doesnt work like that by design May 05 15:14:00 SimonVT: any idea on why my alert dialog sucks like this? http://pbrd.co/117Rraq May 05 15:14:25 You're doing it wrong May 05 15:14:42 SimonVT: what's wrong in the code? http://pastebin.com/9KsvNdTA May 05 15:15:05 For one, you're not using dialogfragment May 05 15:15:30 elegos: looks like a styling/theme issue? May 05 15:15:42 Maybe you messed up your themes May 05 15:16:03 SimonVT: yeah, maybe it's just the ROM's theme which sucks (Xylon) May 05 15:16:10 gonna return to stock with root permissions May 05 15:16:33 elegos: how does it look on an emulator May 05 15:16:43 alexfu: gonna try May 05 15:16:51 how can I disable internet access to the emu? May 05 15:18:23 elegos: if you open Debug Monitor, the Emulator Control tab should allow you to fully turn off data... May 05 15:18:40 thanks May 05 15:21:18 SimonVT: not a theme issue May 05 15:21:27 same problem in the emulator May 05 15:22:01 hey, I'm implmenting a horizontal navigation with swiping using FragmentPagerAdapter, but I don't get at which point and how to load all the fragments in the adapter, when I swipe it shows always the same one, anybody can help ? May 05 15:22:22 I was thinking you fucked up the theme, not the device May 05 15:23:08 SimonVT: using a custom ROM, I can't say the devs fucked up the theme - I did not May 05 15:23:23 btw the same problem appears on clean ICS emulated device May 05 15:23:38 .. and you made no theme changes? May 05 15:23:42 You didn't even set a theme? May 05 15:24:24 SimonVT: exactly May 05 15:25:10 I somehow doubt that May 05 15:25:14 elegos: can you post your style/theme xml file? May 05 15:27:05 if that dialog was 100% stock, the close button would be flush with the dialog May 05 15:27:21 alexfu: where should it be? can't find it <.< May 05 15:27:24 on an ICS device May 05 15:27:53 folder? May 05 15:27:54 elegos: under res > values > styles.xml May 05 15:28:03 elegos: res > values > themes.xml May 05 15:28:07 gotcha May 05 15:28:09 uploading May 05 15:28:51 http://pastebin.com/7ZzbPyaC May 05 15:29:01 I think it's the "SplashscreenTheme" thing May 05 15:29:37 elegos: change that to windowBackground instead and see if that does anything May 05 15:30:02 You should use Theme.Holo on HC+ devices May 05 15:31:52 alexfu: the item name? May 05 15:32:20 elegos: yes. May 05 15:32:59 windowBackground is not a recognized name in the android namespace May 05 15:33:38 elegos: sure it is -- http://developer.android.com/reference/android/R.attr.html#windowBackground May 05 15:33:48 how does android 4.2 determine the name of the town based on a phone number prefix? May 05 15:35:38 alexfu: Error: Color types not allowed (at 'android:windowBackground' with value '#ffffff'). May 05 15:37:08 elegos: that just means you cant put a color hex in there.. try using a reference to a color.. like @android:color/white May 05 15:37:16 ok May 05 15:37:43 ah, libphonenumber May 05 15:38:08 thanks /God/ alexfu :P May 05 15:38:09 elegos: it also states in the doc that "Must be a reference to another resource" May 05 15:39:18 elegos: ur dialog looks fine? May 05 15:39:55 alexfu: yep, it looks "normal" now :) May 05 15:40:10 btw how could I style like all white instead of all dark? May 05 15:40:23 like the dialogs in http://developer.android.com/guide/topics/ui/dialogs.html May 05 15:40:30 elegos: use a light theme May 05 15:41:30 elegos: your activity theme should extend Theme.Holo.Light or something like that. May 05 15:41:44 alexfu: yep was looking for it May 05 15:42:03 I'd like to have dark actionbar though. I know it's possible, gonna check the theme name May 05 15:43:06 elegos: also, as SimonVT said, you should be familiar with DialogFragments instead. May 05 15:43:33 alexfu: what's the point of using a DialogFragment when this dialog at least appears once and ends the app? May 05 15:44:19 in the very end a DialogFragment is a wrapper of dialogs so that you can use them more than once, right? May 05 15:48:09 That was possible with normal Dialogs too. DialogFragment has more to do with the lifecycle of the Dialog with regard to the Fragment it is in. https://developer.android.com/reference/android/app/DialogFragment.html May 05 15:49:31 alexfu: can I define a style of a particular element within a style tag? i.e. the Dialogs style within a Theme.NoTitleBar.Fullscreen? May 05 15:50:25 i'm having an issue ... i'm using backupagent for backup and restore.. That works fine. The problem is i'm backing up a shared preference file that is used by receivers my application specifies in manifest. It appears that these receivers are started prior to the restore method finishing ...so my file gets clobbered the first commit() made in these receivers . Ie, it appears that sharedpreferences reads in the xml file pri May 05 15:50:25 or to my restore function getting called by backup manager May 05 15:50:34 elegos: http://developer.android.com/reference/android/R.attr.html#alertDialogTheme or http://developer.android.com/reference/android/R.attr.html#alertDialogStyle May 05 15:50:42 thanks May 05 15:51:49 is there a way i can force receivers to wait on the backup manager's call to onRestore in the backup agent class i'm using? May 05 15:52:31 i figured backup agent would run and complete prior to any activies or receivers being executed in the package but it appears not. May 05 15:54:32 Good time of the day to everyone! May 05 15:54:50 have a little question May 05 15:55:08 alexfu: I'm nearly there: now I get a white rectangle under the dialog, may it be due to the windowBackground setting? May 05 15:55:40 I want to change the variable assigned in systemUI.apk May 05 15:55:52 but I cant compile it from the source May 05 15:56:02 TheQwertiest: what's the compile error? May 05 15:56:06 no May 05 15:56:29 I mean I cant compile, coz I dont have linux and etc and etc May 05 15:56:43 does the Android build system still require 32-bit libraries? May 05 15:56:50 is it possible to change variable just with decompilation and recompilation& May 05 15:56:51 is there a 64-bit prebuilt version of the toolchain? May 05 15:56:53 like apk tool May 05 15:56:58 ? May 05 15:57:01 alexfu: http://pastebin.com/ghVtrZ1H <-- that's the style for the activity May 05 15:57:27 TheQwertiest: never tried to compile system APKs, but aren't there Eclipse projects, too? May 05 15:58:14 elegos: get rid of windowBackground May 05 15:58:31 alexfu: setting the holo light is automatic right? May 05 15:58:43 elegos: what do you mena May 05 15:58:45 *mean May 05 15:59:15 uhm getting rid of it doesn't solve the problem May 05 15:59:51 elegos: screen shot of the dialog? May 05 15:59:56 getting it May 05 16:00:57 alexfu: http://pbrd.co/1181KLH May 05 16:01:07 well the problem is that in decompiled apk code the variable assignment is like this "localContext.getResources().getInteger(17694759)" May 05 16:01:17 alexfu: that's without the white windowBackground item May 05 16:03:56 TheQwertiest: that's not a problem May 05 16:04:37 elegos: the problem is finding the number of the variable that I want to change to May 05 16:05:01 TheQwertiest: we can't help you untill you don't tell us the constant you're looking for May 05 16:05:10 elegos: one sec May 05 16:09:05 ok May 05 16:09:20 elegos: source: https://github.com/CyanogenMod/android_frameworks_base/blob/cm-10.1/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java May 05 16:09:28 line 430 May 05 16:09:45 Could have just linked to line 430 May 05 16:09:56 how? =) May 05 16:10:01 Click on it. May 05 16:10:03 TheQwertiest: what do you want to do with that? May 05 16:10:11 Hold shift if you want to mark multiple lines. May 05 16:10:20 Maybe you should ask cyanogenmod May 05 16:10:29 I want to change "config_screenBrightnessDim" to "config_screenBrightnessSettingMinimum" May 05 16:10:40 This channel is for app dev May 05 16:10:54 kakazza: thx, will do so in the future ) May 05 16:11:04 yw May 05 16:11:39 TheQwertiest: that's the point - find the integer which rapresents com.android.internal.R.integer.config_screenBrightnessSettingMinimum and you're ok May 05 16:11:40 SimonVT: I tried, but it seems there's noone knowledgeable onnline :| May 05 16:12:21 elegos: that issue might be related to android:alertDialogTheme May 05 16:12:47 alexfu: I highly suspect that, as the default one (the gray one) doesn't have that problem May 05 16:13:03 elegos: meh, finding simple solutions is not my pro it seems -_- May 05 16:13:15 strange though I thought shadows had transparent backgrounds May 05 16:13:16 elegos: thx for guiding me on the right path ) May 05 16:13:45 TheQwertiest: you're welcome. Resources names are always human-readable "labels" for integers May 05 16:13:52 Resource names* May 05 16:14:50 well May 05 16:14:58 I dound the file containing the integers May 05 16:15:01 found* May 05 16:16:26 is it possible to know the label's integer value? May 05 16:16:39 i.e. not the actual value that is listed in the file May 05 16:17:02 but smth like indexed value that is called by get Integer()? May 05 16:18:05 TheQwertiest: take a look at this example: http://developer.android.com/reference/android/R.style.html May 05 16:18:20 i.e. public static final int Theme_Holo_Dialog -> Constant Value: 16973935 (0x0103006f) May 05 16:19:42 is there a Holo Light variant of this theme? Theme.NoTitleBar.Fullscreen May 05 16:20:14 whatever - found: Theme_Holo_Light_NoActionBar_Fullscreen May 05 16:38:04 when I only have one fragment visible at a time, is it a bad idea to just swap fragments all the time instead of starting a new activity that displays the new fragment. what are the differences here? May 05 17:03:58 nioncode, fragments are not designed for that. You'll go crazy with some things like options menu, onActivityResult, and much other May 05 17:05:31 daniele_athome: won't I already handle all that when there are two fragments displayed on tablets? I'll have to handle ActionBar and such there anyways won't I? May 05 17:05:46 hey guys...I like to ask if I only display my contacts from my gmail account (both Phone and SIM contacts are not checked) and sync is enabled, does it mean every time I open my contacts, I will be actually connecting to my gmail account to get the contact list? May 05 17:07:01 ReGiStRaS: I doubt that, it will sync every now and then, your contact list is stored offline May 05 17:10:27 ReGiStRaS: AFAIK it's cached and regularly synced in the background. May 05 17:10:38 nioncode, what about intents? IMHO it's confusing using fragments as activities May 05 17:11:19 I bet sooner or later difficulties will get on the way May 05 17:11:53 nioncode, anyway for tablets is different May 05 17:12:08 you change activity when you change the context May 05 17:12:14 and swap fragments for content changes May 05 17:12:38 in smartphones instead you change activity when changing both content and context May 05 17:12:44 daniele_athome: I was just curious why the examples start activities for single fragment views when on phones and have everything inside a single activity when on a tablet May 05 17:19:39 nioncode, that's whay I just said :) anyway when you change context (e.g. from email list to settings) you should change activity too May 05 17:19:42 *what May 05 17:20:22 could anyone recommend an app that will capture the screen and mke a video (im using a rooted nexus 7) May 05 17:20:47 daniele_athome: that's what I plan to do. will stick to multiple activities on small screens and fewer activities (with multiple fragments) on big screens May 05 17:21:49 nioncode, sorry I thought you wanted to use one activity and then all on fragments :) May 05 17:24:13 daniele_athome: that's what I initially wanted to do with two fragments. this is a 2 steps deep hierarchy of list views where the second one depends on the first. so I thought I'll just swap them if an item was chosen instead of starting a new activity May 05 17:24:51 right :) May 05 17:25:12 brx_: fwiw, I tried that approach initially, but ended up just taking a video of the actual device in use -- was less problematic for me at least. May 05 17:25:44 k thanks kbs May 05 17:26:08 daniele_athome: on a tablet, both can be viewed side by side. on the phone, only one can be visible at a time, so the question to me is if it makes sense to just swap the fragments or if I should start a new activity. probably the latter May 05 17:26:42 nioncode, on phone yes indeed :) May 05 17:34:24 how might I select one account as a default for my application? I have a selection screen with a spinner, and the user can choose an account, but I have to somehow save and retrieve their selection May 05 17:34:33 I am trying sharedpreferences and saving the account name, but then I have to do a linear lookup through the account list every time I want the Account instance May 05 17:34:39 is there a better way? May 05 17:51:17 I have the problem that in A's constructor, A creates B, but B expects A to have been created already. I can't decouple them, and the constructor for A is invoked by a 3rd party. Is there any common way to do this? My only idea I've had so far is to create B within a second thread, and have A alert B when it is complete. Can someone suggest something better? I hate the idea of introducing threads if I can avoid it May 05 17:57:46 maslen, what are you actually doing? you're abstracting too much May 05 18:03:34 with asynctaskloader are you expected to do blocking operations in loadInBackground seeing as it returns a value? May 05 18:04:53 erisco: no, the who point of it is to delegate work off of UI thread. May 05 18:04:58 *whole May 05 18:05:21 alexfu, sure, so how am I supposed to return a value when the work is being done elsewhere? May 05 18:05:38 Yes, you're expected to do blocking operations in loadInbackground May 05 18:06:38 http://developer.android.com/reference/android/content/AsyncTaskLoader.html#loadInBackground() May 05 18:07:12 SimonVT, I didn't see anything in that example that would be long running May 05 18:07:22 unless getinstalledapplications is, but I wouldn't know May 05 18:07:59 The example says that loadInBackground is on a background thread as well May 05 18:08:01 sonOfRa: I have a View (A) defined in XML. When it is created, it calls a method that calls B's constructor. However, B's constructor (after a few method calls) calls findViewById(A's id). Since A did not finishing inflating yet, findViewById returns null, instead of the object. May 05 18:10:06 Can any 1 help bulid a Custom ROM for iNO One Plus on Android ICS 4.04 please? May 05 18:10:12 #android-root May 05 18:20:04 maslen: to ask the dumb question -- moving your method call to onFinishInflate() or something similar not possible? May 05 18:20:34 kbs: I didn't know such a method existed. I'll read up on it May 05 18:45:34 kbs: That doesn't seem to help :( May 05 18:46:01 I am having a hard time finding terms for this... how would you call one asynctaskloader from another? May 05 18:46:17 asynctaskloader doesn't have a reference to the manager May 05 18:50:33 what's the preferred way of doing contextual menus in a ListView in android nowadays? swipe is out, because my listview is in a ViewPager (and I'm not cool with swipeception) May 05 18:52:03 What is the difference between View.findViewById and Activity.findViewById ? May 05 18:53:16 Ah. One is specifically for onCreate, the other is for child views. May 05 18:54:13 how would you find an initial view? May 05 18:55:05 I'm guessing you'd start off with a XML-based layout that's displayed when your app begins. May 05 19:14:19 I have an asynctaskloader which starts another asynctaskloader. How do I have the first wait for the second to finish? May 05 19:14:51 is 'onLoadFinished' called in the second's thread? May 05 19:14:56 I could use synchronize then May 05 19:39:32 hm, not allowed to call LoaderManager.initLoader during initLoader... okay May 05 19:39:50 so I saved a reference to LoaderManager and called it during loadInBackground. The other task doesn't seem to do anything May 05 19:40:00 loadInBackground breakpoints are not hit May 05 20:02:02 if you're starting a new loader in a loader's loadinbackground, why can't you just do all the work in the first loader? May 05 20:57:08 mgsfogneduohawru I don't understand May 05 20:57:28 none of the documentation is consistent or up to date here for Google calendar. any knowledge would be appreciated. May 05 20:57:29 https://developers.google.com/google-apps/calendar/instantiate May 05 20:58:03 this shows the constructor for Calendar taking an argument of type GoogleAccessProtectedResource. I downloaded their libraries and this class does not exist May 05 20:58:10 nor does Calendar take any such argument May 05 20:58:33 and I can't find the correct api calls to supply the extra credentials May 05 21:11:45 not really android, but what is the best way to limit access to a server to only my application? May 05 21:11:52 best/any May 05 21:14:24 what kind of 'server' ? May 05 21:17:47 bankai_ java based server running on app engine May 05 21:20:15 you can create some kind of key or door knocking process May 05 21:20:31 port knocking is probably a better word May 05 21:20:32 hello guys, im a real beginner and need some help http://pastebin.com/szg82SN7 http://pastebin.com/kMTDeSDU i have this Splash screen activity but it doesnt open up May 05 21:21:08 05-06 00:09:17.882: E/AndroidRuntime(12297): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vilunen.test/com.vilunen.test.Splash}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001 May 05 21:21:12 probably a good thing, please don't use splash screens ... May 05 21:21:28 really? May 05 21:21:46 how come? May 05 21:21:47 splash screens are annoying May 05 21:21:52 bankai_ port knocking? May 05 21:22:14 okay, but i want to learn how to make activities, can you guys look into this? May 05 21:23:31 as you can see from the manifest i have two different activities now but the launcher one doesnt start up May 05 21:24:23 * tortal being a retard. can't import libs anymore. gettings crazy. guava fine. play services fine.. ormlite May 05 21:24:24 NO May 05 21:24:38 im talking about src/javadocs with .properties files May 05 21:24:44 ADT just wont recognize it May 05 21:24:48 soo no one can help? May 05 21:25:19 it cant be anything big since the program is so simple :p May 05 21:26:59 what ever happened to "add as library" option in eclipse May 05 21:27:15 why do ADT want to troll this shit May 05 21:27:33 it's same with their APIs.. making it impossible to construct proper MVC May 05 21:27:56 i purchased a phone from ebay but it says CyanogenMod, sgh-i777 May 05 21:28:10 Spandexchamp: you using eclipse? May 05 21:28:29 'it is not recognized by DDMS yet i installed driver for other sgh-i777 and it is recognized and connecting to debugger May 05 21:28:42 is there something about cyanogenmod that screws up debugging> May 05 21:28:48 yes im using eclipse May 05 21:29:31 if your references are correct then you might just need to clean and rebuild ... May 05 21:30:46 why do adt insist in managing classpaths, making the immutable for eclipse May 05 21:30:51 them May 05 21:31:10 it'd be ok. if their jar.properties convention worked May 05 21:31:12 but it doesnt May 05 21:31:22 yeah cleaning didnt help May 05 21:31:47 tortal: jar.properties works for me. Had to restart Eclipse May 05 21:32:06 But I remember it worked only for like 4/5, which was strange. May 05 21:32:12 yes. it is odd May 05 21:32:23 have added guava et al previously May 05 21:32:45 looked back... can't find single difference in my jar.properties files May 05 21:33:23 i hate cloning repos May 05 21:33:32 bankai_ is everything fine in the manifest? May 05 21:33:32 just to configure them for like 20min before i can run the code May 05 21:33:46 any have any example for connecting to google calendar? May 05 21:34:19 which gcal? the cloud API ? May 05 21:34:22 erisco May 05 21:34:32 there are multiple? May 05 21:34:50 well.. i dont even own an andorid phone May 05 21:34:58 but i would presume there are both local and cloud-based May 05 21:35:07 well, cloud based May 05 21:38:26 without having any clue what you want to achieve; you'd probably want to check out the APIs May 05 21:38:32 https://developers.google.com/apis-explorer/#p/ May 05 21:38:33 if I have a view that is inflated from XML, and then I call Activity.setContentView(view), how can I later retrieve that View object (with something like findViewById) May 05 21:39:12 Because Activity.findViewById appears to return null May 05 21:39:36 you need refer to its id May 05 21:39:51 and assign it with a +-prefix in the xml May 05 21:40:12 also, setcontentview BEFORE using findViewById May 05 21:41:03 tortal: Do you mean android:id="@+id/myview" ? May 05 21:41:16 (or is there something I'm missing there) May 05 21:41:54 no that's right May 05 21:43:11 when building thr project. ADT will generate a R.java file containing all the "memory locations" of the IDs you assigned in the project May 05 21:43:15 Right. May 05 21:43:39 so I have a call to View view = getLayoutInflater().inflate(viewid, null); setContentView(view); May 05 21:44:08 Yet a subsequent call to Activity.findViewById (with the same viewid) returns null May 05 21:44:18 so you'll need to to refer to it as findViewById(R.id.myview); May 05 21:44:39 you dont need a subsequent call, since the resource is static May 05 21:44:47 at least not in the same activity May 05 21:44:55 I'm aware, but it's different parts of larger application May 05 21:44:56 store it in a class var instead May 05 21:45:23 so I'd rather let Android manage the View/id's then storing them locally, if I can avoid it May 05 21:45:59 (because then I'd need to store them and pass around references) May 05 21:46:27 pass around, to other intents? May 05 21:46:31 as other intents* May 05 21:46:38 it's over IPC, so it gets messy fast. May 05 21:46:43 ic May 05 21:51:02 okay i fixed my problem May 05 21:51:42 what was it ? May 05 21:53:18 maslen: you need to pass a layoutid to the inflator, not a viewid May 05 21:53:24 maslen: ans the 2 arent compatible May 05 21:53:49 has anyone lately compiled the dropbear ssh server for android? May 05 21:54:16 maslen: you also dont have to inflate it yourself, http://developer.android.com/reference/android/app/Activity.html#setContentView(int) May 05 21:54:21 maslen: this method does the inflation for you May 05 21:58:30 clever: You're right, it's a layoutid. And I need to use that View in the immediate area, that's why I inflate it myself May 05 21:59:51 And it's a View within that layout that I'm having trouble getting the reference too May 05 21:59:55 maslen: you almost always want to put a LinearLayout as the root element, then the view you want inside that May 05 22:00:09 what is the xml and java code?, can you pastebin both? May 05 22:00:44 clever: This is a large project, so it's a bit complex to paste the entire thing. I can paste a minimal amount though May 05 22:00:55 that works May 05 22:01:06 just need some of onCreate and the key parts of the xml May 05 22:02:25 hold on, I've made some updates since I last pastbinned it, so it'll take me a few minutes to recreate it May 05 22:05:04 bankai_ my .png picture for the splash was in a wrong directory, the code itself seemed to be right May 05 22:05:35 well now i understand activities a bit better :) May 05 22:16:11 clever: May I PM you the link? May 05 22:16:41 maslen: yep May 05 22:17:15 Thanks. It's a complex system, so this is almost as simple as it can get. May 05 22:18:11 maslen: it should be as simple as setContentView(R.layout.xmlfilename); and findViewById(R.id.snake); May 05 22:18:27 The initial setContentView is not problematic. May 05 22:18:34 It's the findViewById bit that returns null. May 05 22:18:48 SetContentView is just the first call in the chain May 05 22:18:57 can you paste the line of code that contains findViewById? May 05 22:19:13 newbie question - I have two views in a horizontal linearlayout, an EditText and an ImageView. I want the ImageView to take up whatever the width of its source image is, and the edittext to take the rest of the width - how do I do this? I seem to recall it has something to do with setting layout weight to 0... May 05 22:19:18 it's the last one May 05 22:19:36 Sorry, second to last one May 05 22:19:58 maslen: and where does the value of the 2nd argument come from? May 05 22:20:01 this is the code I am using to try and talk with google calendar: http://pastebin.com/Hp9q2eVD May 05 22:20:14 I get 401 invalid credentials May 05 22:20:41 don't I have to give my API key somewhere, at least? May 05 22:21:06 clever: It's the resource ID for the view. Line 31 May 05 22:21:23 Sorry, 30. May 05 22:21:52 I've stepped through it in a debugger, and it's the same ID throughout. May 05 22:21:58 maslen: you should be passing R.id.snake into that May 05 22:22:20 maslen: also, is the function at line 66 a member of the same Activity? May 05 22:22:25 or another class? May 05 22:22:55 hmm, actualy, your passing something in, which wasnt defined May 05 22:23:15 clever: Line 66 is running within the Activity that called setContentView May 05 22:23:30 maslen: check the PM May 05 22:24:07 figured it out - width 0, weight 1. Of course... May 05 22:53:56 Hello, does exist a way to save logcat on device when it isn't connected to my pc? Thanks May 05 22:54:27 uragano2: there is an app, aLogRec, but it doesnt work past 4.1-ish May 05 22:54:42 and it holds a wakelock open the entire time, causing your battery life to suffer May 05 22:54:47 ^ yeah you might need to root if you have a newer device May 05 22:55:13 there is also adb over tcp, if your near your pc, but dony want to be tied to it May 05 23:03:06 clever: ok thanks! a question about battery life: my app poll for data update every 10 minutes. I am using BroadCastReceiver to do this and i setRepeting every time. Is this to expensive for battery life? May 05 23:03:18 *too expensive May 05 23:03:39 thats not going to harm the battery very much May 05 23:03:46 but you may want to switch to GCM anyways May 05 23:04:55 my own app is polling a server every 2.5minutes with no noticable harm May 05 23:04:57 anyone know how to change a int (RGB int) and make it a few shades lighter etc ? ADD / MULTI etc ? May 05 23:05:11 the issue is when i started aLogRec, the tablet wasnt able to go into power saving at all May 05 23:05:17 it was stuck running 24/7 May 05 23:07:17 StingRay_: wouldn't you just add an equal const to the r/g/b channels ? May 05 23:07:41 tis the unit math that I'm having a problem with May 05 23:08:02 and not sure I like the 2 to 3 unit conversions I have to do May 05 23:08:07 you know about this guy right ? http://developer.android.com/reference/android/graphics/Color.html May 05 23:08:24 which would be brilliant May 05 23:08:35 if my stored vals were hex May 05 23:08:40 but they are ints May 05 23:08:46 well single int May 05 23:09:11 just mask them out ? May 05 23:09:25 clever: yes, i thought about GCM, i'll switch to it when i'll have time to see how it works. Thanks for your advices! :) May 05 23:09:40 g00s: mask them out ? May 05 23:09:51 you can use Color.red(rgbInt) to get just the red component May 05 23:09:58 uragano2: the main bonus of GCM is that you get a single process polling every X minutes, so the cpu usage wont double when another app starts to use it May 05 23:09:59 and build one using Color.rgb(red, green, blue) May 05 23:10:11 oj May 05 23:10:13 oh* May 05 23:10:17 that may do then May 05 23:10:19 :) May 05 23:10:26 StingRay_ since they are 0..255 they fit in a byte, you can get R and B for example by ANDing with 0xff00ff May 05 23:10:29 if you actually want to make it lighter you might want to convert to HSV and do the conversion there. there is a static method in Color to convert to and from HSV as well May 05 23:10:48 yeah May 05 23:12:56 StingRay_: http://en.wikipedia.org/wiki/HSV_color_space#Lightness May 05 23:13:09 i know hsv May 05 23:13:12 yuv May 05 23:13:17 notice equation y'601 May 05 23:13:18 etc May 05 23:13:21 oh May 05 23:13:38 I didnt know about color.red(fullrgbint) May 05 23:13:46 getting red component etc May 05 23:13:54 so I'm sorted now i think May 05 23:14:14 thanks guys (and maybe girls) May 05 23:14:33 This is the same as saying (color >> 16) & 0xFF May 05 23:14:37 is what we meant :0 May 05 23:15:19 reminds me of coding mmx May 05 23:18:03 ok stupidly confused again now May 05 23:18:11 whats the point of Color ? May 05 23:18:24 as in it has no method to return an int May 05 23:18:32 after doing any changes May 05 23:18:43 to either setBackground on a view May 05 23:18:49 or even create a colorDrawable May 05 23:19:00 am I missing somthing here May 05 23:21:58 i think the point is to have some convenience methods on int May 05 23:23:19 StingRay_ you understand the 4 components of a Color ? May 05 23:23:37 of almost all spectrum of color yes May 05 23:23:43 all pallets i mean May 05 23:23:57 whats the confusion May 05 23:24:05 android May 05 23:24:08 :) May 05 23:24:15 scumbag android May 05 23:24:28 well fist of I wanted to lighten a colorDrawable May 05 23:24:40 so figured I could use a filter May 05 23:25:02 seemed to have no visual affect at all May 05 23:25:32 LightingColorFilter ? May 05 23:26:04 i reckon i would just do it myself May 05 23:26:16 and shift some bits May 05 23:26:56 so the argb > hex > int is a fixed thing of 255|255|255|255 ? May 05 23:27:03 yes May 05 23:27:11 ok May 05 23:27:16 or 0..0xff May 05 23:27:30 so you need to isolate them, change them, and combine again May 05 23:27:53 making sure for example your B component does not overflow into your G May 05 23:27:57 but the stored int may or maynot be 12 digits May 05 23:28:10 12 ? May 05 23:28:34 well the int val of lets say 0000ff May 05 23:28:48 would just be 255 ? May 05 23:28:51 yes May 05 23:28:56 (ignoring alpha) May 05 23:29:09 well ingnore/having 00 May 05 23:29:21 but lets say I had an alpha val May 05 23:29:21 0000ff IS 255 May 05 23:29:25 ff000000ff May 05 23:29:42 that's not 32bit May 05 23:29:57 ff0000ff is May 05 23:30:28 yeah thats what I wanted to type May 05 23:30:29 :) May 05 23:30:51 so if you want to make your color darker for example May 05 23:30:57 and android storing that as an int val is just 255000000255 ? May 05 23:31:16 is that hex? :) May 05 23:31:30 best to always use hex when describing colors May 05 23:31:38 it's -16776961 :-) May 05 23:31:46 or say 255/0/0/255 May 05 23:33:02 Return the green component of a color int. This is the same as saying (color >> 8) & 0xFF May 05 23:33:07 if this makes sense, you got it :0 May 05 23:33:28 I have a feeling StingRay_ is confusing the decimal representation of a number, with the underlying bit masks May 05 23:33:43 though personally i would say '(color & 0xff00) >> 8' May 05 23:34:34 i have a feeling stringray while understanding the theory of color and even human eye theory and perception is lost in simply wanting to make a color, x shades lighter :) May 05 23:34:48 :-) May 05 23:34:56 well you have to think about what 'lighter' means May 05 23:35:07 relative value addition May 05 23:35:15 ADD May 05 23:35:38 i think of 'lighter' as 'closer to 255' May 05 23:35:50 indeed May 05 23:35:51 are you familiar with HSL StingRay_ ? May 05 23:36:25 ya May 05 23:36:35 so value increase May 05 23:36:44 well V or L increase May 05 23:37:00 StingRay_: great. So the cookbook answer to your problem is to convert rgb -> hsl, increase the l, and convert back to rgb May 05 23:37:39 (and you should find formulae to do the conversion :-) May 05 23:38:47 actually... I'm almost certain there are methods in Color that do that work already May 05 23:39:22 Color.colorToHSV() seems to be pretty handy; does all the dirty work May 05 23:46:04 looking at it now May 05 23:47:51 unfortunately, you'll probably want HSL rather than HSV, I'm guessing... might need to do a bit more work. (unless you can live with desaturating the color, rather than lightening the color.) May 05 23:49:26 yeah May 05 23:49:33 back to being confused again May 05 23:49:46 Im used to very simple things with colors :) May 05 23:49:59 grading tools, PS etc May 05 23:53:58 you call that simple ;0 May 05 23:54:00 kbs: Any chance you're around? May 05 23:54:18 what's simpler than fiddling with a byte! May 05 23:54:57 maslen: ? May 05 23:55:31 kbs: You had earlier suggested that I put the code that calls findViewById inside onFinishInflate. Unfortunately, that didn't help :( Do you have any other suggestions. May 05 23:55:47 in regards to: I have a View (A) defined in XML. When it is created, it calls a method that calls B's constructor. However, B's constructor (after a few method calls) calls findViewById(A's id). Since A did not finishing inflating yet, findViewById returns null, instead of the object. May 05 23:56:17 maslen: hm.. I take it that you called the super.onFinishInflate() within your overridden method, before you called the problem method? May 05 23:56:25 Yes May 05 23:57:00 As a simple test, I put the call to findViewByID immediately after super.onFinishInflate(), and it still returned null. May 05 23:57:39 maslen: ah, that's a good test. sorry, not sure then. If you can delay things; one of the other onlayout/etc methods (or even ondraw(), I guess, in the worst case) you might be able to finagle it -- but you'll also need to check that you 'ren't calling it multiple times I suppose. May 05 23:58:11 kbs: My best idea was to launch a new thread, wait half a second, and then go May 05 23:58:14 Which is... ugly. May 05 23:58:36 maslen: you might be better off by declaring a method like setViewA(ViewA a) in your ViewB, and then have ViewA call that method of ViewB either after creating it or after finding it's children in onFinishInflate May 05 23:59:32 maslen: :-) what kevinb said maybe? Or worst case, yea. Well, maybe doing it within onDraw or something similar that's called during rendering, might be slightly less ugly May 05 23:59:36 kevinb: It's much more complex then that; if I could have done that, I would have. May 06 00:01:00 I think creating a flag that's cleared as the last step of onFinishInflate is the best way :( May 06 00:01:18 Complete uglyness though May 06 00:03:20 wait/notify is the way to go May 06 00:04:47 i'm looking at the code in layoutinflater, where the setID method is being called May 06 00:05:16 at least in the version I'm seeing, it appears to call setvisibility() right after setting the id May 06 00:05:23 not that I'm suggesting anything mind you :-) May 06 00:05:32 Sorry, I'm not following May 06 00:05:58 well, the absolutely horrible hack that's on par with your thread, is to call your problem method on the first call to setvisibility May 06 00:06:06 and you didn't hear that from me :-) May 06 00:06:39 I have an activity which starts an asynctaskloader. It uses an inner class for the loader callbacks. When the asynctaskloader is done, an Intent may be returned to the callbacks that needs to be activated. Since the activity that originally started the asynctaskloader may not still be active, how can I get the active activity instead? May 06 00:06:39 I guess the other really crazy idea might be to just call it from setID() itself, no? May 06 00:08:06 or is there a way to activate an Intent without knowing the current activity? May 06 00:08:20 maslen: if nothing else, logging a stack-trace at that point might give you more ideas on the best place to make your method call. May 06 00:08:32 kbs: I'm going to try the thread solution first. May 06 00:08:53 i'd recommend figuring out why you think the problem is complex, and solving it correctly. the UI is single threaded, onFinishInflated are called at deterministic times. if your inner view's onFinishInflated is called before you can take action, then do it when your outer view's onFinishInflated is called. if the outer view's onFinishInflated is also called too early then figure out what call you are waiting for rather than spawning a t May 06 00:08:55 Makes me sad :( May 06 00:09:10 kevinb: It's ... complex. May 06 00:09:20 so are threads May 06 00:09:22 I have a lot of limitations of what I'm allowed to modify and control. May 06 00:09:37 erisco, that sounds like you're on short way to memorleak-wille May 06 00:09:38 I'm aware. I've written code for doing tasks in parallel and on clusters. May 06 00:09:55 (And designed said systems as well) May 06 00:10:06 Mavrik, hm, not sure why that would be. can you explain? May 06 00:10:22 to follow up on what kevinb said, the only issue I see is that the threads will cause unpredictable issues; whereas the methods on your views will be determinisitic. but sounds like you know the tradeoffs already ;-) May 06 00:11:00 erisco, if you have an inner class in acvitiy that's not static, you'll leak the activity reference with the loader and cause the activity not to be cleaned up after reconfiguration May 06 00:11:23 Mavrik: is that problem solved by keeping a WeakReference? May 06 00:11:53 Mavrik: +1 :-) the single most common issue I see with the asyncloader design pattern.... May 06 00:11:54 sampullman, hmm, yes, but IIRC Loader callbacks aren't wek May 06 00:11:56 *weak May 06 00:11:56 Mavrik, hm, sure, but is that really much extra memory? the callbacks are being kept alive regardless May 06 00:12:36 erisco, you're leaving whole activities with resources attached lying around in memort May 06 00:12:38 so yes. May 06 00:12:56 and no, solution to memory leaks is never "oh, it's just a little memory, its ok" :P May 06 00:13:02 :( May 06 00:13:05 that isn't a leak May 06 00:13:09 erisco: this isn't your problem, but it might give a little insight: http://stackoverflow.com/questions/9077212/update-progressbar-from-asynctaskloader May 06 00:13:35 the first answer May 06 00:14:05 sampullman, I don't think this is quite is, since the issue I have is that I don't have any reference to the activity May 06 00:14:15 sampullman, because the active activity may have changed May 06 00:14:47 if the activity has changed, the data either shouldn't be relevant anymore, or you should store it in sql or something May 06 00:15:11 sampullman, the 'data' is an Intent which must be activated May 06 00:15:52 hmm May 06 00:15:56 well, why not pass the application context into the loader callback class and use that to send the intent? May 06 00:16:11 sampullman, I can use the context to do such a thing? May 06 00:16:18 probably, i dunno May 06 00:16:38 erisco, basically the Google's suggested pattern is to supply current activity on initLoader May 06 00:16:42 as callback May 06 00:16:43 actually, im pretty sure you can May 06 00:16:54 and never retain any references to activities inside the actual loader May 06 00:17:12 Mavrik, but my activity which starts the asynctaskloader can't know which activity is active in the future May 06 00:17:43 erisco, that's why you reset callback when activity changes May 06 00:18:04 http://developer.android.com/reference/android/app/LoaderManager.html May 06 00:18:05 kbs: I think this is the part where I make it someone elses problem. May 06 00:18:17 Thank you kbs, clever, and kevinb May 06 00:18:19 in onCreateActivity: getLoaderManager().initLoader(0, null, this); May 06 00:18:25 this remaps callback May 06 00:18:37 remaps what callback? May 06 00:18:37 erisco: you can use a service to run some background task and then send an intent May 06 00:19:31 sampullman, I am using asynctaskloader because I have blocking operations. I dont' think services allow for this, but if they did, I'd prefer not to rewrite what I have into services May 06 00:20:17 well, Mavrik's answer is more correct anyways. Your activities should be implementing the loadercallbacks May 06 00:20:58 I don't see how this makes any difference May 06 00:21:04 Does one ever not feel overwhelmed when diving into android dev? May 06 00:21:23 fprophet, hard to prove negatives May 06 00:22:40 I've spent several days playing around, and learning some things. but I wanted to play with SurfaceView and feel completely lost again May 06 00:22:53 Mavrik, you say reset the callback when the activity changes, but I don't understand what this means. How does initLoader relates? afaik it just schedules the background task May 06 00:22:55 like anything complicated, it takes years to master May 06 00:23:11 erisco, it also returns existing loader if running May 06 00:23:14 read the docs :) May 06 00:23:20 that's the whole point of using loaders May 06 00:23:21 use the same loader id May 06 00:23:23 yeah May 06 00:23:40 Mavrik, sure, but what use does this have? I'm not following May 06 00:23:54 you redirect where the callbacks go May 06 00:23:56 fprophet, surfaceview is the bane of all living Android devs, a spawn of deepest pits of abyss causing countless hours of woes, crying and insanity. May 06 00:24:16 erisco, you register your new activity as callback receiver of coures. May 06 00:24:18 *of course May 06 00:24:28 which IS your problem right? May 06 00:24:57 having callback reference in dead activity? May 06 00:25:44 well more accurately it is my callback not being able to start an Intent because it doesn't know the active activity May 06 00:26:12 erisco: out of curiosity, do you care whether your activity is actually active when the intent is launched? :-) May 06 00:26:29 kbs, does the intent do anything if it isn't? May 06 00:26:42 erisco: sure -- it'll get handled regardless. May 06 00:26:48 you can call itent with the application context as well ;) May 06 00:26:59 thus avoiding the whole "retains activity" problem :) May 06 00:27:04 what Mavrik said (and was sampullman's first advice as well.) May 06 00:27:26 kbs, why is this method part of the Activity class then? seems nonsensical May 06 00:27:41 if it is not activity instance dependent May 06 00:27:51 erisco: it's context dependent, not activity dependent... May 06 00:29:29 ah well damn. I'll start with that then May 06 00:29:50 yeah. Think sampullman idea is probably the simplest in your situation May 06 00:30:18 services? May 06 00:30:25 no, app context May 06 00:30:55 Similar to if you had to send an intent from a broadcast receiver or something May 06 00:31:05 I was also confused because getAuthToken requires Activity just to call startActivity... May 06 00:33:54 alrighty thanks for the help :D May 06 00:34:02 fwiw, for anything else I run a threadpool in a service, with a pub/sub api. I just subscribe for events in any activities' onResume() , and unsubscribe from onPause(), and just publish tasks to the service. That keeps (at least my) life simple without getting caught in more elaborate apis. May 06 00:34:45 kbs, (and apis which keep changing... much of my headache with Google Calendars) May 06 00:35:43 well the problem I've seen is the framework api's availability across android versions; but I'm sure other google services (like calendar) have their own challenges too :-) May 06 00:36:30 yeah, trying to find the details on how to correctly authenticate has been a nightmare... and even still I haven't found out where I give my API key May 06 00:36:42 so I presume I'm only using anonymous access, but whatever for now May 06 00:37:05 there's a google play api library thing that seems handy, I'm using that for accessing google drive May 06 00:37:20 every article is a different api or version or approach May 06 00:37:44 :-) well -- hope you find a path without falling into the potholes May 06 00:54:04 so SurfaceView runs in it's own thread? how would I draw say, a circle that I created without having to manually put that in the onDraw method? May 06 00:55:28 make a circle class with a draw method May 06 00:55:36 and call circle.draw(canvas) or something May 06 00:56:52 even better, keep a list of objects than implement a Drawable interface, and loop through those calling draw(canvas) in onDraw May 06 00:56:58 *that implement May 06 00:58:22 alright May 06 01:14:29 its been a long time since i've looked into the details of the Binder, but does anyone knowledgable on the subject recall if the Binder system implicitly supports thread affinity? That is, if I were to call into service methods from threads A and B on the client, will each call flow be mapped to the same threads on the server side? May 06 01:14:44 or will i need to create my own concept of thread affinity for this to work? May 06 01:22:19 hi May 06 01:27:57 how sound is the advice in this tutorial: http://danielnadeau.blogspot.com/2012/01/android-canvas-beginners-tutorial.html May 06 01:43:18 Hello, I would like to create an android application with concierge and event management organization, for we should take the basic android contacts and export to sql with Automatic Creation of tables, the server hosting the database server Sunflowers in redhat 6.4 and I want to install and configure postgresql 9.2. I wish I could also make reservations online forms that would add to the May 06 01:43:18 postgresql database contacts and then I wish I could re-export without duplicates in the android base. I'm clear enough? because it seem to me to explain complicated May 06 01:51:16 userneedhelp: that sounds like some1 has asked you to do a job from freelancer and you have just pasted it here lol May 06 01:56:12 I'm not the pigismes, well I was looking to export the sql from android in automatic. May 06 01:57:15 someone else would have the conceptual data models based contacts android ? May 06 01:57:42 sorry I dont understand May 06 01:58:48 i wanna application to export android contacts with postgresql May 06 01:59:11 why are you mixing up requirements with technology? May 06 01:59:19 make up your mind about WHAT do you want to May 06 01:59:28 and then choose the best tool to do it WITH May 06 01:59:35 you're doing it ass end first May 06 02:06:19 en fait je veux pouvoir exporter les contacts de mon smartphone android vers mon server redhat et y configurer une base de données postgresql 9.2. je veux aussi pouvoir importer depuis un site de reservations les contacts dans ma bases de donnees et y enlever les doublons, puis ensuites reexporter les contacts vers une tablette android. May 06 02:20:51 What is the error here? http://imageshack.us/a/img823/4650/unknownerror.png May 06 02:22:38 it looks like two errors, the one on the dot in Color.BLUE should tell you the real problem, probably that Color isn't imported May 06 02:23:07 oh nevermind, that code is not in a block. put it in the constructor or something May 06 02:23:22 you can only declare things outside of a block May 06 02:23:50 Is there an easy way to measure CPU time consumed by an application, for some basic profiling? May 06 02:25:12 using tracing is by far the easiest May 06 02:25:25 there's traceview which can be enabled to do method tracing. it's powerful but slows down method calls which can make it look like certain methods are more expensive than they really are May 06 02:26:14 I don't really need per-method tracing, just how much CPU time is consumed over running an app, for say, one minute. May 06 02:26:23 As a simple comparison for before and after code modifications May 06 02:26:41 traceview is what you want May 06 02:27:27 maslen, there's also highperformance profiler on devices with 4.1+ May 06 02:27:54 maslen, http://developer.android.com/tools/debugging/systrace.html May 06 02:28:01 noticably smaller penalty May 06 02:46:02 is it possible to trace which things have a reference to a given adapter, preventing it from being collected after setAdapter is called? May 06 02:47:27 I'm wondering if there's amybody here with EXTENSIVE NFC on Android knowledge that knows if it's possible (and if so, how) to write an app that can act as an RFID-type card for a tech that IS supported by Android. I believe it's under NfcV, but I want to have people be able to use their phone in place of an already existing card technology for a sort of loyalty-ish/identification system May 06 02:47:31 or rather, after the adapter is set again. May 06 02:47:57 Security itself isn't the issue here mind you. It's just using phones to emulate the card so they can use the phone or simply not even need a card ever May 06 02:48:21 But it's NOT NDEF based at all, so I don't know how Android can act as a card for a reader to see May 06 02:51:26 etcetera, try MAT in eclipse May 06 02:51:45 http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html May 06 02:52:21 Jouva, i believe you can go down lower than ndef and deal with raw bytes May 06 02:52:29 i think thats how most credit card reader apps wokr May 06 02:52:42 so writing (what you want) would just be the other direction May 06 02:57:52 There's a mechanism for issuing raw bytes and you can talk iso7816 to the card May 06 02:58:02 I dont' recall offhand what that API is, but that's how the credit card reader stuff works May 06 02:59:20 the NFC chips are (generally) the same as smartcard chips, just with a RF link; you can look up ISO7816 for a good starting point and try interrogating cards that way. A good first step is to issue an ATR (wakeup/reset/identify yourself) command and see what comes back **** ENDING LOGGING AT Mon May 06 02:59:58 2013