**** BEGIN LOGGING AT Tue Jan 01 02:59:58 2013 Jan 01 03:01:50 JesusFreke, MyCustomParentObject = Class.getConstructor(package.name.MySubClass)? Jan 01 03:06:52 getConstructor(package.name.MySubClass.class) Jan 01 03:06:53 I think Jan 01 03:07:22 assuming that you want a constructor that accepts a MySubClass instance Jan 01 03:07:32 But, as you mentioned Parcel.. Jan 01 03:07:50 maybe you want Class.getConstructor(Parcel.class) Jan 01 03:08:05 where Class is the Class instance of the subtype that you are constructing Jan 01 03:08:18 so, maybe a slightly fuller example Jan 01 03:08:55 Class.forName("MySubClass").getConstructor(Parcel.class).newInstance(parcel) Jan 01 03:09:28 although, you would need to pass the fully qualified name of the subclass to forName Jan 01 03:11:18 I don't understand why i'd use Parcel.class there. Jan 01 03:12:19 I can store the fully qualified class name I think, and then read it out before I instantiate the object. Then I want to instantiate an object of that type from the String that represents the original object's class Jan 01 03:12:52 damccull: you said that you wanted to use a constructor that accepts a Parcel. Jan 01 03:13:08 (06:57:13 PM) JesusFreke: If you need a parameterized constructor Jan 01 03:13:08 (06:57:31 PM) damccull: I do. It needs to accept a parcel Jan 01 03:13:38 damccull: the fully qualified class name is what you pass to Class.forName() Jan 01 03:14:15 the arguments to getConstructor specify *which* constructor to get. In this case, you're saying that you want the constructor that accepts a single Parcel argument. Jan 01 03:14:25 If that's not what you want, modify accordingly :) Jan 01 03:15:03 In Parcelable.Creator inline class, an overrode method createFromParcel wants to instantiate my object by passing the parcel 'in' Jan 01 03:15:07 according to the example I'm using ;D Jan 01 03:15:35 file:///C:/android-sdk/docs/reference/android/os/Parcelable.html Jan 01 03:15:44 grr sorry lemme get the d.android.com link for you Jan 01 03:16:01 http://developer.android.com/reference/android/os/Parcelable.html Jan 01 03:16:25 In that example it instantiates itself, but I need to instantiate a subclass instead. Jan 01 03:17:20 Right. So you read the subclass name from the parcel. pass it to Class.forName, call getConstructor(Parcel.class), and invoke the constructor with the parcel as an argument. Jan 01 03:19:12 although. hmm. Jan 01 03:20:02 I wonder if the code to deparsel a custom class will look up the class hierarchy if the class itself doesn't have a CREATOR Jan 01 03:20:28 what's that mean? Jan 01 03:22:25 why would i get the constructor for Parcel.class when I want to construct my object and pass it the parcel? Jan 01 03:23:01 I'm going to try to explain this one more time :) Jan 01 03:23:17 Class.forName() - looks up the Class instance for you subclass Jan 01 03:23:17 heh i appreciate it. I only half understand it Jan 01 03:23:24 right. Jan 01 03:23:31 yawn Jan 01 03:23:36 .getConstructor(Parcel.class) Jan 01 03:24:24 this looks up the constructor for *your subclass* Jan 01 03:24:39 your subclass may have multiple constructors Jan 01 03:24:50 Oooh...so it gets the one that accepts the parcel Jan 01 03:24:58 Parcel.class is telling it that you want the constructor specifically that has a single Parcel argument. Jan 01 03:24:59 That's the part I didn't get :D Jan 01 03:25:01 Thanks man! Jan 01 03:25:24 then newInstance creates the object and passes in the parcel Jan 01 03:25:28 yep Jan 01 03:25:51 You rock dude. Seriously....and I think you might have made the first non-google rom i ever used :D haha sweet Jan 01 03:25:58 haha :) Jan 01 03:26:11 How would I go about providing a translation for my app? Like... adding spanish to my "Strings" or whatever? Do I publish a copy of the app for that language, or what? Jan 01 03:26:31 Read the i18n guide first :) Jan 01 03:26:50 pierpark, use values-sp or whatever the twoletter code for spanish is Jan 01 03:27:00 i-nternationalizatio-n Jan 01 03:27:02 then name all the strings the same as they're named in your values folder Jan 01 03:27:13 values.es Jan 01 03:27:13 :) Jan 01 03:27:20 yeah values-es Jan 01 03:27:25 values-es, yeah Jan 01 03:27:30 very nice. Thanks guys! Jan 01 03:27:36 the names of the strings are the same, the values are different Jan 01 03:27:54 and then android picks which string to use, based on the language of the device Jan 01 03:28:24 you definitely don't need to publish a copy of the app :) Jan 01 03:29:19 Very good information to know. I'll go do that now. Also good to have a friend that speaks the language ;) Jan 01 03:29:41 yeah, you wouldn't want to see my spanish translations Jan 01 03:29:48 haahha. Jan 01 03:29:50 everything would say "yo quiero tacos" Jan 01 03:29:58 Can you do the same with resources, perhaps? like images? Jan 01 03:29:59 lmao Jan 01 03:30:01 yep Jan 01 03:30:03 any resource Jan 01 03:30:12 like... drawable-es , then? Jan 01 03:30:15 yep Jan 01 03:30:20 awesome!! Jan 01 03:30:24 there are a ton of other attributes you can use too Jan 01 03:30:27 other than just language Jan 01 03:30:33 too easy. Jan 01 03:30:35 screen sizes, etc. Jan 01 03:30:47 what a relief Jan 01 03:30:54 landscape vs. portrait Jan 01 03:30:56 etc. Jan 01 03:31:17 nice Jan 01 03:31:41 definitely take a look at http://developer.android.com/guide/topics/resources/providing-resources.html Jan 01 03:32:29 thanks! Jan 01 03:58:40 convertView in a listview is supposed to be of type getItemViewType isn't it ? Jan 01 03:59:12 Should be, yes Jan 01 03:59:57 each ViewType you specify allocates a seperate bucket of reused views Jan 01 04:01:16 well its not ! =) Jan 01 04:01:28 i must be doint something wrong bu ti dont see what Jan 01 04:02:04 you're probably returning the wrong view type frlom your getView or whatever it's called Jan 01 04:07:28 with regards to AIDL files, what's the deal with the in/out/inout ? Jan 01 04:07:37 oh i didnt implement getviewtypecount Jan 01 04:07:39 oops Jan 01 04:07:55 Is that just to specify whether changes should be sent back for mutable objects? Jan 01 04:09:22 I'm trying to make a network scanner, and sometimes the device name is blank, so it's simply its LAN address. I'm trying to show all the devices on the network - how would I differentiate between devices that are actually devices and not unused IPs? isReachable(5000) isn't always working, it isn't showing the laptop i'm on lol Jan 01 04:10:02 u'd think they'd assert false or logcat an error if u dont Jan 01 04:18:59 * AmandaC rolls her eyes Jan 01 04:19:32 Onions: network scanners are a royal pain Jan 01 04:20:13 :p Jan 01 04:20:19 lol Jan 01 04:20:25 this is indeed a pain Jan 01 04:20:43 i mean seriously you'd think the computer i'm on would be reachable in 5 seconds if i've got no lag at all Jan 01 04:20:43 o.0 Jan 01 04:21:03 and other network scanners do it in way under 5 seconds so i think i'm doing something wrong Jan 01 04:23:17 Is it possible to have an AIDL-defined interface extend another AIDL-defined interface? Jan 01 04:24:20 Onions: to be fair, nmap has been around for a while. Jan 01 04:24:30 edittext keyboard doesn't show (its in a listview) Jan 01 04:24:46 i get this weird translucent arrow instead Jan 01 04:26:11 I don't believe so, maslen Jan 01 04:29:55 And how does nmap help me, maslem? Jan 01 04:32:17 Onions: Two aspects: 1) They hit almost every roadbump you're going to hit, so see how they solved it 2) It took a really long time to develop, so don't expect to replicate their features/performance easily Jan 01 04:32:42 wut is an aidl defined interface Jan 01 04:34:22 Right thanks for the insight :) Jan 01 04:37:49 k0nichiwa: http://bit.ly/YILV6C Jan 01 04:42:40 looks complicated Jan 01 04:46:47 so, whats the deal with http://androidannotations.org/ ? I can't see why this would not be part of the stock android API... but I'm sure there is a reason? Jan 01 04:53:34 iguay Jan 01 04:55:58 ahhughes: because it requires goofy manifest rewriting Jan 01 04:57:15 among other things Jan 01 05:06:59 ah ok, this is day #2 of android for me. Still lots to learn Jan 01 05:09:07 Is this the best/only way to access elements in the layout xml? ((TextView) findViewById(R.id.message)).setText(message.getValue()); Jan 01 05:11:15 well, you might have a field: private TextView mTextView; Jan 01 05:11:38 and in onCreate (or onCreateView in a fragment), you set mTextView = (TextView) findViewById(R.id.textview); Jan 01 05:11:46 and then you can just reference mTextView wherever you need to Jan 01 05:11:55 but yes, findViewById is how you get a reference to a view that was declared in xml Jan 01 05:14:28 So dagger can't help out in any way? Jan 01 05:14:32 ahhughes depends what you mean by "best" Jan 01 05:14:46 It would be faster presumably when you need it to set it in onCreate Jan 01 05:14:57 dagger? Jan 01 05:14:57 but if you're only using it once that is negligible Jan 01 05:15:39 happy new year Jan 01 05:16:58 ahhughes, i would avoid androidannotations.com, becuase you won't learn how stuff actually works Jan 01 05:17:29 * ahhughes nods Jan 01 05:18:07 canadiancow, http://square.github.com/dagger/ Jan 01 05:22:17 coming from gwt, it seems quite straight forward to pick up android... so far Jan 01 05:22:39 happy new year Jan 01 05:37:09 ugh my textview wont draw its text because my 9 patch has a tiny "content" area Jan 01 05:42:44 Hey guys, i had a question. since jellybean or around then there was a file previously located in platform/frameworks/base/core/java/com/android/internal/app that I was wondering about. ShutdownThread.java. It seems to have disappeared and i was wondering what it was used for Jan 01 05:42:52 or what it's been replaced by Jan 01 06:01:21 is it possible to disable selection for just certain rows in a listview ? Jan 01 06:05:36 through the list adapter, yes, k0nichiwa Jan 01 06:20:43 "GC_CONCURRENT freed 2655k, 31% free 8986K/12935K, paused 2ms+2ms, total 25ms" Jan 01 06:20:47 that doesn't seem to be good Jan 01 06:21:14 whats wrong with that Jan 01 06:21:30 25 ms is fine, isn't it? what kinda app is it? Jan 01 06:21:35 a game Jan 01 06:21:39 i get it constantly Jan 01 06:21:41 xD Jan 01 06:21:46 31% free isnt fantastic Jan 01 06:21:48 and nothing happens on screen Jan 01 06:22:06 let me post what I changed Jan 01 06:22:09 are you making sure not to create too many temporary objects? Jan 01 06:22:22 at this point nothing is created Jan 01 06:22:35 well something must be, or it wouldn't be doing a gc Jan 01 06:23:22 http://hastebin.com/lovehomuci.avrasm Jan 01 06:23:44 interestin autogenerated url name... Jan 01 06:24:51 xD Jan 01 06:25:47 in anycase, e.update() shouldn't add entities yet (although it can), and entities.remove(e) shouldn't be called either since there are no dead entities Jan 01 06:27:28 what about the iteration itself? is that a performance issue? Jan 01 06:28:01 well, it's stuck and nothing works. you can take that as a ... maybe Jan 01 06:28:29 old code worked but lead to a concurrent exception when i tried to add an entity Jan 01 06:28:58 that'll happen if you try to modify a collection while iterating over it Jan 01 06:29:24 i know, that's why i did it with the iterator itself ... at least I've been told i can do it that way Jan 01 06:30:04 leslie, isEnabled in the adapter ? Jan 01 06:30:26 hm, obv yes, thx Jan 01 06:30:30 yeah, k0nichiwa. return false if you don't want it to be selectable Jan 01 06:33:01 I assume I get the GC rampage because the way I declared Entity e, for performance reasons I should move it somewhere else... but I don't see why it won't work. Jan 01 06:36:34 i think the way to avoid GC stuff is to make objects recylable Jan 01 06:40:08 probably.... but someone could have told me that that's not the way to use an iterator -.- well, fixed it now Jan 01 06:41:59 do u call getExtra on an intent in oncreate of the activity that received the intent ? Jan 01 06:45:03 sorry I dont know exactly how to ask this... I have a Collection how can I declare a person.xml view to render each person? Jan 01 06:45:21 I can only see xml used with activities (so far) Jan 01 06:47:09 ahhughes, not sure what you're asking. do you mean in a list view? Jan 01 06:55:30 i had target sdk set to 10 but it didnt warn me i used an api from level 17 Jan 01 07:05:36 wtf do i have to do to *really* dismiss these notifications in my developer console? every time i log in they all come back Jan 01 07:06:06 g00s you have apps released in play store? Jan 01 07:06:18 just 1 Jan 01 07:06:23 coo Jan 01 07:06:25 probably only 1 ever Jan 01 07:06:34 interesting Jan 01 07:23:07 is the 16gb nexus 7 being discontinued ? Jan 01 07:23:56 every time i look at it on the store its "sold out" … no eta (the 32gb says out of stock but ships soon) Jan 01 07:26:00 same with nexus 4 Jan 01 07:26:04 its been sold out for ages Jan 01 07:28:26 heh, Samsung is going to release a Tizen phone in 2013 Jan 01 07:29:02 fuck tizen Jan 01 07:29:11 * SpeedEvil is waiting on Jolla Jan 01 07:29:18 if its html+js Jan 01 07:29:20 i've never seen it, so i cant comment on it Jan 01 07:29:20 it will fail Jan 01 07:29:32 I dont understand why people dont take a note from webos's book Jan 01 07:29:41 I mean sure... palm was already a sinking ship Jan 01 07:29:50 but why you'd take a perfectly capable os like meego Jan 01 07:30:00 and bastardize and it completely violate it? I just dont get it Jan 01 07:30:25 Jolla is the continuation of meego - sort of. Jan 01 07:30:34 I think tizen is Jan 01 07:30:49 jolla may be a diff branch of dev Jan 01 07:31:00 i need a chart, its too confusing Jan 01 07:31:04 haha Jan 01 07:31:04 lot of the ex me ego/Nokia went into it Jan 01 07:31:22 they should have stuck with meego Jan 01 07:31:33 linux+clutter+mx Jan 01 07:31:38 thats a hot ticket Jan 01 07:31:44 you can make some beautiful stuff with clutter Jan 01 07:32:38 meego, mer, tizen, limo, openmoko, maemo, nemo, sailfish, ... Jan 01 07:33:34 anyone mess with ActiveAndroid? Jan 01 07:34:30 heh, another sqlite layer Jan 01 07:34:34 i need a chart for those too Jan 01 07:34:49 should I be alarmed that my paycheck included 45$ less taxes this payperiod Jan 01 07:35:00 g00s - activeandroid is super lightweight and capable Jan 01 07:35:10 I dont mind writing queries Jan 01 07:35:14 I just hate mapping all the bs fields Jan 01 07:35:16 It's the fiscal cliff, their not going to be able to tax as much Jan 01 07:35:58 how am I gonna get boned in retrun Jan 01 07:36:05 I know theres simply no avoiding the taxes Jan 01 07:36:08 one way or another Jan 01 07:40:55 I dont know much about this crap Jan 01 07:41:13 hi, does anybody know of an android command line tool to list the packages by their "pretty" name? i see "pm list packages" that gives the list, but i'd like a list that is presntable to the user Jan 01 08:27:51 in a fragment's onCreateView, why would getActivity.findViewById() cause a null pointer exception? Jan 01 08:29:55 leslie, sorry I was gone for a bit... maybe I am talking about a list view... In GWT you have a uibinder per UI component... but in Android seems like you have an xml layout per activity not per ui component Jan 01 08:35:55 Ah seems I solved it :D Jan 01 08:36:11 New question. Can I use reflection to get a list of all classes in a specific package? Jan 01 08:37:15 ahhughes, you can have an xml layout per ui component. Each activity can have one, each fragment can have one, a specific listitem can have one. You can make a compound control with xml and write a class that uses that xml layout. Jan 01 08:37:55 damccull, so just like GWT's uibinder xml templates... good news :) thanks Jan 01 08:38:11 you're welcome. what's GWT? Jan 01 08:39:04 damccull, you joking? :) Jan 01 08:39:18 ahhughes, nope Jan 01 08:39:29 Google Widget Toolkit? :) Jan 01 08:40:26 Yep, in short... its a Java to Javascript compiler... however the tools it gives you are very sophisticate. Jan 01 08:41:01 OH the Google Web Toolkit right. Jan 01 08:41:06 I tried that once for like 10 minutes Jan 01 08:41:10 then went back to php Jan 01 08:44:38 is there a way i can freely move objects in activitys via Eclipse? or do i have to use "Layouts" ? Jan 01 08:45:08 so, maybe I am asking too much... but if I want my main.xml, to contain a list of "Person" objects, and each "Person" has a custom view, which has its own layout xml... what's the terminology to expain the Person view, and xml? Jan 01 08:46:11 hmm. does anybody know about launching packages and what has changed for android 4.2 with the new user stuff? in gingerbread, i can use "am start ...." to launch an application. now on 4.2, its giving me hell about android.permission.INTERACT_ACROSS_USERS_FULL Jan 01 08:46:46 when i try to give my application that permission, it refuses to give it upon installing Jan 01 09:30:16 at least my shared libraries are welcome here Jan 01 09:30:36 happy New Year to all Jan 01 09:30:48 jigal: happy New Year to you as well :D Jan 01 09:30:57 thanks Jan 01 09:31:56 coderarity, have you done anything with expanable list views? Jan 01 09:32:08 nope Jan 01 09:32:12 i don't like java Jan 01 09:33:07 and i use android for messing with game dev anyways, so i can just use C Jan 01 09:33:43 Happy New Year! Jan 01 09:34:02 Anyone got a good vps service with very low latency and great uptime? Jan 01 09:34:15 ok Jan 01 09:34:17 low cost obviously Jan 01 09:34:37 Streusel: i like using linode Jan 01 09:34:52 but maybe joyent too, if you like smartos and solaris stuff Jan 01 09:35:12 mm Jan 01 09:35:38 more of a centos person, not that I'm very familiar with os's in general but it's also the version I can get most support for at the moment Jan 01 09:35:55 linode lets you choose out of a few distros including centos Jan 01 09:36:02 Streusel: there's also cloud servers Jan 01 09:36:19 an amazon AWS micro instance is free for a year with a new account Jan 01 09:36:21 that sounds good, well I'm not too sure about cloud servers as I'll be running a linux based server on it that requires a bit of ram Jan 01 09:36:46 I was thinking of ubiquityservers.com however they've discontinued their vps service recently.. Jan 01 09:37:08 Streusel: check the costs for AWS, the prices are decent and the uptime is in th 99%+ range Jan 01 09:37:27 they have some outages, like with netflix recently, but have a very good track record Jan 01 09:37:29 Streusel: AWS is pretty good, but note that they go down several times a year Jan 01 09:37:42 sounds good I hope the aws site is better than the general amazon layout Jan 01 09:37:59 yeah coderarity, noticed that this year with netflix (not that I'm a user but it appeared on the news) Jan 01 09:38:08 coderarity: if you track outages on most server hosts you'll notice a couple a year anyway Jan 01 09:38:10 thanks Jan 01 09:38:27 joeyjones: i haven't seen any with joyent Jan 01 09:38:33 it's not like there is such a thing as 100% uptime Jan 01 09:38:41 no, there isn't Jan 01 09:38:49 beauty of ubiquityservers.com was just that they offered 3gb of ram and about 25gb of space + 1tb of bandwidth for only 39.25$ or such Jan 01 09:38:55 would've been perfect for me Jan 01 09:39:08 was it CentOS? Jan 01 09:39:18 they allowed a couple and yes including centos Jan 01 09:39:40 in case you wanted one they didn't have you could contact them after purchase to install your os Jan 01 09:40:37 cool Jan 01 09:40:51 how can i feed my BaseExpandableListAdapter from a cursor? Jan 01 10:24:56 is onCreate called for orientation changes? Jan 01 10:26:17 nm found it thanks Jan 01 10:29:37 hi Jan 01 10:30:10 I've a policy question about google market apps Jan 01 10:30:42 ? Jan 01 10:31:04 I read "nudity" isn't allowed on google market. What's about a 3D modeling application that contains somehow an "naked" body. Nothing really "nudity". Only naked Jan 01 10:31:09 is this allowed Jan 01 10:31:14 no porn no sex Jan 01 10:32:24 it's possible to see a gender, but only in a not explicit way Jan 01 10:32:30 I suspect it'll depend on who looks at the approval, and if there are any complaints Jan 01 10:33:08 if you made a genderless body, that should be safe. or just omit the genitals and nipples. Jan 01 10:33:08 would be nice to get that information before porting the app to android :-) Jan 01 10:33:21 ok, genderless may be an option Jan 01 10:33:30 if this is really the problem Jan 01 10:33:36 this is just general Jan 01 10:33:49 I've not read the terms and conditions Jan 01 10:34:34 I read them and they speak about "nudity" isn't allowed. What ever this means... Jan 01 10:34:48 there's no approval... the question would be if anyone complains Jan 01 10:35:08 nudity implies human. Jan 01 10:35:17 you can't have nude animals. Jan 01 10:35:37 and manikins are not referred to as nude Jan 01 10:36:18 I'm sure if 100.000 people doenload it one fool may complain about a non erected penis :-( Jan 01 10:36:49 who do I have to ask official? Jan 01 10:37:01 you don't ask Jan 01 10:37:45 the question is who decides at the end if someone complains? This one I've to ask Jan 01 10:37:49 before Jan 01 10:38:29 someone who you will have no contact with other than an email which says "someone complained, you've been pulled" Jan 01 10:38:38 you likely can't get a decision like this. Jan 01 10:38:56 sad :-( Jan 01 10:39:08 you will almost certainly not get any warning, or chance to correct things before being pulled Jan 01 10:39:17 if penises are not a critical feature of your app, remove them. Jan 01 10:39:28 no, it's not critical Jan 01 10:39:36 if they are a critical feature, look into a different marketplace Jan 01 10:39:41 indeed Jan 01 10:39:47 it's only for "human correctness" :-P Jan 01 10:40:22 you can pretty much do a body model that will appear correct under most clothing without concern. Jan 01 10:41:06 in the end there will be a cloth on that model for most use cases. so no problem. Jan 01 10:41:10 it's only stripper-wear that you could tell the difference in. Jan 01 10:46:13 <[twisti]> hi, is there a way to compile my android project with java 1.6 'features' ? specifically, there is an annotation i cant easily remove thats not part of 1.5, and i know that it would RUN fine on android since it would just ignore the annotation Jan 01 11:03:35 hello, anyone? http://stackoverflow.com/questions/14109821/feed-baseexpandablelistadapter-with-data-from-sqlite-db Jan 01 11:26:01 problem with db... i manage to show all data from db in other activity(screen) but when i go back and try to fill with more data it shows me only then that new data, it "erase" old data... Jan 01 11:29:15 sampleDB = this.openOrCreateDatabase(SAMPLE_DB_NAME, MODE_PRIVATE, null); // i guess that in this line is mistake and because of this it erase every time old data... Jan 01 11:29:56 any tips how to write so that it does not create all the time new db and just continue to put data in old db and show it? Jan 01 12:30:04 Hello, is it possible to have mixed orientations? Jan 01 12:30:24 nicole24: I don Jan 01 12:30:36 I don't think that should happen due to openOrCreateDatabase Jan 01 12:30:39 if someone had experience with desktop programming with GTK+, you will understand me, is there something like packing layouts in Android? Jan 01 12:31:53 nicole24: check your onUpgrade(..) method. Jan 01 12:32:16 for example, i want a bitmap on the left, textview on the right and a second textview under them, how should i do it? Jan 01 12:35:38 @NITROGEN: The textview to the right can be achieved using layout_alignParentRight I think Jan 01 12:36:52 DarkXPh, thanks, I'll look at it now Jan 01 12:37:13 is the only way to use the MapView, to set project as "Google APIs" ? Jan 01 12:38:29 NITR0GEN: You could put it all into a relativeLayout and adjust the positions using margins and align attributes maybe. Not sure what the best way to do it is though Jan 01 12:40:21 ok, i'll try the both ways Jan 01 12:40:29 just to see which one is more effective Jan 01 12:40:30 thanks Jan 01 12:41:14 NITR0GEN i do that lots Jan 01 12:41:43 also relativeLayout is recommended rather than having nested layouts Jan 01 12:42:54 unfortunate that it takes a bit of planning to use leftOf rightOf below baseline etc as the xml parser reads "ordered" and "linear" Jan 01 12:43:39 so in the outline list of your views, you cant have itemA listed b4 itemB but have a relationship to itemB Jan 01 12:44:10 thats my main beef with it all in using relative layouts Jan 01 12:44:34 thanks for the info StingRay_ Jan 01 12:55:00 <[twisti]> is there a way to indicate that i want to leave behind some user data when my app gets uninstalled ? Jan 01 12:55:05 <[twisti]> or is that not optional ? Jan 01 12:56:30 could write to external storage Jan 01 12:56:41 but user could always delete Jan 01 12:56:43 <[twisti]> ah yes, good idea Jan 01 12:56:54 <[twisti]> im asking for dev/debug purposes Jan 01 12:57:05 log to sd/external then Jan 01 12:57:06 <[twisti]> im writing an mmo client and im getting tired of having to reenter my account stuff Jan 01 12:57:59 i store things like that on live mysql Jan 01 12:58:24 and if id exists use that info, rather than generate new Jan 01 13:42:01 DarkXPh thx, it was something else but i manage to solve it :) Jan 01 13:44:04 i now have problems with sorting db by date, best way to save date to db, i now save it as 4 int columns, day, mth, year and unix timestamp, as far as i read best choice would be sorting by timestamp? Jan 01 13:47:09 nicole24 timestamp sounds good Jan 01 13:47:24 but is timestamp the same info as dy mnth year ? Jan 01 13:47:50 or is one a data centric set and the other a operation time or something ? Jan 01 13:48:18 cause why would you store the d,m,y and timestamp Jan 01 13:48:27 tis a bit duplicated ? Jan 01 13:48:31 hmm pretty confused :S Jan 01 13:48:43 i first tried by 3 int columns Jan 01 13:48:49 just to see is it working Jan 01 13:48:56 well if you have a int timestamp Jan 01 13:49:07 thats your day month year Jan 01 13:49:13 minute second etc Jan 01 13:52:28 Hi Jan 01 13:52:41 Guys, where can I get the latest BusyBox Bin for armv7? Jan 01 13:53:01 StingRay_ confusing part to me is this - lets say i want to sort dates and take some value from data that was store in last month for example... so with 3 int columns i would do in sql "... WHERE month == 12 ", how to write that with timestamp ? Jan 01 13:53:25 i guess its stupid question :) Jan 01 13:53:31 not really Jan 01 13:53:39 this is using sqlite ? Jan 01 13:53:47 yes Jan 01 13:53:55 ah see I'm not a huge fan of that Jan 01 13:53:56 :) Jan 01 13:54:00 very limited Jan 01 13:54:02 although Jan 01 13:54:11 instead of using a long int timestamp Jan 01 13:54:21 i would store in sqlite single field Jan 01 13:54:34 anybody> Jan 01 13:54:40 dd-MM-yyyy hh-mm-ss Jan 01 13:54:54 then you could use a query like that Jan 01 13:55:16 or you would have to convert date to milliseconds to compare Jan 01 13:55:23 if you kept the timestamp as an int Jan 01 13:55:27 eg Jan 01 13:55:34 compare last month Jan 01 13:55:47 anyone? http://stackoverflow.com/questions/14109821/feed-baseexpandablelistadapter-with-data-from-sqlite-db Jan 01 13:55:57 date(01-12-2012).getMilliseconds Jan 01 13:56:37 then sql where date> result and < result add end of month Jan 01 13:57:16 mySql is a bit easier as you can do unit conversion in the query Jan 01 14:13:58 hi all, what is the simplest way to get the a json value from a url, the url is http://pipes.yahoo.com/pipes/pipe.run?_id=e6b85ce4eb478adbfc49a89c09fd3c61&_render=json and i want to get json["items"]["url"] Jan 01 14:14:48 i tried using gson but i am lost need some help Jan 01 14:15:32 how about JSONObject? Jan 01 14:17:25 does anyone have a version of the bouncy castle provider that is suitable for creating key stores compatible with android (2.3) around? Jan 01 14:17:30 I thin it's 1.45 Jan 01 14:21:02 I'm new developing with eclipse. do you suggest to use a new workspace for each single android app project or could I just reuse the same workspace and just adding a new project to it? Where is the difference? How do you handle it? Jan 01 14:23:51 Hi, anyone been playing with the facebook android sdk? I'm trying to retrieve a list of the users friends, I get a result, but it seems the GraphUsers are loaded empty, any clues? perhaps missing some permissions? or do I need to load each GraphUser separately? Jan 01 14:25:58 oh, it seems only getFirstName and getLastName are returning null, however if I call toString on the GraphUser it retrieves the name o_O Jan 01 15:10:48 StingRay_ thx i will try now to do just one column instead of 4 int columns Jan 01 15:11:05 StingRay_ Jan 01 15:30:13 sheeeit... its like 40f inside my house Jan 01 15:33:18 Is there an Android book that is up to date and *isn't* the O'Reilly one (which is both out of date and focuses on writing a client for Twitter, which is about 180 degrees from what I want to do)? Preferably, a book / course that does a lot of graphics and audio? Jan 01 15:33:37 books suck dude Jan 01 15:33:48 Android is too much of a moving target Jan 01 15:33:51 you are honestly better off finding people have build said stuff before Jan 01 15:34:00 Chainfire s/android/software Jan 01 15:34:09 meh Jan 01 15:34:22 books about AS/400 should be pretty accurate still Jan 01 15:35:02 saying all software is too much of a moving target for book knowledge ... Jan 01 15:35:49 well android basics are fine in a book, but if you want something really specific, shit is changing at a rapid pace Jan 01 15:35:55 language itself hasnt changed Jan 01 15:36:06 core concepts like view inflation and custom drawing arent really any different Jan 01 15:36:09 nor is the sound Jan 01 15:36:24 but really if you want something that specific why not just find samples on the net Jan 01 15:36:30 they may not go into the basics of why Jan 01 15:41:22 I wonder if he's making a game ... :) Jan 01 15:42:37 if thats the case he could look at replica island and also the video tuts about the game architecture Jan 01 15:42:49 it may not be the KIND of game hes trying to build Jan 01 15:42:55 but it talks about drawing and sound Jan 01 15:57:20 hi Jan 01 15:57:48 anyone aware of an issue with touchevents on live wallpaper on devices using touchwizz ? Jan 01 15:58:26 Im testing my live wallpaper on a sgs1 running android 2.2 and it seems that Im not receiving touch events Jan 01 16:07:20 what's the file path for when you call Activity.openFileInput? Jan 01 16:20:43 write some test code ... openFileOutput() and see where the file winds up? heh or try stackoverflow for clues Jan 01 16:20:45 http://stackoverflow.com/questions/12751478/can-not-open-files-with-openfileinput-saved-via-openfileoutput Jan 01 16:21:24 the debugger doesn't give a file path for the FileDescriptor that openFileOutput() returns Jan 01 16:21:34 hence why I asked Jan 01 16:21:40 application centric Jan 01 16:21:57 but its basically into your your apps private storage area Jan 01 16:21:58 data-myapp Jan 01 16:22:16 unless you specify other location Jan 01 16:23:17 thanks Jan 01 16:29:06 hey al Jan 01 16:29:08 all Jan 01 16:29:16 I need some help please Jan 01 16:30:03 im creating an app that identify something through sensor Jan 01 16:30:10 now I get the result Jan 01 16:30:31 but i want my app 1st to open bluetooth when app is opened Jan 01 16:30:56 and when connected to start sending values by mail Jan 01 16:31:00 by bluetooth Jan 01 16:31:11 can u help Jan 01 16:31:29 i would try if i could Jan 01 16:31:37 but you havent asked a question really Jan 01 16:31:50 or is your question lots of statements ? Jan 01 16:32:12 sorry, should actually ask.... "what do you need help with ?" Jan 01 16:32:56 so, I'm seeing something odd - I try to read from the private storage a file that shouldn't exist Jan 01 16:33:13 the call to openFileInput passes a supposedly valid FileInputStream Jan 01 16:33:19 and reads what looks to be garbage in Jan 01 16:33:36 naturally this causes problems, and I'm struggling to figure out where it's reading the file from Jan 01 16:33:54 I wanted to try deleting the file manually and then see what happens, but that's not happening Jan 01 16:33:54 I have create a new class which extends AsyncTask, now I want to access the UI in onPostExecute(), what do I pass to the class constructor to do so? The activity from which the AsyncTask is created? Jan 01 16:34:20 sounds good Jan 01 16:36:55 Pfhoenix what are you passing to openFileInput ? Jan 01 16:36:59 the string path ? Jan 01 16:39:24 a filename Jan 01 16:40:23 and even though the file dont exist you have a !=null InputStream? Jan 01 16:40:29 yep Jan 01 16:40:34 hmmm Jan 01 16:40:38 as far as I know the file doesn't exist Jan 01 16:40:45 which is why I was asking what the path is, so I could check Jan 01 16:40:53 well, create a File object from your path Jan 01 16:40:58 path=filename Jan 01 16:41:29 File.exsts() Jan 01 16:41:38 let me check that Jan 01 16:41:50 File.getAbsolutePath() Jan 01 16:42:18 File.getTotalSpace() Jan 01 16:42:41 cause if it dont exist you should get false, null, 0 to those Jan 01 16:42:48 respectively Jan 01 16:42:49 1st i need to open bluetooth Jan 01 16:43:12 when my app is opened Jan 01 16:43:58 it says it exists Jan 01 16:46:09 actually, the exists check is failing Jan 01 16:47:22 so, if the file doesn't exist, why am I getting a non null input stream? Jan 01 16:49:47 I guess I shouldn't rely on calling Activity.openFileInput without checking if the file exists first Jan 01 16:51:06 ah ok, I can call getFD(), and if an exception is thrown, the file isn't there Jan 01 16:51:12 thanks for your help, StingRay_ Jan 01 16:51:19 np Jan 01 16:51:36 I'm actually impressed i could help since I aint a programmer :) Jan 01 16:51:37 hello stealth`_ Jan 01 16:51:58 hello StingRay_ Jan 01 16:52:05 Can a LinearLayout have a "pressed" appearance? Jan 01 16:52:46 StingRay_ : you helped in prompting further search directions Jan 01 16:52:48 so, you helped =) Jan 01 16:53:01 sometimes it's simply bouncing thoughts off of someone else that helps solve the problem Jan 01 16:53:01 any help for me Jan 01 16:53:03 ??? Jan 01 16:53:16 xyz87 : you're going to have to google Jan 01 16:53:17 Or maybe I want a borderless button Jan 01 16:53:30 i have been googling for days Jan 01 16:53:49 anyway it seems that you dnt want to help Jan 01 16:53:55 thank in advance Jan 01 16:53:59 for ur politness Jan 01 16:54:04 good bye Jan 01 17:05:24 anli you can do whatever you want to a lin layout, setBackground etc Jan 01 17:05:30 to have any look you want Jan 01 17:06:06 you can also have it use a viewStyle that is a button style, and make it clickable, touchable etc Jan 01 17:06:33 ok Jan 01 17:08:28 If I am using the progressBar circle only to display activity or no-activity, is it sufficient to set the visibility each time? Jan 01 17:09:21 tis maybe what I would do Jan 01 17:11:55 set visibility for what, the circle itself? Jan 01 17:12:28 Pfhoenix: yes Jan 01 17:14:52 why would you need to reset its visibility? Jan 01 17:16:02 Pfhoenix: I have a button which makes a HTTP get request, when I press it I make the progress bar visible and if the get request finishes I make it invisible again Jan 01 17:16:11 aw man, why did Android have to waste a good name like StorageManager on an OBB handler? Jan 01 17:16:29 platzhirsch : then clearly you need to set it to visible if you're hiding it yourself Jan 01 17:16:46 Pfhoenix: alright Jan 01 17:34:51 I have a fragment that's attached to a framelayout existing in landscape UI only (defined in xml files). Works great on portrait when I open the app. If I turn my phone to landscape, still works great. Turning back to portrait causes a null pointer exception when trying to setText one of the textviews on the fragment in onActivityCreated Jan 01 17:34:55 how do I fix this? Jan 01 17:35:03 view is inflated in onCreateView Jan 01 17:35:03 Back.... and no, not a game per se. A musical instrument application. Jan 01 17:35:59 it seems that setTouchEventsEnabled does nothing on android 2.3+ Jan 01 17:36:11 anyone aware of this issue ? Jan 01 17:36:38 for live wallpapers :) Jan 01 17:47:28 has anyone tried doing an android project in jruby? i wonder if it fits well. Jan 01 17:56:54 Not android-specific; but is there some library that automatically generates a story given a sequence of (32) bytes? The vague idea I have is to have a more memorable way to "recall" key fingerprints; and I'm hoping some sort of automatic story generater might do the trick. Jan 01 17:59:39 <[twisti]> how would that work in practice, kbs ? wouldnt one typo in the story invalidate the resulting fingerprint ? Jan 01 18:00:41 [twisti]: the idea would to display the story when presented with a new public key -- so the application would consistently generate the same story for any given fingerprint Jan 01 18:01:04 <[twisti]> ah, so people would read it and notice if it differs ? Jan 01 18:01:08 <[twisti]> interesting idea Jan 01 18:01:16 right, that's the theory at least Jan 01 18:01:45 <[twisti]> shouldnt be too hard to find a random story generator, but obviously not something with a random seed that matches fingerprints Jan 01 18:02:43 <[twisti]> of course you could just use the hashcode of the fingerprint as seed, but that would probably lower security considerably Jan 01 18:02:44 that's what I ran into as well. I spent a couple of days poking around story generators; there are a lot of interesting models and papers around; but not something focused on "mapping" a sequence of bytes into a somewhat memorable story Jan 01 18:03:37 right. I was hoping for something more directly mappable to an arbitrary sequence of bytes, if you see what I mean; rather than a straight RNG that's seeded with the fingerprint Jan 01 18:04:02 so, some selection of characters to the value of a byte or two, etc. Jan 01 18:05:00 that sounds like compression Jan 01 18:05:13 <[twisti]> well, that bears the risk of the story only having a minor change if the fingerprint is different but similar Jan 01 18:05:15 so most random number generators generate predictable streams for a given starting value Jan 01 18:05:27 hence why rand() returns the same sequence of pseudo-random Jan 01 18:05:29 <[twisti]> youd generally want the story to be completely different if the fingerprint differs even by one bit, no ? Jan 01 18:05:29 [twisti]: true, it does have that flaw if done exactly like that Jan 01 18:05:43 so you just need to munge your fingerprint in a predictable way and seed your PRNG Jan 01 18:05:45 dragorn: That's because they're PRNG, not RNG Jan 01 18:06:01 maslen: yes, which is my point Jan 01 18:06:29 take the fingerprint, feed it into a HMAC of some sort (md5, sha1) to give it a good mixing Jan 01 18:06:36 and feed that into your PRNG, done Jan 01 18:07:04 doing a hash pass will prevent single-bit-change similarity, even if somehow your PRNG is susceptible to that Jan 01 18:07:33 well the fingerprint itself is generally a sha hash of the public key parameters; so I think any bad guy who could manage to get a 'near' collision could also munge the double hashing Jan 01 18:08:41 well, sha1 (and even to a moderate extent, md5) collisions arne't easy. I can't imagine someone doing collision generation for a game Jan 01 18:08:49 unless somehow there's a profitable reason Jan 01 18:08:54 and it'd have to be moderately profitable Jan 01 18:09:55 yep, quite true. So I think it might be adequate [for my purposes at lest] to assume that I have some random sequence of bytes that need to map to a predictable story of some kind; and also assume that the sequence of bytes won't be "too similar" Jan 01 18:11:13 some sort of seeded RNG is a possibility; I'd also need to ensure that the set of generated stories will also roughly be similar to the number of possible keys I suppose. Jan 01 18:11:32 well ultimately it's all obfuscation Jan 01 18:11:49 so you could encode a block w/ a private key (or even just a private XOR) Jan 01 18:12:13 you could concat some things and hash them internally, all depends what you're going for I guess Jan 01 18:12:42 kbs : are you talking about randomly generating a story for a game? Jan 01 18:12:53 or generating a plotline? Jan 01 18:13:15 Pfhoenix: I want something more memorable than a sequence of hex bytes to represent the fingerprint for a public key. The vague idea is to map any given fingerprint to a story, so it's more easily 'recognizable' than a sequnce of hex bytes Jan 01 18:13:34 eg: when you ssh to a new machine, it says some hex bytes for a host fingerprint. Jan 01 18:13:49 kbs: well, a) figure out how many bytes you need to generate your story Jan 01 18:13:53 I'd like to convert that to something that's more memorable, so I can recognize it a bit better Jan 01 18:13:59 then b) how many variations of representation you want Jan 01 18:14:06 and chunk up the bytes and make representations Jan 01 18:14:09 either icons, words, etc Jan 01 18:14:48 if you seed a PRNG then you only need the # of possible variants, if you encode state then you need a lot more Jan 01 18:16:26 One crazy thought I also toyed with, is to map each 2-byte sequence to a particular sentence in a sequence of well-known text. Eg. first sentence is the 0x7a90th sentence in war and peace, the second sentence is the 0x9217th sentence in the king james' bible, etc. Jan 01 18:16:37 but i'd much rather have something that's vaguely sensible :-) Jan 01 18:17:15 the simplistic story generators I've seen that geerate (noun verb object) type sentences are not particularly sensible Jan 01 18:18:16 so guess I'm looking for pointers or both 'interesting' story generators, as well as ways to map a sequence of bytes into a particular story-line generated by sucha generator... Jan 01 18:18:39 well NLG is hard. you could try uh... bayesian chains Jan 01 18:18:47 to make vaguely sensible text Jan 01 18:18:53 but it'll still be kind of nonsensical Jan 01 18:19:12 bayesian and markov chains Jan 01 18:19:27 ok, so you're talking about actual generation of text-based plotlines Jan 01 18:19:36 but generally you'd have to give it all the text and pick options Jan 01 18:19:47 I hope you realize that your difficulty isn't in how randomly you generate stuff Jan 01 18:19:50 you'd probably be better off with a huge database of choose-your-own-adventure style stuff Jan 01 18:20:05 but for it to not be absolute ass, you need to sort out basic relationships Jan 01 18:20:21 language heuristics as well as inter-personal relationships and their average behaviors/consequences Jan 01 18:20:23 Pfhoenix: yep, and agree with all points you make. The underlying aim is just to have something that is memorable; so maybe there's a different idea that I'd love to learn about. Jan 01 18:20:38 anything can be memorable if it's random enough Jan 01 18:20:48 but if you want something people will enjoy, don't aim for "memorable" Jan 01 18:20:51 aim for "believable" Jan 01 18:21:00 or "sensible given certain starting conditions" Jan 01 18:21:56 generating a random sentence is trivial Jan 01 18:21:59 Pfhoenix: an chance you have any pointers to systems/papers that you've looked at? would like to learn how they approcch it Jan 01 18:22:17 I don't; this is simply a topic I've put some thought into on my own Jan 01 18:22:36 but I think it ought to be approached from a psychological perspective Jan 01 18:22:42 on the parts of the characters in your story Jan 01 18:22:57 if you want a truly random story, generate a list of characters first Jan 01 18:23:09 sort out their relationships to each other, including current and past histories Jan 01 18:23:30 then you need a setting that fits those histories and gives the characters a reason to act Jan 01 18:23:59 you could also mix it up, like putting future characters in a 1700's setting to make it more surreal. Jan 01 18:24:30 well Jan 01 18:24:42 if you're talking about generating an entire story, from start to finish Jan 01 18:24:48 why not? ;) Jan 01 18:24:49 then I highly recommend you stop right now Jan 01 18:24:58 hehe Jan 01 18:25:00 because a story isn't just the plot points Jan 01 18:25:03 it's writing style Jan 01 18:25:12 character progression Jan 01 18:25:21 it's highly complex Jan 01 18:25:24 it's just like generative music; all the musicians fall into the uncanny valley Jan 01 18:25:51 I mostly need a much simpler thing, since it's purpose is far more limited -- an auto-generated limmerick might do the trick for instance :-) Jan 01 18:25:52 and either you do a hell of a lot of hardcoding (specific events, specific character interactions, specific character behavior given set of starting conditions) Jan 01 18:25:58 limmericks are easy Jan 01 18:26:13 start with a word dictionary, crosslink by quality of rhymes Jan 01 18:26:27 each word has a syllable count Jan 01 18:26:33 and you have a known limmerick structure Jan 01 18:26:43 ABBAA? Jan 01 18:27:03 or ABABA Jan 01 18:27:10 or ABABC Jan 01 18:27:33 or ABC if you want haikus Jan 01 18:27:41 there are many recognized patterns Jan 01 18:27:47 sorry, AABBA Jan 01 18:28:05 it's nothing google can't help you categorize Jan 01 18:28:35 I was talking about limericks Jan 01 18:28:37 one issue I've run into with whatever little I've seen so far, is having a database with sufficient variability, and I'm stumped. A sha fingerprint has 40 bytes; and I need a cast of 65k names just to get 2-bytes mapped into names Jan 01 18:28:59 I think you're focusing too much on the non-essential aspect of what you want Jan 01 18:29:10 generate the story to a satisfactory level first Jan 01 18:29:25 then worry about optimizing how you compress whatever key variables you generate Jan 01 18:29:37 actually, I don't want to compress them at all Jan 01 18:29:54 hashing IS compression Jan 01 18:29:56 just one-way Jan 01 18:30:01 kbs: by compress, he means to make a small key that uniquely refers to your story. Jan 01 18:30:14 Pfhoenix++ Jan 01 18:30:18 I already have the key -- it's a sha fingerprint Jan 01 18:30:26 i can't compress that once again into a smaller keyspace Jan 01 18:30:26 what does your key do? Jan 01 18:31:02 it's the fingerprint for a public key - eg: what you see when you ssh into a new machine Jan 01 18:31:33 no Jan 01 18:31:34 not what it is Jan 01 18:31:42 what it MEANS to your story generation Jan 01 18:31:55 each such key should map to a unique story Jan 01 18:32:11 I think you've decided on a solution to a problem you haven't even defined yet Jan 01 18:32:37 :-) Jan 01 18:32:58 ok, back to being productive for me. Jan 01 18:33:06 :) Jan 01 18:52:09 Can someone tell / show me some sample code to show a text string that is ellipsied properly using android.text.StaticLayout Jan 01 18:52:10 ? Jan 01 18:56:24 Must my class that receives the calls declared in the AIDL file be a subclass of the AIDL.Stub ? Or is there some interface I can use instead? Jan 01 18:59:25 AmandaC : I'm not seeing anything generally useful via google Jan 01 18:59:35 other than the StaticLayout developer page Jan 01 18:59:55 Pfhoenix: yeah, and it's constructors are undocumented, and I'd rather not wade through the code for it Jan 01 19:01:05 AmandaC: fwiw, I have some code here, extracted - https://gist.github.com/8f7473f54164cffc4ba3 I can't recall if it's ellipsized, but I think it is. checking.... Jan 01 19:03:25 yeah, I belive that code does ellipsize. It's the second to last parameter to the constructer Jan 01 19:04:55 the spacingmult and spacingadd are essentially line-width specifications. It takes the default font line_height (say, h) and turns it into h*spacingmult+spacingadd Jan 01 19:05:26 I think the other parameters are reasonably self-documenting [for some definition of self-documenting at least :-)] Jan 01 19:06:06 a linear layout will automatically scroll when the content exceeds the screen size, yeah? (in the vertical direction) Jan 01 19:06:18 (oops -- I meant to say, line-height specs, not line-width specs) Jan 01 19:06:45 speakingcode-wor: nope -- you'll want to embed it within a scrollview Jan 01 19:07:05 or enable isScrollContainer Jan 01 19:07:21 ah, never knew that! thanks :-) Jan 01 19:09:09 * AmandaC inserts the paramaters, changes her app from "Get current location" to "get data for HERE!" and reinstalls Jan 01 19:10:37 Hmm, doesn't seem to work Jan 01 19:10:45 thanks kbs Jan 01 19:11:22 StingRay_: hm, does setting isScrollContainer true on a linearlayout actually make it scrolling? I should try it; the docs seem to indicate it does something slightly different Jan 01 19:12:39 kbs: do you know if it does it at word boundries or something? Jan 01 19:13:10 AmandaC: I don't believe so; what is the behaviour that you see? Jan 01 19:13:45 kbs: it's wrapping to two lines instead of ellipsiing it Jan 01 19:14:34 * AmandaC tries changing spacingadd to 0 Jan 01 19:16:22 AmandaC: so the behaviour of staticlayout is to fill any available space on the canvas, until it can't do it anymore Jan 01 19:16:23 If you want a single-line, then you may need to clip the bounds of the canvas appropriately Jan 01 19:16:23 oh, I didn't htink of clipping, I was about to go and make a second bitmap! Jan 01 19:16:40 it might have been better to paste my full code :-) let me do so fwiw Jan 01 19:17:04 oi Jan 01 19:17:06 it's building now, so we'll see Jan 01 19:17:25 I NEED SOME ANSWERS NOW Jan 01 19:18:03 lol ron_frown Jan 01 19:18:07 https://gist.github.com/3d09c7d38f333559edfc is the method [somewhere I need to draw the name for a picture, and this bit does it.] Jan 01 19:18:45 I like all the "women" that pop around these parts Jan 01 19:19:34 Anyone here live? Jan 01 19:20:02 wahibdon, no Jan 01 19:20:54 Haha. I just wanted to chat and I hate chatting by myself. Makes me feel like a crazy person Jan 01 19:21:23 Do AIDL calls raise a DeadObjectException or a RemoteException ? Jan 01 19:21:39 The docs claim the former, Eclipse claims the latter. Jan 01 19:22:05 wahibdon tho this channel is not too uptight about straying from topic a little bit, it's generally best to focus on android development related Q&A Jan 01 19:22:14 I was wondering if anyone could point me to some good info on making my own roms. Jan 01 19:22:21 #android-root Jan 01 19:22:26 Well that is what I wanted to chat about Jan 01 19:22:30 wahibdon: #android-root and XDA (xda even more so) Jan 01 19:22:41 also search for cyanogen's *dev* channel Jan 01 19:22:47 hey, i've got a few buttons and a ImageButton set in a table layout with weights. when i set an image to the ImageButton it makes the button expand and screw up my layout. is there a way to restrict the growth of the button? Jan 01 19:23:10 I will go to android root. Jan 01 19:23:59 Is the info on xda in some general android dev forum? I find this kind of chatter in device dev forum is met with resentment. Jan 01 19:24:46 Well, using the clip bounds it cuts it off, but it doesn't ellipsize it pretty-like Jan 01 19:24:50 can also look at source.android.com Jan 01 19:25:11 (wahibdon) Jan 01 19:25:44 wahibdon: no idea Jan 01 19:26:33 wahibdon just go compile source, and play with trying to make your own changes Jan 01 19:26:42 learn about repo/git and the android build process Jan 01 19:27:00 what would be a preferable way to ellipsize it? curious... Jan 01 19:28:11 I want to modify existing roms. Jan 01 19:28:27 kbs: With the expected "..." at the end to indicate that it's cut off, I'm trying a temporary second Bitmap to render to, then render that to my primary canvas, now Jan 01 19:28:37 I want to make a touchwiz rom for my note that looks like a tablet. Jan 01 19:28:48 wahibdon: then go to #android-root and xda Jan 01 19:28:57 Hmm, that doesn't wan to work, either Jan 01 19:29:10 I will. Thanks for the advice. Jan 01 19:29:28 So the actual ellipsizing seems to be adequate then? Jan 01 19:29:40 it doesn't actually ellipsize it for whatever reason Jan 01 19:29:47 sometimes rom-related questions go well here, but those questions tend to be android internals stuff, not modifying a firmware Jan 01 19:29:49 weird Jan 01 19:29:49 it just cuts off due to the clipping rectangle Jan 01 19:30:11 is it possible that the widths in the staticlayout are diffirent from th eclip bounds? Jan 01 19:30:13 AmandaC : did you set the ellipsis rectangle? Jan 01 19:30:22 Pfhoenix: how does one do that? Jan 01 19:31:45 hmm, not sure, as StaticLayout only seems to have getEllipsizedWidth() Jan 01 19:31:51 no setter Jan 01 19:32:10 Chainfire: are you here? :) Jan 01 19:32:34 i'm betting that the widths in the staticlayout don't match the clip bounds ;-) Jan 01 19:32:38 ... or better - has anyone here experimented with getting USB host on N4? Jan 01 19:34:02 p_l: curious -- how long have you had the nexus 4, and thoughts on how you like it? Jan 01 19:34:18 (i'm considering getting one; hopefully to also use for android dev) Jan 01 19:34:47 since... 28th of December Jan 01 19:34:55 ah. :-) Jan 01 19:35:03 it was stuck in Customs for a bit Jan 01 19:35:40 as for my thoughts? "HOLY SHIT, IT'S GOT *LUDICROUS* SPEED!" Jan 01 19:36:05 that was my first thought once I got past the setup screen :) Jan 01 19:36:17 nice :-) if I can ask, what was your previous phone? Jan 01 19:37:10 p_l : your device doesn't USB host Jan 01 19:37:26 but if you buy a USB OTG cable, devices you hook up to it will act like it does Jan 01 19:38:12 Pfhoenix: only if the device supports USBOTG, which, I don't think the N4 has the hardware for ( power OUT through the USB port ) Jan 01 19:38:22 * AmandaC remembers hearing something abou that, anyway Jan 01 19:38:26 the N4 doesn't? I thought all Nexus devices did Jan 01 19:39:03 whoops, looks like you're right Jan 01 19:39:09 N4 doesn't supply power through the USB port Jan 01 19:39:26 well, not enough to be USB host Jan 01 19:43:05 Pfhoenix: USB OTG *is* USB host - there's a switcher chip inside that reacts to different impedance on one of the pins and switches over to HOST controller instead of GUEST one :) Jan 01 19:43:51 the question is whether I can provide external power (for example self-powered device) and use host mode Jan 01 19:45:35 then you know more about USB workings than I do =) Jan 01 19:46:02 and I don't know, I've only known about needing the OTG cable to use USB devices with my tablet Jan 01 19:47:07 I do remember that from diving into modding my old phone. The chipset had OTG docs, but the phone itself didn't support that Jan 01 19:47:20 some people wondered if soldering some extra stuff might provide OTG support :) Jan 01 19:48:02 in general, some phones have fun extras put on the USB socket that uses various resistors to signal which option to enable Jan 01 19:49:45 for example, on my old phone someone found support for media/car dock controls, mentions of routing line out over usb socket, and (that was actually tested) serial port that provided classic serial console from bootloader upwards Jan 01 19:51:35 Pfhoenix: there are more problems with the n4 Jan 01 19:51:52 my understanding is because they use a video-over-usb chip (ie, a special plug kicks it into hdmi, not usb) Jan 01 19:51:59 and they share the ID pin for OTG Jan 01 19:52:09 there cannot be OTG support in the HW Jan 01 19:52:39 dragorn: only if the switching signal on ID pin is the same for display out and OTG Jan 01 19:53:04 p_l: and they share the ID pin for OTG Jan 01 19:53:07 all the things I mentioned were selected with single ID pin as well :) Jan 01 19:53:16 dragorn: *signal*, not which pin Jan 01 19:53:26 the OTG switch isn't particularly granular Jan 01 19:53:32 you can indicate what kind of charger you are Jan 01 19:53:35 and host mode Jan 01 19:53:37 and that's about it Jan 01 19:53:57 * p_l goes to search the spec Jan 01 19:54:08 Pfhoenix: you can overcome the device not supplying host voltage, though it's a hassle. I'm working on building some HW which fixes it on moto, for instance Jan 01 19:54:22 interesting Jan 01 19:54:31 b/c their host mode requires the otg pin, power backfed into the phone, and a hub b/c even with power, it rejects all enumeration Jan 01 19:54:36 unless a powered hub is in the chain Jan 01 19:54:58 so you have to supply your own powered hub to get the device to act like a host? Jan 01 19:55:02 my hw works, working on tweaking before looking into manufacturing Jan 01 19:55:03 yes Jan 01 19:55:14 that's rather limiting Jan 01 19:55:20 though if you want a desktop setup, not terribly so Jan 01 19:55:20 the board I made takes USB from the phone, USB from a battery pack, and outputs to a device Jan 01 19:55:29 yeah they do it b/c of their dock+charging mechanism Jan 01 19:55:34 the phone retains charging in host mode Jan 01 19:56:19 the only reason it's worth designing hw to do this is b/c w/ a switch flip, you can also use it to prevent a usb device from drawing from the phone battery on a phone with normal host Jan 01 19:56:22 can the device charge while in host mode? Jan 01 19:56:34 if you have it hooked up to a hub/splitter to a charging endpoint? Jan 01 19:56:38 Pfhoenix: moto can. Others can not. Jan 01 19:56:52 hrm Jan 01 19:56:57 in theory you might be able to charge via the pogopin bus on the nexus stuff Jan 01 19:57:02 but I haven't tried it Jan 01 19:57:09 what's the pogopin bus? Jan 01 19:57:11 I don't know how segregated it is from the usb power bus Jan 01 19:57:17 look at the side of a galnex, n7, n10 Jan 01 19:57:19 or i think a n1 Jan 01 19:57:24 it has little exposed copper dots Jan 01 19:57:29 for charging in a dock Jan 01 19:57:48 oh, look at that Jan 01 19:57:56 on the n10 it's a maglock dock point Jan 01 19:58:09 n1 didn't have it, afaik Jan 01 19:58:11 which looks like it exposes power, usb, spdif audio Jan 01 19:58:12 now I need to google docking stations for my N7 Jan 01 19:58:27 p_l: I think it has a very limited one; at least, when I was looking for the n10 pinout last night I saw ppl talking about it Jan 01 19:59:16 p_l: but the n1 is over in the barn and I'm not and it's snowy and I don't care :P Jan 01 20:00:38 Pfhoenix: anyhow I don't know if the docking pin power bus is directly linked to the usb bus Jan 01 20:00:42 mmm, any thoughts about AndEngine? Jan 01 20:01:28 socket : I've played with it a little bit Jan 01 20:01:36 if you aren't keen on writing your own engine, use it Jan 01 20:01:40 it has enough basic stuff Jan 01 20:01:54 it doesn't do anything I haven't written 30 times before, though Jan 01 20:02:14 so it can only do simple stuff? Jan 01 20:04:47 socket : it'll do what you want Jan 01 20:05:22 ok, thanks Jan 01 20:17:23 dragorn: if I get the details right, the chip used in N4 supports passthrough of USB OTG Jan 01 20:17:56 now I just need to hunt the teardown for exact chip number :)( Jan 01 20:18:12 p_l: if you find it I'dbe interested Jan 01 20:18:20 p_l: I read a bunch on xda that it wasn't fixable Jan 01 20:18:58 dragorn: was it from real devs? :) Jan 01 20:19:42 fast, unrelated question: Anyone know of a good IRC channel for linux kernel dev (not specifically android)? Jan 01 20:19:52 p_l: well, I don't have a n4, so i can't force the issue :P Jan 01 20:20:21 p_l: and telling a friend "hey, let me backfeed vcc into your phone" wasn't met with a great reception Jan 01 20:20:29 dragorn: nah, in general, I find that there's preciously little of real developers in modding Jan 01 20:20:43 p_l: agreed, thought what I read made sense Jan 01 20:20:50 may turn out to be inaccurate Jan 01 20:20:55 android rom development is the new mirc scripting ;) Jan 01 20:20:55 http://www.analogix.com/pdf/ANX7808_PB.pdf <--- ok, this is the chip in N4 Jan 01 20:20:58 I did notice google removed all mention of otg on the device Jan 01 20:21:30 dragorn: there *is* possibility that LG screwed up and didn't place a switcher for host pins Jan 01 20:21:56 p_l: wouldn't surprise me Jan 01 20:22:27 but for long time I didn't see any mentions of what the side contacts on GNex are for, and only recently found some accessories that connect there Jan 01 20:24:00 btw, ifixit gives N4 a 7/10 repairability score Jan 01 20:25:07 hmm... they report that it has a GLONASS chip Jan 01 20:26:13 there'll be 4 satnav systems in a couple of years Jan 01 20:26:41 wonder if they'll have chips with gps, glonass, galileo and the chinese system Jan 01 20:28:18 well, I heard that Galileo already got some interoperability talks with GPS, though it doesn't have SA signal Jan 01 20:29:15 (and afaik won't have EU variant of it) Jan 01 20:29:52 OK, N4 works with GLONASS (just tested) :D Jan 01 20:31:40 the SoC has OTG listed on features, but I haven't found the pinout yet Jan 01 20:34:56 Anyone know where I can download version 0.9.8 or 0.9.7 of ADT Plugin for Eclipse? Jan 01 20:34:57 The current repo has version 21 Jan 01 20:35:21 trying to work with what I got, and that's an ancient eclipse and an acient SDK. Which took 2 days to download :P Jan 01 20:37:55 YES! Thank the Duck (duckduckgo.com) http://stackoverflow.com/questions/4710107/where-can-i-find-older-versions-of-eclipse-adt Jan 01 20:37:55 i have one really incredible confusing stuff now going on... so i use timestamp for date and now trying to write it as date... Jan 01 20:37:56 Long timestamp = System.currentTimeMillis(); Date date1 = new java.util.Date(timestamp); Jan 01 20:37:56 Date date2 = new java.util.Date(timestamp - 86400*1000*20); // 86400*1000 = 1 day , is okay result Jan 01 20:38:02 nvm :) Jan 01 20:38:29 also http://www.oldapps.com/adt_plugin_for_eclipse.php?old_adt_plugin=8382 appears to be useful Jan 01 20:38:32 but when i put instead of 20 number like 30 it goes with time in future so instead of 1st december it writes 21 january :S Jan 01 20:44:24 If I have a static variable, is that value shared among Services running in different processes? Jan 01 20:45:08 no Jan 01 20:45:19 each process is running its own stack+heap Jan 01 20:45:24 That makes sense Jan 01 20:45:36 your static variable is tied to the memory space per process Jan 01 20:45:44 otherwise, that'd be downright magical Jan 01 20:46:01 That's true; but Android is still very magical to me. Jan 01 20:46:57 * maslen still has to get this AIDL working Jan 01 20:47:53 * maslen is not used to working with multiple processes Jan 01 20:48:30 maslen : I'm guessing you've already read http://developer.android.com/guide/components/aidl.html ? Jan 01 20:48:34 Of course. Jan 01 20:48:45 and multithreading can be a real mind-wreaker Jan 01 20:48:49 See.. the code compiles. But it immediately throws a null pointer exception Jan 01 20:48:59 I'm used to multi-threading, not multi processes :) Jan 01 20:49:01 pastebin Jan 01 20:49:35 Pfhoenix: Only if you're willing to take a peek at it. I haven't pastebinned it yet because of it's complexity. Jan 01 20:49:49 I'm willing to take a somewhat quick peek Jan 01 20:49:51 (here goes nothing) Jan 01 20:50:02 honestly, I'm not going to spend half-an-hour on it =) Jan 01 20:50:57 dragorn: heh, a thread on XDA included a post that actually did the right thing and looked in the source Jan 01 21:03:05 Pfhoenix: This is as simple as I can make it. Please let me know if I left out something important in the paste http://pastebin.com/v11BWhQ0 Jan 01 21:05:26 dragorn: I'm going to try building a power feed for the OTG connection and re-enable it in the software Jan 01 21:05:35 (fitting the N4, that is) Jan 01 21:06:55 maslen : looking now Jan 01 21:07:00 thanks Jan 01 21:07:27 p_l: let me know how it goes Jan 01 21:07:42 maslen : do you have any idea where the code is throwing the exception? Jan 01 21:07:45 Hi - My company is investigating potentially using company-owned Android devices mounted in company-owned vehicles to do GPS tracking for the vehicles using the android devices. I'm trying to figure out if there's a reliable way to prevent GPS being turned off, or to automatically turn it back on if it's been disabled? We're looking at using Samsung devices, which makes available a GPS toggle button outside the settings app, which Jan 01 21:07:46 Note: When it calls onServiceConnected, the service that's passed in is not null. The auto-generated Java code for the AIDL file is what raises the NPE Jan 01 21:07:57 Pfhoenix: * Jan 01 21:08:14 than just locking down the settings app. I've seen some solutions which exploit bugs in various Android versions, but I'm hoping for a more reliable/universal solution? Jan 01 21:08:22 have you taken the generated file and disassembling it? Jan 01 21:08:36 pm2: I think you can do so, especially with rooted firmware Jan 01 21:08:42 Pfhoenix: Huh? It generates a Java file from the AIDL file, no dissassembly neccessary Jan 01 21:08:56 have you looked at that file then? Jan 01 21:09:02 or is that what I'm looking at? Jan 01 21:09:03 or to be more specific - you don't need to leave "root" on, as long as you load your software with system permission level Jan 01 21:09:10 p_l: yeah, I think we're trying to avoid rooting except as a last resort, but it sounds like that may be the only option... Jan 01 21:09:20 Yeah, but the issue is more likely with my code than with their auto-generated code. Jan 01 21:10:12 yeah Jan 01 21:10:17 where is ChimeraServiceInterface code? Jan 01 21:10:24 you're calling a static via stub right? Jan 01 21:10:32 Is SharedPref the best way to store encryption keys? Jan 01 21:10:43 if you don't care that anything can access it, sure Jan 01 21:11:01 Pfhoenix: ChimeraServiceInterface is one of the AIDL files Jan 01 21:11:03 pm2: well, you don't need to leave the devices rooted Jan 01 21:11:18 you only need to load part of your software into /system Jan 01 21:11:29 I'll give that a try, thanks Jan 01 21:11:30 Pfhoenix: But I do! What would be the optimal way? Cache? Jan 01 21:11:51 pm2: also, I think you can re-enable GPS with some permissions, but again, those might require being in /system Jan 01 21:11:53 lighthazard : depends on what lifecycle you want for your saved key Jan 01 21:11:59 cache gets removed with the app on uninstall Jan 01 21:12:04 preferences do not Jan 01 21:12:09 preferences stick around Jan 01 21:12:47 That's fine with me. Cache ist he way to go then. It's supposed to be something that the user enters once, and it's stored for as long as the app is installed. Jan 01 21:13:45 then cache is the way to go Jan 01 21:13:58 geez, there's so much butthurt on xda forums Jan 01 21:14:48 maslen : can you pastebin your ChimeraServiceInterface code? Jan 01 21:15:22 What about the KeyChain API? Is it any different? Jan 01 21:18:00 lighthazard : don't know, I haven't looked into that yet Jan 01 21:18:07 Pfhoenix: It's just a big AIDL file Jan 01 21:18:09 kk, looking into it now Jan 01 21:18:16 There's no "code" in it Jan 01 21:18:19 maslen : the error is in there somewhere Jan 01 21:18:32 because ChimeraServiceInterface.stub.whatever is what's throwing the error Jan 01 21:18:59 that's all auto-generated code :) Jan 01 21:19:15 dunno then =) Jan 01 21:19:35 unless service is null? Jan 01 21:19:40 It's not Jan 01 21:20:04 I think it's doing some sort of conversion along the way, and my types are wrong Jan 01 21:20:05 does service have to be initialized before usage? Jan 01 21:20:26 That's Android's job Jan 01 21:20:44 ok Jan 01 21:21:08 I need to run, I'll be back in two hours to continue working :( Jan 01 21:21:32 Thanks for trying. I'm pretty sure it's a type issue, that something is the wrong type, somewhere Jan 01 21:22:04 sorry I couldn't be more help Jan 01 21:44:11 http://stackoverflow.com/questions/14114480/making-an-https-connection-using-url-openconnection Jan 01 21:44:43 if someone could give me some pointers or even an answer to that question on HTTPS connections, I'd very much appreciate it :) Jan 01 21:49:19 Anoia: You need to generate your keystore with Bouncy Castle Format and the keystore type must be BKS Jan 01 21:49:27 yes Jan 01 21:49:38 did you read the question where I say I did that? Jan 01 21:49:39 and you generated it with the same version that android uses? Jan 01 21:49:54 I think so Jan 01 21:49:54 You know, I totally missed the -storetype BKS in there Jan 01 21:49:58 :p Jan 01 21:50:45 sorry, I gave an ansy answer Jan 01 21:50:48 Can't help, but I would say you check your versions and make sure they're the same, it might affect it Jan 01 21:51:35 I THINK 2.3 uses 1.45 Jan 01 21:51:56 which I;m currently using to generate the keystore Jan 01 21:52:36 What I'm finding is that it's 1.46 Jan 01 21:52:58 2011: Android 4.0 is updated to Bouncy Castle 1.46. It remains a subset of the upstream release. As before, its not part of the public API, but implementations should be accessed through the java.security.* etc APIs. Jan 01 21:56:05 my device is 2.3 Jan 01 21:56:40 then yes, 1.45, i am of no use to you, good luck :( Jan 01 21:57:13 have you had to do similar? Jan 01 21:57:18 did it "just work"? Jan 01 21:57:24 Pretty much lol Jan 01 22:20:58 frankly, with all the storage options, I'm surprised there isn't a publicly available StorageManager class (yes, I know about the one that encapsulates OBB handing, but it was a terrible decision in naming on Google's part) Jan 01 22:22:44 Would probably be too hard to implement Jan 01 22:23:42 hmmmm Jan 01 22:23:44 "This is definitely the best formulated question I've ever seen, on any site" Jan 01 22:23:52 I'm sure I;ve seen better... Jan 01 22:23:57 Aren't those responses the best though!? Jan 01 22:24:20 yes, but not very helpful in answering it :( Jan 01 22:24:26 "Oh yes! An alert! Time to check if someone figured out the issue." "I AGREE WITH IT." "God damn it." Jan 01 22:25:52 exactly :) Jan 01 22:29:39 I find it odd that the Android storage documentation calls private app files two different things Jan 01 22:29:52 internal storage versus cache files Jan 01 22:29:56 when they're exactly the same thing Jan 01 22:34:45 oh I get it - the OS creates a specific cache directory that it then prioritizes for reclaiming space when needed Jan 01 22:43:38 Hello. I am writing a widget with a listview and it is working fine. I get the list of items and are able to populate it. First time user clicks, it works. The second time I got the error Cannot send pending intent Jan 01 22:44:12 What kind of flags should I set on pendingintent to have it fire every time for every item in the list? Jan 01 22:55:44 Anyone? Jan 01 22:58:05 is there ever a time when File.getPath() != File.getAbsolutePath()? Jan 01 22:58:41 Ghiottone: why not just make an intent for each item? Jan 01 23:00:08 dragorn, that's what I'm trying to do. I use setPendingIntentTemplate and setOnClickFillInIntent since it is a ListView Jan 01 23:00:37 dragorn, first click works fine, but the second does not Jan 01 23:01:45 I'm trying everything, from the pendingintent flags to setData with the url and setAction with systemTime Jan 01 23:01:50 but still no luck Jan 01 23:04:16 help! I've been stuck with this damn GridLayout for several hours now. No matter what I do I can't seem to remove the spacing in between the cells. any pointers? I tried putting the margins to 0, I called setUseDefaultsMargin(false); probably tried alot of other stupid stuff aswell Jan 01 23:07:51 I'm adding the GridLayout through java code, not from an xml. Jan 01 23:26:48 why does this: http://pastebin.com/MgikBDUr only add 1 lap? Jan 01 23:27:17 1 lap? Jan 01 23:27:34 One item to the listview Jan 01 23:27:38 zyngawow: what's in your listitems? Jan 01 23:27:43 listItems* Jan 01 23:27:46 Just a string with time Jan 01 23:27:55 ArrayList listItems = new ArrayList(); Jan 01 23:28:05 and how many entries are in there? Jan 01 23:28:48 Every time I click the button, one more Jan 01 23:28:51 It starts with 0 Jan 01 23:29:22 OK, so you click it once, it adds a lap, but then it stops, right? Jan 01 23:29:41 no matter how many times you click it, it won't add a new one Jan 01 23:29:42 * lighthazard looks Jan 01 23:29:43 the timer goes on, but if I click again, it doesnt show the second lap Jan 01 23:30:18 They are added the the arraylist: http://puu.sh/1Iddt Jan 01 23:30:24 intersting Jan 01 23:30:43 Hm, I get the same layout trouble when I rewrote it using LinearLayout instead of GridLayout. same weird margin :| Jan 01 23:32:02 wtf Jan 01 23:32:08 where is this file coming from? Jan 01 23:33:52 I want to smash my phone with a hammer Jan 01 23:33:55 They should be added, why arent they! Jan 01 23:37:46 http://pastebin.com/cQavSpGV Jan 01 23:37:57 anyone sees anything horrible in here? Jan 01 23:38:33 I just can't get rid of the spacing.. it's on my own view which basically sets the size (onMesaure) to the size of a bitmap which it draws. Jan 01 23:39:50 son of a donkey's penis! Jan 01 23:40:05 it's the view that's getting a larger size than requested... Jan 01 23:45:00 any particular reason why a View overriding setMeasuredDimension(mBitmap.getWidth(), mBitmap.getHeight()); would be larger? Jan 01 23:45:40 zyngawow: Did you try other devices? Jan 01 23:58:57 well fuck, it was my fault all along =| Jan 02 00:05:39 I've realized, that I really just need another person to go over my code before asking on Stackoverflow. Jan 02 00:05:51 I hate posting something and then realizing "Oh shit, a semicolon is missing" type of deal Jan 02 00:07:02 lighthazard: heh Jan 02 00:07:11 How can I make my activity not restart wghen the phone is rotated? Jan 02 00:07:50 zyngawow: there's a property you can have in the activity tag, I forget what it's called though Jan 02 00:08:11 android:configChanges="orientation|keyboardHidden" ? Jan 02 00:09:01 zyngawow: Let's hope you have all your data when it rotates though Jan 02 00:09:14 Why would I lose it?¿ Jan 02 00:09:28 No idea Jan 02 00:10:09 Thanks to you though, I discovered setRetainIntance(true) Jan 02 00:11:22 lighthazard: is that thing suposed to go in the activiy or in the application? Jan 02 00:11:42 zyngawow: generally the better solution is to use onSaveInstanceState/onRestoreInstanceState to save/restore your activity's state Jan 02 00:11:52 instead of preventing the system from recreating it Jan 02 00:12:01 zyngawow: That goes in your AndroidManifest.xml for your Activity Jan 02 00:14:36 I dont really understand what I have to do OnConfigurationChanged Jan 02 00:15:09 what gets raised on a 404 in a URL.openInputStream() Jan 02 00:15:17 FileNotFoundException? Jan 02 00:15:23 android:configChanges="orientation|keyboardHidden" is put inside the Manifest for your specific Activity that you need it to work on (or application, not sure about that one). However, you should heed Maurits_'s advice and use the onSaveInstanceState Jan 02 00:15:33 Hark! Jan 02 00:15:40 AmandaC: I thought it was IOException? Jan 02 00:15:40 * pragma- gesticulates wildly. Jan 02 00:16:19 I did both for my checks. Jan 02 00:16:33 it extends IOException Jan 02 00:16:42 lighthazard: I know it's NotFoundException because of the error that's getting printed to my device, but it cuts off the first half Jan 02 00:16:53 so both will work Jan 02 00:17:12 Sweet, good to know Jan 02 00:17:28 Maurits_: and.. what am I suposed to do on those methods? Jan 02 00:17:38 yep, FileNotFoundException Jan 02 00:17:52 now to find out why I'm getting that for the input I'm given Jan 02 00:18:02 zyngawow: save the data you want to keep in the new orientation Jan 02 00:18:08 ie, text entered in dialog boxes Jan 02 00:18:15 scroll position in lists Jan 02 00:18:20 Maurits_: Where do I save it? Jan 02 00:18:43 Man, I had such a nice bit of code with TransitionDrawable and lazy image loading in my ListView... Jan 02 00:18:46 you get a Bundle you can put it into in onSaveInstanceState(Bundle) Jan 02 00:18:48 Should an EditText just be a green underline where you input text? Jan 02 00:18:53 Worked beautifully on my 4.1.2 device... Jan 02 00:18:55 I want to have a box instead Jan 02 00:18:58 * AmandaC thinks she's going to end up making an EditText subclass to use the fancy completion API Jan 02 00:19:03 Then I boot up my 2.3 emulator and it doesn't work! Jan 02 00:19:17 Maurits_: outState.put? Jan 02 00:19:27 Because 2.x doesn't support LayerDrawable's setDrawableById method very well Jan 02 00:19:30 * pragma- grumbles. Jan 02 00:20:03 zyngawow: depends on what you're putting into it Jan 02 00:20:11 could be outState.putInt(42) Jan 02 00:20:17 A StopWatch(custom object) class... Jan 02 00:20:24 an arraylist.. Jan 02 00:20:36 and an arrayadapter Jan 02 00:20:44 Oh well, I whipped up a workaround that works in 2.3 and 4.1.2 Jan 02 00:20:45 anli: EdiText is usually themed, by default, it should be a box.. Jan 02 00:20:52 in yo face, Android. Jan 02 00:20:56 there's completion API with EditText? Jan 02 00:21:05 I'm writing my own editor view entirely Jan 02 00:21:11 (also tested working in 2.2) Jan 02 00:21:19 I have 75 users still on 2.2 ... Jan 02 00:21:20 lighthazard: Ah, do you know how to programmatically untheme it? Jan 02 00:21:22 I wouldn't store the custom objects themselves, just the info you need to recreate them Jan 02 00:21:23 Pfhoenix: err, EditTextPreference is what I meant Jan 02 00:21:32 oh ok Jan 02 00:21:52 * AmandaC needs locations the Wunderground will accept, and they opffer a completion API Jan 02 00:21:58 anli: I think you create a custom view and then include it Jan 02 00:22:02 s/d w/d API w/ Jan 02 00:22:09 ok Jan 02 00:22:17 that's a lot of corrections, AmandaC =) Jan 02 00:22:18 anli: please don't do that Jan 02 00:22:21 I created it programmatically and added it to a view Jan 02 00:22:23 What do I do if there is no SD card but I need one to run? (I store audio files of unknown length) Jan 02 00:22:36 lighthazard : check for external storage Jan 02 00:22:52 http://developer.android.com/guide/topics/data/data-storage.html#filesExternal Jan 02 00:22:57 Pfhoenix: It's getting to be brain-shuts-off-thirty soon. :P Jan 02 00:22:58 AmandaC: please use human-readable subsitutions on IRC Jan 02 00:23:11 zyngawow: but why do you need to store the data in your list? that's something you can just load again Jan 02 00:23:12 Environment.getExternalStorageDirectory().getPath(); is what I'm using - will it automatically select the best option? Jan 02 00:23:26 pragma-: Er, I can read sed syntax just fine? Jan 02 00:23:32 Maurits_: I though I had to save it. Then what do I have to save? Jan 02 00:23:33 it's just s/old/new/ Jan 02 00:23:43 My app is a timer Jan 02 00:23:45 ( with some special circumstances) Jan 02 00:23:45 AmandaC: It was not worth the effort to find the "w d" in your message. Jan 02 00:23:53 zyngawow: why do you want it to not recreate the activity on rotation? Jan 02 00:23:53 And you can store laps on an arraylist/adapter Jan 02 00:24:06 So the data isnt reset Jan 02 00:24:09 "d w", whatever. Jan 02 00:24:12 which data? Jan 02 00:24:19 that's the stuff you save Jan 02 00:24:19 I shouldn't feel like I'm manually parsing a regex when people correct themselves =) Jan 02 00:24:20 laps, time.. Jan 02 00:24:55 generally for a stopwatch one would store the timing etc in a service or perhaps a contentprovider Jan 02 00:24:57 so, writing string to file issues Jan 02 00:25:09 contentprovider is a bit overkill Jan 02 00:25:25 I have a String that I open up a openFileOutput, and then outputstream.write(string.getBytes()) Jan 02 00:25:28 but if you do the timing itself in the activity you're bound to have issues like this Jan 02 00:25:42 only what gets written is not ASCII nor, for as much as I can tell, UTF-8 Jan 02 00:25:44 and the harder to fix 'I press home, the system kills my activity' Jan 02 00:25:46 s/wunderground/wunderground API/ would have been a much preferable substitution for human consumption Jan 02 00:27:39 well sonofabitch Jan 02 00:27:53 I guess all I needed was an explicit string.getBytes(Charset.defaultCharset) Jan 02 00:27:57 Also, what's the best way to set up an initial loader? basically a splash screen that does a whole bunch of checks to see what's next? Just a regular activity? Jan 02 00:29:57 hi. how can i debug a IPConnection issue with host/port settings? my exception just retunrs NULL and i do not know why. maybe the nexus 7 permissions in my manifest are wrong but i do not know where to start searching ... *help* Jan 02 00:31:40 What do ppl in here prefer for a textbox, a textview with editable set or an edittext? Jan 02 00:32:24 They're the same thing, is my understanding Jan 02 00:32:41 EditText is just a helper ontop of TextView with the defaults changed Jan 02 00:34:44 true Jan 02 00:34:51 The question is still valid :) Jan 02 00:35:04 Maybe its partly incorrect then :) Jan 02 00:35:48 EditText Jan 02 00:36:07 since there's no reason to go through the effort of making a TextView set to be an EditText Jan 02 00:36:44 that and once the defaults for edittext change your app will look out of place Jan 02 00:36:55 that too Jan 02 00:37:13 might as well use the controls given to you if they do what you want Jan 02 00:37:19 no point in unnecessary work Jan 02 00:49:24 I am having some trouble setting up eclipse with adt anyone think they could help me out? Jan 02 00:52:54 I hated setting up Eclipse with ADT Jan 02 00:53:05 try IntelliJ IDEA CE 12.0 instead Jan 02 00:53:11 that's the best help I can give you right now Jan 02 00:54:44 people's ability to tolerate Eclipse always surprise me Jan 02 00:54:58 It might not even be Eclipse, I am getting the R cannot be resolved to a variable I tried cleaning the project and importing android.R; they both have not worked Jan 02 00:55:01 I thought it was rather nice Jan 02 00:55:52 'R cannot be resolved to a variable' generaly happens if it cant generate R.java Jan 02 00:56:00 which means your xml files have errors Jan 02 00:56:31 Is that Eclipse's fault? Or mine? Jan 02 00:56:54 most likely yours, look for more error messages in eclipse Jan 02 00:57:02 Unexpected exception 'Cannot run program "/home/main/android-sdk-linux/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/main/android-sdk-linux/platform-tools/adb' Jan 02 00:57:35 sounds like you dont have the sdk path set right, or the right packages inside it installed Jan 02 00:57:45 which would cause problems generating R.java Jan 02 01:01:24 Hi, when i click a notification, will it call the Activitys onCreate()? Jan 02 01:01:36 tias Jan 02 01:01:55 dkuypers: probably? Jan 02 01:02:06 dkuypers: unless it's already running Jan 02 01:02:26 clever thank you very much 'apt-get install ia32-libs' Jan 02 01:02:48 I pass values using someIntent.putExtra(...); where can i use it then? Jan 02 01:03:50 dkuypers: one sec Jan 02 01:05:04 I'd like to point out that all it took to get started with IntelliJ was to download, install, import project Jan 02 01:05:34 I will never willingly suffer installing and setting up Eclipse again. Jan 02 01:06:01 Pfhoenix: intellij won't work any better on a 64bit system without 32bit libraries than eclipse. :P Jan 02 01:06:16 well, that's a given Jan 02 01:06:20 I had a look at the activity lifecycle ( http://developer.android.com/training/basics/activity-lifecycle/starting.html ) and it seems that it should reenter with onRestart and onStart and onResume, but none of them has the Bundle as an argument. Jan 02 01:06:31 dkuypers: http://www.privatepaste.com/bfdd7eca83 Jan 02 01:06:33 but I'm talking about just getting Eclipse to the point where you can actually compile and run an Android project Jan 02 01:06:36 dkuypers: i'm using this to turn a Bundle back into an AccountWrap object Jan 02 01:06:37 from scratch Jan 02 01:06:43 dkuypers: you don't get the extras as a bundle Jan 02 01:07:07 not that bundle, anyway Jan 02 01:07:11 AmandaC: thats line 4 of my pastebin, not sure how 9 works Jan 02 01:07:12 that's an icicle Jan 02 01:07:17 and now, time for the best JRPG mankind has ever produced Jan 02 01:07:21 Chrono Trigger on my Nexus 7 Jan 02 01:07:42 with external controller? Jan 02 01:07:43 emulated, of course. Jan 02 01:07:45 Pfhoenix: :D Jan 02 01:07:50 deepy : not yet, waiting for my OTG cable to come in =) Jan 02 01:08:02 You can make those Jan 02 01:08:15 i'd rather spend the <$10 for a quality manufactured one Jan 02 01:08:42 I don't suppose you happen to know if the LG 4X HD has OTG support? Jan 02 01:08:50 I don't, sorry Jan 02 01:09:49 Oh. I still approve of your choice when it comes to games though Jan 02 01:10:50 clever: onCreate is the wrong place to take the extra data Jan 02 01:11:03 onSaveInstanceState Jan 02 01:11:11 no Jan 02 01:11:34 dkuypers: maybe thats why it was throwing NullPointerException ~5% of the time, in another area Jan 02 01:11:51 clever: you have to check for null anyway Jan 02 01:12:15 Here is the deal: I create a notification which informs the user that networking is currently enabled. It says something like "Click me to turn off networking to save battery". Now when the application Jan 02 01:12:23 is already running it wont call onCreate Jan 02 01:12:35 in my case, the activity should never be ran without extras, its like trying to open an email and not say which one Jan 02 01:12:36 because the instance is just brought back to the foreground, correct? Jan 02 01:12:59 clever: okay. still you have to check for that so it wont crash your app with ANR Jan 02 01:13:02 dkuypers: are you making a new taskstack? Jan 02 01:13:15 yes Jan 02 01:13:18 no Jan 02 01:13:23 only a backstack for the back key Jan 02 01:13:32 or is that the taskstack? :) Jan 02 01:13:37 let me find the code Jan 02 01:14:03 dkuypers: http://www.privatepaste.com/7f5d9c9393 Jan 02 01:14:08 i see it is indeed a new taskstack. I took the example from google Jan 02 01:14:45 Yes I do that Jan 02 01:15:03 So when I click the notification it will run through onCreate()? Jan 02 01:15:15 i believe so, try adding Log.v's to it Jan 02 01:17:56 It did Jan 02 01:25:40 clever Jan 02 01:32:08 dafuq, I just updated an app on google play, and it says "Updated: January 2nd, 2013" Jan 02 01:32:16 it's still January 1st here Jan 02 01:32:30 pragma-: UTC, maybe? Jan 02 01:32:54 bah, so much for a New Year's Day update Jan 02 01:33:08 bah! Jan 02 01:33:26 * pragma- storms off grumbling and gesticulating. Jan 02 01:34:07 * AmandaC notes pragma- might want to see a doctor about all that gesticulation Jan 02 01:35:16 I am starting a activity though a notification. The activity is already running and set to being "singleTop". I wish that the new Intent is passed to onNewIntent instead of onCreate, how would i do this? Jan 02 01:36:41 dkuypers: ah, you didnt mention singleTop Jan 02 01:36:49 *looks* Jan 02 01:36:49 I just added it Jan 02 01:37:18 dkuypers: try using handleIntent Jan 02 01:37:48 dkuypers: you probably want singleTask. Jan 02 01:37:51 or maybe singleInstance Jan 02 01:37:58 read the launchMode documentation (and i mean read, not skim) Jan 02 01:39:15 also, you want to verify that you're not passing intent flags that would otherwise conflict with your launch mode choice Jan 02 01:41:15 singleTask it is. Jan 02 01:50:20 jasta , clever: I must not pass a taskstack when i want to recall a singleTask activity, right? Jan 02 01:52:15 not sure, i havent played with it much yet Jan 02 02:25:07 Hello, is there a way to run/debug an android app without it opening the Virtual Device? I just need to check the console. Jan 02 02:25:16 is there any Cursor that is also Parcelable? Jan 02 02:25:40 or perhaps an object that stores one row of a cursor, and is also Parcelable? Jan 02 02:26:53 use the ID of the row, look it up in the next activity Jan 02 02:26:56 FelicianoX: I guess you have to have either an emulator (AVD) or a hardware device to run apps. If you are running plain java code (non android) you can probably run it without a device Jan 02 02:35:08 how resource intensive are sql queries? Jan 02 02:35:22 I am doing them on another thread of course Jan 02 02:35:24 about 42 Jan 02 02:36:22 one table has got 300 entries. The other, 14k Jan 02 02:36:42 either way, I think I want to avoid having to query the db twice Jan 02 02:36:57 So whats in them? Jan 02 02:37:02 RustyShackleford: depends on many things; like how efficient your query is, and if you indexed properly Jan 02 02:37:06 the query alone doesn't use resources Jan 02 02:37:18 iterating over the results via the cursor also uses resources Jan 02 02:38:14 g00s: how do you properly index? Each table has _id primary key autoimcrement Jan 02 02:38:38 http://use-the-index-luke.com/ Jan 02 02:38:42 I don't know if SQLLite allows you to build index tables Jan 02 02:38:49 but if so, use them as much as you can Jan 02 02:39:08 also, sqlite creates ephemeral indexes in some cases Jan 02 02:49:35 I'm constantly amazed at how well designed Chrono Trigger is Jan 02 02:49:59 and at why Square Enix is completely incapable of duplicating such quality **** ENDING LOGGING AT Wed Jan 02 02:59:58 2013