**** BEGIN LOGGING AT Mon Apr 09 02:59:58 2012 Apr 09 03:06:41 juanez: the theme refers to the drawable xml Apr 09 03:06:46 the drawable xml refers to a bunch of .pngs Apr 09 03:06:59 JakeWharton, yeah, found the png's :) Apr 09 03:07:04 making some progress Apr 09 03:07:13 thx a bunch Apr 09 03:09:11 got the seek_thumb in order. Apr 09 03:16:56 Trying out TDD for the first time Apr 09 03:17:03 only because I defined the API before the impl Apr 09 03:22:34 JakeWharton: btw, your main page, 'common pitals' under faq Apr 09 03:23:09 hit refresh Apr 09 03:23:17 github does some odd caching Apr 09 03:23:36 ah. I'm still getting the old one, but fair enough Apr 09 03:23:45 JakeWharton imo thats the ONLY reason for doing real tdd Apr 09 03:24:04 dragorn: that was fixed weeks ago Apr 09 03:24:09 that's strange you still see the old version Apr 09 03:24:23 ron_frown: yeah i'm not a huge fan otherwise Apr 09 03:24:52 JakeWharton: yeah I dunno; saw it a while back, meant to mention it next time you were active in channel, still see the old one after refreshing, but I take your word for it Apr 09 03:27:38 i want to pass a Bitmap to another activity, any recommendations on how i should do it? Apr 09 03:29:42 Hold it in a singleton Apr 09 03:49:51 hey ron_frown are you busy? I have to go back out soon but if you are around id like to catch up with you for a few mins Apr 09 03:50:21 hahah Apr 09 03:50:46 not busy... just rounding out an extremely long weekend Apr 09 03:51:38 I know what you mean. I havent hat a break at all. Apr 09 03:52:01 well it was a big mix of dayjob shit, and then phsyical labor around the house Apr 09 03:52:23 that stuff that always comes up that you have to have it done THIS weekend Apr 09 03:52:26 plumbing and shit Apr 09 03:53:28 mechanical skills... for me i fear touching anything related to household plumbing Apr 09 03:53:44 haha you'd be scared abotu hafl the stuff I've done then Apr 09 03:53:55 women dig that shit though :) Apr 09 03:54:04 less than 6 mo ago I had the engine block out of my truck and all torn apart in my garage Apr 09 04:02:20 [23:29:42] Hold it in a singleton Apr 09 04:02:39 better answer is "what exactly are you doing" :P Apr 09 04:02:46 i've learned to stop asking that question Apr 09 04:02:49 heh Apr 09 04:03:03 I'm just going to start answering questions Apr 09 04:03:07 take the byte array of the bitmap and stick it in the intent's bundle! Apr 09 04:03:12 "How can I pass an activity to another activity?" Apr 09 04:03:15 well if you stop caring why bother at all Apr 09 04:03:17 Parcelable that bitch Apr 09 04:03:30 private static Activity sActivity; Apr 09 04:03:33 sActivity = this; Apr 09 04:03:40 or... public static Apr 09 04:03:43 so you can access it from the other one Apr 09 04:03:44 :) Apr 09 04:04:17 how can i put an actionbar at teh bottom of my activity? Apr 09 04:04:21 upside down Apr 09 04:04:29 and backwards Apr 09 04:07:21 http://i.imgur.com/rgtoG.gif Apr 09 04:07:24 unrelated Apr 09 04:07:28 to everything Apr 09 04:07:50 excellent. Apr 09 04:08:45 Pandas poop 40 times a day Apr 09 04:35:53 interesting.. the seekthumb is not aligned along with the rest of the seekbar Apr 09 04:48:24 hello Apr 09 04:58:51 can some one pls help me in differentiating a paused activity and a stopped activity.. Apr 09 05:00:12 rakesh1988? Apr 09 05:00:21 rakesh1988, onStop, onPause.. what else? Apr 09 05:01:34 hi juanez i saw the flow chart of activity and i am not able to understand what exactly happen when an app is paued and what happens when its stopped Apr 09 05:02:33 an app goes to pause when another app is opened .. am i right ??? Apr 09 05:03:49 http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle Apr 09 05:03:50 pretty much yes Apr 09 05:04:08 i'll not be able to explain it much better tahn JakeWharton's link Apr 09 05:04:17 now my q is when does the app go from sleep to stop? Apr 09 05:04:30 oops sorry pause to stop Apr 09 05:04:36 when another activate is displayed Apr 09 05:04:41 activity Apr 09 05:06:30 I have seen it where things appear to live on past the pause/destroy into the new activities lifecycles Apr 09 05:06:38 makes universal context a son of a bitch Apr 09 05:06:47 in the diagram its given as "The activity is no longer visible" ... I am not understanding this part alone Apr 09 05:07:06 something else is now visible Apr 09 05:07:24 your app is running -> you get a call -> call-handling screen comes up -> your app is no longer visible Apr 09 05:08:18 annoying.. seekthumb is off center.. max/min heights are set... Apr 09 05:08:34 so at that particular point of time the app is stopped... Apr 09 05:09:11 no it is paused Apr 09 05:09:56 then when will it be stopped? Apr 09 05:09:59 and after that stopped, according to the diagram yes Apr 09 05:10:34 you can do most things in onpause Apr 09 05:10:37 and onresume Apr 09 05:10:43 i dont think ive ever used onstop Apr 09 05:11:31 ok thanks for the reply :) Apr 09 05:11:32 i think onstop is not guaranteed to be called if your activity gets destroyed Apr 09 05:11:45 hmmm... Apr 09 05:12:33 implement onresume and onpause, you'll be fine Apr 09 05:49:12 Is it possible to make logcat wrap lines? Apr 09 05:52:21 sure Apr 09 05:52:34 I always run logcat in a terminal =) Apr 09 05:52:42 Heh Apr 09 05:54:21 is there a baskmali program for android ? i have the android ides for the phone but wondered if anyone knows if they made the other Apr 09 05:55:03 Got Java 1.7, now Eclipse can properly notice when my assets changed. What a relief. Apr 09 05:56:48 ron_frown: that's a great tip, seems it works w/ eclipse open too Apr 09 05:56:57 of course =) Apr 09 05:57:31 on my macs and linux boxes, its better because you can easily filter/color and "pause" easier than ddms logcat Apr 09 05:58:25 Yeah. Logcat in Eclipse tends to auto-pause for me at annoying moments as well. Here, I just scroll whenever I want Apr 09 06:01:57 does anyone have the motorola electrify gtalk or a link to it ? Apr 09 06:16:42 identify amabovulpa Apr 09 06:16:52 wrong network Apr 09 06:16:56 anyways Apr 09 06:17:02 want to get started on my first program Apr 09 06:23:26 what should I get/do to start programming my idea? Apr 09 06:25:59 Get eclipse and all android pluggins. Good start. Apr 09 06:26:22 thanks :D Apr 09 06:27:21 I just started development of an app yesterday, no prior knowledge or anything in programming. I can say I am probably 1/2 done with it atm. Eclipse is pretty user friendly and android so far is pretty easy stuff, atleast for the "small" project I am working on. Apr 09 06:32:16 Android is easy as long as you don't do dialogs, network operations, or rotate your device :) Apr 09 06:32:29 So... Everything? Apr 09 06:33:14 So true. Apr 09 06:33:27 Well it's not hard to do any of those three things but people usually insist on doing them incorrectly. Apr 09 06:33:34 Lol. Apr 09 06:33:41 I had a bitch learning how to handle rotations. Apr 09 06:34:04 so long as your solution wasn't android:configChanges="orientation"... Apr 09 06:34:18 When I looked into handling them, I was surprised to realize that Fragments exit. The docs were hiding them pretty well from me up until that point. Apr 09 06:34:22 JakeWharton thats wrong? Apr 09 06:34:37 I try and stick to static layouts Apr 09 06:35:11 I hate having to write compatibility code to handle different orientation layouts Apr 09 06:35:43 one of Android's strengths is support for a myriad of devices... Apr 09 06:36:25 I usually write 4 layouts for every screen Apr 09 06:36:31 Damn. Apr 09 06:36:58 Quick question, can you wrap the action bar sherlock in a custom view? Apr 09 06:37:02 no Apr 09 06:37:08 Trenith: I'm working on an IRC widget actually Apr 09 06:37:26 Damn. Apr 09 06:37:28 it's part of the decor view, not the content view Apr 09 06:37:33 nova launcher lets me put all my programs in folders in my dock, so I'd like to have something to look at Apr 09 06:37:38 JakeWharton I wanted to try and put together a drag layout like what the iOS facebook app does. Apr 09 06:37:53 And wrap it up so the top view brings the ActionBar with it when you slide it Apr 09 06:38:10 I use neither Facebook nor iOS so I'm not sure what you're trying to accomplish Apr 09 06:38:29 but think of the action bar like the system bar, unmovable and only available for interaction through designated APIs Apr 09 06:38:37 I use facebook occasionally, but only on my computer Apr 09 06:38:54 Look up iOShttp://www.youtube.com/watch?feature=player_detailpage&v=mCvPfqgRaJE#t=11s Apr 09 06:39:00 http://www.youtube.com/watch?feature=player_detailpage&v=mCvPfqgRaJE#t=11s Apr 09 06:39:04 Sorry for the double post. Apr 09 06:39:07 Click 2nd link. Apr 09 06:39:46 definitely no Apr 09 06:40:32 that's a UI interaction that's not appropriate for Android. you can certainly do that with the content view very easily Apr 09 06:40:50 I've written it already Apr 09 06:41:05 But with my own custom action bar. Apr 09 06:41:58 What should my android:empty Apr 09 06:42:04 's element visibility be at start? Apr 09 06:42:14 shouldn't matter Apr 09 06:42:18 With default, it sometimes gets left showing when there is an item showing. With gone, it's not shown at start Apr 09 06:42:26 Hm. Apr 09 06:42:30 mine are always visible to start with Apr 09 06:44:01 I have it as a linearlayout that has a listview and then the empty textview after it - is that the right protocol? Apr 09 06:44:26 FrameLayout Apr 09 06:44:41 Alright Apr 09 06:44:42 well, it shouldn't matter Apr 09 06:49:47 Maybe the XML doesn't work for a ListView, just ListActivities and such. I'll try setting the view programatically Apr 09 06:49:54 need help no matter what my eclipse has an red exclimation next to it with no project errors Apr 09 06:51:57 vadi2: I've only ever set it programatically Apr 09 06:52:06 never used a list view or list fragment Apr 09 06:52:14 well, not never. but never for serious Apr 09 06:52:39 Alright Apr 09 06:53:00 you were setting it in the XML? Apr 09 06:53:47 I just gave my textview the ID of android:empty, I read that Android figures out that it should display it when the list is empty Apr 09 06:53:59 in a ListActivity or native ListFragment it will Apr 09 06:54:05 in a support-lib ListFragment it will not Apr 09 06:54:10 and in anything else it most certainly will not Apr 09 06:54:20 Aha, okay Apr 09 06:54:36 what version of JDK should I get? Apr 09 06:54:41 1.6 or newer Apr 09 06:55:11 netbeans or EE necessary? Apr 09 06:55:22 absolutely not Apr 09 06:55:27 cool Apr 09 06:55:53 is it too late for caffeine? Apr 09 06:55:59 * JakeWharton ponders Apr 09 06:56:34 hi. I have a ListView, and some items in it contains CheckBox. I made this CheckBox not focusable by calling setFocusable(false), but when user clicks directly on CheckBox, item's OnClick is not handled. How can I make this checkbox completely "transparent" for focus? Apr 09 07:00:15 android:descendantFocusability="beforeChildren" Apr 09 07:00:16 or something Apr 09 07:00:18 on the list item Apr 09 07:00:28 I forget specifics Apr 09 07:17:35 where should I look to get started with OpenGL? Apr 09 07:18:26 http://developer.android.com/guide/topics/graphics/opengl.html Apr 09 07:18:43 http://developer.android.com/resources/tutorials/opengl/opengl-es10.html Apr 09 07:18:48 http://developer.android.com/resources/tutorials/opengl/opengl-es20.html Apr 09 07:19:04 thanks Apr 09 07:19:28 Which OpenGL version do you suggest for a 2d tilebased rpg? Apr 09 07:21:45 Never used OpenGL in my life Apr 09 07:22:16 ah Apr 09 07:22:39 http://developer.android.com/resources/dashboard/opengl.html Apr 09 07:22:42 use 2.90 Apr 09 07:22:45 *2.0 Apr 09 07:23:22 thanks Apr 09 07:43:38 I'm trying to use an sqlite3 database in my assets folder. This tutorial says to use it I must first copy it to /data/data/... but when I try it says "No such file or directory" --- http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ Apr 09 07:44:02 I tried to copy it to /sdcard/mydb.sqlite3 and it worked Apr 09 07:44:03 Anybody checked out the lynda learning to develope and apps with java ? Apr 09 07:44:34 where am I supposed to copy the database so I can read it? why can't I read it straight from my assets folder? is it read-only? Apr 09 07:44:47 public class AnnivActivity extends AppWidgetProvider { Apr 09 07:44:47 public void onUpdate(Context context, AppWidgetManager, appWidgetManager, Apr 09 07:44:54 throws errors wtf Apr 09 07:45:01 assets are read-only Apr 09 07:45:19 you should copy to /data/data/your.package.name/ Apr 09 07:46:02 JakeWharton: I tried. my package name is "xix.hangmansolver", so I tried copying to /data/data/xix/hangmansolver/databases/ Apr 09 07:46:14 you'd need to make that directory first Apr 09 07:46:35 JakeWharton: but I get the error "No such file or directory" on the line: OutputStream myOutput = new FileOutputStream(outFileName); Apr 09 07:46:44 JakeWharton: oh ok Apr 09 07:48:43 is there any way to recursively create all directories in a path? I tried "new java.io.File(outFileName).mkdirs();" but doesn't seem to have worked Apr 09 07:49:45 www.pastebin.org Apr 09 07:51:24 http://pastebin.com/HrHN3hY7 Apr 09 07:51:30 what is wrong here ? Apr 09 07:51:35 actually the above line returns false, but why? Apr 09 07:51:39 throws no errors but for me Apr 09 07:52:47 my app installs with the package manager but it force closes package manager after install Apr 09 07:53:03 but i can navigate to it in the app drawer and launch it just fine Apr 09 07:53:09 any ideas why?.. Apr 09 07:55:34 tells me after first line i should close class Apr 09 07:57:36 i clean it up as suggested and it throws more error Apr 09 08:07:16 fuckton of people in here Apr 09 08:07:36 so what languages are used to code android apps? Apr 09 08:08:13 kish: java Apr 09 08:08:36 or if you go the hardware directly: C/C++/assembler or any compiled language :D Apr 09 08:08:38 or C something if u use the NDK right? Apr 09 08:10:50 is there some sort of view group that fills rows horizontally until the space is depleted and then starts to fill the next row? Apr 09 08:10:58 with a variable amount of views per row? Apr 09 08:11:37 tapas, do a google on "flow layout android" Apr 09 08:11:46 alex_PP: ty Apr 09 08:11:58 can one convert linux source written in c to android and make it work? Apr 09 08:13:46 kish: sure, people do it all the time Apr 09 08:14:24 kish: if it's autotools based, just let it construct the config.h, then commit that into the android copy of the project and write Android.mk that just names all the source files and spits out the kind of target you need (.so, most likely) and write the jni bridge for that. Apr 09 08:15:24 and it will work? Apr 09 08:15:36 for example, i'd want irssi converted into an android app Apr 09 08:15:49 probably quite difficult to do Apr 09 08:15:51 but i cannot imagine why this has not been done already Apr 09 08:15:56 and that must be why Apr 09 08:16:16 it depends on what frameworks the app requires Apr 09 08:16:16 irssi is a text program, poorly suited for android. not impossible, I think. You just redesign the view part of irssi differently. Apr 09 08:16:47 or you could port ncurses first :D Apr 09 08:16:52 text input is ever difficult on keyboardless mobile phones Apr 09 08:17:06 running irssi as it is would be a horrible idea on a phone - especially on one without a HW keyboard Apr 09 08:17:14 so at the very least you'd want to offer intelligent completions based on what is happening on the chat or something Apr 09 08:17:17 this is why irssi connectbot exists Apr 09 08:17:25 i did run it in a ssh session when i was in china Apr 09 08:17:40 terminal emulator -> ssh -> screen -> irssi Apr 09 08:17:51 but i have a tablet with a hardware keyboard Apr 09 08:18:07 tapas: get connectbot - make life much easier... Apr 09 08:18:18 there is an irssi connect bot Apr 09 08:18:31 btw, why is there no access to a terminal on android Apr 09 08:18:54 kish: you can install a terminal emulator Apr 09 08:19:00 the irssi connectbot is especially suited for irssi Apr 09 08:19:06 scorche: and right.. i used the terminal emulation of the ssh client.. Apr 09 08:19:08 it has those shortcuts we love Apr 09 08:19:12 maybe that was connectbot :D Apr 09 08:19:29 yep (just checked) Apr 09 08:19:41 trouble is though, sometimes you dont have access to a remote account to run connectbot with Apr 09 08:20:01 man, all the android irc programs are trash next to the power of irssi Apr 09 08:20:05 then get one Apr 09 08:20:19 irc is not very tolerant of mobile networks Apr 09 08:20:30 which is why it is better to use a bouncer or ssh + screen Apr 09 08:20:51 i'd have one if i could get port forwarding to work through this vpn junk Apr 09 08:21:08 as long as port 80 is open you can do something about it :D Apr 09 08:21:42 no port is open here Apr 09 08:21:47 but i have an idea Apr 09 08:21:52 http://dag.wieers.com/howto/ssh-http-tunneling/ Apr 09 08:22:19 no port open = not connected to the internet? :D Apr 09 08:22:56 no ports open from the outside tapas Apr 09 08:23:15 oh you just need to poke a hole from the inside Apr 09 08:23:31 assuming you being on the inside network.. Apr 09 08:23:33 yeah but how Apr 09 08:23:48 if you can browse the web, you can tunnel ssh over http for example Apr 09 08:23:54 i have two routers and the innermost router runs a vpn that doesnt allow port forwarding at all Apr 09 08:24:42 no need for port forwarding.. you just need a unix box somewhere on the outside Apr 09 08:25:20 i dont have that Apr 09 08:25:33 i could get a cheap vps Apr 09 08:25:40 trouble is there are no really cheap ones Apr 09 08:25:42 fixed my problem but eclipse wont cast no matter what i do Apr 09 08:25:57 and the best vps i know of is linode which costs a fortune given what little you get from it Apr 09 08:26:06 i pay 10 bucks a month for a quad core i7 box with 3 other people (so 10 bucks each) Apr 09 08:26:15 where is that Apr 09 08:26:21 we have virtual machines setup for each of us Apr 09 08:26:24 hetzner Apr 09 08:26:39 http://www.hetzner.de/hosting/produktmatrix/rootserver-produktmatrix-special/ Apr 09 08:26:42 tell me moe Apr 09 08:27:01 there is this company called ovs that has great bandwidth but only serves toadas Apr 09 08:27:06 hmm, whatever I try I can't create the directory /data/data/xix I tried "new java.io.File("/data/data/xix/").mkdir()" but it returns false. I have also added "" in AndroidManifest.xml in the tag before the tag Apr 09 08:27:06 kish: given what little you get from it? - huh? Apr 09 08:27:09 toads* = french Apr 09 08:27:10 oh, costs 50 bucks a month now :D Apr 09 08:27:21 scorche, the smallest linode is 512mb or so Apr 09 08:27:25 Xix19: don't assume a certain directory structure Apr 09 08:27:26 i only need 64MB Apr 09 08:27:32 linode is bloated that way Apr 09 08:27:42 Xix19: use getExternalStorage or getExternalCacheDirectory Apr 09 08:27:48 kish: so the issue isnt what little you get from linode - the issue is what little you need Apr 09 08:27:54 tapas: ok trying now Apr 09 08:28:15 whatever scorche ;) Apr 09 08:28:16 "bloated" is not the correct term here.. Apr 09 08:28:49 tapas, do you add people to that Apr 09 08:28:58 what kind of virtual server is that Apr 09 08:29:03 kish: no, only trusted friends.. Apr 09 08:29:10 kish: in our case it's a real box :D Apr 09 08:29:20 hetzner offers virtual servers, too, though: http://www.hetzner.de/hosting/produkte_vserver/vq7 Apr 09 08:29:24 7,90 euros a month Apr 09 08:29:29 with full root access Apr 09 08:29:51 http://www.hetzner.de/en/hosting/produkte_vserver/vq7 [english] Apr 09 08:30:17 cheaper tham crap linode Apr 09 08:30:34 o_O Apr 09 08:31:11 so, you say linode is the best vps you know, then say they are "bloated" because they don't have an option small enough for your usage, then they are crap? Apr 09 08:31:28 sigh Apr 09 08:31:29 lol Apr 09 08:31:31 am i being illogical Apr 09 08:31:41 :D Apr 09 08:31:41 very Apr 09 08:31:53 well im high and dont give a sht Apr 09 08:32:04 still not working. what I want is to just READ an sqlite3 database in my assets folder. but I can only find one function for opening an sqlite database: SQLiteDatabase.openDatabase() which takes a file path. How can I tell it to open my database inside my assets? Apr 09 08:32:06 lol Apr 09 08:32:20 do I HAVE to copy it first? Apr 09 08:32:41 Xix19: oh, you want to access assets Apr 09 08:32:48 Xix19: that's a different story.. one moment Apr 09 08:32:52 tapas: yep Apr 09 08:33:01 http://developer.android.com/reference/android/content/res/AssetManager.html Apr 09 08:34:01 Xix19: oh.. hmm.. you need a SQLiteDatabase constructor that takes an FD or an inputstream though.. Apr 09 08:34:07 tapas: ok, I open an InputStream of the asset database, but how do I pass this to the android.database.sqlite.SQLiteDatabase ? Apr 09 08:34:12 yes Apr 09 08:34:22 tapas, do they take payment in bitcoin Apr 09 08:34:24 http://stackoverflow.com/questions/2605555/android-accessing-assets-folder-sqlite-database-file-with-sqlite-extension Apr 09 08:34:24 it only takes a file path as far as I can tell Apr 09 08:34:52 Xix19: you might have to copy it over Apr 09 08:34:55 tapas: ok, so that brings me back to what I was trying earlier Apr 09 08:35:31 tapas: getExternalStorage(???) <-- what goes here? Apr 09 08:35:35 Xix19: yeah, so the plan is: a] get the path of the externalcache directory Apr 09 08:35:42 b] copy the sqlite db file over Apr 09 08:35:44 c] open it Apr 09 08:36:09 http://developer.android.com/guide/topics/data/data-storage.html#ExternalCache Apr 09 08:36:33 from http://developer.android.com/reference/android/content/Context.html#getExternalCacheDir() you can do .getPath() Apr 09 08:37:02 tapas: should I copy it to the CACHE directory? I mean the database is not quite temporary, it should stay copied until the application is uninstalled Apr 09 08:37:15 Xix19: that's exactly what the cache dir is for.. Apr 09 08:37:28 tapas: "cache" sounds very temporary to me, but ok Apr 09 08:37:32 read the docs :D Apr 09 08:38:03 you can also use http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory() but then your stuff won't be deleted on uninstall time Apr 09 08:38:29 tapas, how many bitcoins would you charge me to create a shell account Apr 09 08:38:52 kish: i won't give you a shell account.. too much possible legal trouble Apr 09 08:39:07 i don't know you at all.. why would i trust you like that? :D Apr 09 08:39:13 yeah and the worry about exploits Apr 09 08:39:40 how much would you charge IF you knew me well? Apr 09 08:40:02 Environment.getExternalStorageDirectory() returns /mnt/sdcard/, is this right? Apr 09 08:40:03 either nothing at all or 5 euros a month. depending on your intended use.. Apr 09 08:40:37 Xix19: yes.. mind though that that is writable for EVERY app on the device.. you would have to create a unique directory for your stuff.. Apr 09 08:40:43 Xix19: it's better to use the cache directory Apr 09 08:41:06 tapas: /mnt/data/xix.hangmansolver/databases/ is ok? Apr 09 08:41:16 JakeWharton: thanks, i'll try that. Apr 09 08:41:22 Xix19: why don't you want to use the cache directory? Apr 09 08:41:46 tapas: which functions gets me the cache dir? Apr 09 08:41:49 Environment.getDownloadCacheDirectory()? Apr 09 08:41:51 . Apr 09 08:41:57 i pasted the link before Apr 09 08:42:03 http://developer.android.com/reference/android/content/Context.html#getExternalCacheDir() Apr 09 08:42:38 getCacheDir() seems to be it Apr 09 08:42:48 that\s on the internal storage iirc.. Apr 09 08:43:14 Xix19: please read this: http://developer.android.com/guide/topics/data/data-storage.html Apr 09 08:43:19 how do you port an app that requires a different framework.jar ? Apr 09 08:43:28 can you merge 2 different framework.jars? Apr 09 08:43:41 getExternalCacheDir() Apr 09 08:44:05 tapas: ok reading it now Apr 09 08:51:08 tapas: read it. one thing I'd like to clarify: are files stored in getExternalCacheDir() ever deleted during the lifetime of the application? it's not very clear on this point Apr 09 08:51:40 yes Apr 09 08:51:44 it only says "If the user uninstalls your application, these files will be automatically deleted. However, during the life of your application, you should manage these cache files and remove those that aren't needed in order to preserve file space." Doesn't say that it won't get deleted if running out of space Apr 09 08:51:53 JakeWharton: hmm Apr 09 08:52:12 JakeWharton: so if I add something to this database I could lose it at any time if I put it there Apr 09 08:52:22 yes Apr 09 08:52:44 the user could also click 'Clear Data' in the app info Apr 09 08:52:50 or 'Clear Cache' Apr 09 08:53:46 so if I want to store a database with information that I want to keep for the lifetime of the app. I should put it here? getExternalStorageDirectory()+"/Android/data/xix.hangmansolver/???/" Apr 09 08:54:07 no Apr 09 08:54:12 where then Apr 09 08:54:15 what happens when the user removes the SD card? Apr 09 08:54:17 or doesn't have one? Apr 09 08:55:13 so where should I put it in that case? Apr 09 08:56:28 internal storage Apr 09 08:56:34 http://developer.android.com/guide/topics/data/data-storage.html#filesInternal Apr 09 08:57:20 JakeWharton: just like that? no path? Apr 09 08:57:21 /data/data/package.name/databases Apr 09 08:57:25 is better Apr 09 08:57:42 JakeWharton: that was the first thing I tried Apr 09 08:58:06 but then tapas suggested me not to hard-code the path like that Apr 09 08:58:19 and anyway I didn't have permission to write to it Apr 09 08:58:23 not sure why Apr 09 08:58:34 tapas is wrong Apr 09 08:59:05 well Apr 09 08:59:12 use context.getApplicationInfo().dataDir Apr 09 08:59:21 if you're uncomfortable hard coding Apr 09 08:59:33 then add "/databases" Apr 09 09:01:29 hmm threw an error Apr 09 09:02:07 LogCat isn't working anymore :( Apr 09 09:02:46 it's just not showing logs anymore, it was working just fine Apr 09 09:02:56 why was java chosen as the language for apps Apr 09 09:03:20 tons of tooling Apr 09 09:03:21 UI-wise question: I have a ListView that displays data from the net. How would I implement pagination best? Add a concrete button for next/previous/#'s, or detect when the user scroll to the bottom somehow? Apr 09 09:03:22 lots of libraries Apr 09 09:03:24 free Apr 09 09:03:26 open source Apr 09 09:03:45 (or at the time it was) Apr 09 09:04:39 yeah but java requires way more typing for some things for some idiotic reason Apr 09 09:05:27 That's why it has nice IDEs with autocompletion. Apr 09 09:05:32 it also requires a lot less than binary Apr 09 09:05:57 or pure dalvik bytecode Apr 09 09:06:19 dalvik is open source so feel free to write other cross compilers for Android from other languages or a new language which suits your needs Apr 09 09:07:35 Or make use of the JNI! Apr 09 09:08:43 JakeWharton: hi, I am using ActionBarSherlock (my fragments extend SherlockFragmentActivity instead of FragmentActivity) .. and then, when I use mActionBar = getSupportActionBar() on ICS I get crash (Galaxy Nexus).. I suppose I don't have to write two implementations for <= Honeycomb versions and >= Honeycomb..? Apr 09 09:08:43 jakewharton, what do you mean by "tons of tooling" what is tooling? Apr 09 09:09:01 IDEs, debuggers, profilers Apr 09 09:09:16 gemidjy: well what does the log say? Apr 09 09:10:09 I don't think you need to write two separate implementations - I didn't have to... and that doesn't seem like is the intended design either. Apr 09 09:11:47 JakeWharton: actually it crashes at line like this: ft.add(R.id.fragment_place, mFragment); .. seems like 'ft' is null (FragmentTransaction) from ActionBar.TabListener Apr 09 09:12:03 are you using 4.0.1? Apr 09 09:12:22 4.0.3 Apr 09 09:12:27 ActionBarSherlock 4.0.1 Apr 09 09:12:44 ahm Apr 09 09:12:53 latest from git Apr 09 09:14:03 nope, sorry, @version 4.0.0 Apr 09 09:14:30 I'll try with 4.0.1 now Apr 09 09:14:47 if that's a Javadoc tag it was probably never updated Apr 09 09:15:22 it's from a comment from ActionBarSherlock.java Apr 09 09:15:28 JakeWharton: I think it now copies the file (I can't check because I don't have access), but when running a simple query I get: "SQLiteException: no such table: words: , while compiling: SELECT word, frequency FROM words WHERE word LIKE ?" Apr 09 09:15:45 but the file in the assets folder DOES have a `words` table, I just checked it Apr 09 09:19:20 you're sure you're using a SherlockFragmentActivity? Apr 09 09:20:29 i'm going to bed. post to the mailing list or bug someone else in here :) Apr 09 09:20:52 we'll get you fixed one way or another Apr 09 09:22:04 so if I have DB_PATH = "/sdcard/" it works, the query returns what I need, but if I change it to DB_PATH = "/data/data/xix.hangmansolver/databases/" it gives me that error about the table not existing which makes no sense since it works with the other path Apr 09 09:30:03 what is the type of encryption employed on the hd when you apply the encrypt tablet option? Apr 09 09:33:36 hi guys Apr 09 09:33:39 interesting question Apr 09 09:33:58 what does it take for one to become a "senior android developer" Apr 09 09:34:08 in your own words Apr 09 09:34:09 :) Apr 09 09:35:12 brains Apr 09 09:38:48 just what the hell is a "senior android developer" anyway? Apr 09 09:40:09 old people Apr 09 09:40:23 lol Apr 09 09:40:45 i dunno, seems pretty vague to me Apr 09 09:40:59 that's why i was asking Apr 09 09:41:06 hmmm.. Apr 09 09:41:30 prob someone who's had experience garbage collecting in android apps/ Apr 09 09:41:32 whre did you hear it? Apr 09 09:41:44 just crossed my mind Apr 09 09:41:53 does it mean someone who works on the android sysstem itself? Apr 09 09:42:20 hmmm.. Apr 09 09:42:21 wait Apr 09 09:43:17 I was reading articles about android development tips Apr 09 09:43:28 and i came across a word that i didn't know about Apr 09 09:43:31 "weak references" Apr 09 09:43:34 so i googled it Apr 09 09:43:39 and found this site Apr 09 09:43:40 http://weblogs.java.net/blog/2006/05/04/understanding-weak-references Apr 09 09:44:07 the first line got to me Apr 09 09:44:08 Some time ago I was interviewing candidates for a Senior Java Engineer position. Among the many questions I asked was "What can you tell me about weak references?" Apr 09 09:44:42 so this guy sort of draws the line between senior and non-senior java developer Apr 09 09:44:59 so it came to me Apr 09 09:45:18 "What constitutes a senior android developer then?" Apr 09 09:45:26 so here i am Apr 09 09:45:31 ^_^ Apr 09 09:45:35 still there kish? Apr 09 09:48:32 why is it that whatever value I put for my background's "android:gravity" and "android:tileMode" it just stretches to fill the whole background anyway? Apr 09 09:49:14 here's the xml I use for the background: http://pastebin.com/uBgfBnPw Apr 09 09:49:40 the image shows up correctly but it stretches when I turn to phone to landscape Apr 09 09:57:34 nevermind got it Apr 09 09:58:58 a simple stupid question = does kernel = modem? Apr 09 10:33:20 chups, here Apr 09 10:33:55 everyone wants to make a lot of money writing apps Apr 09 10:34:05 hehehehhe GREED is eternal in our species Apr 09 10:38:26 i agree kish Apr 09 10:38:28 hahaha Apr 09 10:38:41 but without greed, what else is there in life? Apr 09 10:38:48 we already have the things we need Apr 09 10:46:45 how can I "wrap" elements? as in stack horizontally, but if they go over the edge they should "wrap" and continue on the next line? Apr 09 11:02:17 Xix19 > elements in where? Apr 09 11:02:40 GUI? You'll have to manually keep an eye on the length Apr 09 11:05:55 chups you're very greedy but unable to acheive your goals yet Apr 09 11:05:59 how old are you, if i may ask Apr 09 11:09:53 hackkitten: nevermind, I found this http://nishantvnair.wordpress.com/2010/09/28/flowlayout-in-android/ and it works perfectly Apr 09 11:10:35 chups, im guessing youre very young! Apr 09 11:10:37 how can I programatically set the minWidth in "sp" units? I only have an option to pass an integer Apr 09 11:10:50 t.setMinWidth(40); // I want 40sp not 40px Apr 09 11:22:03 So... widgets/RemoteViews are supposed to support Buttons right? Apr 09 11:22:28 The appwidget page has a list of supported views Apr 09 11:23:00 SimonVT: Yeah, that's why I'm asking - it states that the buttons should be good to go o_o Apr 09 11:23:18 Yet I get a "Problem loading widget" :( Apr 09 11:23:41 SimonVT: http://codepad.org/apoGKbgS Apr 09 11:24:20 Maybe it was added later when the API you're testing on Apr 09 11:24:32 Try a textview Apr 09 11:24:46 If that doesn't work, at least you know it's your fault :p Apr 09 11:24:53 I'm actually running it on a 4.0.3 Apr 09 11:25:06 it works if I remove the buttons Apr 09 11:25:07 which is weird Apr 09 11:28:19 if View.layout() sets the layout's left, top, right and bottom, how do I then retrieve these values ? Apr 09 11:42:21 Is there any guidelines for 2d game backgrounds? Apr 09 11:42:35 dpi, resolutions etc. Apr 09 11:46:45 hi I created a drawable (xml) with pressed and focus states images, but when I click the item it gets highlighted orangish, how do I suppress that? Apr 09 11:50:52 ahh found it: "android:listSelector" Apr 09 12:12:41 Hello does anyone know how I can find out the sample size of the onBufferReceived of the RecognitionListener? Apr 09 12:13:23 it says it depends of the implementation but still how can I influence it Apr 09 12:20:39 having a first go at services, is there something wrong with simply extending from IntentServer and calling SystemClock.sleep() followed by a Log.d(..) ? and do I need to do something more than startService(new Intent(this, TestService.class)); to make it run ? Apr 09 12:20:47 *IntentService Apr 09 12:23:06 hi I want to read a raw resource, I have several problems, first: I created /res/raw and put my file into it, but "eclipse" can not find it when doing suggestions, so I guess that android won't find it too, do I have to announce the folder somewhere? Apr 09 12:25:14 rvsjoen, intentservices stop running at the end of onHandleIntent Apr 09 12:26:03 well that frickin explains a lot Apr 09 12:26:04 :P Apr 09 12:26:10 DarsVaeda, if the R class didn't recompile it won't know about your new resouce Apr 09 12:26:21 i'll rethink it, thanks Apr 09 12:26:35 if you need a longstanding service extend Service Apr 09 12:26:44 and handle your threading and lifecycle yourself Apr 09 12:32:23 is there something i should know if i never experienced ICS and want to develop for 2.2+ (like actionbar/fragments)? Apr 09 12:32:24 how do I recompile R in eclipse? Apr 09 12:32:46 clean project ? Apr 09 12:33:24 holde: i've been battling that beast for the past week, ActionBarSherlock seems to work quite well once you get used to it Apr 09 12:34:48 I want whenever a change is made to an EditText to select the whole content of it. So I add addTextChangedListener(new TextWatcher() { ... }); Apr 09 12:35:11 But how do I get the EditText inside the event method? afterTextChanged(Editable s) { ... } Apr 09 12:35:21 cleaning was a bad idea -.- Apr 09 12:35:27 now R is not there at all Apr 09 12:35:29 how do I get a TextEdit from the Editable? Apr 09 12:35:46 R will be regenerated Apr 09 12:36:08 hmm im getting noclassdefound when i call my gps activity, why would that be ? startActivity(new Intent(context, GPSActivity.class)); Apr 09 12:36:18 I can't simply reference the EditText by id because it's dynamically generated and has no id Apr 09 12:36:18 not really I guess cause on all working R.statements it is now saying they do not exist Apr 09 12:37:10 darn and I have no backup :( Apr 09 12:37:17 it really should be no problem Apr 09 12:37:29 have you configured eclipse to not automatically rebuild the workspace ? Apr 09 12:37:30 DarsVaeda check the problems window, it wont re-gen r.java is something is named wrongly Apr 09 12:37:50 or: how do I reference an outside variable from within a new TextWatcher() { ... } class? Apr 09 12:38:03 there is nothing named wrong I just created a folder /res/raw and put a file in it Apr 09 12:38:16 thats all I changed after it worked perfectly Apr 09 12:39:05 now it finds for example R.layout but it can not find R.layout.myLayoutFile Apr 09 12:39:14 even if it is there and worked before the clean Apr 09 12:39:57 did u look at the problems view Apr 09 12:40:02 and clean project and rebuild? Apr 09 12:40:08 i get this a lot but they usually fix it Apr 09 12:41:26 after clean it can not find R even *puzzled* Apr 09 12:41:41 yeh because theres a problem Apr 09 12:41:44 I have to import it, but I can not remember that I had to do this Apr 09 12:41:45 in the problems view Apr 09 12:41:51 ah yeh and inport Apr 09 12:42:34 Description Resource Path Location Type Apr 09 12:42:34 R cannot be resolved to a variable DepartmentTreeListActivity.java /xxx/src/de/xxx/xxx line 17 Java Problem Apr 09 12:44:08 in all test projects I did after the tutorials it is never imported Apr 09 12:44:29 something went quite wrong, clean wasn't a good thing to do it seems... Apr 09 12:46:09 there is no R.java in gen.packagename as it is in the other projects Apr 09 12:46:51 did u look at problems view Apr 09 12:47:13 yes I posted above what it is saying Apr 09 12:48:40 WARNING: doing a clean will most likely DELETE YOUR R CLASS. Since you have references to it all over your code which cant be found then they will result in errors. and since you cant compile with errors, no new R class will be generated! Apr 09 12:49:08 doing a clean will of course regenerate R class. Apr 09 12:49:23 since it's the first step of build process, before the compilation Apr 09 12:49:33 I invite you to my home to see how it does not :) Apr 09 12:52:01 do a refresh Apr 09 12:52:05 and it'll pop up Apr 09 12:52:10 if it doesn't, your project setup is broken. Apr 09 12:52:51 or, of course, you have an error in XML and building of R file fails Apr 09 12:53:47 the only errors I have is that R is not there Apr 09 12:54:03 if it can not recreate R because of that then...oh well Apr 09 12:54:48 redicilous Apr 09 12:56:32 thats really stupid, all the R no resource erros prevented to generate R.java Apr 09 12:56:50 I uncommented all lines and then it did generate R.java and I could recomment Apr 09 13:03:44 I have a class: "ProfileSyncTask extends AsyncTask" with a custom constructor ProfileSyncTask(int action, String whatever..) which calls super() on the first line. However, instantiating the class with ProfileSyncTask task = new ProfileSyncTask(22, "q"...) gives me the error Type Mismatch "Cannot convert from AsyncTask to ProfileSyncTask. "AsyncTask task = new ProfileTask(...)" Apr 09 13:07:33 what's a good way to handle errors? is there an easy way to display an error message ? Apr 09 13:07:49 Xix19: You can use a toast notification Apr 09 13:08:17 Xix19: Toast.makeText(context, "Message", Toast.LENGTH_SHORT).show(); Apr 09 13:08:24 ok nice Apr 09 13:08:26 thanks Apr 09 13:09:10 Xix19: Depends on the situation. Logcat is useful for normal debugging messages which you don't want the user to see. You can write messages with "Log.d("Tag", "Message");" Apr 09 13:09:11 and how do I exit the application after? Apr 09 13:09:31 no, this I want for the user as it's fatal and will exit after Apr 09 13:09:36 Xix19: If it's an activity, you can end it with "finish();" Apr 09 13:09:48 cool Apr 09 13:14:32 Does ice cream sandwich have any changes which could affect singleton behavior when an activity is invoking a method on a different activity's method, and the static instance field becomes null? Apr 09 13:15:51 I am going to help some people out which get lots of NullPointerException error messages and they seem to come from ICS users in particular and I suspect it's related to their way of doing OtherActivity.getInstance().refreshTabs() Apr 09 13:16:46 Eh.. Don't keep static references to activities Apr 09 13:16:47 What is the best practice to do that… Refresh tabs on a different activity. Apr 09 13:16:52 And definitely don't treat it as a singleton Apr 09 13:16:57 SimonVT: I know, this is not my code, I wanna change it. Apr 09 13:17:18 the main activity sets mInstance = this in onCreate() and then later it seems to cause an NPE Apr 09 13:17:37 SimonVT: any suggestions on how I can change this into a non-singleton pattern? Apr 09 13:18:03 Intents? Apr 09 13:18:12 Inter-process-communication? Apr 09 13:18:30 Why do you even need to do this Apr 09 13:18:45 hmm im drawing a rectangle on a canvas but i dont see it, i see the text and images tho Apr 09 13:18:56 They have a login activity which refreshes the tabs on the main activity Apr 09 13:19:02 SimonVT: ^ Apr 09 13:19:08 Gaz`: Have you set up a fill style? Apr 09 13:19:14 oh god.. Apr 09 13:19:16 yes skfax Apr 09 13:19:34 Well, you should probably start the login activity with startActivityForResult or something.. Then handle it in onActivityResult Apr 09 13:20:01 SimonVT: Sounds like a great suggestion Apr 09 13:20:12 I will have to dig into their code and see if that is possible Apr 09 13:20:16 Gaz`: Can you pastebin some of the code? Apr 09 13:21:28 http://pastebin.com/STfYjfKz Apr 09 13:21:40 tried new bounds, 100,100,100,100 still nothing paints, weirdas Apr 09 13:22:09 So, Gaz` Apr 09 13:22:17 All 4 corners of the rectangle are in the same point Apr 09 13:22:24 oh lol Apr 09 13:22:31 keep forgetting its diff to j2me Apr 09 13:22:32 !! Apr 09 13:22:33 doh Apr 09 13:22:35 guys Apr 09 13:23:09 hmm still nothing Apr 09 13:23:23 how are there kits that auto generate modded systemui.apk for battery images and stuff Apr 09 13:23:30 when systemui.apk requires system signature? Apr 09 13:24:36 Gaz`, i assume you're painting onto a black background? Apr 09 13:24:51 yeh Apr 09 13:24:55 wait might have it Apr 09 13:25:07 yeh works now weirdly Apr 09 13:25:58 Gaz`: Can be useful to do a canvas.drawColor(Color.BLACK); to clear the canvas before painting Apr 09 13:26:08 right Apr 09 13:26:09 cheers Apr 09 13:31:45 has teh google made a new miscalc in dl'count or was it just mine stats that went through the roof? Apr 09 13:33:14 where can i find the style sheets for the light and dark themes? Apr 09 13:33:35 jakob|: Normal here Apr 09 13:34:03 what does that proggie do gaz` Apr 09 13:34:20 skfax: aight, thx Apr 09 13:40:09 where can i find a reference of every style available? Apr 09 13:44:05 Hello, i am using ubuntu 11 , eclipse indigo, latest android sdk, and i am able to run the hello world sample, however is it true that i cant resize the emulator window or am i missing something ? Apr 09 13:45:30 hey, if I'd like the user to go to a new screen after clicking on a button ...how would I do that? Apr 09 13:46:27 an Intent Apr 09 13:47:14 wongk-home: alright Apr 09 13:48:05 asterisk-Tester: You have to set the emulator screen size before starting the emulator Apr 09 13:48:28 wmbest2: yeah i noticed that but once it runs i cannot modify it , right ? Apr 09 13:49:34 my styles for textviews are overriding my styles for buttons Apr 09 13:50:34 I'm trying to anchor a view to an ActionItem but I don't see a way to get the specific view from the ActionBar... Am I missing something here? Apr 09 13:51:23 or should I create the ActionItem as a custom view... that would probably work. Apr 09 13:55:32 how can I open a resource in a class that is called in an activity? Apr 09 13:57:13 asterisk-Tester: No, thats correct Apr 09 13:57:34 hmm ive got a mpaview thats workign now but when i hit back key it simply wont respond, works in all my other activities Apr 09 13:57:36 wongk-home: is there any way to make the androidMainifest file to automatically know update itself that a new intent and new xml file has been created? Apr 09 13:57:50 john_doe_jr: no Apr 09 13:57:55 DarsVaeda u can refer to its id Apr 09 13:58:17 something like bmp = BitmapFactory.decodeResource(getResources(), R.drawable.smallmarker); Apr 09 13:59:12 as far as I understand it I have to get it from the context (which is passed to the class in the constructor) Apr 09 13:59:25 then I have to get it from the context right? Apr 09 13:59:28 what arer you trying to get at Apr 09 13:59:38 a raw file resource Apr 09 14:00:45 aka I want to read a file in /res/raw in a class that is called in my activity Apr 09 14:00:52 something like InputStream raw = context.getAssets().open("filename.ext"); Apr 09 14:00:59 getResources().openRawResource(R.raw.file_name); Apr 09 14:01:27 DarsVaeda: Gaz`'s answer is better Apr 09 14:01:27 wmbest2: that is what I am now, but getResources does not exist Apr 09 14:01:56 try context.getResources Apr 09 14:02:06 if its not in the activity youll have to pass context into the function Apr 09 14:02:42 defining all text views to have a black text color is causing my action bar menu text color to also change. defining titleTextStyle does not override the text view color Apr 09 14:03:15 im very confused, back key soimply wont work on a mapactivity Apr 09 14:05:09 uhm in my class there is a innerclass that gets the context and passes it to the extended parent so I can access that but it does not have such function Apr 09 14:07:39 Anyone know it's it's possible to have a XML gradient AND an image in a single ImageView? I have an expandable listview, and I want to overlay an expand and collapse arrow over my gradient Apr 09 14:09:42 MarkG123: Not sure how this would even perform but it might be possible to use a layered drawable Apr 09 14:10:03 Im sure there are better ways to go about it though Apr 09 14:10:12 Is there any other approach I could use? Apr 09 14:11:19 what good is actionMenuText(Appearance|Color) if the textViewStyle overrides it? Apr 09 14:12:00 hi again, according to this : http://developer.android.com/reference/android/app/NativeActivity.html starting with sdk version 9 , it is possible to write an app entirely in c++, however in eclipse android sdk manager i can only see samples for sdk api 7,8,10,11,12,13,14,15 .... does anyone know why ? Apr 09 14:12:14 ps: android api version 9 is gingerbread is android 2.3 right ? Apr 09 14:13:20 asterisk-Tester: that means the samples didn't change from version 8 to 9 Apr 09 14:13:37 anyone has a good suggestion as to how to create a popup dialog that is anchored to an ActionItem such as.. http://android-patterns.rickreation.com/img/sets/context-help/foursquare-checkin.jpeg Apr 09 14:14:15 http://codepaste.net/y2pt56 -> here is a code exerpt, how do I access the resource at line 27? Apr 09 14:15:07 wongk: mmm seems like this NativeActivity does not have a sample in the sdk then Apr 09 14:15:19 DarsVaeda, this seems like it is related: http://stackoverflow.com/questions/2856407/android-how-to-get-access-to-raw-resources-that-i-put-in-res-folder Apr 09 14:15:47 asterisk-Tester: likely not, using the NDK is not typical Apr 09 14:16:00 and has all sorts of issues Apr 09 14:16:22 alexfu: thanks my problem is that I do not have access to call getResources Apr 09 14:16:55 DarsVaeda: You're passing the context to the class.. Use that context? Apr 09 14:17:45 pass the resources to the class? Apr 09 14:17:50 SimonVT: thanks, that is what I am trying but failing obviously, probably it is too simple but I'm new to java and android so I guess I miss something Apr 09 14:17:56 pass the actual resources that you need to the class? Apr 09 14:18:09 you're passing a context and calling context.getResources(), and that's failing? Apr 09 14:18:12 canadiancow|work: nope that would be not a good idea Apr 09 14:18:15 st or gtfo Apr 09 14:18:45 calm down... Apr 09 14:18:56 context does not have getResources Apr 09 14:19:18 wongk: yeah noticed that, but why is Google not enforcing C/C++ app development , just because of complexity to the developpers, or for the OS security / stability? Apr 09 14:19:20 DarsVaeda, http://developer.android.com/reference/android/content/Context.html#getResources() Apr 09 14:19:31 DarsVaeda, sure it does. Apr 09 14:19:51 enforcing C/C++ app developmen? Apr 09 14:19:55 no sorry I meant in my code, when I type context. there is no such proposal Apr 09 14:20:12 Have you heard of member/instance variables? Apr 09 14:20:40 C++ is second class citizen still Apr 09 14:21:07 asterisk-Tester: did you get the NDK? Apr 09 14:21:19 asterisk-Tester: what do you mean by enforcing? Apr 09 14:21:41 NOT the SDK... Apr 09 14:21:52 SimonVT: me? Apr 09 14:21:55 yes Apr 09 14:22:58 in general yes I think so Apr 09 14:23:18 [10:12:00] hi again, according to this : http://developer.android.com/reference/android/app/NativeActivity.html starting with sdk version 9 , it is possible to write an app entirely in c++, however in eclipse android sdk manager i can only see samples for sdk api 7,8,10,11,12,13,14,15 .... does anyone know why ? Apr 09 14:23:18 [10:13:20] asterisk-Tester: that means the samples didn't change from version 8 to 9 Apr 09 14:23:22 no wongk Apr 09 14:23:23 not even close Apr 09 14:24:09 yes, i am aware of the ndk, but that's based on a system like JNI right ? there is a performance hit on each natove call and such, I mean why couldnt the application "package" be in binary/native form ? I suppose under ios you can natively link your native code to the application code (but i am not sure abt that) Apr 09 14:24:18 asterisk-Tester, it's because api level 9 is essentially obsolete Apr 09 14:24:26 2.3.3 is the new 2.3 Apr 09 14:24:45 So.. Keep the context in an instance variable, and use that Apr 09 14:24:46 canadiancow|work: yes i just noticed that 10 is 2.3.3 Apr 09 14:25:04 Or alternatively, google some java tutorials, cus this is pretty basic stuff Apr 09 14:25:34 asterisk-Tester: the platform is java, so yes, JNI is necessary Apr 09 14:25:43 DarsVaeda, as SimonVT mentioned, in your constructor, save the passed in Context to a instance variable and then use that in your onCreate method. Apr 09 14:25:55 unless you only interact with other native libraries Apr 09 14:26:14 which would mean no gui Apr 09 14:27:03 wongk: when you say platform you mean the dalvik jvm, but the os is a linux one = friendly with C and C++ Apr 09 14:27:17 the main hurdle would be that you would cross-compile for arm, and your application would run on non-arm hardware Apr 09 14:27:27 alexfu: I was in the impression I did that Apr 09 14:27:35 would not Apr 09 14:27:52 asterisk-Tester: Android is much more than linux Apr 09 14:30:27 wongk: of course it is much more that linux ;-) ... but i dont understand this problem the cpu /gpu portability thing ... windows can run on many different hardware setup, even linux run on AMD, intel, nvidia, .... Apr 09 14:30:43 DarsVaeda, are you using eclipse? Apr 09 14:30:54 I found my mistake the context was "private final context" not "private static context" in the class -.- Apr 09 14:31:16 I mean the same native executable could be used on any pc , except for advanced graphic stuff, where the dev would put if() clauses and stuff Apr 09 14:41:42 hey, does anyone know a good solution for a horizontal thumbnail view with view recycling? the built in Gallery class is really clunky Apr 09 14:42:16 basically something like HorizontalScrollView but with view recycling Apr 09 14:43:01 asterisk-Tester: that is not true Apr 09 14:43:36 compile any written in C++ on windows and tell me if it runs on linux Apr 09 14:43:49 wongk: no of course not Apr 09 14:44:13 i meant in windows world alone and in linux world alone (but each on different hardware setup) Apr 09 14:44:20 I have a HelloWorld than almost runs :-) Apr 09 14:44:46 Try and compile a binary for ARM and run it on x86 Apr 09 14:45:03 asterisk-Tester: because AMd and Intel are both x86, that is not true for x86 vs. power pc on Mac OS X Apr 09 14:45:36 zambo, a horizontalscrollview with recycling IS a gallery Apr 09 14:45:50 if you have a manufacturer releasing a mips device, for example (which exists), native code caompiled for arm will not run on it Apr 09 14:45:52 wongk: true, but arent all ARM coming from the same base architecture , or not ? Apr 09 14:46:20 same for android-x86 Apr 09 14:46:40 so use java Apr 09 14:46:43 solves all your problems Apr 09 14:47:19 thoughts i never would have had in the past: java is the solution to all my problems :P Apr 09 14:47:59 So apple has the lluxury to use native code because it restricts cpu to arm, but since android is open any hardware manufacturer could use any cpu wich would make native portability hell ? Apr 09 14:48:25 canadiancow|work: it doenst solve *all* problems just portability ones, but not performance ;-) Apr 09 14:48:26 is there something like a canvas.drawResource from one of my R.drawables? Apr 09 14:48:31 Apple created the universal binary Apr 09 14:48:58 1 'application' may have 4 binaries stuffed in it Apr 09 14:49:02 asterisk-Tester, give me an example of something you'd run on a PHONE where java's "performance" causes problems Apr 09 14:50:18 canadiancow|work: any 3D "heavy" game Apr 09 14:50:24 the lag is apparent Apr 09 14:50:46 no, that's an example of not knowing how to write good code Apr 09 14:51:00 just because YOU can't write performant java doesn't mean it can't be done Apr 09 14:51:06 Hi ppl! I recently developed an android game "Hot Hands" available on play store, but it was developed with a raster approach using Android Canvas. My question is that someone knows some really good 2D or 3D engines, because I have found some engines like (starling, andengine, unity 3d), but no one made seems perfect to game development (graphic s and physics engine). Apr 09 14:51:33 Thresh0ld, what issues did you have with AndEngine? Apr 09 14:52:11 no issues.. i'm just trying to piick the better one :) Apr 09 14:52:20 canadiancow|work: I am not talking abt myself, never tried to write a game yet but as a user i can feel the lag Apr 09 14:52:22 nevermind, found it! Apr 09 14:52:23 Bitmap reload = BitmapFactory.decodeResource(getResources(), R.drawable.reload); Apr 09 14:52:26 well i like andengine, but it's a 2d engine Apr 09 14:52:41 i think that the main problem with andengine is the cross compatibility Apr 09 14:52:52 like with iOS? Apr 09 14:52:59 yes Apr 09 14:53:03 hello! can someone please tell me - what is the best way to programmatically add an indefinite number of EditTexts to a layout, and keep track of all their inputs for future reference in code (like packing the input into a JSON)? Apr 09 14:53:15 it's the only free engine that runs on android that i've used that doesn't suck Apr 09 14:53:59 while (true) { EditText e = new EditText(context); mRootView.addView(e); mList.add(e); } Apr 09 14:54:08 have you tried starling? it seems nice but is flash (air) and needs some extra physics engine Apr 09 14:54:08 canadiancow: a gallery is what I am looking for, but it doesn't seem to have an option to anchor all the items to the left (eg. gravity:left) Apr 09 14:54:28 how do you trigger a focused event on a touch device? I mean physically? Apr 09 14:54:34 and when you select items in the gallery, it has strange centering behavior Apr 09 14:54:57 Thresh0ld, i have not Apr 09 14:55:08 zambo: yea =\ Apr 09 14:55:14 if only there were a HorizontalListView, eh? Apr 09 14:55:22 that would be amazing Apr 09 14:55:24 and a VerticalGallery, while they're at it Apr 09 14:55:37 vertical gallery could be grid Apr 09 14:55:40 gridview* Apr 09 14:56:00 canadiancow|work: will your code work if i want to insert the edittexts into a linearlayout that is inside a scrollview? Apr 09 14:56:06 yes Apr 09 14:56:16 as long as mRootView is a ViewGroup, it works Apr 09 14:56:21 in your case, it would be the LinearLayout Apr 09 14:56:28 wongk: so how does the ndk solve the native portability issue ? or in the settings u have ti manually select ur targeted device ? Apr 09 14:57:16 it doesn't afaik... i have never actually used the NDK Apr 09 14:57:33 you can include multiple native binaries in an apk Apr 09 14:57:42 so arm, armv7, x86 (i think those are the only three right now) Apr 09 14:57:43 oh, nice Apr 09 14:57:49 but then you've got a bigger apk Apr 09 14:57:54 and IT WILL NOT WORK ON GOOGLE TV (!!!) Apr 09 14:58:34 there is at least one mips tablet made by some chinese manufacturer Apr 09 14:58:54 canadiancow|work: ok but is there a phone / tablet that uses x86 processor ? Apr 09 14:58:58 http://techcrunch.com/2011/12/05/99-chinese-tablet-is-mips-based-runs-android-4-0/ Apr 09 14:59:17 yes Apr 09 14:59:28 wongk, so ndk wont work on it Apr 09 14:59:33 and asterisk-Tester, yes Apr 09 15:00:44 canadiancow|work: what if I wish to put the code you gave into a java class that is not the activity that i want the code to interact with? do i have to change the context parameter of new EditText(context) ? Apr 09 15:01:38 no...it still needs a context Apr 09 15:01:57 when you compile using the ndk it will make native libraries for all of the supported platforms (unless you tell it not to). When you install the app it will use the library appropriate to the platform you're running on. Apr 09 15:04:11 thanks got it working! Apr 09 15:04:42 and the biggest change since ndkr5 is that now u can have ur "main" in c++ while before u had to had ur main in java and making JNI calls ? Apr 09 15:05:41 you "can" u dont have to do that... Apr 09 15:07:14 Jug6ernaut: yes but before ndkr5 it was impossible, right ? Apr 09 15:08:32 idk @ which version Apr 09 15:08:38 but that was a simi recent change yes Apr 09 15:08:49 if i setContentView a second time, do i need to reassign my member variables for my views? Apr 09 15:08:58 what does a Dictionary.get("x") return is the key "x" does not exist? The documentation says null but Integer can't be null! Apr 09 15:09:06 if* Apr 09 15:09:16 Integer can be null Apr 09 15:09:17 int can't Apr 09 15:09:22 ^ Apr 09 15:09:24 yes it can :) Apr 09 15:09:29 Integer != int Apr 09 15:09:40 i see Apr 09 15:09:52 like int? in C# ? Apr 09 15:09:53 Integer is an object representation of an int primitive Apr 09 15:09:58 like "int?" in C# ? Apr 09 15:10:03 C#'s int is an object Apr 09 15:10:23 <3 C# Apr 09 15:10:30 and I simply do "if (result == null) ... " Apr 09 15:10:49 <3 C# or if (map.contains(key)) ... Apr 09 15:11:00 yes Apr 09 15:11:09 visual studio is my all time favourite IDE Apr 09 15:11:23 i agree that visual studio is awesome Apr 09 15:11:33 but eclipse is close in quality Apr 09 15:11:39 LOL Apr 09 15:11:41 no really :P Apr 09 15:11:55 eclipse gets OOMs more than my app! Apr 09 15:12:18 is there a good way to verify that the acceleration sensor in one's phone is working properly? Apr 09 15:12:30 shake shake shake Apr 09 15:12:32 VS would be awesome of it stripped away all of the kludge and didn't use a gig of memory Apr 09 15:12:44 eclipse easily uses a gig Apr 09 15:12:55 my eclipse is using 1.2GB right now Apr 09 15:13:24 500MB Apr 09 15:13:38 with 3 projects open and debugging Apr 09 15:14:14 no matter what i di i cant get eclipse to cast Apr 09 15:14:29 * hackkitten drops her phone to see whether it reports 0, 0 for X, Y Apr 09 15:14:29 in a widget project wtf Apr 09 15:14:30 :D Apr 09 15:15:18 ugh Apr 09 15:15:31 canadiancow|work: obviously .. eclipse is what happens when you strip away the kludge and bloat from VS .. then package all that pure kludge and bloat as an IDE Apr 09 15:15:34 i just found an onTouch method that sets different colours for pressed/not pressed Apr 09 15:15:40 * oGMo runs Apr 09 15:15:55 time to do a git blame and teach someone about StateListDrawable Apr 09 15:16:03 haha Apr 09 15:18:12 * hackkitten hugs MSVS~ Apr 09 15:18:20 * hackkitten waits for Eclipse to unfreeze yet again Apr 09 15:19:57 hi! I'm writing an enum that includes a function. The function needs to change the value of the enum. How do I do this? Apr 09 15:20:34 what's an easy way to sort a HashMap by it's value? Apr 09 15:20:42 I want the characters with most occurances Apr 09 15:20:53 google is failing me Apr 09 15:21:28 sorting is n * log(n), a linear search is, well, linear Apr 09 15:21:56 wongk: sorry, was that for me? Apr 09 15:21:59 yes Apr 09 15:22:09 i know that Apr 09 15:22:10 http://pastebin.com/29rJ5394 Apr 09 15:22:22 what does it have to do with my question? Apr 09 15:22:29 why would you want to sort to find a value, then? Apr 09 15:22:29 main and imagebutton1 wont cast Apr 09 15:22:33 i think what he's saying is "what are you trying to do" Apr 09 15:22:55 wongk: I need the top 5 characters with the biggest corresponding value Apr 09 15:23:52 i did say "characters", not "character" :) Apr 09 15:24:52 im not coming up with a great solution to that problem Apr 09 15:25:10 other than populating a sorted map Apr 09 15:25:29 ok, I'll do that then Apr 09 15:26:03 hmm toast doesnt seem towork from virtually anywhere, is there a way to call it from whatever thread etc your in Apr 09 15:26:13 i find it a bit weird since this is needed for every "top x by group" problem Apr 09 15:26:26 that no simple solution exists Apr 09 15:26:42 new Handler(Looper.getMainLooper).post(new Runnable() { @Override public void run() { Toast.makeText(...).show(); } }); Apr 09 15:26:51 some syntax errors in there, but the idea is sound Apr 09 15:26:57 thanks man Apr 09 15:27:10 it's also possible to maintain 2 containers if this is data you'll need frequently Apr 09 15:28:23 anyone has a good suggestion as to how to create a popup dialog that is anchored to an ActionItem such as.. http://android-patterns.rickreation.com/img/sets/context-help/foursquare-checkin.jpeg Apr 09 15:28:57 you know if you longpress on an action item, it pops something up on its own, right? Apr 09 15:29:14 canadiancow|work, yes... Apr 09 15:29:31 canadiancow|work, that isn't my goal, however... Apr 09 15:29:54 Could be a PopupMenu.. Or just some custom view/viewgroup Apr 09 15:30:41 canadiancow|work, my goal is to anchor a view to an item so it will display when the app is first installed. Apr 09 15:32:35 I guess my next question is, is there any way to get the view of an action item in the action bar? Apr 09 15:32:54 or would I just have to specify a custom view for that action item. Apr 09 15:34:44 Hi ppl! I recently developed an android game "Hot Hands" available on play store, but it was developed with a raster approach using Android Canvas. My question is that someone knows some really good 2D or 3D engines, because I have found some engines like (starling, andengine, unity 3d), but no one made seems perfect to game development (graphic s and physics engine). (sorry for repetition) Apr 09 15:43:00 what the fuck Apr 09 15:43:00 http://www.facebook.com/Andropedia Apr 09 15:43:05 how is that allowed to survive Apr 09 15:44:53 wouldn't the developers need to file takedowns with facebook? Apr 09 15:45:02 Awesome, thanks for the link! Apr 09 15:45:25 yeah, sweet! Free apps! Apr 09 15:45:59 Because $0.99 is just too darned expensive ;P Apr 09 15:46:03 evancharlton - developers? fuck that Apr 09 15:46:09 that's what legal teams are for Apr 09 15:46:29 also helps when your company is 10% of facebook's revenue or whatever ;) Apr 09 15:46:33 canadiancow|work: developers are the ones who hold the copyright, br0 Apr 09 15:46:52 im pretty sure our lawyers would disagree with you there ;) Apr 09 15:47:10 "developers" = "company making the app" Apr 09 15:47:14 yea yea Apr 09 15:47:32 i stand by [11:46:09] that's what legal teams are for Apr 09 15:47:32 Gotta love that moment when you really want to add a new feature but you really don't want to figure out how to do it. Apr 09 15:47:48 INTERNS! Apr 09 15:47:51 * pragma- snaps his fingers. Apr 09 15:47:57 :) Apr 09 15:49:53 does anyone know a good tutorial how to use the SpeechRecognizer? Not the RecognizerIntent Apr 09 15:49:59 hi, i need two things: repeat something every minute and doing stuff in a background thread as i suppose it will cause some workload. Should I use AsyncTask for both? I am a little lost with the handler stuff (but i think i created one, just don't know how to post something every n milliseconds or something) Apr 09 15:52:54 tldnr: i need stuff done every b seconds, how to?; should i use AsyncTask for any huge Workload? Apr 09 15:53:06 ~n seconds Apr 09 15:53:22 cougarten: AsyncTask, Handler.postDelayed(..), IntentService Apr 09 15:53:27 all are viable choices Apr 09 15:53:50 ok :) Apr 09 15:54:25 do you know if android will soon support natively ExFat filesystem for SDXC memory cards? Apr 09 15:59:53 evancharlton, http://www.pastie.org/3756314 is this correct to set up a seperated handler i can postDelayed() on? Apr 09 16:04:45 How do I find the link a user can follow on their phone to install my app? Apr 09 16:05:13 explodes, either you need to publish it to the market Apr 09 16:05:24 done Apr 09 16:05:28 or you will have to host und provide the apk somhere Apr 09 16:05:32 I guess it look like: market://details?id=com.yourcompany.yourapp Apr 09 16:06:06 ah, no Idea since the new play thing Apr 09 16:06:53 for a simple http link it's http://play.google.com/store/apps/details?id=whatever.id\domain.thing.you.gave.it Apr 09 16:07:00 i doubt play would have changed something as basic as that Apr 09 16:07:13 imagine the huge amount of links that would become useless if it had Apr 09 16:07:19 Does that link pull up the play store? Apr 09 16:07:28 That would pull up the web page for it Apr 09 16:07:33 gsteinert, for my browser/ROM the http links don't snap to tho "open with" choice anymore Apr 09 16:08:20 is that because you've checked the 'don't ask again' box though? Apr 09 16:08:34 gsteinert, no, I don't think so Apr 09 16:09:24 I'm sure I've seen a few of those boxes since play was play Apr 09 16:10:24 gsteinert, maybe it's the dolphinbrowser i use Apr 09 16:10:46 explodes, it remained market://details?id= Apr 09 16:11:19 Awesome, thanks. Apr 09 16:11:41 explodes, if in doupt look up your ID in the manifest.xml (package="Your.Id") Apr 09 16:11:46 ~doubt Apr 09 16:11:53 can you make the acitonbar icon different than the app icon? Apr 09 16:12:06 Yes Apr 09 16:13:17 How can I manually call an onDraw event for my View? Eg I want to refresh my drawings Apr 09 16:13:41 View.invalidate() Apr 09 16:13:49 can anyone tell me if this is the correct way to set up a handler for a parallel processing thread? http://www.pastie.org/3756314 Apr 09 16:14:10 Is there any easy/convenient way to view the current shared preferences for my app using adb tools / eclipse? Apr 09 16:14:37 That did the trick! Thanks SimonVT :) Apr 09 16:14:57 PRetty peculiar name, I'd name it refresh() or update() Apr 09 16:15:05 If you're root, you can just pull the preference xml from data/data/package Apr 09 16:15:30 I have a string with html formatting and I display it in 2 places, once in an activity and once in a dialog, using html.fromHtml. When showing in the activity, all the formattings displays, in the dialog, only bold displays but no links Apr 09 16:15:43 any ideas why? Apr 09 16:16:06 the code is pretty much the same for loading it up Apr 09 16:16:10 in both cases Apr 09 16:16:19 Does anyone have some free web space available... To test out a link to my app for the market... Apr 09 16:16:34 I could piggy back it on one of my works websites I guess Apr 09 16:18:40 Anyone got a root toolkit they would recommend for the Galaxy Nexus? Is Wug's good? Apr 09 16:19:21 skfax: #android-root Apr 09 16:23:01 canadiancow: setIcon(), setLogo() Apr 09 16:35:23 i have eclpse on 3 machines and this one machine always throws errors that dont exist im running indigo Apr 09 16:37:09 i clean it up and no errors show then i try to run it and bam errors Apr 09 16:37:23 but nothing in the project suggesting any Apr 09 16:37:41 i just reinstalled eclipse also latest android adp Apr 09 16:37:49 adt* Apr 09 16:42:00 http://mobile.slashdot.org/story/12/04/08/0546247/google-earns-2-per-handset-apple-575 Apr 09 16:42:03 stories like that... Apr 09 16:43:26 …prove how over priced apple products really are Apr 09 16:43:38 that story is untrue Apr 09 16:44:13 also funny in that context: http://www.mvpriyank.com/microsoft-earns-5-for-every-android-phone-by-htc/ Apr 09 16:44:22 google earns on the market which didnt ofer a paid app feature till late 2008 q1 2009 Apr 09 16:45:21 Anyone know the reason for this message? (Running app on emulator) - D/SntpClient(68): request time failed: java.net.SocketException: Address family not supported by protocol Apr 09 16:46:23 god the avd is so slow Apr 09 16:46:26 wtf google Apr 09 16:46:33 it's arm emulation Apr 09 16:46:48 is it slow even for i7 users and such ? Apr 09 16:46:51 yes Apr 09 16:46:52 time for submission :) Apr 09 16:47:02 oh thanks god Apr 09 16:47:02 so glad google doesn't have a process like Apple with submission. Apr 09 16:47:03 azm, you should try running a tablet-sized avd Apr 09 16:47:09 I wanted to buy new computer Apr 09 16:47:20 x86 + GPU support works wonderfully :) Apr 09 16:47:45 yea, is the android x86 4 rc running with eclipse as in debug mode well ? Apr 09 16:47:50 Im gonna try Apr 09 16:47:51 does the x86 avd work on linux already? Apr 09 16:47:57 the 2.2 is too old Apr 09 16:48:39 Ge0rG, why wouldnt > Apr 09 16:48:41 Ge0rG: sorta, there are instructions to set it up for linux, but not supported oob Apr 09 16:48:42 *? Apr 09 16:48:54 Ge0rG: also, the x86 emulation sucks ass Apr 09 16:49:17 there is only support for api 10, no google apis, and tons of stuff missing from the image Apr 09 16:49:24 Description Resource Path Location Type Apr 09 16:49:24 Error generating final archive: Debug Certificate expired on 2/21/12 11:40 AM Unknown Android Packaging Problem Apr 09 16:49:29 lol wtf Apr 09 16:49:35 so you guys tell me that all devs are stuck with this crazy slow avd or using real phone ? Apr 09 16:49:59 dominicdinada: welcome to android development! Apr 09 16:50:00 i use avd's without a problem, just cant do ics very well Apr 09 16:50:21 i never made a debug cert on this computer Apr 09 16:50:32 dominicdinada: it was created automatically Apr 09 16:50:33 birbeck, so if i install the lower api with the emulator it runs faster ? Apr 09 16:50:38 dominicdinada: it is auto generated when you set up the sdk Apr 09 16:50:43 hi, it is possible to map a hostname to a ip on android sdk 4 api 11 ? Apr 09 16:50:50 how to fix that ? Apr 09 16:51:02 Find the .android folder and delete debug.keystore Apr 09 16:51:08 azm: yeah, depending on hardware, api 10 and lower runs like butter Apr 09 16:51:15 great Apr 09 16:51:41 enapupe: sure, just adb shell vi /etc/hosts Apr 09 16:51:47 in eclipse or the sdk Apr 09 16:55:59 SimonVT: thankyou Apr 09 16:56:00 birbeck: must learn this adb thing Apr 09 16:59:39 Hey, question: Apr 09 16:59:48 Does the kernel directly control the signal of the usb port of the android device? Apr 09 17:00:10 Gaboose: not sure what you're asking Apr 09 17:00:32 besides form data, and request headers what else could keep a site form reponding correctly, giving me a 404 error Apr 09 17:01:15 dragorn, well, from what ive seen in the android code, you can only communicate with usb devices throught some sort of protocol, interface Apr 09 17:01:30 Jug6ernaut restricted access? Apr 09 17:01:38 im thinking on what level can you directly turn on and off the data+ data- contacts on my nexus one Apr 09 17:01:41 is it kernel? Apr 09 17:01:42 Gaboose: If you're in host mode you communicate with them like any other pc in host mode; android has an API for assigning the device Apr 09 17:01:47 Gaboose: oh. no, you can't do that on USB. Apr 09 17:01:56 Atarii i can access it from the broser, but not directly(like just putting hte url) Apr 09 17:01:57 why not? is it hardcoded in the board? Apr 09 17:02:04 Gaboose: you have a USB controller chip, not GPIO pins Apr 09 17:02:09 so i know its some data that has to be passed to it...but idk what im doing wrong Apr 09 17:02:10 Gaboose: that's not how USB works Apr 09 17:02:26 google should make news PC os out of android Apr 09 17:02:36 finaly some good linux Apr 09 17:02:39 x) Apr 09 17:02:41 oh, i see Apr 09 17:02:44 * abaratican stabs azm. Apr 09 17:02:45 thanks dragorn Apr 09 17:03:33 Gaboose: if you have an android 3.2 or 4 device you can communicate directly with usb devices using the android api for doing so, and if you have a microcontroller with gpio you can talk to it and use that. Apr 09 17:03:56 How do you scale an image up or down in an image view? Apr 09 17:04:16 hi all Apr 09 17:04:20 dragorn, yea, what i wanted to do is control a motor with the phone without an additional microcontroller in between Apr 09 17:04:32 Gaboose: yeah that's not going to happen Apr 09 17:04:51 Jug6ernaut user agent Apr 09 17:05:01 Gaboose: but since you can do usb device mode in a $1.50 micro Apr 09 17:05:26 question about casting Apr 09 17:05:27 Gaboose: just suck it up and do it. I suggest the attiny85 as a minimal device which can talk basic USB using the vUsb library Apr 09 17:05:49 dragorn, wont it cost additional $50 for the programmer? Apr 09 17:05:59 Gaboose: you can do ISP programming on the avrs for about $9 Apr 09 17:06:31 Atarii set via request header Apr 09 17:08:23 dragorn, do they sell those as a complete board? or do i have to construct it? Apr 09 17:08:26 Gaboose: a tiny85 needs 2 resistors and a voltage regulator to be a usb device with 4 or 5 gpio pins, it's dead simple. google avr and vusb Apr 09 17:09:03 if you're going to be controlling a motor you're going to be doing a lot more design than this because you can't drive a motor off usb voltage sanely, especially not on a phone. I think you have some research to do. Apr 09 17:09:45 im going to use ECS, its not that hard Apr 09 17:09:52 for motor control Apr 09 17:10:52 dragorn, what about 2.3.6 android? nexus one seems to not go any further Apr 09 17:10:56 I don't see anything gong on in logcat in elcipse :\ Apr 09 17:11:04 Gaboose: you need usb host mode capability Apr 09 17:11:27 what about usb accessory mode? Apr 09 17:14:18 dragorn, what about usb accessory mode? Apr 09 17:14:35 would that do? Apr 09 17:14:43 Gaboose: you need a USB host mode controller on your circuit then Apr 09 17:14:52 Gaboose: and several amps of power at 5v Apr 09 17:14:55 Gaboose: it's documented Apr 09 17:15:09 and thats not going to happen with attiny85, right Apr 09 17:15:19 absolutely not. you need a large battery pack and a usb controller. Apr 09 17:15:40 accessory mode means the phone is a usb device, you need to provide the equivalent of a computer to be the other side of usb Apr 09 17:16:17 the emulator is still a piece of shit. I don't understand why can't google release somehting less buggy Apr 09 17:16:34 here goes $10 setup then :\ Apr 09 17:16:41 phpN00b, have you tried the x86 emu? Apr 09 17:17:11 I installed androidx86 in virtualbox yesterday, works rather good Apr 09 17:17:23 k, thanks dragorn! Apr 09 17:17:52 no the official x86 emu Apr 09 17:18:30 Gaboose: if you want to talk USB you really want to target android 4 Apr 09 17:18:37 Gaboose: then it's cheap and easy Apr 09 17:18:57 Gaboose: alternately you can talk bluetooth; there are < $10 bt rfcomm modules that are easy to design boards around Apr 09 17:19:43 dragorn, is bt latency significant? i kind of want minimal latency Apr 09 17:21:33 canadiancow, I am using the windows version.. Apr 09 17:21:41 canadiancow, not sure which version you are talking about Apr 09 17:21:52 I assume there is only one windows version of the emulator? Apr 09 17:22:07 no Apr 09 17:22:10 there are x86 images Apr 09 17:28:52 is the dialog window support on GB or only on ICS? Apr 09 17:29:13 ... dialog window? Apr 09 17:29:18 Lately how long has it been taking to get an app into the market? Apr 09 17:29:36 Bear10: when you hit Publish, it should go live, AFAIK Apr 09 17:29:45 doesnt show up in my play store Apr 09 17:29:48 :/ Apr 09 17:30:23 i think there's a small time lapse before they refresh the store or something just cant remember how long Apr 09 17:30:57 It might take a while to propagate to all their servers, as well as get indexed for search Apr 09 17:31:08 yeah ok thats all i was wondering, thanks SimonVT Apr 09 17:34:38 Hi guys. Apr 09 17:35:15 I've got 2 intents (screens) w/ 2 different buttons on each screen...in the code the button is called button1 but there is also a button1 on the 1st intent screen as well...how do I reference the button1 on the second screen (or intent)? Apr 09 17:36:13 er, you don't Apr 09 17:37:15 evancharlton: what do you mean? Apr 09 17:37:44 what's an intent screen Apr 09 17:37:55 but also: [13:36:13] er, you don't Apr 09 17:38:04 What canadiancow|work said Apr 09 17:38:12 i'd also avoid calling two different buttons "button1" Apr 09 17:39:00 I'd avoid calling any button "button1" :p Apr 09 17:39:20 lol Apr 09 17:39:23 well that too i guess Apr 09 17:39:33 maybe a calculator... Apr 09 17:39:53 haha Apr 09 17:40:21 * hackkitten likes to call one button 'special_button' Apr 09 17:40:26 so that it feels special :3 Apr 09 17:40:45 lol Apr 09 17:40:58 what i hate is how people like to have a R.id.ok_button Apr 09 17:41:01 on every fucking screen Apr 09 17:41:07 and then you remove it from one xml file Apr 09 17:41:10 stuff still compiles Apr 09 17:41:12 but you get a NPE Apr 09 17:41:15 USE UNIQUE NAMES!!!!! Apr 09 17:41:23 Java is the bloody NPE language anyway Apr 09 17:41:24 :P Apr 09 17:41:52 hackkitten: you shouldn't call it special :/ http://digitaljournal.com/article/314540 Apr 09 17:42:38 :P Apr 09 17:45:02 why wont my crap cast correctly its pissing me off i checked 10 times Apr 09 17:45:40 views.setOnClickPendingIntent(R.id.imageButton1, pending) Apr 09 17:47:06 st or gtfo Apr 09 17:48:33 if i setContentView a second time, do i also need to re-assign member variables to views? Apr 09 17:49:24 st? Apr 09 17:50:03 stack trace Apr 09 17:53:35 Hello guys! I'm trying to develop a simple game (Tic Tac Toe). I got the basic layout set. However, now I would like to implement a "Double tap to zoom". I've spent several hours googling, but it seems that all tutorials are focused on double tap to zoom on just images, and not an actual game board, where the user is able to make moves by clicking on the board. If anyone here could point me to a link, or how I should g Apr 09 17:54:15 er .. can you get double-tap events? can you set your board to draw with zoom? seems straightforward Apr 09 17:56:16 it looks like there's a gesture manager or something for getting double taps if you don't want to trivially implement it Apr 09 17:56:39 Yes, recognizing double tap is possible through gesture manager, that is true. Apr 09 17:57:32 However, actually implementing the "zoom" gesture is the tricky part.. Apr 09 17:57:56 ? Apr 09 17:58:27 hmm Apr 09 17:58:28 you mean two-finger zoom? Apr 09 17:58:46 is there really now way to determine the DisplayMetrics of a device from dumpsys or getprop? 'the fuck? Apr 09 18:00:00 jasta: dumpsys SurfaceFlinger probably has enough information Apr 09 18:00:37 Is it possible to have an Adapter with an unknown number of items? Or should I be using a different class? Apr 09 18:00:44 romainguy_: i'm looking for the xdpi and ydpi in particular. i ddi a full dumpsys and getprop and grepped a few combinations Apr 09 18:00:48 came up empty handed Apr 09 18:01:03 the xpdi and ydpi are only printed during boot afaik Apr 09 18:01:05 h6w: in a way, depends on what you mean. Apr 09 18:01:12 romainguy_: lame, ok, ill just build an apk Apr 09 18:01:51 I'm having an ordinary View as background which I just draw some lines on, forming squares. Then based on where you click, I calculate what square you clicked in, and put this in the game model matrix. So, when I double tap I would like to zoom in on that specific piece of the board, but as well being able to scroll. I'm afraid my square-calculations will fail if changing the scale factor, or will all magically work? h Apr 09 18:02:06 jasta: I want to use a Gallery View, but I want to generate each item as needed. So I only have three views in memory at a time. (Left, Current, Right) Apr 09 18:02:42 jasta: I mean three items. It's just in my case each will be a view. Apr 09 18:03:30 jasta: The way I read it, Adapter is expecting a position p, where p < getCount(). Apr 09 18:03:49 jasta: 0 <= p < getCount() Apr 09 18:04:09 SomethingDumb: scale the click to the view? Apr 09 18:04:54 you don't even have to use a full transformation matrix if you're not doing rotations etc Apr 09 18:05:12 h6w: getCount can be updated dynamically Apr 09 18:05:39 if I wanted android to run a function in intervals, X amount of times every X minute, what do I look into for this? Apr 09 18:05:56 romainguy_: Yes, but if the user goes left, then the position becomes negative? Apr 09 18:06:13 h6w: no, it never will be negative Apr 09 18:06:13 Hi, i'm trying to copy a hosts file to android with abd, first i had 'fs is read only' and after 'out of memory' Apr 09 18:09:00 enapupe > do you have write access? Apr 09 18:09:25 i don't know, why not? Apr 09 18:09:42 on my local system, yes Apr 09 18:09:55 romainguy_: So if I start with getCount() = 3 (Left = 0, Current = 1, Right = 2) and position = 1, then the user goes left twice. What position does the view call to getItem()? Can I tell the view that the position is still 1? Apr 09 18:10:18 enapupe > you do not have write access to the application folders without rooting the device Apr 09 18:10:24 once you're at position 0 you cannot go left anymore Apr 09 18:10:40 hackkitten: yes.. inside the system i understand Apr 09 18:10:50 but outside, how can I root adb access? Apr 09 18:11:05 where are you writing to, enapupe? SD card? Apr 09 18:11:14 /etc/hosts Apr 09 18:11:17 out of memory could also mean that there is no more room to write Apr 09 18:11:35 i'm trying to add a hosts file with one more entry Apr 09 18:11:40 that should work Apr 09 18:11:50 I guess the issue is then that you do not have root acces Apr 09 18:11:51 +s Apr 09 18:12:10 romainguy_: So what should I do when position gets to 0? Apr 09 18:12:29 you display the item at position 0? Apr 09 18:12:41 whoever was complaining about the mulator earlier: http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html Apr 09 18:12:50 Just saw that Apr 09 18:13:19 Android 4.0.4 available with GPU support Apr 09 18:14:02 oGMo: I might be stupid right now, but if you redraw part of the board where you clicked in a higher scale (zoomed), will you be able to scroll easily then? Wouldn't you have to redraw the entire board as soon as you wanted to scroll a bit to the left for example? Making new calculations? Apr 09 18:14:12 hackkitten: how can i set myself root? Apr 09 18:14:28 romainguy_: !?!?! Apr 09 18:14:39 jasta: for the emulator Apr 09 18:14:45 it's really nice Apr 09 18:14:56 enapupe > by rooting the device, usually by installing a custom boot ROM or similar. It depends on the device Apr 09 18:14:58 I was able to get smooth animations in 1280x800 on my laptop with this emulator Apr 09 18:15:10 omg and sensor emulation? btw, any chance we could get wifi emulation? :) Apr 09 18:15:15 romainguy_: Sorry, I mean what should I do when the user is at position 0 and swipes left? Apr 09 18:15:19 Google never considered making developing for Android easy :P Apr 09 18:15:23 wow . finally. nice! Apr 09 18:15:25 hackkitten: i thought that the sdk was facilitated to do this things Apr 09 18:15:27 weird.... Apr 09 18:15:41 enapupe > nope, major oversight on Google's part Apr 09 18:15:54 You only have root access on the emulator AVDs Apr 09 18:15:56 AFAIK Apr 09 18:15:59 jasta: there's also a way to emulate multitouch Apr 09 18:16:06 i'm running this thing hackkitten Apr 09 18:16:10 on the devices you have user access Apr 09 18:16:36 List of devices attached emulator-5554 device Apr 09 18:16:48 ah, so an emulator instance Apr 09 18:16:59 I guess there's no root access on that either? I'm not sure Apr 09 18:17:14 ./adb -s emulator-5554 push /home/enapupe/hosts /etc/hosts << i'm trying this Apr 09 18:17:24 failed to copy '/home/enapupe/hosts' to '/etc/hosts': Read-only file system Apr 09 18:17:28 yeah Apr 09 18:17:32 permission issue Apr 09 18:17:48 not sure how to get access on the emulator Apr 09 18:17:52 sorry :( Apr 09 18:18:09 did you run adb root first? Apr 09 18:18:28 adbd is already running as root Apr 09 18:18:32 adb root, adb remount, adb push Apr 09 18:18:34 in that order Apr 09 18:19:09 after remount, when pushing, i get this: failed to copy '/home/enapupe/hosts' to '/etc/hosts': Out of memory Apr 09 18:19:13 I believe that the system partition on the emulator is only big enough for the current /system, so you might have problems Apr 09 18:19:16 :) Apr 09 18:19:27 fun :) Apr 09 18:19:33 enapupe: there's some launch flag that you have to use when starting the emulator Apr 09 18:19:39 hey guys, does anyone know if there's a way the behaviour of the keyboard (it actually makes my ViewPort smaller) when focusing on an input field in HTML? Apr 09 18:20:52 evancharlton: nothing on the advs's gui Apr 09 18:21:05 romainguy_: I'm trying to get the emulator running in 24/32 bit with no luck so far ... does the goldfish kernel support true color framebuffers? It seems like the qemu adaptions come with true color support Apr 09 18:21:58 enapupe: -partition-size 1024 <-- maybe Apr 09 18:22:02 we don't have an option to do so afaik Apr 09 18:22:57 ok, so, i should forget the gui Apr 09 18:23:23 why? Apr 09 18:23:30 (you could also modify the emulator I suppose) Apr 09 18:24:24 romainguy_: there's "hw.lcd.depth=32" ... are you somewhat familiar with the kernel code? is it straightforward to rewrite the specific parts or would it blow up a huge bunch of code? Apr 09 18:24:43 I don't know how the emulator sets up the framebuffer Apr 09 18:24:44 you can set flags for the ADV instance in Eclipse/ADT Apr 09 18:24:53 How can I give adb pull root privileges? Apr 09 18:24:55 AFAIK Apr 09 18:25:10 skfax: join the club :P Apr 09 18:25:28 hackkitten: well remembered, i have something on netbeans Apr 09 18:25:41 enapupe: Ah sorry ^^ Just returned to my comp :P Apr 09 18:26:11 finally... Apr 09 18:26:14 romainguy_: I see, it's very hard to get in touch with the developers ... any ideas how to reach the "goldfish" guys? Apr 09 18:26:16 guess it's possible to just use adb shell with "su", copy the file to SD, then get it from there Apr 09 18:26:21 emulator got its speed Apr 09 18:26:23 skfax: i mean, join the club that wants to push/pull as root Apr 09 18:26:24 :D Apr 09 18:27:08 yhpark: whats the trick? Apr 09 18:27:14 http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html Apr 09 18:27:54 hi Apr 09 18:28:17 I am getting a NoclassDefFound .. I am using an external java lib I created Apr 09 18:28:30 but it seems that it's not included at runtime. Apr 09 18:29:35 aLeSD: go to Order/Export in eclipse. check it. Apr 09 18:29:45 awesome yhpark Apr 09 18:29:47 also, put it in the libs/ folder. this is a special folder that will do this automatically. Apr 09 18:29:55 jasta, done. Thanks Apr 09 18:31:08 where do I get the emulator? Apr 09 18:31:26 guess wait for update Apr 09 18:35:38 instagram is so dumb :( Apr 09 18:35:54 but then again, if i think something's dumb, it's worth billions Apr 09 18:36:44 canadiancow|work: most people are dumb Apr 09 18:38:13 hi ctate Apr 09 18:38:27 is the app still really horrible and iphone-y Apr 09 18:38:38 HAY GUYS Apr 09 18:38:57 JakeWharton: what up, dude? Apr 09 18:39:18 evancharlton: rocked my brand spanking new Google hoodie today Apr 09 18:39:32 \o/ Apr 09 18:39:41 whoa whoa Apr 09 18:39:43 how do i get one Apr 09 18:39:49 canadiancow|work: googlestore.com/ Apr 09 18:39:54 no no Apr 09 18:39:56 for free! Apr 09 18:40:00 canadiancow|work: well Apr 09 18:40:04 it's free* Apr 09 18:40:21 (* with some cash) Apr 09 18:42:15 oh i see how it is Apr 09 18:44:57 whats faster... (""+0) or (String.valueOf(0)) Apr 09 18:45:51 why not just "0" Apr 09 18:46:06 * Jug6ernaut doesnt acutally need this just wondering hehe Apr 09 18:46:11 Is it possible to intercept the camera signal? Apr 09 18:46:17 because it might be ""+someInt Apr 09 18:46:19 ;) Apr 09 18:46:38 i think String.valueOf() Apr 09 18:46:48 m0: on some phones you can use the camera apis without a surface, not sure about native code. Apr 09 18:47:14 readme: I would like to replace the Camera driver on my android phone to a driver I wrote instaed. Apr 09 18:47:26 m0: try #android-root for that Apr 09 18:47:41 That way any application using the camera, would use my driver. Apr 09 18:47:43 it can certainly be done if you are rooted and using a custom rom that you built yourself. Apr 09 18:47:46 So it has to be rooted? Apr 09 18:47:50 yes Apr 09 18:48:10 Arg, so there is no way for me to let the user download a new camera app that controls their camera Apr 09 18:48:41 you'd have to deal with kernel module versions and stuff. Apr 09 18:49:05 if your code is good then a project like cyanogenmod will be interested in it Apr 09 18:49:13 -> #cyanogenmod Apr 09 18:50:24 I was hoping a non rooted way to control the output of the camera on my android :/ Apr 09 18:50:44 you mean so that other apps get back data that you decide, rather than what is actually coming through the camera? Apr 09 18:50:53 not happening. Apr 09 18:51:23 It decides what to output back Apr 09 18:51:28 For example, adding overlays Apr 09 18:51:48 imo, an overlay is something that should be handled by application code, not a driver Apr 09 18:52:07 maybe you should make your code an android library that wraps the camera apis and overlays on the surface. Apr 09 18:52:20 For example, I want to add filters to my video camera from any app. Apr 09 18:52:39 I want to screenshare my phone as an input, like those softwares you find on the PC Apr 09 18:52:51 if you want your filters to work across all apps that use the camera, now, and you want it to work without root or any sort of hackery, that's not possible. Apr 09 18:54:03 That app would make a good amount of money. Apr 09 18:54:04 :) Apr 09 18:56:52 readme, I did it Apr 09 18:56:55 :D Apr 09 18:56:59 now it rotates Apr 09 18:59:38 is it possible to make the Sensor class serializable ? Apr 09 18:59:50 readme: I explained it here heh https://plus.google.com/u/0/116805285176805120365/posts/Ev1hkmymXTE Apr 09 19:00:34 Speaking of filters, facebook just buying instagram for $1 billion. Apr 09 19:00:37 aLeSD: ... do I want to know what you're doing? Apr 09 19:00:41 crazy eh... Apr 09 19:00:54 It took me a weekend to incorporate filters on my app too. Apr 09 19:01:08 They executed nicely. Apr 09 19:01:58 evancharlton, in a couple of days I will publish a pre-alpha Apr 09 19:02:18 aLeSD: with questions like that, I doubt I'll be installing it :P Apr 09 19:02:30 lol Apr 09 19:03:05 evancharlton, why ? Is a stupid idea to serialize a Sensor class ? Apr 09 19:04:12 aLeSD: yes Apr 09 19:04:18 yes ... Apr 09 19:04:27 you right Apr 09 19:05:19 try this one : https://play.google.com/store/apps/details?id=org.lysergic.app.screenghost Apr 09 19:05:58 people is happy with my code Apr 09 19:06:13 evancharlton, :P Apr 09 19:06:50 aLeSD: so how much data are you serializing and writing just to flip the screen? Apr 09 19:07:47 is it possible to make an app that runs in the background and monitors if any apps are phoning home when not in se? Apr 09 19:07:48 use* Apr 09 19:08:07 readme I tried with 30 classes Apr 09 19:08:11 no delay Apr 09 19:08:24 I am not serializing the data Apr 09 19:08:54 cause the data is stored in the service Apr 09 19:09:18 Hi, is anyone amazing at ActionBarSherlock aroud? Apr 09 19:09:23 when the graph is created the source node ask all the data to the service Apr 09 19:09:28 has anybody ever touched this file "drivers/video/goldfishfb.c" in goldfish? Apr 09 19:09:35 how do you guys manage your keystores? is it supposed to be one per application? one per company? Apr 09 19:09:37 Do any users need a mirror for a ROM? Apr 09 19:10:09 ShawnMcCool I just use one for everything. Probably insecure, but I don't care Apr 09 19:17:41 huh, a new sdk ? Apr 09 19:18:00 has anyone found significantly decreased battery life with daily development? e.g. phone plugged in pretty much 9-5 and doing development on it? Apr 09 19:18:50 afaik, keeping your phone charged all the time is much better than charging it out / recharging Apr 09 19:21:22 Rockmaninoff: http://en.wikipedia.org/wiki/Lithium-ion_battery "Avoid deep discharge and instead charge more often between uses, the smaller the depth of discharge, the longer the battery will last." Apr 09 19:21:39 skfax: yeah, that's what i thought Apr 09 19:21:40 strange Apr 09 19:21:45 my Droid X is getting AWFUL battery life lately Apr 09 19:22:08 whatever, new battery was $5 Apr 09 19:23:12 Rockmaninoff: make sure to check what is using the battery, ofc Apr 09 19:24:19 ctate: i'll do that next time i notice it discharging rapidly Apr 09 19:24:42 it _seems_ to be directly related to data usage Apr 09 19:24:48 heavy Reddit browsing gets me down to 20% battery in maybe 25 minutes, which is absurd Apr 09 19:25:41 Rockmaninoff: using the reddit app, the browser, what? Apr 09 19:25:52 that was just an example Apr 09 19:25:56 browser has similar behavior Apr 09 19:26:01 i think the phone is just getting old :P Apr 09 19:26:02 seriously, actually using the radio for live traffic is the second most battery-burning thing you can do with the device Apr 09 19:26:10 having the screen on is the most. Apr 09 19:26:22 true Apr 09 19:26:24 so basically in that case you've got both running Apr 09 19:26:52 _and_ i'm using 3G Apr 09 19:27:03 still, 20-30 minutes to discharge a battery even with those seems really low to me Apr 09 19:27:15 how old is the battery? Apr 09 19:27:22 ~1 year Apr 09 19:27:26 maybe give or take 2-3 months Apr 09 19:28:00 okay. not unexpected that it'd be losing capacity, then. Apr 09 19:28:12 they're only really built for a year of lifetime. Apr 09 19:28:33 (they want you to buy a new phone every year, remember) Apr 09 19:28:41 yeah Apr 09 19:28:47 and lifetime is expensive to achieve in batteries Apr 09 19:28:48 trying to hold out for the next GPHone Apr 09 19:28:50 GPhone* Apr 09 19:29:29 GPhone? Apr 09 19:30:24 as in, whatever is next in the Nexus line Apr 09 19:30:30 Do you mean a new Galaxy Nexus version, because it'll likely be a while until the next Nexus iteration? Apr 09 19:30:32 figure i can wait another 6-7 months for it Apr 09 19:30:40 yeah, but i have plenty of ICS dev phones at work Apr 09 19:30:52 and i will eventually get around to putting an ICS rom on my droid x Apr 09 19:31:00 Do any Android phones come with no binary blobs? Apr 09 19:31:14 im not fond that android phones can be turned on remotely via baseband Apr 09 19:32:48 hkhalid: Who would turn your phone on remotely? Apr 09 19:32:52 wut Apr 09 19:33:21 not my phone, but CNET and many others have reported that phones can be turned on remotely via baseband Apr 09 19:33:35 and android phones dont ever seem to use an opensource baseband Apr 09 19:33:52 "CNET" Apr 09 19:33:55 case closed. Apr 09 19:34:21 did they also report that PC and Mac can be turned on remotely? Apr 09 19:35:11 and dept. of justice Apr 09 19:35:16 do you live in USA? Apr 09 19:35:26 no Apr 09 19:35:31 yea you wouldnt know Apr 09 19:36:04 are there cool motherfuckers out there? Apr 09 19:36:17 i wouldn't know about sensationalism journalism hkhalid? Apr 09 19:36:41 i can turn on my PC remotely Apr 09 19:36:51 Heyy can I get some help Apr 09 19:36:57 I have installed android sdk Apr 09 19:37:07 and downloaded eclipse Apr 09 19:37:10 dont know what to do now :( Apr 09 19:37:21 canadiancow|work: Atarii I didnt know you guys use open source basebands Apr 09 19:37:50 i dont know what you're smoking Apr 09 19:37:53 s/smoking/talking about/ Apr 09 19:38:00 lol Apr 09 19:38:06 http://gyazo.com/8d1cd7316beaf7426f738583f869c8d8.png?1333999514 Apr 09 19:38:11 helpp Apr 09 19:38:11 lol you guys watch too much tv Apr 09 19:38:15 * Atarii grabs his tinfoil hat Apr 09 19:38:26 WE WATCH TOO MUCH TV Apr 09 19:38:38 you're in here shouting "ZOMG DOJ FBI CIA NSA DEA IS GOING TO TURN ON MY PHONE" Apr 09 19:38:43 hkhalid: Dude, if you have stuff you want to keep secret - don't keep it on your phone. Or encrypt it with AES. If you wanna talk terrorist strategies, get an encrypted sat-phone or something. Apr 09 19:38:45 lol Apr 09 19:38:50 probably missed a few agencies, but you'll forgive me -- i'm canadian Apr 09 19:39:37 skfax: fuck you for implying that Apr 09 19:39:43 skfax: not cool Apr 09 19:39:55 Atarii: there is a conspiracy that tinfoil hats actually make it easier for the government to read your brain :D Apr 09 19:39:56 haha Apr 09 19:40:05 g00s, they act as an antenna Apr 09 19:40:05 skfax: racist Apr 09 19:40:15 g00s it's ok, mine's double-foiled! Apr 09 19:40:19 lov evancharlton ctate someone - this might get ugly Apr 09 19:40:34 hkhalid: How am I racist? You could be an inuit for all I know. You're kinda bigoted for defaulting to such a response. Apr 09 19:40:46 the terrorism thing, where did that come from? Apr 09 19:40:50 you saw my name Apr 09 19:40:53 haha Apr 09 19:41:13 no, it was a general comment, related to you being paranoid about people turning on your phone... Apr 09 19:41:16 hkhalid: No, I took it from "being semi-paranoid" + "wanting to find solutions where you can't get tracked". Apr 09 19:41:24 see ^ Apr 09 19:41:32 Plus I gave helpful suggestions :-) Apr 09 19:43:23 yeah pro tip: if you don't trust your phone, absolutely nothing can be done to MAKE you trust it. Never mind that you can't even GET at half the code running on your phone (the baseband) which could also access your data, if the phone was designed so Apr 09 19:43:48 thats why I was asking about the baseband and this idiot got scared and equated it with terrorism Apr 09 19:43:52 if you're afraid of government-level actors, security and privacy are a myth on mobile devices. Move on. Apr 09 19:44:32 -mobile Apr 09 19:44:37 im not afraid, I just wanted to know if any android phones use an opensource baseband where it cant be remotely turned on according to dept of justice Apr 09 19:44:42 no Apr 09 19:44:46 ok thanks Apr 09 19:44:51 Also I think "remotely turned on" is bullshit Apr 09 19:45:04 if your phone was on and lsitening to the radio you'd have a HIGHLY observable battery drain Apr 09 19:45:34 besides, if they wanted to bug your phone this'd be easy Apr 09 19:45:48 MDijkstra: isnt that what the closedsource baseband is Apr 09 19:45:57 hi. is there some juju required to get an x86 4.0.x system image? or is 2.3.3 the latest available? nothing else listed in tools/android Apr 09 19:46:03 "remotely turned on", they can just bug your phone anyway? Apr 09 19:46:07 plus it's always on Apr 09 19:46:21 hkhalid: an 'opensource baseband' of production quality doesn't actually exist Apr 09 19:46:32 MDijkstra: osmocombb? Apr 09 19:46:39 also: why would they touch your phone Apr 09 19:46:44 MDijkstra: but if you had to guess, and there was a backdoor, wouldnt it be in the baseband? Apr 09 19:46:45 whe nthey can just send a warrant to your provider Apr 09 19:46:48 hkhalid: nor is a baseband interchangeable, it's closely tied to the underlying hardware Apr 09 19:47:02 so your question really makes no sense Apr 09 19:47:06 im talking about turning on a mic Apr 09 19:47:16 *sigh* Apr 09 19:47:25 yep the cia secretly owns motorola Apr 09 19:47:26 canadiancow|work UK are in talks to be able to do it without a warrent also Apr 09 19:47:28 or qualcomm Apr 09 19:47:35 Atarii, not the point Apr 09 19:47:38 network can trigger a gsm phone to call and hangup via SIM toolkit Apr 09 19:47:49 no spy tech there, its part of the spec, and has been used for law enforcement Apr 09 19:47:55 hkhalid: no, putting a backdoor in every phone would be waaaay too obvious Apr 09 19:48:02 hkhalid: and not very useful at that Apr 09 19:48:05 thanks dw and MDijkstra Apr 09 19:48:40 Your device cannot be made secure against network or government level actors. If this is a problem for you, stop using phones. I don't see the point in worrying about it much beyond that. Your location is already sold to every ad network out there. Apr 09 19:49:01 gotcha, thanks as well dragorn Apr 09 19:49:15 you pretty much have to stop communicating if you're afraid of government-level actors Apr 09 19:49:18 imo Apr 09 19:49:24 pretty much Apr 09 19:49:33 shit's not great, but you just gotta live life Apr 09 19:50:02 You want something to be worried about, be worried about all the data collected on you which is a) sold for ad revenue and b) now easily available as a subpoena you know nothing about Apr 09 19:50:03 If you really want to make sure that you're phone isn't doing anything too clever at a point in time, simply disconnect the battery. Apr 09 19:50:25 They don't need a backdoor when all they need to do is fire a subpoena to google/dropbox/amazon/etc Apr 09 19:50:27 OMG MY WEBCAM LIGHT JUST TURNED ON Apr 09 19:50:29 IT'S THE FEDS Apr 09 19:50:30 HIDE Apr 09 19:50:38 oh wait no it was the android emulator booting up Apr 09 19:50:45 canadiancow|work: dude chill out, your comments are getting annoying Apr 09 19:50:49 canadiancow: it's the fed backdoor in android! :P Apr 09 19:50:55 are you 13 years old? Apr 09 19:50:58 i wish there was a way to permanently disable the iSight thing on mac lion Apr 09 19:51:14 i mean, w/o putting tape over it Apr 09 19:51:20 needle Apr 09 19:51:33 you could probably tell the usb stack to ignore the device Apr 09 19:51:35 if you wanted Apr 09 19:51:37 replace the kernel driver with a stub driver that binds the device and nothing else Apr 09 19:51:59 well, the kernel driver is probably a general purpose driver for usb webcams Apr 09 19:52:09 even better =) Apr 09 19:52:11 so that might not be the best idea, but I'm sure there's a usb id blacklist Apr 09 19:52:49 could probably find a way of putting the device out of spec by sending junk at it Apr 09 19:52:51 if you don't want the free webcam you probably don't want the paid ones either :) Apr 09 19:52:56 so do that once at boot Apr 09 19:53:16 I was wondering, if there is an API to have the google map API (different images, where you can zoom in , load others, etc) ? Apr 09 19:53:40 so I could make my own custom map viewer Apr 09 19:53:46 pleaassee someone help me? :( Apr 09 19:53:49 nope, use OSM if you want that Apr 09 19:53:54 (openstreetmap) Apr 09 19:54:02 http://gyazo.com/822e94cc6c4776bc947b248c44441060.png?1334000944 Apr 09 19:54:03 MDijkstra, is that to my question ? Apr 09 19:54:04 step 5 Apr 09 19:54:08 Insayne: yep Apr 09 19:54:32 I cant press next Apr 09 19:54:58 hrm, MDijkstra, is there a demo apk ? Apr 09 19:55:14 demo apk for what? an API? Apr 09 19:55:16 O_o Apr 09 19:55:28 yeah, sample code - i.e, showing off all features Apr 09 19:55:33 so I can see if it fits my needs of what can be done Apr 09 19:55:45 well, OSM requires you to provide the tiles yourself, I think Apr 09 19:55:58 Yeah, I wanted to do exactly that Apr 09 19:56:09 also MapView sucks :( Apr 09 19:56:18 hasnt improved since cupcake Apr 09 19:56:30 or marginally, but not much Apr 09 19:56:37 mapview exists? Apr 09 19:56:54 Hello can somebody tell me how I can find out the sampleRate of RecognitionListener? Apr 09 19:56:58 but can you provide your own tiles? Apr 09 19:57:01 but the modern google maps app doesn't actually use tiles anymore Apr 09 19:57:10 oh, what does it use ? Apr 09 19:57:11 but streams vectordata Apr 09 19:57:14 Insayne, you can overlay your own tiles Apr 09 19:57:17 you cant replace google's Apr 09 19:57:21 ah, shoddy Apr 09 19:57:25 I wanted to make my own custom map Apr 09 19:57:42 so i suppose openstreetmap is the API to go in this case? Apr 09 19:57:52 hello I have a dialogfragment launched from a fragmentactivity, i need to update the view when the dialog is dismissed (a method I created in my fragmentactivity) how do I call it or is there another way of refreshing the view? Apr 09 19:57:55 I don't know if they actually have a general purpose tile api Apr 09 19:57:56 http://developer.android.com/reference/android/speech/RecognitionListener.html#onBufferReceived(byte[]) it says the sample rate is implementation dependant Apr 09 19:58:02 or if they require you to render your own tiles Apr 09 19:58:11 but still how can i find it out? Apr 09 19:58:35 well, i would like to have an offline map viewer with my own tiles Apr 09 19:59:13 Insayne: well, the OSM data is open (hence the O in OSM) Apr 09 19:59:22 Insayne: so you can simply generate your own tiles Apr 09 19:59:28 add your own stuff, etc Apr 09 19:59:40 alright Apr 09 19:59:47 http://wiki.openstreetmap.org/wiki/Develop/Frameworks#Webmaps Apr 09 20:00:15 thank you! Apr 09 20:00:34 I have this ( http://www.elevensquared.com/Uploads/jQMzERGqDuZgXvjo8oWIEA/SC20120409-144408%20-%20mR4AEvAjOlYv9cSfkYOZxg.png ) UI element on one of my activities. Basically you can use one of the arrows to change the date, and then it loads the activities for that date. How would I delay loading the activites for a short period of time, so that if the user presses the button 5 times, it Apr 09 20:00:35 only loads the activites for the last press. What I am trying to do cam be accomplished in JavaScript like this ( http://pastebin.com/8ZCSX5pR ), but im not sure if something similar can be done in Java. Apr 09 20:00:40 hrm, I dont see it not running off a website ? Apr 09 20:00:52 canadiancow|work: does someone still need to learn how to be polite? Apr 09 20:00:57 dont think so Apr 09 20:00:59 lolol Apr 09 20:01:05 alright Apr 09 20:01:16 this is why you should give me +o Apr 09 20:01:28 Ahem. Apr 09 20:01:42 I'm starting to think you're planting these trolls so you can make a convincing +o argument Apr 09 20:01:49 false flag and all that Apr 09 20:01:49 thanks for the help guys... Apr 09 20:01:51 Or atleast +v Apr 09 20:01:53 He is Apr 09 20:01:58 I think canadiancow is the most active person I've seen in here. :) Apr 09 20:01:59 It's all lies. Canadian lies Apr 09 20:02:01 ElevenSquared: +v is useless Apr 09 20:02:15 evancharlton, i'll take it anyway Apr 09 20:02:16 :D Apr 09 20:02:17 Its useful for braggin rights. :) Apr 09 20:02:19 ElevenSquared: why not just disable the button in its onClick, and then reenable it when the result has been rendered? Apr 09 20:02:27 [16:01:16] this is why you should give me +o Apr 09 20:02:28 [16:01:28] <@ctate> Ahem. Apr 09 20:02:28 :( Apr 09 20:02:51 I want them to be able to quickly navigate between dates. I just dont want to waste resources loading data that they dont need. Apr 09 20:03:12 So if they want to load the activity from 3 days ago, 3 quick presses of the back button should load it Apr 09 20:03:51 yeah, you could use a slight delay before processing to try to get the end date, not the intermediates Apr 09 20:04:17 Im not sure how to do that in Java. :) Apr 09 20:04:26 you could also kick it off immediately but write it in an interruptible way, so that when the user clicked again you just stop in mid task and start the new date, etc. Apr 09 20:04:28 In Javascript its easy, but Im not sure how to do it i in java Apr 09 20:04:52 hmm. i suspect you'd benefit from doing a little bit of serious java tutorial work. Apr 09 20:04:53 That would maybe work too, but sounds more complicated than just delaying execution. Apr 09 20:05:07 and then read the Android programming docs a bit, the overviews in particular. Apr 09 20:05:41 the way i'd do what you descdribe, btw, would be to post a message (or Runnable, in java technical terms) to my app's message queue, with the slight delay Apr 09 20:06:03 and when i get a click, i'd cancel any such pending message/Runnable and repost with the new delay Apr 09 20:06:19 Sounds like what I need. I'll google Runnable. Thanks. Apr 09 20:06:22 but i'm guessing that you might want a little more background before what i said is instantly comprehensible :) Apr 09 20:07:20 Im sure you're right. Im going to jump in head first, and after Ive almost drowned I'll learn how to swim. Apr 09 20:08:29 Helpful safety tip: first loot, *then* pillage, *THEN* burn. Apr 09 20:12:12 nah Apr 09 20:12:14 burn first Apr 09 20:12:29 :) Apr 09 20:12:52 I've always learned better by failing at something than by reading about it first. Apr 09 20:13:03 truth Apr 09 20:13:09 This seems pretty simple and straight forward. I must be missing something. Apr 09 20:13:49 Looks like I just define a Handler and a Runnable, then in my method I call handler.removeCallbacks(runnable); then call handler.postDelayed(runnable, 250); Apr 09 20:15:45 heppers Apr 09 20:15:47 *yeppers Apr 09 20:15:56 why this works is Android stuff :) Apr 09 20:16:05 * JakeWharton sets mode -canadian on canadiancow Apr 09 20:16:25 hey evancharlton, sorry didnt mail you… i got started on some interface and fragments (weather, news, app launcher, etc) Apr 09 20:16:36 i guess i should really write a bit of exposition about Looper & Handler for the docs Apr 09 20:16:42 IMO they're not quite clearly laid out Apr 09 20:16:44 im still putting together my own wishlist and i will email you for inclusion Apr 09 20:17:03 ctate: they are better than most of the docs :| Apr 09 20:17:10 :( Apr 09 20:17:14 Now, it being easy depends on whether or not the runnable is called in a context that can modify the UI, I guess. Testing out now. Apr 09 20:17:58 yes Apr 09 20:18:03 * canadiancow|work sets mode: -Jake+Co JakeWharton JakeWharton JakeWharton JakeWharton JakeWharton JakeWharton Apr 09 20:18:05 birbeck: haha no worries, I meant to email you but then I decided to do something else :P Apr 09 20:18:07 Seems to work. Thanks for your help! :) Apr 09 20:18:13 unless you take explicit steps to run it somewhere else, ElevenSquared Apr 09 20:18:41 Next project is something JakeWharton helped me out on. :) Gonna go try to "extend bitmap drawable, override onDraw, clip the canvas, call super.onDraw(canvas)". Apr 09 20:18:43 Wish me luck. :) Apr 09 20:18:45 (briefly: by default, a Handler that you create will post its payloads to the application's main Looper thread, which is the thread on which all UI action occurs) Apr 09 20:19:15 Thanks for the help ctate. Apr 09 20:19:25 why can't i create custom methods in my content provider and then call them: MyContentProvider.mAISweetCust0mMethod();? Apr 09 20:20:52 cooldman224: you shouldn't, and you don't seem to grasp java or android Apr 09 20:21:07 new Handler(Looper.getMainLooper())!!! Apr 09 20:21:20 lol MDijkstra Apr 09 20:21:40 canadiancow|work, is that needed? I can just leave the constructor empty and get the main looper, right? Apr 09 20:21:44 MDijkstra: maybe I have common queries and I want to reuse them Apr 09 20:21:56 I mean, I know its not needed because my code seems to work. I guess my question is.. whats the difference? Apr 09 20:22:10 omg microsoft is so cheap Apr 09 20:22:19 ElevenSquared, depends where you're creating it Apr 09 20:22:33 i think it creates the handler on the current thread Apr 09 20:22:36 we demoed our android product to amazon and microsoft last week, today there are 3 lumina 800's sitting in the office Apr 09 20:22:38 whereas mine creates it on th emain thread Apr 09 20:22:44 800's? Apr 09 20:22:44 cooldman224: well, sure, but a static method will never have access to your ContentProvider's state Apr 09 20:24:05 MDijkstra: so what's the best way to create these common queries in a single place Apr 09 20:24:22 cooldman224: in the activity that queries the contentprovider Apr 09 20:24:46 either that, or if you need to share the query between activities Apr 09 20:24:47 MDijkstra: so every activity i have to recreate the query method? Apr 09 20:24:50 make a helper class Apr 09 20:25:43 canadiancow|work: it gives you the current thread's target looper. by default in an Androi dapp that is going to be the main looper, unless you're spinning off your own (looper) threads. Apr 09 20:25:59 MDijkstra: helper class that extends Application? Apr 09 20:26:00 hmm Apr 09 20:26:05 cooldman224: no... Apr 09 20:26:10 then what's the error that says your current thread has not prepared a looper Apr 09 20:26:11 so explicitly asking for the main looper is how you'd guarantee pointing to that looper even from other execution contexts. Apr 09 20:26:28 that's when you try to do certain kinds of thing that require a looper from a random non-looper thread. Apr 09 20:26:55 so a thread might not have a target looper Apr 09 20:26:57 such as creating a Handler with the default ctor :) Apr 09 20:27:11 If you don't pass a looper, it'll try to get one from the current thread Apr 09 20:27:16 If there is none, boom Apr 09 20:27:20 MDijkstra: So what? activity doesnt seem necessary though but then I cant do getContentResolver().query(...) Apr 09 20:27:29 right. and you'll get an exception with a message like "Can't create handler inside thread that has not called Looper.prepare()" Apr 09 20:28:56 cooldman224: well, you need to have a ContentResolver to connect to the ContentProviders Apr 09 20:29:15 cooldman224: so if you make a helper class (or define the methods on the ContentProvider itself) Apr 09 20:29:52 ie, MyContentProviderClient.get_stuff(ContentResolver cr, Integer someId) { ... } Apr 09 20:29:52 MDijkstra: "or define the methods on the ContentProvider itself" that is what I was saying before, now it is possible? Apr 09 20:30:36 cooldman224: no, because the way you were asking the question made it seem like you didn't understand the difference between a class method and an instance Apr 09 20:30:58 cooldman224: you can define whatever custom static method you want on your CP class Apr 09 20:31:14 but for it to actually be able to talk to the instance of the CP as created by android Apr 09 20:31:17 you need more Apr 09 20:31:52 enapupe: I made a batch file to get the shared_prefs: http://pastebin.com/BTH3zeXi Apr 09 20:32:02 MDijkstra: i see so just pass the getContentResolver() in the MyCPClient constructor? Apr 09 20:32:27 cooldman224: no, this is a static method Apr 09 20:32:34 there's no constructor Apr 09 20:32:45 again, please read up on static methods in java Apr 09 20:32:58 oh you right. i missed the get_stuff Apr 09 20:35:58 How do I use a custom drawable? Apr 09 20:36:16 I extended the BitmapDrawable, but im not sure how to use it. Apr 09 20:37:19 ElevenSquared: What do you mean? Apr 09 20:37:42 ElevenSquared: http://developer.android.com/guide/topics/ui/custom-components.html Apr 09 20:38:18 ElevenSquared: It extends Drawable, so just use it whever you'd pass a drawable... Apr 09 20:39:01 How would it know to use my drawable instead of the default BitmapDrawable? Apr 09 20:39:14 ctate, thanks. that looks like it might answer my question. Apr 09 20:40:01 CustomDrawable d = new CustomDrawable() ? ;d Apr 09 20:40:12 I mean in xml. Apr 09 20:40:24 Probably can't Apr 09 20:41:24 k, thanks Apr 09 20:43:04 ElevenSquared: do read the docs. :) Apr 09 20:48:10 * g00s learns the hard way, the regular java install has the sdk, and the 'java for developers' is certainly not what you want Apr 09 20:48:19 (on mac lion) Apr 09 20:50:23 lol Apr 09 20:56:07 hey Apr 09 20:56:20 i have been trying to make a caching Apr 09 20:56:38 the file my server returns has json string Apr 09 20:56:51 i write that json to a file Apr 09 20:57:15 but when it is time to read, json throws an exception, saying expected eof at line ... Apr 09 20:57:22 y u no pastebin Apr 09 20:57:42 oh okey Apr 09 20:58:03 hmm, anyone tried the rev 18 sdk on linux, nouveau drivers? Apr 09 20:58:13 http://pastebin.com/8tGHEk5x Apr 09 20:58:35 play i can't submit to Google Play Apr 09 20:58:37 weird. Apr 09 20:59:14 what would be the reason Apr 09 20:59:30 Let's see some code Apr 09 21:00:12 And try to print the json as a string first, though that's going to be hard with 151465 columns Apr 09 21:00:58 i will try to lower the response Apr 09 21:02:15 Also try to isolate whether it's the server response that's going wrong, the writing, or the reading. Apr 09 21:02:32 I.e. what happens if you let gson parse the string directly before saving it? Apr 09 21:02:38 http://pastebin.com/pd4aSdy0 Apr 09 21:03:22 when i keep the response as a string in the cache it is okey Apr 09 21:03:31 but after writing and reading afterwards Apr 09 21:03:41 it says EOF is not found Apr 09 21:05:07 do i have to write EOF explicitly or what ? Apr 09 21:07:08 any help :) Apr 09 21:20:11 Anybody know how I can turn a country code into a currency code? Apr 09 21:22:16 currencyCode = countryCode + "D"; Apr 09 21:22:20 works for at least two countries Apr 09 21:22:24 heh Apr 09 21:22:25 perfect Apr 09 21:25:32 hmm... how do I force system to re-recognize an SD card, *outside* of DVM app? Apr 09 21:26:13 anyone know how to set the window animations speed (without the dev options in settings) Apr 09 21:28:12 Hey guys, is using eval() a bad idea on Android? Apr 09 21:28:55 in Java? does it exist? Apr 09 21:28:59 Chronax: Seems like you can get it using one of the geonames.org APIs: http://api.geonames.org/countryInfo?username=demo Apr 09 21:29:10 Thanks, skfax. Apr 09 21:31:31 SuD like Class.forName(String) Apr 09 21:31:37 which is essentially Eval Apr 09 21:33:24 i does not look as powerful/dangerous as eval() in javascript Apr 09 21:35:38 can you put multiple fragments in a scrollview? Apr 09 21:36:00 no Apr 09 21:36:04 well Apr 09 21:36:05 wait Apr 09 21:36:06 maybe Apr 09 21:36:10 but why? Apr 09 21:37:03 I have a nooby question Apr 09 21:37:31 I want to use a binary lib ...in my android eclipse project ... where I put the jar file ? Apr 09 21:37:57 the libs directory Apr 09 21:38:09 binary lib? What do you mean? Apr 09 21:39:10 chrisrhoden, I want to use androidplot lib in my app ... I am new in java and eclipse ... so I'd like to know where to put it Apr 09 21:39:33 and if I want to extends a class of androidplot do I need the source ? Apr 09 21:39:36 You put it in libs/ Apr 09 21:39:42 SimonVT, thanks Apr 09 21:39:59 canadiancow|work: because i have one details fragment that is getting large Apr 09 21:40:05 then put it in your build path, no you dont need a saource Apr 09 21:40:27 and im using a growing amount of member variables, even though they might not be used Apr 09 21:40:43 Anybody know where I can find some code to format currency by COUNTRY code? Apr 09 21:40:51 Looks like I might need currency code and/or language too. Apr 09 21:40:53 Which is a bummer. Apr 09 21:40:59 ok ... thanks all Apr 09 21:41:25 I'd like to be able to do this: €100 with only country code and price. Apr 09 21:41:27 Is that possible? Apr 09 21:42:22 * g00s can't believe anyone would by instagram for $1b Apr 09 21:42:50 hi, I try to populate a ExpandableList from a database query, this is the best I could come up with after googling and trying for hours, it works for the parent list, but when I expand one item it crashes with a nonsaying excpetion: http://codepaste.net/s9mfwj Apr 09 21:43:25 Ok really quick question Apr 09 21:43:41 Everyone, opinions on using ActionBarSherlock for your apps? Apr 09 21:43:42 SimonVT, I have a question about recycling views in listview. I want to play an animation on some view, then change some of its attributes and call notifyDataSetChanged for adapter to remember it. But after notifying, another random view plays the same animation too Apr 09 21:44:05 would you recommend using the Android 3.0+ UI guidelines on your backwards-compatible apps? Apr 09 21:44:42 chrisrhoden: i applied them where they made sense Apr 09 21:44:53 question is, where do they make sense :P Apr 09 21:45:17 stiggpwnz: When you notifydatasetchanged it calls getView for all visible items again Apr 09 21:45:22 No guarantee where a view is reused Apr 09 21:45:46 g00s, did you use ABS Apr 09 21:45:47 ? Apr 09 21:45:58 chrisrhoden: no Apr 09 21:46:03 so no action bar Apr 09 21:46:06 you can use abs or the ActionBarCompat stuff Apr 09 21:46:22 SimonVT, yeah, noticed that, but what can I do? play the animation after notifying? Apr 09 21:46:31 Sure Apr 09 21:46:40 i used the technique in iosched 2010/2011 for my action bar chrisrhoden Apr 09 21:46:41 SimonVT, is it the only way? Apr 09 21:46:54 You need to have any data used to recreate the list in the adapter Apr 09 21:48:13 hmm Apr 09 21:48:43 chrisrhoden: most people here would say use abs, like SimonVT :P Apr 09 21:49:00 ^_^ Apr 09 21:49:21 simon is from vermont , btw :) Apr 09 21:49:39 THE CHEESE STATE? Apr 09 21:49:41 So they say Apr 09 21:49:57 has anyone had any luck getting multi-touch emulation working with adt 18? Apr 09 21:49:57 i thought it was the state of maple syrup Apr 09 21:52:08 Damnit, dudes. Apr 09 21:52:15 Why can't I format currency with only currency code? Apr 09 21:52:19 Seems like that should be enough. Apr 09 21:52:33 not sure what you mean Apr 09 21:52:44 "currency code" meaning dollars vs euros vs whatever? Apr 09 21:52:48 anyone know if you can put fragments inside a viewgroup? Apr 09 21:52:58 Err..:p Apr 09 21:53:04 Yes Apr 09 21:53:05 like a viewpager? Apr 09 21:53:47 Remember that a Fragment isn't a *View*; it's more like one section of your UI. Apr 09 21:53:52 http://developer.android.com/guide/topics/fundamentals/fragments.html Apr 09 21:53:59 I was thinking a scrollview with multiple fragments in it (the scrollview would have to have a linearlayout or something) Apr 09 21:54:06 ctate, Like the ISO standard currency code. Apr 09 21:54:08 For a given currency. Apr 09 21:54:16 Evidently this is not enough for Java to know how to format currency. Apr 09 21:54:18 ok so thats a no then Apr 09 21:54:20 It also needs language and country. Apr 09 21:55:00 Chronax: of cousre Apr 09 21:55:07 the euro is the canonical example here Apr 09 21:55:18 different national locales format euro currency figures differently Apr 09 21:55:43 e.g. is it €2.30 or €2,30 ? Apr 09 21:56:02 Right. Apr 09 21:56:08 [the former in Ireland, the latter in Germany - for example] Apr 09 21:56:20 Eep. So in order to format currency correctly, I really do need language, currency code and country code? Apr 09 21:56:27 so just the ISO4217 currency code "EUR" isn't sufficient Apr 09 21:56:45 country code and language may be redundant Apr 09 21:57:06 unless you don't care about whether it uses a comma or point as separator, of course Apr 09 21:57:48 i wouldn't be surprised, for example, if Swiss francs were typically written the same everywhere in Switzerland, regardless of regional variation in dominant language Apr 09 21:58:11 Right. Apr 09 21:58:22 Why in the heck does this display "EUR100,00" instead of the Euro symbol? Apr 09 21:58:22 http://pastie.org/3758348 Apr 09 21:58:32 Seems like it should display the Euro, based on the JavaDocs. Apr 09 21:59:03 ahh love how fast Google Play is... Apr 09 21:59:07 blows apples submission process away. Apr 09 22:01:00 Chronax: seems that it uses the symbol only if the euro is considered the 'native' currency for the given locale Apr 09 22:01:45 Chronax: you should try with getCurrencyInstance(Locale.DE) Apr 09 22:03:18 Chronax: in java 1.4, at least, whether it uses the symbol or the code is hardcoded for a couple of specific locales Apr 09 22:03:48 Chronax: or "The Euro symbol, for example, is provided for those Western European locales that will use the Euro currency by default or by other common necessity in 2002." Apr 09 22:04:08 Ahh, I see. Apr 09 22:04:11 Thanks MDijkstra. Apr 09 22:05:09 Chronax: but usually you either want to use the users' locale Apr 09 22:05:23 or hardcode a specific one (if the app is only usable in one country) Apr 09 22:05:54 Localization is hard. Java's infrastructure for it is ... not without warts. :( Apr 09 22:07:29 https://play.google.com/store/apps/details?id=com.reelzchannel.nakedtrailers Apr 09 22:11:01 SimonVT, I tried playing the animation after calling notifyDataSetChanged, but it got even worse, now it never plays animation on a desired view, always on another Apr 09 22:12:30 SimonVT, I think the view gets recycled and I lose it after notifyDataSetChanged. is it a good idea to play animation from an inside of my adapter? Apr 09 22:16:05 chrisrhoden: class-for-name is not Eval, that's just reflection/introspection Apr 09 22:16:25 chrisrhoden: and is often used to support multiple API levels ;) Apr 09 22:29:12 * canadiancow 's head explodes Apr 09 22:29:28 boom. Apr 09 22:30:21 http://www.cheapass.com/freegames/uxcow Apr 09 22:30:23 * explodes candiancow's Apr 09 22:30:32 * ctate | Europe. Summer. 1997. You and your friends have discovered two problems with a common solution: mad cows in England and unexploded bombs in France. Apr 09 22:31:07 lol Apr 09 22:31:17 <3 Cheapass Games Apr 09 22:31:40 oh wow i totally meant that to be <3 Apr 09 22:31:48 * canadiancow hides Apr 09 22:32:01 * p_l loves fscked up /mnt/asec Apr 09 22:32:23 my emu isnt faster Apr 09 22:32:28 and a lot of people say gles20 isnt working on it Apr 09 22:32:58 then it must be true Apr 09 22:33:13 they probably didn't enable GPU Support in their AVD Apr 09 22:34:28 i was about to say -- you have to turn it on in the AVD Apr 09 22:35:07 i havent tried it yet Apr 09 22:35:12 i see no reason to use an emu :) Apr 09 22:35:22 but the interwebs are buzzing Apr 09 22:36:03 i like how it takes almost a year for stuff demoed at i/o to make it out Apr 09 22:36:09 google should just stop announcing stuff Apr 09 22:36:22 ... apparently, my launcher somehow ended up in sdcard instead of phone storage, so after booting I got blank screen. Yay fixed Apr 09 22:36:34 canadiancow: and when we don't people complain :) Apr 09 22:36:41 that is true too Apr 09 22:36:43 either way, people complain Apr 09 22:36:44 so meh Apr 09 22:36:46 :D Apr 09 22:40:09 Would it be acceptable UX to have an action item to toggle a service on and off? Apr 09 22:40:43 heh. I managed to hit something that should be pretty rare failure. If the phone can't resolve the launcher intent, it will never go on to mount the sdcard nor start /mnt/asec Apr 09 22:41:05 readme: well, it depends, kind of Apr 09 22:41:08 adt 18 is definitely better on my mac... hopefully linux will get the same enhancements at some point Apr 09 22:41:16 p_l: well if there's no launcher... Apr 09 22:41:18 readme: why would the user need to? Apr 09 22:41:34 now if I could just get the multi-touch emulation working... Apr 09 22:42:20 romainguy_: somehow my launcher ended on sdcard. I'm still baffled about how it did so, though it now explains certain strange behaviours from the past... Apr 09 22:42:23 MDijkstra: I can't give more detail than that really, sorry Apr 09 22:42:34 readme: then your question is pretty much unanswerable Apr 09 22:43:27 but generally, no, you should hide technical details from the user Apr 09 22:43:37 well Apr 09 22:43:51 for example, in the music player, the "play" button toggles a service on and off :) Apr 09 22:43:58 ie, have 'Activating feature x may cause extra battery drain' Apr 09 22:43:59 lol Apr 09 22:44:06 but that's just an implementation detail for what the user is actually requesting with that button Apr 09 22:44:13 not 'Checking this checkbox will start service y' Apr 09 22:44:16 focus on the user and the UX, and build the app to support that Apr 09 22:44:27 exactly Apr 09 22:51:04 hi to all! Apr 09 22:52:34 aZuZu, hey Apr 09 22:53:04 once again me here :D Apr 09 22:53:31 so porting .35 to sony-ericsson x10 mini Apr 09 22:53:35 #android-root Apr 09 22:53:44 compiles w/o error Apr 09 22:53:50 but no boot :D Apr 09 22:53:55 what evancharlton said Apr 09 22:53:56 aZuZu: #android-root Apr 09 22:54:01 EBADCHANNEL :) Apr 09 22:54:12 lol Apr 09 22:56:23 it's still not possible to have a 4.0.3 x86 image w/ GPU support right? Apr 09 22:56:28 *AVD Apr 09 22:56:43 no x86 image released yet afaik Apr 09 22:57:54 but the latest release is *much* faster on my mac as a result of the GPU accel (wasn't working for me in 17, but now is in 18) Apr 09 22:59:14 GPU accel doesn't seem to be working yet on my MBP Apr 09 22:59:15 any dev want an idea for an app? Apr 09 22:59:25 or do I need to enable it explictly? Apr 09 23:00:52 mdijkstra: you have to enable it per avd Apr 09 23:01:23 yeah, just figured out how to Apr 09 23:01:25 lets see Apr 09 23:02:08 it took me a few restarts of the vm to get it working properly (i.e. it was hanging at the android boot screen) but eventually it worked Apr 09 23:07:10 yeah, much faster now Apr 09 23:07:11 cool. Apr 09 23:19:39 mdijkstra: just think, in a few more releases it could actually be usable :-) Apr 09 23:37:15 Anyone else on mac crashing with the new emulator: emulator-arm unexpectingly quit Apr 09 23:39:37 aronmt: I haven't seen that yet myself... do you have gpu emulation on? (if so, try turning it off and see if that helps) Apr 09 23:42:29 Hey bros. Apr 09 23:42:42 Why does this display a crazy symbol (that isn't the symbol for Euros)? Apr 09 23:42:43 http://pastie.org/3758808 Apr 09 23:42:48 I'm passing EUR for the countryCode. Apr 09 23:42:49 Didn't seem to fix it. This is a crash on "Start" Apr 09 23:42:59 Thanks, and Flying Spaghetti Monster bless. Apr 09 23:43:31 hey now. keep your noodly appendages to yourself. Apr 09 23:43:41 Ramen. Apr 09 23:43:45 Any ideas, ctate ? Apr 09 23:43:46 (ha ha ha) Apr 09 23:43:48 no clue, Chronax Apr 09 23:43:48 IS it possible my phone doesn' Apr 09 23:43:55 doesn't support the EUR symbol? Apr 09 23:44:01 Chronax: ... the actual result would be useful too Apr 09 23:44:02 aaronmt: another thing to try would be to delete your avd (I'm assuming it's 4.x) and recreate it Apr 09 23:44:20 killring: Yeah, first thing I tried. I'm going to redownload the SDK and update Apr 09 23:44:49 worth a shot Apr 09 23:45:08 Chronax: also, money in a double? >_> Apr 09 23:46:22 YES. Apr 09 23:46:30 The result is hideous. Apr 09 23:46:54 What data type are you proposing for money? Apr 09 23:47:22 whatever was the unlimited precision in Java Apr 09 23:47:28 BigDecimal? Apr 09 23:47:33 heh Apr 09 23:47:35 Okay. Apr 09 23:47:37 (haven't used that in a long time) Apr 09 23:48:00 Is there a setting to automatically hold up methods/imports/comments? Like the little + and - to the left of the code, where you can collapse and hide your code, is there a option to automatically hide everything on open, rather than automatically having them open? Apr 09 23:48:00 Here's my result from this method: ¤179.00 Apr 09 23:48:06 WTFBBQ? Apr 09 23:48:07 ^in eclipse Apr 09 23:48:19 Chronax: interesting. Incorrect font? Apr 09 23:48:26 ... though might not be Apr 09 23:48:45 I dunno. I think the problem might be that I'm using "en" for the language, but "EUR" for the country? Apr 09 23:49:02 *fold, not hold Apr 09 23:49:10 no idea right now Apr 09 23:49:29 * p_l is making sure his phone is at least capable of answering calls right now Apr 09 23:51:30 Any ideas y'all? Apr 09 23:58:03 Damn. I really need to be able to get a Locale by a country or currency code. Apr 09 23:58:05 Or the combination. Apr 09 23:58:11 Basically, I don't want language to be involved at all. Apr 10 00:02:22 Is there any way to format currency only using only the currency code and/or country code? Apr 10 00:02:36 Apr 10 00:06:28 Hey guys I have an activity where a user must fill in fields and click a location on a map. They press and button and go to the map activity. How do I get the location coordinates from the maps activity and transport it into the previous activity without text fields being erased? Apr 10 00:07:29 startActivityForResult() maybe? Apr 10 00:08:13 Thanks I'll check it out! Apr 10 00:09:49 Okay, alternate question. How likely is it if I use Locale.getDefault() that I'll display currency in the user's preferred currency? Apr 10 00:10:37 Anyone know of a good ready-built virtual appliance for android development? Apr 10 00:10:53 just do everything in dollars and call it a feature :-) Apr 10 00:10:54 haz3lnut: you mean like the emulator? Apr 10 00:11:58 evancharlton: no, I mean like a vitualbox with eclipse, java, and android sdk already installed, specially built for android development. Apr 10 00:12:19 that would be groovy Apr 10 00:13:33 it would be groovy. I found one built on centos, but it's old..from 2009, I believe. Apr 10 00:13:40 that would make android development way too easy to get started in... it cannot be allowed to happen :-) Apr 10 00:14:14 killring, the novelty would wear off Apr 10 00:16:02 you got a link haz3lnut ? :> Apr 10 00:16:21 I could see that... every developer should fondly remember the time they spent getting the sdk working. it's bad enough that google's pretty fully documented the process Apr 10 00:17:31 brx_: nope, not right available, would have to google it up again Apr 10 00:18:15 Allright, then if no one knows of anything like that, then tell me why I get this error? Apr 10 00:18:25 R cannot be resolved to a variable HelloAndroid.java /HelloAndroid/src/com/example/helloandroid line 11 Java Problem Apr 10 00:18:36 ...and yes, I already googled it Apr 10 00:19:00 test Apr 10 00:19:03 And I have 32 bit libs installed Apr 10 00:19:06 now that's the introduction to android I remember! :-) Apr 10 00:19:07 phew, can post to the room. cool Apr 10 00:19:07 did you import R? did you import the correct R? Apr 10 00:19:58 evancharlton: I created a helloworld app. it's a brand new project and it gives the error out of the box. Apr 10 00:20:06 Does anyone need mirror hosting? Apr 10 00:20:10 haz3lnut: and there are no other errors? Apr 10 00:20:33 I have a really hard problem to solve using bluetooth communication. my plan had been to use bluetoothchat and it's associated service to set up the connection, then expose the service to my application activity. that seems to be working, but when I try to test, my callbacks only get called after the activity is fully initialized. i'm kind of out of my league Apr 10 00:20:50 haz3lnut: make sure you imported com.example.helloandroid.R Apr 10 00:20:59 if this was a web problem i'd use jsfiddle to show you, but since it's android not really sure how to show you guys Apr 10 00:21:05 Dystinio: no spam Apr 10 00:21:10 It's not spam. :\ Apr 10 00:21:21 it's not Android development, either.... Apr 10 00:21:21 I'm offering free mirroring to anyone who needs it. Apr 10 00:21:34 "#android-dev" Apr 10 00:21:34 Not hard to set up anything anyways Apr 10 00:21:35 dystinio: it's spam... go away Apr 10 00:21:38 Dystinio: we don't really like unsolicited advertising in here Apr 10 00:21:53 Sorry for being generous. Apr 10 00:21:55 FFS. Apr 10 00:22:03 haha how about ignoring the spammer and helping me with my problem :) Apr 10 00:22:43 javajosh: I would if I knew anything at all about the bluetooth api :-( Apr 10 00:23:01 killring: i think it might be a threading/activity lifecycle problem Apr 10 00:23:22 is it possible for android to combine threads in the background? Apr 10 00:23:33 define "combine"? Apr 10 00:23:49 evancharlton: also get this error: Error executing aapt. Please check aapt is present at .../android-sdk-linux/platform-tools/aapt Apr 10 00:23:58 Android threads are native threads, so their lifetimes etc are as defined by the kernel Apr 10 00:24:03 use one thread to move through many runnables Apr 10 00:24:19 javajosh: that, certainly; that's the way the main thread of your app operates, for example Apr 10 00:24:24 that is exactly what Looper does Apr 10 00:24:45 processes all of the messages/Runnables posted to it, one at a a time in the order posted Apr 10 00:25:08 [subject to a certain amount of control like "make sure to run this one next" or "run this one at a specified point in the future"] Apr 10 00:25:17 then i don't know how to get the effect i need. basically I want my singleton to be a listener on the bluetoothchat service, and be notified when new messages come in Apr 10 00:25:20 haz3lnut: welp! Apr 10 00:25:27 I think there's something wron with my java installation Apr 10 00:25:31 haz3lnut: you don't think that those two might possibly be related? :P Apr 10 00:25:43 haz3lnut: wrong; there's something wrong with your SDK and/or ADT installation Apr 10 00:26:34 evancharlton: yeah, might be something wrong with java. but I have had all kinds of java issues since oracle pulled out of ubuntu repo Apr 10 00:26:37 ctate: when i step through the code, i notice that my Handler is being called on the main thread rather than the connect thread being used to shuttle between sockets. Apr 10 00:26:53 how did you construct the Handler? Apr 10 00:26:59 haz3lnut: it's not an issue with java Apr 10 00:27:16 ... that's a leading question. When you construct a Handler, you tell it which Looper thread to direct its messages to. Apr 10 00:27:21 ctate: it's an anonymous subclass of Handler instanced as a member of my singeton Apr 10 00:27:29 by default it points to the app's main thread Apr 10 00:27:31 haz3lnut: unless aapt is present at that location and you can't execute it Apr 10 00:27:34 AHHHHHHHH Apr 10 00:27:59 javajosh: you might want to check out HandlerThread in the docs Apr 10 00:28:32 ctate: yes indeed. this would explain the strange behavior i'm seeing Apr 10 00:28:45 i'll be hanging around for a while. you? Apr 10 00:29:24 for a little bit yet Apr 10 00:30:22 evancharlton: it's there, but attempt to execute gives: Apr 10 00:30:54 bash: ./aapt: No such file or directory Apr 10 00:31:04 wtf? Apr 10 00:33:50 haz3lnut: you need to make sure eclipse is properly pointed to your sdk installation as well as adding tools and platform-tools to your path Apr 10 00:34:31 killring: it is, I attempted the execution from command line. That's bizaar. I am attempting a reinstall of the SDK Apr 10 00:35:47 ctate: okay, so i tried to pull the looper reference from another listener, but this didn't work. the docs for handlerthread are not very expressive. do you have any examples of it's use? http://developer.android.com/reference/android/os/HandlerThread.html Apr 10 00:37:04 I guess I'd like to get some guidance on the overall plan, too. Is it reasonable to let one Activity instantiate and configure a service, and then have another Activity install a Handler on that service and expect asynchronous callbacks? Apr 10 00:37:18 Perhaps there's another better way to do things Apr 10 00:37:49 HandlerThread is an easy [imho the easiest] way to spin off a new thread that is a Looper Apr 10 00:38:16 so: you instantiate a HandlerThread(), and call .start() on that instance Apr 10 00:38:25 at this point, that thread is off and running as a Looper Apr 10 00:38:30 then Apr 10 00:39:12 Handler otherThreadHandler = new Handler(theHandlerThread.getLooper()); Apr 10 00:39:30 now, otherThreadHandler is a Handler instance that posts its work to that HandlerThread, not to the main thread. Apr 10 00:39:38 et voilà Apr 10 00:39:46 yeah, that's what I did and my handler was still being called on the main thread :/ Apr 10 00:39:59 "handlers" dont' get called. Apr 10 00:40:14 well, i suppose their handleMessage() methods do Apr 10 00:40:21 that's what I meant Apr 10 00:40:30 how are you spinning off the HandlerThread, and how are you instantiating the Handler, and how are you posting work to it? Apr 10 00:41:19 i mean, i know that this does work; i've written code using HandlerThread successfully :) Apr 10 00:41:35 http://www.youtube.com/watch?v=bVeew4QjpuI creapy, but awesome Apr 10 00:41:36 In this case the Service has it's own threads shuttling data to and from bluetooth sockets. These threads invoke the Handler.handlMessage callback. Hence, I would expect any breakpoint on that method to appear on the Service's threads, but I don't Apr 10 00:41:57 you should never called handleMessage() yourself Apr 10 00:42:07 that is the *callback* method Apr 10 00:42:18 called by the Looper implementation directly Apr 10 00:43:01 what you do is call myHandler.obtainMessage(...) to get a Message object bound to that Handler instance Apr 10 00:43:22 then myHandler.sendMessage(...) to enqueue it, once you've filled it out appropriately Apr 10 00:43:22 yes, sorry that's how it's done. my code is based on Google's code, and they do the obtainMessage dance Apr 10 00:43:27 just spin up new services for all of this Apr 10 00:43:42 and use the alarm manager on 5s intervals Apr 10 00:43:43 evancharlton: yeah but Services still use the main looper by default Apr 10 00:43:54 okay don't make me come over there and smack you Apr 10 00:43:55 ctate: oh in that case use a different process Apr 10 00:44:07 countdown to hurting in 5... 4... 3... Apr 10 00:44:40 * evancharlton has quit (ping timeout: 240 seconds) Apr 10 00:44:53 did ctate just run across the room to slap evancharlton with a large trout? Apr 10 00:45:34 I thought it was a barramundi. Apr 10 00:45:53 was evancharlton serious O.O Apr 10 00:45:57 bah i feel very very dumb because i don't understand Android threads and i have a deadline. I think I may fail Apr 10 00:46:58 javajosh: android threads are just java threads Apr 10 00:47:22 ctate: thanks for the pointers, i'm sure that's where the problem lies. Apr 10 00:47:30 g00s: ... no. Apr 10 00:47:35 ok :) Apr 10 00:47:50 killring: apparently not. java threads do not normally come with "Loopers" Apr 10 01:04:11 Looking for some help with shared prefs and the data/data folder. I have a game that gives me credit for downloading and playing other games. I would like to do this for a friends app. However, we cant figure out how to tell if that app has been run before or not Apr 10 01:07:12 Bit_reaper, used shared_prefs and store like played=true on first init Apr 10 01:07:13 anyone using the latest httpclient (stock from apache) Apr 10 01:07:28 can you? Apr 10 01:07:32 ya Apr 10 01:07:38 without bringing in the source and renaming everything? Apr 10 01:07:46 oh , well jarjar Apr 10 01:07:49 iBotPeaches can i pm you? Apr 10 01:08:05 i try to stay away from httpclient now Apr 10 01:08:09 urlconnection++ Apr 10 01:08:19 * g00s wishes google just never included it to begin with Apr 10 01:08:32 Whats the problem with it Apr 10 01:08:40 * Jak_o_Shadows tries to remember if I used it. Apr 10 01:08:58 im only going to be here for like 10 more minutes Apr 10 01:09:08 androidhttpclient is ok Apr 10 01:09:20 httpclient works, it just takes a lot to set up correctly Apr 10 01:09:25 google recommended httpclient for foray and below, and url connection for gb and above - or something like that Apr 10 01:09:30 (froyo Apr 10 01:09:30 but androidhttpclient is only api 8+ Apr 10 01:09:32 I switched over to that Jackson json parser instead of SAX parser, and seeing huge improvements Apr 10 01:09:38 Incase anyone is using SAX Apr 10 01:10:00 iBotPeaches: and a 6MB larger apk! Apr 10 01:10:26 with Jackson 2.0 you can pick modules out and build it Apr 10 01:10:30 Im at 2.5mb Apr 10 01:10:42 hmm, proguard 4.8 beta Apr 10 01:10:43 you still need jackson full Apr 10 01:10:58 o, well whatever im using it now is working fine Apr 10 01:11:04 ibotpeaches i can pm you haha not sure why lol Apr 10 01:11:08 sure Apr 10 01:11:13 I cant* Apr 10 01:11:16 yeah, jackson might be a little smaller, im thinking spring Apr 10 01:11:19 spring is HUGE Apr 10 01:11:49 Is that like Spring 3 Apr 10 01:11:51 or wrong thing Apr 10 01:11:56 roboguice + spring + jackson + slf4j = like 8mb Apr 10 01:12:03 yay for proguard Apr 10 01:12:17 spring for android is v1 i believe Apr 10 01:12:20 or 0.x Apr 10 01:12:26 i looked at slf4j Apr 10 01:12:27 o kk, never looked at it for android use Apr 10 01:12:49 iBotPeaches: no dependency injection, just json and oauth Apr 10 01:13:16 uses jackson for object mapping Apr 10 01:13:52 i just love jackson for the mapping Apr 10 01:13:54 just pop up a class Apr 10 01:13:57 dump an api into it Apr 10 01:13:59 boom, setup. Apr 10 01:14:00 anyhow, have a good night, im gonna pack up Apr 10 01:14:08 good night Apr 10 01:17:16 FTW, it was a lib32 problem after all. I had to remove ia32-libs (which unfortunately removed some packages like wine!) and reinstall ia32-libs. Apr 10 01:17:53 evancharlton: ^^^ Apr 10 01:18:01 Does anyone else know about sharedprefs that I can pm with? I have a few more questions. Ibotpeaches helped a lot though thank you! Apr 10 01:19:58 hey guys whats the appropriate syntax for a hashtable array? Apr 10 01:20:10 i foudn this on stack trace @SuppressWarnings("unchecked") Hashtable[] h = (Hashtable[])new Hashtable[10]; h[0] = new Hashtable(); Apr 10 01:21:08 (Hashtable[])new Hashtable[10]; is defining the array i can potentially add? Apr 10 01:22:46 why would you want an array of hashtables, yuck Apr 10 01:23:00 cause I do okay. Apr 10 01:23:26 for fun. >:P Apr 10 01:23:27 Does anyone else know about sharedprefs that I can pm with? I have a few more questions Apr 10 01:23:48 just ask your question here Apr 10 01:25:05 if the program checks to see if a progam has been run before and the user deletes this file. Would this affect anything? Because would it the programs shardpref be asking the vendor shardpref if that file has been run before? Apr 10 01:25:42 Anyone here an expert with admob? Apr 10 01:25:44 if a program checks to see if another progam has been run before with a sharedpref and the user deletes this file. Would this affect anything? Because would it the programs shardpref be asking the vendor shardpref if that file has been run before? Apr 10 01:25:56 It's more of a question for the setup, not really putting or coding it in. Apr 10 01:28:45 T-Dub was that for me? Apr 10 01:28:56 No, sorry. Apr 10 01:36:17 Basically i know games can give you credit for downloading other games. I wanted to help my friend in doing this same process. I know you need to add a line to the shared prefs asking if that app you are getting credit for is its first time running. However my questions is if the user deletes the sharedprefs file, would this matter as the sharedpref is communicating with the vendor sharded pref file. So they would have t Apr 10 01:39:08 "Nine to fivers need not apply." kind of scares me on a job application Apr 10 01:39:33 like ive never had a job where i worked "nine to five", but when the employer says it, it sounds more like "we want eight to ten" Apr 10 01:39:39 yeah, kind of like "superstars only" which translates to "handle unrealistic expectations" Apr 10 01:40:11 (and abuse, and not complain about it) Apr 10 01:40:40 just tell them 'no problem, I'm a 10 to 3 guy myself' Apr 10 01:40:47 the way i see it is that you better expect me to work 40 hour weeks Apr 10 01:40:56 and as long as that's your expectation, i will do well Apr 10 01:41:02 but when you force me to work 60 hour weeks, i get annoyed Apr 10 01:41:11 and my productivity drops Apr 10 01:41:16 my enthusiasm drops Apr 10 01:41:23 but keep it at 40, and i'll do 60-70 Apr 10 01:41:49 if we keep it at 30, will you do 70-80 ? Apr 10 01:41:57 no Apr 10 01:42:00 :D Apr 10 01:42:05 slacker Apr 10 01:43:03 it also depends what you consider work Apr 10 01:43:27 of 25 android devs in my office, ibet less than 5 know what an ActionBar is Apr 10 01:43:39 it takes time to stay up to date with android Apr 10 01:44:11 romainguy: if you are around, do you use any type of software that keeps error correction data for your photos, like huffman codes, or whatever Apr 10 01:46:32 Basically i know games can give you credit for downloading other games. I wanted to help my friend in doing this same process. I know you need to add a line to the shared prefs asking if that app you are getting credit for is its first time running. However my questions is if the user deletes the sharedprefs file, would this matter as the sharedpref is communicating with the vendor sharded pref file. So they would have t Apr 10 01:47:42 you cannot trust the client device, period. Apr 10 01:47:55 ctate: lies! Apr 10 01:48:06 i wrote the app Apr 10 01:48:11 therefore i know it's giving me good data Apr 10 01:49:08 Ctate we dont have the server power to not turst at this moment. If it takes off we can change it. But for now we have to do it client side Apr 10 01:49:50 ctate: it is so frustrating how few people seem to realize how fucking easy it is to masquerade... Apr 10 01:50:00 jasta you can't spoof android apps Apr 10 01:50:03 because it's signed with my key Apr 10 01:50:05 i have this argument constantly with folks that just make the same bogus assumptions over and over again Apr 10 01:50:16 and i pass the app's signature to the server in all requests Apr 10 01:50:21 so i know it hasnt been tampered with Apr 10 01:51:02 ha ha ha Apr 10 01:51:16 i actually did something nasty to AntiLVL recently Apr 10 01:51:26 if you run it on a certain app, it says "I HACKED THE APP" Apr 10 01:51:29 but really, it did nothing Apr 10 01:51:57 Can anyone help? Apr 10 01:52:17 bit_reaper, i dont know waht you want Apr 10 01:52:21 you want to do security client-side Apr 10 01:52:26 this will fool my mom Apr 10 01:52:31 but none of my frineds Apr 10 01:52:37 so what's your target demographic Apr 10 01:52:59 Canadiancow - im more so tying to understand what would happen if they tried is all Apr 10 01:53:17 people will always get around a system Apr 10 01:53:25 they clear data, and it's as if it's a fresh install Apr 10 01:53:48 so they just clear the whole data/data folder? Apr 10 01:53:59 no, they go into managea pps Apr 10 01:54:01 manage apps Apr 10 01:54:03 select your app Apr 10 01:54:05 "clear data" Apr 10 01:54:08 it just wipes the one app Apr 10 01:55:03 right but when the shardprefs checks to see if the app they downloaed for credit is its first time running wouldnt the vendor sharedpref say false, thus they would not get credit? Apr 10 01:55:25 hello Apr 10 01:55:39 can someone explain how create a socket between client/server without hardcoding in an ip address for either phone? Apr 10 01:55:50 so what if they clear that one Apr 10 01:56:47 Basicaly they would have to clear my apps data and the app they want credit for as well correct? or would the phone still have a record of that app runing before? Apr 10 01:57:20 created client/server socket using tcp but had to hardcode the ip address, is there a way to broadcast address so one phone can setup a socket? Apr 10 02:00:46 pm'ing me wont magically make me help Apr 10 02:02:40 canadiancow - as i said in the pm i thought it would be easier as you dont have all the ping timeouts and people asking other questions in the way Apr 10 02:03:02 thats all Apr 10 02:03:15 I appreaicate the free help honestly Apr 10 02:03:21 Is RealativeLayout the only layout that allows aligning with parent bottom? Apr 10 02:06:07 can anyone help me, please? Apr 10 02:06:44 Basicaly they would have to clear my apps data and the app they want credit for as well correct? or would the phone still have a record of that app runing before? Apr 10 02:13:51 hello.......hello..hello..hello Apr 10 02:15:51 Basicaly they would have to clear my apps data and the app they want credit for as well correct? or would the phone still have a record of that app runing before? Apr 10 02:18:11 don't think anyone is here Apr 10 02:18:19 i am... Apr 10 02:18:30 what's up? Apr 10 02:18:33 can you help me? Apr 10 02:18:33 alright canadiancow what is the magic way to get you to help me o_O Apr 10 02:18:39 or me? haha Apr 10 02:18:43 or both really Apr 10 02:18:46 created client/server socket using tcp but had to hardcode the ip address, is there a way to broadcast address so one phone can setup a socket? Apr 10 02:18:55 i cant... busy working throughout the day... Apr 10 02:18:56 dont ask me at the end of a long hard day? Apr 10 02:19:31 i guess u would need to put it in stackoverflow, and let us know, then we'll get back to that later? Apr 10 02:19:49 canadiancow anyother way? How about will you please help me with my questions? Apr 10 02:20:10 * bit_reaper sends canadiancow an icecream sunday with extra cherries Apr 10 02:24:59 * bit_reaper sends canadiancow a million dollars in small used bills Apr 10 02:27:19 * bit_reaper sends canadiancow a job promotion with pay raise Apr 10 02:28:00 pay raise... needed that... Apr 10 02:28:13 Can anyone here help me with admobs? Apr 10 02:28:13 *i needed that* Apr 10 02:28:46 ill send you one too if you can help haha Apr 10 02:29:27 Hey guys I have a noobie android question. Apr 10 02:29:48 sooo...... in regular java i can read file from a directory like this Apr 10 02:29:49 File folder = new File(path); File[] listOfFiles = folder.listFiles(); Apr 10 02:30:01 can I do the same thing with my res/raw folder somehow? Apr 10 02:30:12 or what should I look into to achieve this Apr 10 02:32:22 can anyone help me with sharedprefs? Apr 10 02:33:27 cant u just define them save values in them and then watch those values persist ? Apr 10 02:33:52 clear application cache adn whatever to troubleshoot Apr 10 02:34:47 mantas322 - was that for me? Apr 10 02:34:53 yeah Apr 10 02:35:35 where is app cache? Apr 10 02:35:55 grrr... stupid v7 compat lib... Apr 10 02:36:03 http://developer.android.com/guide/topics/data/data-storage.html Apr 10 02:36:57 mantas322 - im wondering if they clear my apps data and the app they are getting credit for apps data would that change anything as the shared pref of my app is talking with the vendor sharedpref to see if the app has been run before correct? Apr 10 02:38:16 umm i dont know.... I think that shared preferecnes in android are the equivelent of cookies or html5 local storage Apr 10 02:38:32 its ment for small things like user settings for volume or something along those lines Apr 10 02:39:20 should i use something different then? I just need to know if a certain has been runed before or if its first time running so i can give them credit for the app... Apr 10 02:42:03 bit_reaper, the only way to 100% check for a one time gift, is to use a server validation. Nothing in APP is secured Apr 10 02:42:18 Unless your running some uuid AES 256 encryption, but then again, it could be deleted. Apr 10 02:42:31 So back to the fact that using a uuid in a server to check, is the safest way Apr 10 02:42:34 Though, that requires internet Apr 10 02:42:49 oooo uuid AES 256 super encryption eh? sounds sexy Apr 10 02:43:36 iBotPeaches - I understand that, im just trying understand better....I have no idea how the sharedprefs knows that app has been run or not. What its checking and all of that Apr 10 02:44:05 Bit_reaper: if the user wipes data on any given app, the next time the app is run it will think it has never been run before Apr 10 02:45:15 @ctate - thank you, so the phone keeps no record of the app after the user wipes that data? Apr 10 02:45:34 that is what it mean to wipe the data Apr 10 02:45:40 they could also uninstall & reinstall the app Apr 10 02:45:43 same dael Apr 10 02:45:58 cool Apr 10 02:45:58 bit_reaper, don't put any check in the APP, so it doesn't matter if they wipe. Apr 10 02:46:05 Store their UUID in your database Apr 10 02:46:09 check it on your server. Apr 10 02:46:13 They can't wipe your server Apr 10 02:46:27 or the user could suck the data out through adb, modify it however they wished, and put it back Apr 10 02:46:29 will look into that, thank you ibotpeaches Apr 10 02:46:32 and the app would not know Apr 10 02:46:51 as i said: you cannot trust the client/app/device. Apr 10 02:46:51 hash the data on send/recieve Apr 10 02:47:10 got it Apr 10 02:48:33 one last question, what happens to a phone when you wipe the whole data/data folder? Little brother was being a smartass and did that to one of test phones. Now the home button doesnt work, It gives feedback but has no effect software wise....do i need to do a restore of a back? Apr 10 02:48:54 back up?* Apr 10 02:49:47 did this as a root user? Apr 10 02:49:55 yeah Apr 10 02:50:00 lol Apr 10 02:50:02 it's hosed; you'll have to wipe it for realz Apr 10 02:50:12 (which you can do from fastboot or from recovery, if necessary) Apr 10 02:50:28 hey ctate Apr 10 02:50:29 if you can get to the built-in UI for factory reset, that'll do it Apr 10 02:50:30 random quesiton Apr 10 02:50:37 mantas322: right to left Apr 10 02:50:38 its got cwm on there because i love the image backup Apr 10 02:50:39 (random answer) Apr 10 02:50:55 if I use Hashtables and they are being deprecated from java will my code which contains hashtables no longer work with the future? Apr 10 02:51:00 they are? Apr 10 02:51:08 also, no; it will continue to work Apr 10 02:51:15 thats what the excited people at #java told me Apr 10 02:51:21 okay, thanks Apr 10 02:51:39 Ctate why though does everything else work and not the home button though? I would think the phone would just fc everything. but it still has most of its funcatily Apr 10 02:52:15 mantas322: also, *Hashtable*? for srsly? Apr 10 02:52:23 because Hashtable was deprecated in like Java 1.2 Apr 10 02:52:26 in 1998 Apr 10 02:52:39 :/ the more i learn Apr 10 02:52:42 time to join the 21st century my friend Apr 10 02:53:01 seriously: HashMap was introduced as a replacement for Hashtable, in Java 1.2 Apr 10 02:53:10 lolololol hashtable Apr 10 02:53:17 shut up >:O Apr 10 02:53:26 Bit_reaper: the device no longer thinks it's been through Setup Wizard, probably Apr 10 02:53:40 on account of havinbg blown away the settings database Apr 10 02:53:44 "oops." Apr 10 02:53:57 probably can't make/receive calls either, though that i'm less sure of Apr 10 02:57:55 finally! victory over the v7 compat lib... what a pita Apr 10 02:59:15 thanks for the help ctate **** ENDING LOGGING AT Tue Apr 10 03:00:00 2012