**** BEGIN LOGGING AT Tue Aug 07 02:59:59 2012 Aug 07 03:00:50 The problem you'll run in to is when this app is in the background. Aug 07 03:00:52 Again :-) Aug 07 03:01:28 Ive been to home depot like 50x and finally just now got info I needed on my deck railing Aug 07 03:01:30 wtf Aug 07 03:01:57 If the apps in the background, the AlarmManager will still fire and if you ask for the "WAKE_LOCK" permission, it will deliver the pending intent to your application Aug 07 03:02:05 If you do not, your app will never receive the pending intent Aug 07 03:03:06 The issue if you're using a BroadcastReceiver to handle the intent, there's a chance that the context that created the receiver has already been destroyed and your app will crash when it receives the intent if it attempts to update the UI of the application. Aug 07 03:16:43 Sorry guys... hate to ask questions like that and run, but duty calls. I'm reading backlog now. Aug 07 03:19:06 forgive me if my definitions are a bit off... still learning a lot. Aug 07 03:20:45 yinzara: my intent is starting a service that runs a timestamp method. I need a service to run in the background. Aug 07 03:28:26 yinzara: so let me rephrase this so that I can better understand it, as I've never used BroadcastReceiver and need to read up on it. The main activity sets a pending intent. That pending intent runs a service that performs a timestamping event. When that service fires the timestamping event, it will (getting hazy here) boradcast that the event fired. I'll need a BroadcastReceiver to detect that broadcast, and in that receiver I can Aug 07 03:30:02 er, no. Aug 07 03:30:48 hmmmm.... :-( Aug 07 03:36:20 I'm so lost here it's not funny.... Aug 07 03:37:30 let me ask a few more questions and see if I can get on track. What happens if my activity is backgrounded? does the receiver never get the action? Aug 07 03:45:50 Rescue9 depends on if your device goes to sleep Aug 07 03:46:23 the device will go to sleep. Aug 07 03:47:35 you can set a wakelock, and I am pretty sure you can wake a device on intent Aug 07 03:47:46 but you really dont want to do that willy nilly on customers devices Aug 07 03:47:57 as you could drastically effect battery life Aug 07 03:48:14 our hardware doesnt sleep Aug 07 03:49:09 yea.. I understand wakelock. not sure I want to go that route.... though Aug 07 03:50:50 so the only way to fire an activity from an alarmmanager service while the device is asleep is to wakelock? Aug 07 03:54:18 this might be a helpful pattern to look at or use: Aug 07 03:54:20 https://github.com/commonsguy/cwac-wakeful Aug 07 04:02:02 doogan: looking at it now. Aug 07 04:15:32 too much for me to wrap my head around tonight. I can't seem to wrap my head around it. Thanks for the info guys. Aug 07 04:18:19 have a good evening all. Aug 07 04:31:53 when my app is running, if you press the power button the display goes to sleep. when you unlock the phone, the app resumes but on resume gets called and my activity reloads Aug 07 04:32:06 is there a way to prevent the activity from reloading Aug 07 04:41:43 has anyone worked with accessibility apps? Aug 07 04:41:56 moreso for 4.1.x specificly? Aug 07 04:46:29 Anyone had success creating a wireless network? I'm not interested in tethering (i.e., sharing 3/4G connection), I just need to create a wifi connection between the device and an iPad. Aug 07 04:47:23 I did Aug 07 04:48:15 https://play.google.com/store/apps/details?id=android.tether&feature=search_result Aug 07 04:50:46 eXtremo: Does it require that your phone be rooted? Aug 07 04:50:54 Is it possible to have GLSurfaceView set things up and have code on native-side do the GL stuff? Aug 07 04:52:57 MontyCarleau: this app yes Aug 07 04:54:08 this doesn't, but has some incompatibilities https://play.google.com/store/apps/details?id=com.foxfi&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5mb3hmaSJd Aug 07 04:54:38 eXtremo: Does that one use reflection to access potentially unsupported interfaces? Aug 07 04:55:19 what do you mean? Aug 07 04:56:14 eXtremo: Some approaches use setWifiApEnabled, a method that isn't officially supported by the SDK. Aug 07 04:57:00 eXtremo: http://stackoverflow.com/questions/3023226/android-2-2-wifi-hotspot-api?rq=1 Aug 07 04:59:26 you can consistently make adhoc on almost any android rev (well, after 2.. maybe 2.2) Aug 07 04:59:37 but you won't be able to serve dhcp or dns w/out rooting Aug 07 05:00:19 making a proper AP managed network is harder Aug 07 05:00:26 fairly sure the api to do that only exists in 4.x Aug 07 05:01:16 dragorn: So, if all I'd like to do is be able to have a TCP connection between devices, are you saying I should have access to that? Aug 07 05:01:32 wellll yes and no; like I said, you can't do dhcp or dns Aug 07 05:01:39 you could try to do multicast discovery Aug 07 05:01:46 zeroconf style Aug 07 05:02:32 I don't know what i-devices do when you present them with an adhoc Aug 07 05:02:53 dragorn: Sure, there will only be two devices on the network, so a broadcast would be fine. Can you point me toward any SDK pages regarding setup? Aug 07 05:03:22 MontyCarleau: wifimanager; create an adhoc network and set it to the active network Aug 07 05:13:40 dragorn: I think I'm missing something obvious - I'm looking through the WifiManager, but I'm not seeing any methods pertaining to the creation of a network. Should I be looking at supplicants? Aug 07 05:14:30 MontyCarleau: https://developer.android.com/reference/android/net/wifi/WifiManager.html#addNetwork%28android.net.wifi.WifiConfiguration%29 Aug 07 05:15:34 dragorn: Oh, I was misunderstanding - the ad hoc networks are filtered so that Android devices can't join - but addNetwork won't filter their creation. Stupid of me – I appreciate it. Aug 07 05:16:00 MontyCarleau: Modern android should support adhoc fine, I believe it was added in 2.2 Aug 07 05:23:01 does anyone know where in AOSP the screenshot stuff lives? Aug 07 05:47:05 has anyone used ListPreference? Aug 07 05:52:19 is anyone here Aug 07 05:53:29 couple hundred users present Aug 07 05:54:48 ok i need to be clear about something. I'm reading the docs at http://developer.android.com/reference/android/content/pm/ActivityInfo.html#SCREEN_ORIENTATION_PORTRAIT which screen orientation corresponds to auto mode where the device rotates based on how the user is holding the phone ? SCREEN_ORIENTATION_FULL_SENSOR ? SCREEN_ORIENTATION_SENSOR ? Aug 07 05:54:50 JakeSays: but none of them answered a generic question immediately Aug 07 05:55:08 also JakeWharton Aug 07 05:56:25 leeds can you help me out Aug 07 05:56:30 trying to figure out where screenshot stuff lives so that I can add an API to Instrumentation for taking screenshots Aug 07 05:56:45 I should poke someone about whether that's logical or not first so as to not waste my time Aug 07 05:56:50 * JakeWharton pokes romainguy_ Aug 07 05:56:54 devslash: SENSOR is auto mode - FULL_SENSOR means it will rotate to any orientation, even those which aren't included in SENSOR Aug 07 05:57:20 oh i see ok thanks for clearing that up Aug 07 05:57:48 so auto might only have 2 orientations - 1 portrait and 1 landscape - but FULL_SENSER has all 4 Aug 07 05:58:55 ok Aug 07 06:00:17 devslash: also, you really need to learn some patience Aug 07 06:00:33 thats a tough one Aug 07 06:01:12 timezones too, perhaps Aug 07 06:03:33 indeed, that too Aug 07 06:06:23 JakeWharton: is this what you're looking for? under SystemUI basically com.android.systemui.screenshot.TakeScreenshotService Aug 07 06:06:46 that sounds reasonably accurate! Aug 07 06:08:30 ah, frameworks/base/packages! Aug 07 06:08:34 thank you kind sir or madam Aug 07 06:08:48 * Leeds suspects prateek is a sir Aug 07 06:09:02 totally unrelated: did you know that the JPL C coding standards forbid the use of recursion or any loops which cannot be statically analyzed as finite? Aug 07 06:09:12 haha, i prefer Sir Aug 07 06:13:20 http://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf Aug 07 06:15:22 I have two textviews in a linearlayout Aug 07 06:15:47 heh, nevermind Aug 07 06:16:22 No no you can't do that gimme a new question :) Aug 07 06:17:20 themirror: hah okay Aug 07 06:17:27 I have two textviews in a horizontal linearlayout Aug 07 06:17:44 I want the left textview to expand as much as possible but still keep enough room for the right textview Aug 07 06:18:09 Additionally, when the left textview doesn't take up more room than is available, I want the right textview to be 2dp away from the left textview. Aug 07 06:19:18 Hmm something about getSuggestedMinimumWidth, compare to DisplayMetrics width? Aug 07 06:19:49 So my view is 140dp wide -- I want the width of the left textview to be (if it has a lot of text) 140dp - width(right textview) Aug 07 06:19:56 Yeah, but is there any way to do that in XML? Aug 07 06:20:08 tv1.min + tv2.min ?= displayWidth Aug 07 06:20:10 oh Aug 07 06:20:14 uhhh Aug 07 06:20:22 lemme think and get a beer Aug 07 06:22:20 Shoot nothing is coming to mind immediately. Fill parent can be used for a width to make up the difference Aug 07 06:22:33 but you need to get runtime width Aug 07 06:22:46 it likely will need code tbh Aug 07 06:24:41 themirror: that's true. I didn't think of it that way. Aug 07 06:25:00 themirror: I'm convinced that that's correct. Aug 07 06:26:39 Lol paid apps in Mozambique. By a quick glance at the Factbook, I'm willing to guess they won't be buying too many apps Aug 07 06:31:28 factbook? Aug 07 06:32:33 EGamerHDK: the CIA puts out a 'factbook' of basic facts about every country in the world, including economic data... Aug 07 06:32:46 dafuq? Aug 07 06:33:07 Lol u serious man. It's been around forever Aug 07 06:33:16 Are you serious? Sounds like a nice waste of a couple of hours. ***mozzies on over Aug 07 06:33:54 You're right. Let's ride the anti-intellectualism train Aug 07 06:34:01 all together now Aug 07 06:34:11 btw. This is my first irc channel that requires me to "log in" every time I connect. is there any way to set that up automatically? Aug 07 06:34:12 ethnocentrism FTW Aug 07 06:34:25 it's a little bit dry for browsing, to be honest - the wikipedia entries for countries has all the same data, plus narrative :) Aug 07 06:34:27 Yes perform methinks Aug 07 06:34:30 any real IRC client will do it for you Aug 07 06:35:08 Alright so when I added android dev to favorites it asked for a password. should I have added my password at that point? I'm using hexchat Aug 07 06:35:30 Idk is there a perform? Aug 07 06:35:33 no, that would be a channel password Aug 07 06:35:44 the nickserv password is configured at a server-level Aug 07 06:36:30 Gotcha. Yeah, still new to irc. played around with it like when i was 14 and got all into it. now 7 years later, it all makes no sense. have to start from square 1 Aug 07 06:37:01 Anyways... any of you guys planning to buy this/develop for it? http://developer.getpebble.com/ Aug 07 06:37:50 EGamerHDK: in mIRC, at least, its under "perform" Aug 07 06:37:53 hi guys, can barcode scanners read barcodes that are displayed on smartphone screens? Aug 07 06:39:04 Hey everyone EGamerHDK is 21 Aug 07 06:39:09 lol Aug 07 06:39:13 onats: yes Aug 07 06:39:28 JakeWharton: thanks a lot! Aug 07 06:39:36 contrast ratio and pixel density in the parsed image are all that's necessary Aug 07 06:40:12 themirror, good job dude. you use the calculator app to do that? Aug 07 06:40:31 I verified it with 3 different ones yes Aug 07 06:40:33 lol. irc used to be good times when i was a kid. looking to start that back up Aug 07 06:41:02 except now its much more helpful. because I have real questions. lol Aug 07 06:41:32 Yeah and go back and watch cowboy bebop. It's still enjoyable Aug 07 06:42:00 Hello. After I've signed a package for Google Play, will that same apk install for people if I distribute it raw on my site? Aug 07 06:42:08 I'm 22, will be 23 in a week Aug 07 06:42:14 bebop++ Aug 07 06:42:22 trentg: yup Aug 07 06:42:30 excellent Aug 07 06:42:34 you are 16 going on 17... Aug 07 06:43:56 btw thanks Jake for always answering my stack overflow questions. hahaha Aug 07 06:54:46 hi, Does anyone know, is there analog of Javolution ArrayFactory? (http://javolution.org/target/site/apidocs/javolution/context/ArrayFactory.html) Aug 07 06:54:55 I am wroking on a project where i have a gallery and inside the gallery i need to have multiple image views which are created using canvas.Those image views are having bitmaps placed in different places. i need to have onclick event if any of the bitmaps is pressed.how can i do that? Aug 07 06:57:44 on onclick event i need to perform some task Aug 07 07:09:55 hello is there anyone to help me Aug 07 07:10:58 depends Aug 07 07:12:58 depends on what? Aug 07 07:13:28 "Acer CEO warns Microsoft to 'think twice' about its Surface plans" … hehe, fuck off acer Aug 07 07:15:50 Android03: depends on whether you ask your question or not ;) Aug 07 07:16:34 but it also depends … on other /stuff/ Aug 07 07:16:41 brian_de: he did actually ask before you joined... Aug 07 07:16:42 exactly! Aug 07 07:17:13 oh, my bad :) Aug 07 07:17:33 you guys will keep arguing or help me also Aug 07 07:17:41 His question is kinda doable after reading the docs decently Aug 07 07:17:49 but I'm lazy Aug 07 07:18:33 read view.onclicklistener Aug 07 07:18:36 android03: Nobody can't help if you don't even ask your question. Of course don't hold your breath even if you ask. Aug 07 07:18:52 He *did* ask Aug 07 07:18:57 oh? Aug 07 07:19:06 when? Aug 07 07:19:06 themirror: my question is double ? Aug 07 07:19:28 double != doable :) Aug 07 07:19:28 ah right already hidden by all these join and leave messages Aug 07 07:19:29 for those who did not see my question : I am wroking on a project where i have a gallery and inside the gallery i need to have multiple image views which are created using canvas.Those image views are having bitmaps placed in different places. i need to have onclick event if any of the bitmaps is pressed.how can i do that? Aug 07 07:19:31 Do+able = doable Aug 07 07:20:17 As I said above, read View.onClickListener Aug 07 07:21:01 yeah, get a onClickListener Aug 07 07:21:28 How about my question? Aug 07 07:21:33 My mainActivity loads a second settings Activity. should I be able to pragmatically access the main activity from settings using MainActivity.this Aug 07 07:21:36 or maybe, if everthing is in the canvas, try onTouch and process coordinates Aug 07 07:21:49 hey but if i do view.onclicklistener i ll get the onclck for whole image view but i want the onclick for the bitmaps i have drawn inside that image view using onDraw method Aug 07 07:23:06 a bitmap represents a bunch of colors Aug 07 07:23:12 they know nothing about the display systems Aug 07 07:23:14 devslash, no pass the main object to the other activity Aug 07 07:23:23 Android03, use onTouchEvent Aug 07 07:23:32 brian_de : correct everything is in canvas , u mean there is no other way to except onTouch and processesing coordianates Aug 07 07:23:34 Android03: http://developer.android.com/reference/android/view/View.html#onTouchEvent%28android.view.MotionEvent%29 Aug 07 07:23:44 the ImageView, however, is a container that can draw a Bitmap onto the UI Aug 07 07:24:03 themirror: what I'm trying to do in settings is this: MainActivity.this.setRequestedOrientation(Integer.parseInt(currOrientation)); Aug 07 07:24:17 Android03: no sense in that. Fill the entire imageview, otherwise use a container view Aug 07 07:24:28 to hold imageviews Aug 07 07:24:33 such as a layout Aug 07 07:25:46 no but i need to achieve zoom in / out functionality for the images .if i use containerview will i be able to achieve zoom feature? Aug 07 07:26:08 devslash, yes, make a method called setMain and settings.setMain(this); Aug 07 07:26:18 do that Aug 07 07:26:42 As in Settings add that method to take a Main Aug 07 07:26:46 so setMain goes in main activity ? Aug 07 07:26:51 and in Main pass this Aug 07 07:27:01 no in Settings Aug 07 07:27:32 You see? I can explain better if necessary Aug 07 07:27:32 so i create a reference to main before loading settings Aug 07 07:27:38 After Aug 07 07:27:49 ? Aug 07 07:27:52 I'm confused Aug 07 07:27:53 cuz you are calling setMain from main object Aug 07 07:28:08 yes Aug 07 07:28:09 One sec okay Aug 07 07:28:52 Id create an object in settings like this: private Activity mainActivity; and have a method setMain(Activity m) { mainActivity=m; } Aug 07 07:29:03 sound about right ? Aug 07 07:29:05 Android03: well you can also zoom an imageview, or multiple imageviews. but if you want to go the canvas way, i guess there is no other possibility than use onTouchEvent. and processing the coordinates from the motionevent isn't that hard (if you already managed to get a zooming feature) Aug 07 07:29:19 Settings settings = new Activity(); (or however that shit is called). settings.setMain(this); Aug 07 07:30:02 oops, i deleted all the photos from today w/o xfering them to my computer first :/ Aug 07 07:30:04 in my main i load the intent //Starting a new Intent for Settings screen Aug 07 07:30:05 Intent prefsScreen = new Intent(getApplicationContext(), SettingsActivity.class); Aug 07 07:30:06 Aug 07 07:30:07 // show it Aug 07 07:30:08 startActivity(prefsScreen); Aug 07 07:30:12 I still only have one activity so I'm dumb Aug 07 07:30:21 i have already achieved zooming feature for images using canvas ,but the main concern is to have onclicks or anyother event Aug 07 07:31:02 i dunno Aug 07 07:31:03 well, use onTouch Aug 07 07:31:33 ok , what about using glsurfaceView and renderer Aug 07 07:31:57 Android03: to do what? Aug 07 07:32:14 the same task Aug 07 07:32:29 to do the same task Aug 07 07:32:38 which is? Aug 07 07:32:55 Are they separated uniformly? Why not rectify by dividing? Aug 07 07:33:02 u saw my question? Aug 07 07:33:07 no Aug 07 07:33:29 I am wroking on a project where i have a gallery and inside the gallery i need to have multiple image views which are created using canvas.Those image views are having bitmaps placed in different places. i need to have onclick event if any of the bitmaps is pressed.how can i do that? Aug 07 07:33:54 Just use ImageViews and set click listeners on those ImageViews Aug 07 07:33:57 no need for OpenGL Aug 07 07:35:35 romainguys:inside those images i have few bitmap created using draw method now i want the clicks for those bitmaps not for the whole imageview Aug 07 07:36:15 So you are using an ImageView but you override the draw method to draw more than one bitmap? Aug 07 07:36:52 yes Aug 07 07:37:03 well first of all don't use an ImageView for that Aug 07 07:37:06 just use a View Aug 07 07:37:15 and you have two solutions: Aug 07 07:37:17 ok Aug 07 07:37:20 either create one ImageView per image Aug 07 07:37:21 or Aug 07 07:37:30 override onTouchEvent and handle touch events yourself Aug 07 07:39:58 please recommend me an analog of http://javolution.org/target/site/apidocs/javolution/context/ArrayFactory.html Aug 07 07:41:00 themirror: i added android:configChanges="orientation" to my manifest for my main activity because i want to prevent the activity from being redrawn on orientation change. but its still redrawing. has it been changed ? Aug 07 07:41:57 devslash well handle it in onConfigurationChanged Aug 07 07:42:13 romainguy: ok so mean instead of 23 Aug 07 07:42:16 also need another parameter now forgot Aug 07 07:42:20 its screen something Aug 07 07:43:27 romainguy: ok i will try it Aug 07 07:43:50 Love the splits Aug 07 07:44:30 hello all Aug 07 07:48:54 hi snkt Aug 07 07:55:08 hello onr, .... I m getting some bug while executing java application.... the bug is similar to ... http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6508889 Aug 07 07:56:01 how can I use this ... -Xms128m -Xmx384m -XX:MaxPermSize=99m Aug 07 07:56:02 snkt: er, on Android? Aug 07 07:56:30 Leeds, its a java based application Aug 07 07:56:38 on Android or not? Aug 07 07:56:49 I try to specify a file like this new File("resources/images/image.png"). The question is, how do I know what the current directory is, that resources and images (the directories) will be created before creating or looking up image.png? Aug 07 07:57:12 Leeds, its not on Android Aug 07 07:57:21 snkt: then why are you asking in #android-dev? Aug 07 07:58:02 Leeds, because after that I have to integrate on android 2.3 Aug 07 07:58:21 ask in #java Aug 07 07:58:28 Leeds, ok Aug 07 07:58:30 Android doesn't use a JVM Aug 07 07:58:44 Leeds, ya Aug 07 08:00:28 johanhar: that's not how resources are done on android Aug 07 08:00:49 moreover, that's not how file access is done either Aug 07 08:01:04 themirror: oh, ok... Aug 07 08:01:46 Yeah more reading is required most of what you need is well documented on d.android.com Aug 07 08:02:02 themirror: I'm downloading resources for a web-app to be run in a web-view-thingy. I'm not downloading resources to use in my "native-app", if you understand what I mean... :) Aug 07 08:02:10 thanks Aug 07 08:02:26 For writing new files, use outputstreamwriter etc there's a good forum post online Aug 07 08:03:20 johanhar, right, there's a good post online showing how to read and write your own files somewhere Aug 07 08:03:50 I used it, works well just can't remember where its at or anything Aug 07 08:07:16 I was wondering, can my android phone work as a bluetooth speaker? I mean, can I code an app which will let the phone be shown as a bluetooth speaker for laptop? is it possible? Aug 07 08:07:56 The short answer... "no, unless rooted" Aug 07 08:08:44 Any non-rooted scenarios I can think of require a companion app on the other end. Aug 07 08:09:49 johanhar: this should be quite useful http://www.anddev.org/working%5Fwith%5Ffiles-t115.html Aug 07 08:09:58 Question.. do I need "android.permission.CHANGE_WIFI_MULTICAST_STATE" to set up a multicast socket at all, or is it just if I want to send data on a multicast socket? Aug 07 08:10:18 Speaking of multicasting, I hate the emulator for not supporting any advanced networking features :/ Aug 07 08:12:38 easiest app i can use to install .apk files with? e.g. from e-mail attachments Aug 07 08:13:27 Eh Gmail? :) Aug 07 08:13:35 stork: AppInstaller Aug 07 08:16:37 hmm, doesn't seem to work :/ trying to open it from the jelly bean e-mail client Aug 07 08:18:38 Uh idk worked great for me. Save to SD card, open app installer and its right there Aug 07 08:19:06 e'mail is telling me "there is no installed app that can open this attachment" Aug 07 08:20:06 Yeah has nothing to do with the app. You can't just save the file instead of opening it/ Aug 07 08:20:23 Definitely works if u do it on a comp and usb it over Aug 07 08:20:48 Gmail (at least on pre-4.1) shows an install button for APK attachments. Aug 07 08:21:02 doesn't seem to be an option to save the file Aug 07 08:21:12 (this is the e-mail client, not gmail though) Aug 07 08:22:08 Use a lappy, address email client deficiency later?/ Aug 07 08:23:57 yeah, i'll do that Aug 07 08:24:06 just get people to install it by putting it on the sd card Aug 07 08:24:07 shame though Aug 07 08:27:40 when the docs say that GCM can use 4 different collapse keys at any one time, is that per-sender or per-receiver? Aug 07 08:29:39 Ugh Taiwan has 3rd highest downloads per capita, yet paid apps not supported there. Aug 07 08:30:00 Hello Amazon Aug 07 08:30:26 themirror: you know *why* it's not supported? Aug 07 08:30:45 Leeds no please enlighten Aug 07 08:31:29 apparently they would be legally required to have a 1-week free trial for every app Aug 07 08:32:01 Oh rly? Try before you buy litigation? Aug 07 08:32:21 How bizarre Aug 07 08:32:24 how bizarre Aug 07 08:32:27 ooh baby Aug 07 08:32:30 or at least a full refund within a week... yeah, something like that Aug 07 08:32:57 How do you create a dialog without the lame blue line below the title? Aug 07 08:32:57 http://www.theverge.com/2012/2/4/2770160/google-loses-app-refund-appeal-taiwan-not-selling-apps Aug 07 08:35:35 Leeds: I dunno I would have allowed 7 days for them if it were up to me, though I can see Google's perspective Aug 07 08:36:16 what'd be the right "primary product type" for android apps which payments i manage with google checkout? Aug 07 08:38:28 i guess "computer-software" wouldnt be right Aug 07 08:40:46 i tend to "internet, networks, digital media", however it'd be great if someone has a tip Aug 07 08:40:58 Of course I'm very much biased, since my game doesn't lose its value after 7 days Aug 07 08:45:26 when the docs say that GCM can use 4 different collapse keys at any one time, is that per-sender or per-receiver? Aug 07 08:50:17 yes. think I got my bugs sorted out. Aug 07 09:00:31 JakeWharton: wtb functionality to be able to set a custom font in hansel and gretel Aug 07 09:01:50 i've got an image view with width set to fill_parent, is there a way to adjust the height to keep the aspect ratio? Aug 07 09:02:55 hi Aug 07 09:09:34 i'm so irate i can't watch the olympics on my nexus 7 Aug 07 09:10:28 I was watching on my phone the other day... Aug 07 09:10:32 I just tried the debug drawing of dirty regions in android JellyBean on my Nexus S (haven't tried it since ginger) and if I scroll in settings it tends to not stop drawing at times. I did this check since I have gotten significant battery drain when I switched to JB, even ICS was rather heavy drinker of my batter Aug 07 09:10:55 Can anyone confirm my sighting that the dirty regions aren't correct? Aug 07 09:11:52 stork: if you mean because of lack of flash, have you considered getting flash? Aug 07 09:12:27 do they have flash on jelly bean? Aug 07 09:12:34 * Snuffel flashes stork Aug 07 09:12:57 i won't show my dirty regions, ok? Aug 07 09:13:00 :3 Aug 07 09:13:11 Snuffel, thats ok Aug 07 09:13:12 :P Aug 07 09:14:06 yes, from everything I've heard (where's my bloody N7?) (why hasn't my gf's Gnex updated yet?) you can get flash and use it in other browsers Aug 07 09:14:11 not in chrome Aug 07 09:14:45 and if dirty regions isn't the usual naming here its called GPU view updates in settings Aug 07 09:15:21 how can I attach my own class that extends SurfaceView to a SurfaceView I defined in the layout/main.xml ? Is that even possible or do I have to add it manually to the View and not define any SurfaceView in the xml? Aug 07 09:15:37 shame it couldn't just work out of the box Aug 07 09:16:25 rigid: you can. com.mysite.myapp.MyCustomSurfaceView is the xml declaration Aug 07 09:16:37 rigid: er... do you mean use your class *instead* of a SurfaceView? Aug 07 09:17:04 themirror: ah cool... do you know where I can find docs about that? It's not in the SurfaceView API docs Aug 07 09:17:07 Leeds: yes Aug 07 09:17:30 then it's nothing to do with surfaceview Aug 07 09:17:38 Nah that about sums it up :) Aug 07 09:17:54 https://developer.android.com/guide/topics/ui/custom-components.html#modifying Aug 07 09:17:58 Custom views in xml Google search? Aug 07 09:18:03 Leeds: actually my class is a SurfaceView... I guess now 2 SurfaceViews are inflated, one in the xml and the one defined by my class Aug 07 09:18:33 ahh... i guess I can work it out from here Aug 07 09:18:38 themirror: Leeds: thank you Aug 07 09:18:39 Yeah don't put a SurfaceView in your xml. Instead substitute your custom Aug 07 09:18:49 is it a SurfaceView, or is it a CustomViewWhichInheritsFromSurfaceView? Aug 07 09:19:15 Leeds: oh yeah, it's the latter Aug 07 09:19:36 your link seems to contain exactly what I looked for Aug 07 09:20:14 argh Aug 07 09:21:17 hmm when phone is tilted by any chance it will cause onPause method? Aug 07 09:21:28 to be called Aug 07 09:21:32 I'm absolutely not an expert in Android stuff - I'm just capable of finding stuff in the docs, unlike a surprising number of 'developers' Aug 07 09:22:11 i know how to google Aug 07 09:22:14 tneva82_: "tilted"? Aug 07 09:22:20 i don't even program for android anymore Aug 07 09:22:23 turned 90 degree upside Aug 07 09:22:33 or is that sideway Aug 07 09:22:39 tneva82_: it will recreate the activity by default, so probably Aug 07 09:22:43 ugh Aug 07 09:22:49 stick a log in there Aug 07 09:22:55 To be sure Aug 07 09:23:13 Followed by onStop, onDestroy Aug 07 09:23:29 dammit Aug 07 09:23:35 tneva82_: yeah, orientation change causes your activity to be destroyed and recreated Aug 07 09:23:38 You can prevent this Aug 07 09:23:42 (unless you say otherwise) Aug 07 09:23:44 and forest fires Aug 07 09:23:58 (I don't recommend saying otherwise because handling orientation change manually is pain-in-the-ass) Aug 07 09:24:00 with handling configuration changes yourself Aug 07 09:24:23 bugger. Aug 07 09:25:03 the orientation change isn't issue but if it calls onPause it inadvertely causes unwanted code to be run. Wonder if I would need to place that code elsewhere then Aug 07 09:25:25 is there way to detect that the button that takes user to main screen was pressed? Aug 07 09:25:35 Well one solution is Aug 07 09:25:42 which is unique to it. onPause ran into this issue Aug 07 09:25:46 onConfiguration changed Aug 07 09:25:56 see if orientation changed Aug 07 09:26:06 set a field boolean true Aug 07 09:26:15 check its value in onPause Aug 07 09:26:28 but if u override onConfiguration changed Aug 07 09:26:33 When on autoscroll, LogCat in Eclipse is not showing the last line of logs but the one before that (or the one even before that). Aug 07 09:26:37 Anyone else had this? Aug 07 09:26:48 for orientation changes onapause won't be called Aug 07 09:27:18 Unless you call super.onConfigurationChanged Aug 07 09:27:23 methinks Aug 07 09:27:27 not sure Aug 07 09:28:51 tneva82_: if you mean home screen, then no you are not allowed that information Aug 07 09:29:22 bummer. okay what is called first then? onConfigurationChanged or onPause? Aug 07 09:29:24 just put code for events, do not try to read phone state Aug 07 09:30:14 http://developer.android.com/guide/topics/resources/runtime-changes.html Aug 07 09:31:51 yes well I tried to put boolean to false on the onconfigurationchange and then run part of onpause only if it's true but still code got performed Aug 07 09:32:29 That was kinda a bullshit hacky solution I made up lol Aug 07 09:32:34 read the link Aug 07 09:33:24 tneva82_: you should rather move "onPause" code somewhere else Aug 07 09:33:46 yes. but problem is there doesn't seem to be way to detect when home button was pressed Aug 07 09:33:52 since if running that at unexpected moments causes you problems your design has problems Aug 07 09:33:57 which is when the code is supposed to be run Aug 07 09:34:04 ehm Aug 07 09:34:20 onPause gets called whenever something covers the app - including received calls, notifications, task switch, etc. Aug 07 09:34:33 so putting code meant for "Home" press there will cause you headaches :) Aug 07 09:34:38 tneva82_: you cannot know that information. It is forbidden to you. You can know when onPause happens tho Aug 07 09:34:43 well tell better place Aug 07 09:34:47 http://developer.android.com/guide/topics/resources/runtime-changes.html Aug 07 09:34:54 It has your answers Aug 07 09:35:09 More eloquently than I can spew Aug 07 09:35:10 can't find Aug 07 09:35:15 tneva82_: whats the reason you need to know that a specific key was pressed? Aug 07 09:35:18 that smells from misdesign Aug 07 09:35:21 Boy you read fast Aug 07 09:35:26 I have read that before... Aug 07 09:35:52 Handling the configuration change yourself Aug 07 09:36:04 you have manifest declaration? Aug 07 09:44:38 Some of these paid app supported countries: Burkina - infant mortality 8%, literacy 20%. Aug 07 09:47:07 Not saying they shouldn't have paid apps, just I really don't think many people there will have Android Aug 07 09:47:29 Apparently, they have lenient payment laws. Aug 07 09:48:05 The Google "add new countries to paid apps" team should do a blog about the crazy stuff they encounter when trying to add a country. Aug 07 09:48:21 No one seems to understand their context. Aug 07 09:48:41 HDroid: we're just looking at their comptetition and wondering WTH is that team doing Aug 07 09:48:45 wish I knew at least why the onPause works fine with the home button press but orient screen throws program completely off the mark. If it worked consistently same way I could maybe convince that it's not big enough issue but now basically you need to restart the program after the orient change :( Aug 07 09:49:11 Mavrik: yeah, that's why they should blog :P Aug 07 09:49:31 If it starts with "I'm an intern at Google", I'd be satisfied. Aug 07 09:49:50 tneva82_: rotation goes through onCreate Aug 07 09:50:04 tneva82_: that's because home screen press does not recreate, but orient does Aug 07 09:50:05 https://gist.github.com/8e4d6236fe2b46190381 Aug 07 09:50:06 yeah Aug 07 09:50:25 Can someone tell me why createfile gives exception there? Aug 07 09:50:36 cases like mine: we could sell apps on AppStore before you could even buy iPhone in the country, while Google still doesn't support selling apps is kinda bullshit :P Aug 07 09:50:45 you must understand that many people design their app to use alternative layouts when using a different orientation Aug 07 09:52:43 hi again! have a question Aug 07 09:52:58 My app needs to update a mySQL database periodically (once every minute or so).. Aug 07 09:52:59 yay! Aug 07 09:53:14 so I use a service for that, or a ScheduledThreadPoolExecutor? Aug 07 09:53:18 should* Aug 07 09:54:02 Untouchab1e: does it need to do that even in background? Aug 07 09:54:42 hrnt: hmm Aug 07 09:54:47 I suppose yes Aug 07 09:54:47 a mysql database? you mean you're posting data online every minute? Aug 07 09:55:00 Leeds: sqlite, not mysql, sorry Aug 07 09:55:50 My initial thought was to do use a service with a timer that then does the needed operation once every minute Aug 07 09:56:04 but then the developer documentation told me the ScheduledThreadPoolExecutor is preferred over the timer Aug 07 09:56:21 Untouchab1e: presumably this is only over a specific period, not indefinitely? Aug 07 09:56:53 Leeds: yeah, as long as the app is "connected" Aug 07 09:57:16 because you're going to kill the battery... Aug 07 09:57:25 Leeds: yeah, I know.. Aug 07 09:57:36 And to be honest, its not once a minute.. its once a second :P Aug 07 09:57:45 that makes a big difference Aug 07 09:57:58 yea, but battery life is not an issue in this particular case due to the nature of the app Aug 07 09:58:31 There's gotta be a better way.. Aug 07 09:58:41 I just figured a service would be the most sensible way to do it, but Ive never even heard of the ScheduledThreadPoolExecutor before Aug 07 09:58:58 themirror: its a radio com panel for FlightSimulator X Aug 07 09:59:14 so you only use the app when you're in front your computer flying Aug 07 09:59:28 preferrebly then your android device is hooked up to a charger at that point Aug 07 09:59:33 you mean the EOLed MS sim? Aug 07 09:59:54 it supports both FSX and X-Plane actually Aug 07 09:59:57 and no, not MS Flight Aug 07 10:00:10 just starting with a bit of playing with android dev using phonegap, but wondering what benefit it would be not using that and just write app itself without it Aug 07 10:00:28 where's the data coming from? Aug 07 10:00:31 Which widget do u guys suggest to create an ebook that displays text images? Aug 07 10:00:41 a plugin that runs from FSX Aug 07 10:00:54 over the network? over USB? Aug 07 10:00:55 that uses multicasting to pump out the radio frequencies aproximately 10 times a second Aug 07 10:00:58 Untouchable I see your point. Sorry but I am of no help Aug 07 10:01:16 Ceeram: well, phonegap's biggest advantage is that you get some form of cross-platform support. But you get a whole boatload of disadvantages in return. Aug 07 10:01:19 themirror: its ok, thanks though :) Aug 07 10:02:00 Untouchab1e: I'm just wondering how you're getting data from your PC to your phone reliably enough that it's worth writing it every second? Aug 07 10:02:14 HDroid: ok, but if you write it as android app, are there tools to convert it to iphone apps? or need to write that from scratch? Aug 07 10:02:26 Ceeram: write from scratch, pretty much. Aug 07 10:02:39 Leeds: because if you change the radio frequency in-game, you want the change reflected on the phone Aug 07 10:02:44 and visa versa Aug 07 10:02:59 iPhone is Objective C, android is java Aug 07 10:02:59 You can do a native C library and hook into that, but the use case for that is mostly limited to games. Aug 07 10:03:09 sure, I get that - but how do you get the data from the PC to the phone? Aug 07 10:03:10 unless you have native code Aug 07 10:03:13 And it would still require a fair amount of boiler plate. Aug 07 10:03:21 blegh Aug 07 10:03:23 Leeds: UDP packets Aug 07 10:04:00 trying to write an app for multiple platforms tends to end up with the same crappy app everywhere Aug 07 10:04:05 Untouchab1e: over wifi? Aug 07 10:04:09 i'm using the 4.1 sdk and i keep finding things online that seem to be deprecated… is linearlayout a replacement for scrollview? Aug 07 10:04:10 Leeds: yea Aug 07 10:04:19 Leeds: and Wifi only Aug 07 10:04:47 so since the plugin throws out 10-20 of those UDP packets per second, I just need the Android app to update the frequency listings in the internal sqlite db Aug 07 10:04:48 Untouchab1e: the PC sends the data as a ping? Aug 07 10:04:57 Leeds: UDP != ICMP Aug 07 10:05:00 ah, so you don't want to write every packet out Aug 07 10:05:05 yes, I know what protocols are Aug 07 10:05:06 ultra-: no not at all. One is a viewgroup, the other is a view Aug 07 10:05:18 Leeds: hehe, sorry, but no, not as ping.. Aug 07 10:05:32 just UDP packets following a custom format Aug 07 10:05:42 ok… when making a new project, i only get the 4.1 option… should i download older sdks if i want this compatible with 2.3+? Aug 07 10:05:42 not literally ping... I meant - does it send out a packet every second, which you want to log, or is it more complex? Aug 07 10:06:15 Leeds: well, the plugin sends out 10-20 identical packets a second containing all the current radio frequencies set in the game Aug 07 10:06:26 ultra-: yep, and there are tags in manifest to accompany Aug 07 10:06:31 so the Android app simply needs to make sure that the radio frequencies that are stored are the ones currently used by the game Aug 07 10:06:33 i do get the option for android version, but sdk version is 4.1 Aug 07 10:06:34 Untouchab1e: if I were you, I would only write changes... Aug 07 10:06:41 oh, you only want the current value? Aug 07 10:06:47 (values) Aug 07 10:06:48 Leeds: yep, no logging involved Aug 07 10:07:03 ultra-: minimum api, target, maximum api Aug 07 10:07:06 I just need to know the current values at any given time Aug 07 10:07:17 themirror: tags as in to specify if 2.3, 4, etc? Aug 07 10:07:21 hence why I have a sqlite table with one row per radio channel Aug 07 10:07:22 do you need to store it at all? Aug 07 10:07:34 Yeah target high, support low Aug 07 10:08:15 It's definitely covered in the developer guide somewhere, keep looking :) Aug 07 10:08:18 Leeds: I am not completely sure, but I figured it would be a good idea for some reason. I have EditText widgets that lets the user set a desired radio frequency, and the text in those needs to be updated with the current value (if different) Aug 07 10:08:34 yeah, i need a good book… for some reason i hate reading on my laptop Aug 07 10:08:37 you can change the text in an editview if you want... Aug 07 10:08:41 er, edittext Aug 07 10:09:41 Leeds: yeah, but here is where my developer knowledge falls short.. maybe you can help me out though.. Since the editTexts are scattered about different layouts (Different layout for each radio channel), how do I set the editView text when I know which layout is currently active? Aug 07 10:09:44 if that made any sense at all :P Aug 07 10:11:26 are they actually different layouts, or just different values? Aug 07 10:11:52 Leeds: different layouts.. as illustrated in this old, early-stage screenshot: http://connect-utb.com/xcomms_02.png Aug 07 10:12:23 hmm... I'd be tempted to just keep them in memory and swap in as appropriate Aug 07 10:12:36 keep the values in memory? Aug 07 10:12:55 yup Aug 07 10:13:02 themirror: you're right, it's in the documentation :) Aug 07 10:13:04 That was my inital idea, but then I figured it might be a good idea to store them anyway.. or maybe just store them when they change at least Aug 07 10:13:13 only highest and lowest, nothing in between Aug 07 10:13:17 Leeds: but I have yet to figure out how to reliably update the EditTexts* Aug 07 10:14:19 without adding a timer to the activity that updates that tries to update the EditText values every time they change.. or something :/ Aug 07 10:14:22 I think yall mean textviews Aug 07 10:14:31 hmm. I presume it is possible to have webview and other UI elements on same layout right? It's just that I'm missing way to do it? Aug 07 10:14:34 why would you not just update them every time they change? Aug 07 10:14:42 tneva82_: of course it's possible Aug 07 10:14:56 Get state, if equal do nothing, else update the view Aug 07 10:15:00 Leeds: because then I would have to check if they actually changed, instead of just updating the db entry for each packet received :) Aug 07 10:15:02 themirror: it recommends android 2.2 as the lowest version but is this possibly old? haven't most phones been upgraded to gingerbread? Aug 07 10:15:04 sleep that thread ask again Aug 07 10:15:17 but at any rate, thats not a techincal problem so that will be resolved Aug 07 10:15:27 which leaves the problem of updating the editTexts Aug 07 10:15:29 Untouchab1e: that's a poor idea Aug 07 10:15:36 themirror: yeah, I know Aug 07 10:15:37 only update when changed Aug 07 10:15:43 themirror: ok, done ^^ Aug 07 10:16:03 themirror: I still need to figure out a smart way to keep the EditTexts up-to-date Aug 07 10:16:49 Leeds: any ideas? :) Aug 07 10:16:59 ultra-: this is for you http://developer.android.com/about/dashboards/index.html Aug 07 10:17:06 many, but none I'd care to share in public at this time Aug 07 10:17:18 Haha Aug 07 10:17:19 Leeds: oh, totally fair enough Aug 07 10:17:29 He's totally writing a book then Aug 07 10:17:32 haha Aug 07 10:18:17 thanks… 2.3.3 it is Aug 07 10:19:09 Leeds: could you recommend whether to use a service or the ScheduledThreadPoolExecutor to accomplish the packet reception though? Aug 07 10:19:18 Untouchab1e: frankly, I'd use neither Aug 07 10:19:34 Untouchab1e: I don't see the problem. Every dt, grab all information pertaining to each TextView. If that information is different from the field text or whatever for the value, set it, else leave it alone Aug 07 10:19:35 Untouchab1e: pretty much the only reason to use a service is if you want to collect independently of the Activity. Aug 07 10:19:58 themirror: dt? Aug 07 10:20:07 Time step Aug 07 10:20:09 if you're talking about only running while plugged in, and getting data 10-20 times per second, just do it in the Activity Aug 07 10:20:12 I.e. collect data at times when the stats activity is not visible. Aug 07 10:20:46 Leeds: yeah, thats what I thought initially as well, and I suppose thats the easiest and cleanest way to do it too Aug 07 10:21:03 HDroid: good point, thanks Aug 07 10:21:16 themirror: the only problem is that I have different EditTexts in different layouts Aug 07 10:21:30 and I have no apparent way to knowing which EditText is currently visible Aug 07 10:21:39 No problem Aug 07 10:21:40 Untouchab1e: does that matter, though? Aug 07 10:21:46 they are textviews Aug 07 10:21:52 also, of course you have a way to know that Aug 07 10:21:52 themirror: as illustrated here: http://connect-utb.com/xcomms_02.png Aug 07 10:22:01 Leeds: care to share how? :) Aug 07 10:22:02 and you can change their text anytime Aug 07 10:22:14 My personal opinion is that checking the previous values and checking if the view is actually visible is pointless unless you have very good reasons. Aug 07 10:22:17 well, presumably they've been displayed at some point? Aug 07 10:22:24 themirror: so I can change the COM1 edit text even if that layout isnt even loaded? Aug 07 10:22:32 Define "loaded" Aug 07 10:22:42 Yeah depends Aug 07 10:22:52 Leeds: not neccessarily.. what I havent displayed the NAV frequencies yet Aug 07 10:22:55 if its null, no Aug 07 10:23:03 What are these, fragments, tabs? Aug 07 10:23:08 HDroid: fragments Aug 07 10:23:13 could someone tell me how can i add an additional layout to an activity? Aug 07 10:23:52 balls2thewall: probably, if you tell us what you mean by that. Aug 07 10:23:55 balls2thewall: addView() Aug 07 10:24:14 layouts are just views which contain other views and... lay them out Aug 07 10:24:24 Untouchab1e But even in that case, just update the String field corresponding and whenever you want to show it, just setText to that field Aug 07 10:24:46 is using xml vs java at runtime to define layouts simply a personal preference? i've always been used to coding from scratch and i'm wondering if there is some benefit to using the xml layout editor, besides convenience? Aug 07 10:24:50 Untouchab1e: well, the way I understand it, the UI components of a Fragment become available as soon as you load the activity. Aug 07 10:24:52 themirror: hmm.. so basically just keep all the values in memory, then just update as needed Aug 07 10:25:08 Yeah it'll be fast Aug 07 10:25:25 HDroid: I thought that might be the case as well, but when I tried I got errors indicating it didnt know of the given view Aug 07 10:25:45 Grab a blob of their values every update Aug 07 10:25:48 ultra-: how do you handle different layouts and other resources for different sizes, orientations, etc. Aug 07 10:25:51 and sift through Aug 07 10:26:06 themirror: sift through how exactly? Aug 07 10:26:20 Woulndt I still need to check which EditTexts are "available"? Aug 07 10:26:24 i want to add an existing layout made in xml Aug 07 10:26:25 ultra-: 1) it becomes hard to separate markup and code 2) there's lots of built-in mechanisms you wouldn't be able to use and 3) UI through code is generally a world of hurt. Aug 07 10:26:38 Grab values 1-50. First value. Is it changed. No? Next etc Aug 07 10:26:38 i cant figure out how to get a handle on it Aug 07 10:26:39 balls2thewall: LayoutInflater Aug 07 10:26:43 or should I just put try/catch blocks around all the EditTexts I want to try and update Aug 07 10:27:00 No its bulky Aug 07 10:27:15 themirror: I agree, but whats the alternative? Aug 07 10:27:23 Connected to the computer for debugging, and the sdcard mounted, I can't write to the sd-card in my debugging? :( Aug 07 10:27:27 if newvalue != value, change value Aug 07 10:27:35 hdroid: so say my app will modify the number and layout of buttons on the main UI. created a starting point in xml and edit at runtime as needed? Aug 07 10:27:36 I don't get it, you can't do findViewById on a Fragment unless it's been visible? Aug 07 10:27:42 For all data Aug 07 10:28:04 if the NAV1 frequency suddenly changed, but the NAV1 EditText isnt loaded/available/visible/whatever.. how to I handle it? Aug 07 10:28:25 Don't. Keep some data for it Aug 07 10:28:34 johanhar: so unmount the SD card? Aug 07 10:28:35 if u want to display Aug 07 10:28:36 ultra-: to add extra buttons, you can use a LayoutInflater. As for the layout, if your container layout is of the right type and has the right settings, chances are the only thing you have to do is add the inflated buttons. Aug 07 10:28:40 use that data Aug 07 10:28:46 Init to "" Aug 07 10:28:46 Leeds: can't do that, no unmount option when right-clicking Aug 07 10:28:57 don't be silly Aug 07 10:29:09 hi Aug 07 10:29:12 yeah likely add/remove buttons under the same layout… ok thanks i understand what to do now Aug 07 10:29:12 maybe this pastebin makes things more clear.. http://bpaste.net/show/fEaPBy5WFjJTtFlQEVqt/ Aug 07 10:29:36 context.getExternalFilesDir() vs Environment.getExternalStorageDirectory()? Aug 07 10:29:48 can someone give me some comments about my new game please? if people like it, I will release it on Android soon. http://itunes.apple.com/app/turn-your-friend-into-a-dog/id541406985?mt=8 Aug 07 10:29:50 [13:14] hmm. I presume it is possible to have webview and other UI elements on same layout right? It's just that I'm missing way to do it? Aug 07 10:29:52 Is it worth a porting? Aug 07 10:30:05 i'm sure this has been asked 100x and is personal preference, but can someone plz recommend a book? i already have a halfway decent understanding of java and use python to build my own objects regularly… completely new to android programming Aug 07 10:30:10 themirror: if I understand you correctly, it would mean that every time you display a panel, the values will be updated Aug 07 10:30:15 Untouchab1e: initialize its data with String myNAV1Freq = ""; Aug 07 10:30:23 No Aug 07 10:30:31 themirror: oh? Aug 07 10:30:44 grab all data for all possibly displayable information Aug 07 10:30:50 if it changes Aug 07 10:30:54 update your copy Aug 07 10:31:01 if u want to show it Aug 07 10:31:06 use your copy Aug 07 10:31:14 themirror: yeah, I agree.. here is the problem though Aug 07 10:31:28 and grab all the data for all possible information at once Aug 07 10:31:28 ultra-: no sensible advice from me :/ I'm past the point of remembering what I used when I started learning. Aug 07 10:31:42 i understand that Aug 07 10:32:05 also why the webview does not zoom when double clicked Aug 07 10:32:20 how do I show it if: a) You might be currently displaying the editText with the value you need to change.. b) you may not be currently displaying it Aug 07 10:32:27 i do have a book but it's for android 1.5/1.6… i don't see a point Aug 07 10:32:43 so woulndt I just have to assume that they are all currently displaying and try to update them all? Aug 07 10:32:59 mobilegamelabs: hmmmm I am definitely not the target audience :P Aug 07 10:33:39 Hold on Untouchab1e let me try to type up something to illustrate Aug 07 10:33:51 themirror: much appreciated Aug 07 10:34:54 HDroid: thanks... Aug 07 10:35:44 Untouchab1e: the way I'd probably do it is... pass the data object (that is updated from a thread, perhaps) around or make it accessible to the Fragments somehow and let each fragment periodically take the data out of the object to refresh its own components. Aug 07 10:36:19 HDroid: periodically using a timer ? Aug 07 10:36:41 problem is its all the same fragment, just different layouts.. I think Aug 07 10:36:51 A timer or a listener... if you use listeners you only have to maintain one timer. Aug 07 10:36:58 HDroid: good point Aug 07 10:37:14 but are they even seperate fragments? Aug 07 10:37:26 HDroid i love and respect you as a human being Aug 07 10:37:33 (thats what i was looking for) Aug 07 10:37:34 Method getFromGame: fills up a String[] object (I call it a blob). Update method - for position i in blob, if the same position in my persistent data blob (a field object you keep) is the same as that in blob, do nothing else update it. Then onUpdate method, set text to the data in your field object Aug 07 10:37:38 Untouchab1e: doesn't look like it :) Aug 07 10:37:44 balls2thewall: heh, glad it worked out. Aug 07 10:38:28 Untouchab1e: I recommend making these into real fragments, it's going to be a bit tricky but in the end it will help a lot. Aug 07 10:38:48 themirror: looks good.. getFromGame: check.. update method: check.. but could you elaborate the onUpdate method a bit? Aug 07 10:39:15 Yes, you will want to draw constant fps Aug 07 10:39:36 not try to update the textviews all the time Aug 07 10:39:46 when the time runs out, setText Aug 07 10:39:56 you can use a thread for this Aug 07 10:40:11 sleep the time step dt Aug 07 10:40:14 more accurately Aug 07 10:40:20 [13:14] hmm. I presume it is possible to have webview and other UI elements on same layout right? It's just that I'm missing way to do it? Aug 07 10:40:24 sleep the time since the last draw Aug 07 10:40:28 themirror: I almost follow.. Aug 07 10:40:41 using System.getTimeMillisecs Aug 07 10:40:44 constant.. fps.. as in frames per second? o.O Aug 07 10:40:44 or whatever Aug 07 10:40:47 tneva82_: what is the problem? Doesn't it behave like any other View? Aug 07 10:41:01 Yes. It saves you a lot of headache Aug 07 10:41:16 don't draw every time a value changes Aug 07 10:41:25 well. seems like it takes the entire screen so button below gets hidden. then when I tried "wrap content" for height ditto. Then I tried switching positions so button is up and application crashed Aug 07 10:41:31 themirror: draw what exactly? Aug 07 10:41:36 Just grab that blob on your own time Aug 07 10:41:50 and update your textviews on your own time Aug 07 10:41:59 draw as in setText Aug 07 10:41:59 themirror: so basically, have a separate thread sleep, check if values change.. if so.. then how to distribute the changes to the EditTexts? Aug 07 10:42:08 themirror: ah ok Aug 07 10:42:26 not quite sure what you mean by.. "your own tiem" Aug 07 10:42:27 time* Aug 07 10:42:54 http://pastebin.com/ftHyTRp1 <- this way for the layout xml and bang it crashesh Aug 07 10:43:24 grab info from sim, match it up against your persistent copy, updating your own copy if something is different Aug 07 10:43:25 tneva82_: why does it crash? Aug 07 10:43:35 Then when its time to update screen Aug 07 10:43:42 on phone with infos Aug 07 10:43:54 massively call settext Aug 07 10:43:59 better yet no Aug 07 10:44:04 tneva82_: also note that (I'm suspecting) if the web page is larger than the webview (which would be pretty much in all cases), it effectively fills parent. Aug 07 10:44:11 just update the ones that are different Aug 07 10:44:17 themirror: good, good Aug 07 10:44:21 Add them to a differs list Aug 07 10:44:25 So you need a different mechanism to determine the height (weights, for instance). Aug 07 10:44:43 iterate differs list, setting text to their own text Aug 07 10:44:53 Why bother with differences? Aug 07 10:45:01 why doesn't android auto-open the soft keyboard when an edittext has focus? is that like a bug or an intentional thing Aug 07 10:45:11 Fewer setText calls Aug 07 10:45:18 but the only thing that I am struggling with is how to know when its time to update the screen.. if I am currently staring at the NAV frequencies in the app, and the frequency changes in the flightsim, I need the values in the EditText changed immediately Aug 07 10:45:37 themirror: but added spaghetti and the conditions aren't free either. Aug 07 10:45:42 however, if I am staring at the NAV frequncies, and the COM1 frequency changes in the game, I dont need to update the EditText before I want to look at the COM frequencies Aug 07 10:45:46 you're probably ok doing them all, but why do extra work that does nothing Aug 07 10:46:22 themirror: well, if you're keeping track of the differences, it's you doing the work :P Aug 07 10:46:25 Untouchab1e, update the phone's textviews whenever you want Aug 07 10:46:38 HDroid: by the way, if you like, it's the official trailer http://www.youtube.com/watch?v=nvP301ai_Lc Aug 07 10:46:40 Untouchab1e: that just screams for a listener then. Aug 07 10:46:59 HDroid: so write my own listener basically? Aug 07 10:47:07 HDroid: I disagree Aug 07 10:47:18 About the listener Aug 07 10:47:24 themirror: but how would you do it then? Aug 07 10:47:39 Okay consider this Aug 07 10:47:39 hello every one Aug 07 10:47:40 somehow, you need to know which EditTexts are currently displaying/available? Aug 07 10:47:58 i am struggling with one problem please help me Aug 07 10:48:05 you can grab that info every 10 ms if u want Aug 07 10:48:08 btw, just wanted to say that I really appreciate your help.. that goes to you both :) Aug 07 10:48:10 i am implementing an sms app Aug 07 10:48:14 themirror: it's either that or very frequent polling, if you want to reach any sort of realtime display. Aug 07 10:48:43 i have displayed the imcoming messages by reding from the content provider Aug 07 10:48:59 Also, the polling can still be done pull-based and periodically update the listeners. Aug 07 10:49:15 Listeners are nice because it eliminates the need for timers in the fragments. Aug 07 10:49:17 Untouchab1e: if an info changes, don't try to change the textview text immediately. Just store that change in the variable Aug 07 10:49:39 then if u deem its time to update the screen Aug 07 10:49:40 themirror: fair enough, but why not change the textview immediately? Aug 07 10:49:43 do it Aug 07 10:49:45 but am not able to display a message from the brodcast reciever in the current activty Aug 07 10:49:54 Way variable framerate Aug 07 10:50:06 if lots of shit changes Aug 07 10:50:13 themirror: but ideally, it would update instantly.. in case the user is currently looking at the radio frequency that just changed Aug 07 10:50:20 it'll be set text 20 times Aug 07 10:50:24 isChangingConfigurations <- how to call that function? Aug 07 10:50:24 or 50 Aug 07 10:50:31 Or 250000 Aug 07 10:50:34 themirror: well, it would only be set if the valued changed Aug 07 10:50:35 <10ms is near instant Aug 07 10:50:39 part of activity so I thought that since my class extends it this. isChangingConfigurations() would work but nope Aug 07 10:50:52 HDroid: any good documentation on how to write this kind of listener? Never written one Aug 07 10:50:53 any one please help me Aug 07 10:50:59 Untouchab1e: no, the computer will beat you Aug 07 10:51:13 you need to be in control of framerate Aug 07 10:51:28 u don't need to show every minute change Aug 07 10:51:32 Untouchab1e: it depends on how frequently the updates are sent by the sim... if they're sent at 26fps it can get nasty :P Aug 07 10:51:34 you can miss some Aug 07 10:51:36 themirror: I still dont see exactly how I am supposed to know when its time to update the screen Aug 07 10:51:51 You choose when Aug 07 10:52:00 its in your hands Aug 07 10:52:09 right. wrong API :( Aug 07 10:52:18 just set the text to whatever copy you have on hand Aug 07 10:52:22 don't have that android myself so guess that's function I can't use then Aug 07 10:52:43 It doesnt need to be bleeding edge trust me Aug 07 10:52:45 I have a Broadcast receivers class which gets the Incoming message and i have an activity which should display the message that we got from the broadcast receiver Aug 07 10:52:52 themirror: but then again its the problem of how I have no idea what textViews are currently displayed.. which influences the need to update them Aug 07 10:53:08 if u try for that, your app will have unstable performance spikes Aug 07 10:53:19 Untouchab1e: step one is to properly fragment this. Aug 07 10:53:23 getVisibiloty Aug 07 10:53:32 getVisibility Aug 07 10:53:44 themirror: so basically loop through all the textViews and check for visibility? Aug 07 10:53:47 or the layout dictates Aug 07 10:53:47 Either that or keep "handler classes" for each layout you toggle, but that's pretty much reimplementing fragments. Aug 07 10:54:01 so I keep an enum for that Aug 07 10:55:06 If currentLayout == Layout.poopView { poopTextView.setText("poop"); Aug 07 10:55:13 oh right Aug 07 10:55:16 i should buy diapers Aug 07 10:56:05 themirror: to build on your idea, would this approach work.. I detect that the NAV1 value has changed.. I check if the NAV1 textView is visible by using getVisibility, if yes, then setText Aug 07 10:56:08 Else if currentLayout == Layout.faceView, faceTextView.setText("face") Aug 07 10:56:13 Seriously, just use fragments, this is a recipe for bad spaghetti. Aug 07 10:56:32 HDroid: you might be right, I just want to understand his approach before I decide :) Aug 07 10:56:33 Also, visibility is not the criterium. Null is the criterium. Aug 07 10:56:45 HDroid I also disagree again Aug 07 10:56:48 HDroid: ah, good point, thanks Aug 07 10:57:06 I am doing this with constant framerate in my game Aug 07 10:57:07 findViewById is going to return null if you're trying to get a view that is not actually in the layout you've loaded. Aug 07 10:57:18 HDroid: nice, good Aug 07 10:57:51 themirror: I dunno, my experience with spaghetti state machines is that they're very much unmaintainable. Aug 07 10:58:00 Untouchab1e everytime you change the contentview, update an enum Aug 07 10:58:07 so you know Aug 07 10:58:15 Also, the platform pretty much offers this functionality, I don't see what the pressing need is to reimplement it. Aug 07 10:58:27 what you have active Aug 07 10:58:28 or not shown Aug 07 10:59:32 If you're on a screen giving infos 1-50 because of setContentView, then store that Aug 07 10:59:40 In enum Aug 07 10:59:44 so you know Aug 07 10:59:53 oh im on that screen Aug 07 11:00:09 I can access views 1-50 Aug 07 11:00:13 themirror: ah, right Aug 07 11:00:34 If you're on one displaying 51-100 because of setContentView Aug 07 11:00:47 set the enum there to a diff value Aug 07 11:00:50 and so on Aug 07 11:00:57 for all layouts Aug 07 11:01:23 If you're declaring layouts in xml Aug 07 11:01:32 Geez, world of hurt. Aug 07 11:01:40 Fragments were invented for exactly this! Aug 07 11:02:25 Well do what you want. I'm going to bed. This approach works beautifully in my game Aug 07 11:02:36 smooth framerate Aug 07 11:02:38 themirror: thanks loads for your help Aug 07 11:02:44 Np gl Aug 07 11:02:46 HDroid: and thanks a lot for yours Aug 07 11:02:59 I will read up on fragments and listeners and see what I figure out Aug 07 11:03:01 themirror: sleep well Aug 07 11:03:02 :) Aug 07 11:03:16 themirror: framerate is irrelevant, it is not the limiting factor. Spaghetti is. Aug 07 11:03:37 It's limiting productivity and making the code fragile. Aug 07 11:03:54 but spaghetti is delicious Aug 07 11:04:01 Not this kind. Aug 07 11:04:06 This is poo spaghetti Aug 07 11:04:15 I'm aware :p Aug 07 11:04:54 http://www.h-online.com/open/news/item/OpenGL-ES-3-0-the-future-of-tablet-and-smartphone-graphics-1661118.html Aug 07 11:07:15 I've extended a listview, when you click an item it does v.setSelected() on an element while it runs an asynctask that opens a new window. If the asynctask fails, the listitem is still selected. How can I setSelected(false) on that element again without reference to it? Aug 07 11:34:27 when i used gesture listener for imageview ...then the on clicklistner is not working...What to do?? Aug 07 11:40:32 anyone here??? Aug 07 11:40:51 Don't consume? Aug 07 11:40:57 Not sure if that's how it works. Aug 07 11:41:07 Anybody looking for mid-senior android role in London working in a Labs environment? Hit me with a PM Aug 07 11:41:52 What's a Labs environment? Aug 07 11:42:54 a small(ish) team working in a large global company working on innovations/experiments Aug 07 11:43:09 Denvar: technically off-topic, please don't advertise here :) Aug 07 11:43:11 Ahh ok Aug 07 11:43:38 you think headhunters come here? Aug 07 11:43:40 tsk Aug 07 11:43:48 oh you are one Aug 07 11:43:56 lol Aug 07 11:43:59 actually looking for my replacement, not a headhunter ;) Aug 07 11:44:39 Hm I think I remember you getting that job. Aug 07 11:44:44 Less than a year ago, right/ Aug 07 11:45:04 2 years Aug 07 11:45:09 Time flies Aug 07 11:45:16 sure does Aug 07 11:45:24 Or I have the wrong person in my mind :o Aug 07 11:45:24 HDroid: I have another question for you :) Aug 07 11:45:30 Denvar: you need recruiter? Aug 07 11:45:30 any idea why this code doesnt work? http://bpaste.net/show/J7RIlI9NZ9N5xo4uMD0C/ Aug 07 11:45:36 funktronic: no thanks Aug 07 11:45:42 only the last ContentValue pair is inserted into the table Aug 07 11:45:47 what happened to all the others? O.O Aug 07 11:46:07 oh god Aug 07 11:46:17 Untouchab1e: they got overwritten. Aug 07 11:47:00 Untouchab1e: gotta do an insert per record (or use a different pattern, if there is one, for ContentValues -- not sure, haven't used it). Aug 07 11:47:18 HDroid: ah, thats what I thought Aug 07 11:47:55 looks like a map Aug 07 11:47:56 I don't think there's a multi-row shortcut, I only see single row patterns. Aug 07 11:48:08 you can do a batch insert Aug 07 11:48:22 How? :) Aug 07 11:49:03 funktronic: yeah, is there? Aug 07 11:50:49 i think so Aug 07 11:55:36 dear lord, http://www.reddit.com/r/androiddev/comments/xnpde/reusing_a_layout_inside_a_single_activity_for/ Aug 07 11:56:26 you lost me at 'reddit' Aug 07 11:56:37 stork: i've seen some very nice boobies on reddit Aug 07 11:58:07 yeah reddit is good for porn i'll give you that Aug 07 11:58:16 not porn man Aug 07 11:58:22 art Aug 07 11:58:29 my bad Aug 07 12:02:55 could someone tell me how to scale images in the layout editor? the sizes seem to lock at arbitrary values =/ Aug 07 12:06:57 god is there a topic reddit DOESNT have a board for? Aug 07 12:26:39 CallumTaylor: http://reddit/r/list_of_topics_reddit_does_not_have_board_for/ Aug 07 12:26:49 fffffffffffu- Aug 07 12:27:01 lies Aug 07 12:27:28 if i refresh enough times, does it automatically get created? Aug 07 12:28:32 I have a function, defined as so: public void fillFrequencies(int radio_section, View v){ Aug 07 12:28:40 question, how do I get the current View? Aug 07 12:29:10 of the activity? Aug 07 12:29:15 you could do v.getRootView() Aug 07 12:29:41 Callum Im thinking of how to get the View of the Activity before calling this function Aug 07 12:29:46 so "v" doesnt mean anything yet Aug 07 12:30:20 getWindow().getDecorView().getRootView()? Aug 07 12:30:24 getWindow().getDecorView() Aug 07 12:30:26 ya Aug 07 12:30:32 well decor view is the root view Aug 07 12:31:00 hmm, what are the other kind of views? Aug 07 12:31:12 as its apparently not the root view Im after, as I get a nullPointer exception when calling the function Aug 07 12:31:23 What is this Aug 07 12:31:46 HDroid: just playing around with my EditTexts, but struggeling to pass the correct View Aug 07 12:31:54 within a fragment Aug 07 12:31:56 What view do you need to pass? Aug 07 12:32:08 in the fragment, do getactivity().getwindow... Aug 07 12:32:15 What is the point in passing it if it doesn't exist? :) Aug 07 12:32:26 HDroid: it does exist :) I just dont know how to call it correctly Aug 07 12:32:37 Can't you just findViewById from the fragment? Aug 07 12:32:48 HDroid: nope, apparently not.. get a nullPointer exception Aug 07 12:33:00 I'm guessing there's a different reason for that. Aug 07 12:33:20 you'd have to do getActivity().findViewById Aug 07 12:33:47 Ah, maybe thats it Aug 07 12:33:53 which flag do i need to pass to Intent.setFlags to ignore the current activity in the hiearachy ? Aug 07 12:34:52 AFAIK if you call findViewById on the activity, you get references in the main activity's layout, not the fragment. Aug 07 12:35:06 the fragment is in the activity though Aug 07 12:35:23 if your fragment has an id, you could do findViewById(ID OF THE FRAGMENT).findViewByID Aug 07 12:35:43 or if you manually inflate in the fragment, keep a reference of the view and do findViewById on taht Aug 07 12:35:54 Is that really needed? Since the fragment has its own setContentView Aug 07 12:36:16 then keep a global reference of the view you pass to setContentView Aug 07 12:36:23 and query on that Aug 07 12:36:27 Why? The fragment does that? Aug 07 12:36:39 fragments don't have the method findViewById Aug 07 12:36:49 Ok, fair enough :) Aug 07 12:37:13 not sure why, i think its because you manually inflate the view programtically Aug 07 12:37:23 CallumTaylor: ok, will try.. keep getting exceptions for some odd reason.. Aug 07 12:37:26 what i do is keep a global ref of the layout i inflated, then query everything on that Aug 07 12:37:30 @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) Aug 07 12:38:06 ya in that you return the view you want the fragment to have, i keep a global ref of that Aug 07 12:38:17 Yep that should work Aug 07 12:38:35 http://pastebin.com/QA9ULZNA Aug 07 12:42:02 Gah, keep getting exceptions Aug 07 12:42:08 now Ive stripped down everything, and all I have is this: http://bpaste.net/show/SYtunrw5ULjNOgBZlpFy/ Aug 07 12:42:18 and I get a nullPointer exception when setting the text Aug 07 12:42:50 you need to make a global ref of your layout Aug 07 12:42:54 and do findViewById on that Aug 07 12:43:17 Moar context Aug 07 12:43:34 Are you even in a fragment when you call this? Aug 07 12:43:53 HDroid: aye I am Aug 07 12:44:19 But fragment does not have findViewById Aug 07 12:44:22 So how come you can call it? Aug 07 12:44:23 CallumTaylor: this should work, doesnt it? http://bpaste.net/show/WgD4si2J6s9KfSDALy6l/ Aug 07 12:44:35 HDroid: FragmentActivity..? Aug 07 12:44:50 Ok, so you're in the activity Aug 07 12:44:50 can you paste the whole file? Aug 07 12:45:01 HDroid: ah yeah, sorry for the confusion Aug 07 12:45:06 CallumTaylor: I can try.. hold on Aug 07 12:45:58 http://bpaste.net/show/y8wPLKyXyhLTE2nzZ8qQ/ Aug 07 12:46:13 now in the layout files, I use the onClick property to run functions, and that work just fine Aug 07 12:46:20 when the docs say that GCM can use 4 different collapse keys at any one time, is that per-sender or per-receiver? Aug 07 12:46:33 such as the public void switchNav1(View v) function at the bottom there Aug 07 12:46:40 Stew-a: per sender Aug 07 12:47:03 hrm Aug 07 12:47:04 CallumTaylor: meh, thanks Aug 07 12:47:28 can I have an android phone that requires a simcard have one but not be activated? Aug 07 12:48:04 the view must not exist in the layout then Aug 07 12:48:18 try cleaning Aug 07 12:48:21 making sure the ids are right Aug 07 12:48:22 etc etc Aug 07 12:48:58 CallumTaylor: hmm, it all looks good Aug 07 12:49:20 it crashes on the setText line Aug 07 12:49:31 DigitalKiwi: yes that's no problem (though some carriers lock the phone?? this is easier if you're not an American :) ) Aug 07 12:49:39 yeah that means va1 is null Aug 07 12:49:44 nav1 is null Aug 07 12:49:48 yeah Aug 07 12:49:48 which means it couldn't find it Aug 07 12:49:51 which is odd Aug 07 12:49:56 I'm in the US and have verizon Aug 07 12:50:01 try cleaning your project Aug 07 12:50:10 but I'm eligible for an upgrade and the phone I have sucks Aug 07 12:50:15 DigitalKiwi: oh, I think that's the worst combination you could have. Aug 07 12:50:22 CallumTaylor: just did :/ Aug 07 12:50:40 maybe I'll just get some old android that doesn't need a sim card for development Aug 07 12:50:42 paste in the contents of layout/activity_panel_detail Aug 07 12:50:55 this wouldn't be an issue but I kind of want an iphone >.> I know i know for shame! Aug 07 12:50:57 ok, hold on Aug 07 12:51:02 DigitalKiwi: in "standard" cases, the phone doesn't need a sim and can be fully used, except for calling, of course. But Verizon requires activation for some phones, I think. Aug 07 12:51:06 firstly, here's the nav layout.. or parts of it, anyyway Aug 07 12:51:06 http://bpaste.net/show/4xzFs2mUFQx6w8bgpuP7/ Aug 07 12:51:12 as you can see, the id of the layout is nav_panel Aug 07 12:51:27 and editTextNAV1 is right there Aug 07 12:51:37 theres 2 views with the same id Aug 07 12:51:40 oh Aug 07 12:51:41 nvm Aug 07 12:52:17 the activity_panel_detail isnt really relevant though.. http://bpaste.net/show/fs8N9zoDx4GcT5XpIXfq/ Aug 07 12:52:20 HDroid: yeah I have an LG Revolution that my boss let me borrow when my droid2 screen died Aug 07 12:52:51 and it would not work at all before I took it to verizon whinging about not having a sim card Aug 07 12:53:33 ugh idk Aug 07 12:53:44 hate when this happens :P Aug 07 12:56:36 CallumTaylor: its not giving me a nullpointer exception on this line though --> EditText nav1 = (EditText) v.findViewById(R.id.editTextNAV1); Aug 07 12:56:40 not the setText line Aug 07 12:56:45 is that because v is null then I suppose Aug 07 12:56:54 View v = findViewById(R.id.nav_screen); Aug 07 12:56:56 which is also ridiculous Aug 07 12:57:24 That call can't nullpointer, it can return null, though. Aug 07 12:57:45 findViewById is a method of Activity, and you have an instance of that. Aug 07 12:58:01 I don't see where the fragment gets its layout. Aug 07 12:58:55 HDroid: that would be in PanelDetailFragment Aug 07 12:59:17 http://bpaste.net/show/hqZxvwcF2Yj0jFhyZtuK/ Aug 07 12:59:39 http://bpaste.net/show/vAdCfxZIX8noXujvYlUT/ whole thing Aug 07 13:00:22 so if you look back on the fragmentactivity.. http://bpaste.net/show/4m50h2okQXMt2etI8cKx/ Aug 07 13:00:25 you see how its connected? Aug 07 13:03:30 I also tried: fragment.getView() Aug 07 13:03:32 to get the View Aug 07 13:03:33 but now Aug 07 13:04:46 I wonder if it's a timing issue. Aug 07 13:05:31 HDroid: yeah, thats pretty much the only thing left in my mind Aug 07 13:05:55 but thats odd though, isnt it? Aug 07 13:06:14 I've seen stranger things :P Aug 07 13:06:33 If onCreateView is called after onCreate finishes, this messes up. Aug 07 13:06:42 Try doing what you do from onCreateView and see what changes. Aug 07 13:07:01 It's where fillfrequencies should be, anyhow -- in the fragment. Aug 07 13:08:01 ah, ok.. Ill give it a go Aug 07 13:11:40 HDroid: The method findViewById(int) is undefined for the type PanelDetailFragment Aug 07 13:11:48 what am I supposed to use? Aug 07 13:11:48 Yes but not for rootView Aug 07 13:11:51 ah ok Aug 07 13:11:59 Or container Aug 07 13:12:01 either Aug 07 13:12:16 Well Aug 07 13:12:25 rootView because it wouldn't be attached to container yet. Aug 07 13:13:53 testing... Aug 07 13:14:00 worked! Aug 07 13:14:02 wohoo Aug 07 13:14:22 I feel slightly stupid for not realziing that I should be doing all this in the onCreateView, but thanks loads HDroid Aug 07 13:15:05 Well, the lifecycle stuff isn't easy. Aug 07 13:16:58 I used to have a nice grasp on things before Android 3.0 came with fragments and stuff Aug 07 13:16:58 :P Aug 07 13:18:13 Now, if you want my recommendations on how to proceed... since the panels have different layouts, I'd create a separate fragment for each and lose the switchbox in onCreateView(and instead hardcode the layout, since it can only used by that specific fragment anyhow, or alternatively pass the layout to the constructor as an int).. and have separate fill* methods in them as well (since they don't technically seem to have anything in common). Aug 07 13:19:28 My personal view... if I'm creating switchboxes, chances are good I'm generalizing things where there are in fact different cases. Aug 07 13:20:50 good morning, i have a tablelayout inside a relative layout, and i'm trying to align one of the images to the right side of my tablerow programatically Aug 07 13:21:17 i've tried using new layout params and adding the rules for both align right and right of (to another element), but these both result in the image disappearing fromt he screen Aug 07 13:24:40 kaneda^: that's all a bit vague... a bit more on what you're trying to achieve, as well as your current code, would help. Aug 07 13:25:52 HDroid, ok, http://pastie.org/private/zbt4ayu7zlmeffwywk8yxw <-- there's my XML file, i'm trying to programatically add table rows where one item of the table row is on the left and another is on the right essentially Aug 07 13:32:09 HDroid: thanks for your valuable insight.. Ill see what I can come up with Aug 07 13:32:47 kaneda^: might be easier to inflate the snippets, assign the image and attach. Aug 07 13:32:58 That way you can put the layout params in the xml. Aug 07 13:33:06 LayoutParams building is quite tedious. Aug 07 13:33:13 (though it can be done) Aug 07 13:33:14 HDroid, it's not difficult, the problem is the result Aug 07 13:33:20 if i had done this in xml i'm sure it would also look strange Aug 07 13:33:32 Ok, what do you have now? Aug 07 13:37:27 HDroid, right now the image is to the right of a textview, but it's not aligning parent right, if i set align right using layout params it disappears from the screen entirely Aug 07 13:39:13 some people should never be allowed to touch any code Aug 07 13:40:02 hi, i have an activity which displays some data about a contact. the user should be able to edit the data. what would be the "android way" of doing things? edit button in the action bar to switch to a "global" edit mode? or button behind every textview to edit the single items? Aug 07 13:40:04 I want to display the items of an xmpp roster. Should I use a Loader, Cursor, and Adapter? Aug 07 13:43:07 hi Aug 07 13:46:07 HDroid, adding any layoutparams seems to make it disappear fromt he screen -_- Aug 07 13:47:25 m1hael, why dont you look at how the contacts app does it? :P Aug 07 13:47:31 I have an IntentService that communicates with a remote server on behalf of the user. Now I want to log the user in once and handle the cookie passing in the service. Given I'm using HttpURLConnection, is there a neater way to achieve this than storing the session cookie in SharedPreferences and passing it manually back and forth (manual == explicit retrieve and header-setting and sending)? Aug 07 13:47:45 kaneda^: well, you're aligning in a TableRow, I presume, which is a LinearLayout. Aug 07 13:50:03 great... ogles 3 and i havent even learned 2 yet :S Aug 07 13:50:46 canadiancow|work: already did that. i thought that it would be a good idea to also ask here. Aug 07 13:51:08 Jug6ernaut: does android support 3? Aug 07 13:51:24 more importantly, unless you're making an engine, do you need to know gles at all? Aug 07 13:52:00 What happens when a service calls stopSelf() when it is still bound? Aug 07 13:52:20 Does it stop anyway? How should other activies still bound handle it? Aug 07 13:52:48 eXeC64: I imagine this might depend on whether you have used the autostart flag on the bind. Aug 07 13:55:09 hello.. i have a ListView of custom views, when i touch each item, it gets highlighted correctly.. now, if i go and call setOnCreateContextMenuListener on the view, the item gets a context menu, but doesn't get highlighted any more... any ideas? Aug 07 13:57:13 eXeC64: because the start/stop are sort of indications that "I require this service" and "I don't require this service". Multiple users can call start, and the service runs as long as the indicated users is not zero Aug 07 13:57:18 HDroid, oooh, i thought if i put it inside a relative layout i could use the relative layout parameters Aug 07 13:57:20 hell o Aug 07 13:57:21 bind, in this context, I suppose, but haven't tested it, can work either way Aug 07 13:57:43 kaneda^: nope. You can, however, put a relative layout inside the tablerow. Aug 07 13:57:50 Yuyo, setOnCreateContextMenuListener() is to create on a context menu in the listview, not each row Aug 07 13:57:54 So start/stop are almost like their own bindings? Aug 07 13:58:07 HDroid, that's exactly what i'll have to do Aug 07 13:58:09 HDroid, ty Aug 07 13:58:17 kaneda^: though, if you're going down that route, might as well have a bunch of relative layouts in a vertical linearlayout instead of a table. Aug 07 13:58:24 canadiancow|work: hmmm i'm calling it on each item's View (in the adapter's getView) Aug 07 13:58:30 HDroid, yah, that's probably true, lol Aug 07 13:58:44 HDroid, but since i've already come this far i might as well just throw a relative layout wrapper around the otuside and add one more layout params Aug 07 13:58:54 how would i layout this ui fragment in a layout xml? edge screen -> |[ EditText Filling Available Space][Button]| <- edge screeen Aug 07 13:59:05 eXeC64: well, sort of. They must maintain some use count. I'm confident of that because I've had to call startService once to protect a service from dying because I had call chain where two methods each did startService/stopService pair, and android killed the service because its use count reached 0 Aug 07 13:59:10 canadiancow|work not yet, and no, only for games ofc ;) Aug 07 13:59:37 bascially i want a button on the right with the width set to fill its content, and an edit to the left of t filling the rest of the area Aug 07 13:59:45 alankila, Okay, thanks. I think I've overcome the problem I was facing now. Aug 07 14:01:18 (actually it was a method that called stopService() followed by startService() but android nevertheless took the service down after it returned, then started it again Aug 07 14:09:22 HDroid, the relative layout is working roughly as expected, only it's stretching the icon on the right Aug 07 14:09:29 HDroid, i'm guessing this means i must set a width in dp Aug 07 14:09:53 kaneda^: either that or set a scaletype on the imageview so the container size doesn't matter that much. Aug 07 14:10:15 it's not really aligning the image to the right either Aug 07 14:10:23 Oh Aug 07 14:10:23 it IS listening to my right_of though Aug 07 14:11:22 wrap_content on the layoutparams is still stretching it? Aug 07 14:11:30 yep Aug 07 14:11:58 Odd Aug 07 14:12:33 it's listening to my center_vertical and my right_of, but not my align_parent_right Aug 07 14:12:44 and it's stretching as a result of my right_of clause Aug 07 14:13:46 canadiancow|work: any idea? Aug 07 14:16:57 How do people here write to the sd card? Aug 07 14:17:01 Or, rather, redect it? Aug 07 14:17:12 mount it r/w? Aug 07 14:18:57 detect* Aug 07 14:19:14 basically, I want to detect if its an sd card or usb computer connection that is currently mounted Aug 07 14:19:59 anyone know if it is possible to expose the actual android api AND use phonegap? Aug 07 14:26:17 short of rooting a device, is there a simple way to get to the sqlite file for a DB created in the internal storage? Aug 07 14:26:31 Hey, I have some API11 code wrapped in if (SDK LEVEL >= 11) in a project with min level 4. The new version of ADT is showing a bunch of errors. Is there a good way to supress these without suppressing them for the whole project Aug 07 14:27:04 zambo: normally you can use suppres decorations on all kinds of things Aug 07 14:27:10 classes, methods, variables Aug 07 14:27:22 MY CHATSPAMMER Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:22 zambo: so just decorate the smallest enclosing scope Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:22 EAT MY CHATSPAMMER Aug 07 14:27:23 EAT MY CHATSPAMMER Aug 07 14:27:23 EAT MY CHATSPAMMER Aug 07 14:27:33 which is a good practice anyways.. Aug 07 14:27:39 whoops Aug 07 14:27:54 and be as specific as possible with the supress decoration, so you don't miss other important warnings.. Aug 07 14:28:00 @tapas: I put @TargetApi(11) Aug 07 14:28:00 @SuppressLint("NewApi") Aug 07 14:28:11 as per the quick fix in eclipse, however the errors still appear Aug 07 14:28:17 Lol sorry, wasnt ment to do that Aug 07 14:28:18 :( Aug 07 14:28:26 Was gonna spam a friend on steam :P Aug 07 14:28:31 Snoxie: sure ;D Aug 07 14:28:32 Sorry :P Aug 07 14:28:34 I was Aug 07 14:28:37 Seriously :P Aug 07 14:28:39 sure ;D Aug 07 14:28:54 clean fixed it, thanks guys Aug 07 14:29:01 Snoxie: ... Aug 07 14:29:04 Snoxie: seriously? Aug 07 14:29:11 I am plain serious. Aug 07 14:29:14 I am so sorry Aug 07 14:29:20 I actually came in here for a question Aug 07 14:29:21 Snoxie: don't let it happen again, please Aug 07 14:29:29 Nah sorry Aug 07 14:29:51 How would i show an mysql table in an listview? Aug 07 14:29:55 don't spam the channel with apologies ;D Aug 07 14:30:18 are you running mysql on your Android device? Aug 07 14:30:33 Nope, on my webserver Aug 07 14:30:39 Leeds: where can i downlad your sql? Aug 07 14:30:42 Snoxie: http://developer.android.com/reference/android/widget/CursorAdapter.html Aug 07 14:30:52 Snoxie: oh ok. sorry.. Aug 07 14:31:04 missed the commment about mysql running on a remote server.. Aug 07 14:31:32 Snoxie: anyways, i guss you could just write your own adapter.. Aug 07 14:31:32 Oh lol :P Aug 07 14:31:36 mikedg: you post the evils on the G+ Aug 07 14:31:57 tapas: Isnt there any solution really? Aug 07 14:32:10 Snoxie: well, you could also do the following: Aug 07 14:32:24 Snoxie: use some ORM to create an array of DAO objects representing your rows Aug 07 14:32:28 Snoxie: then use ArrayAdapter Aug 07 14:32:56 tapas: Please explain some more Aug 07 14:33:02 Snoxie: you package up your SQL data in JSON, send it over the wire, then do usual Android stuff with it Aug 07 14:33:18 And how would i do that? PHP? Aug 07 14:33:24 l Aug 07 14:33:32 webservices!!!! Aug 07 14:33:41 ruby Aug 07 14:33:47 on snails Aug 07 14:33:47 javascript Aug 07 14:33:50 Snoxie: anyway, how do you a] access the mysql server, and b] how do you model the data in it? Aug 07 14:33:59 Snoxie: are you planning on firing off SQL queries manuallt? Aug 07 14:34:01 manually? Aug 07 14:34:12 i smell injection Aug 07 14:34:25 Snuffel: that's what she said Aug 07 14:34:37 o.O Aug 07 14:34:48 SCNR :D Aug 07 14:34:54 qhat? Aug 07 14:34:57 just store the mysql root password in the android app Aug 07 14:35:00 and run queries directly Aug 07 14:35:02 it's safe i swear Aug 07 14:35:02 hehe Aug 07 14:35:21 Well its just my webserver where i would like to host my jokes for an jokes app where it would load an table named for example: Jokes and then put all the jokes into an listview in the app.. The webserver is the same i use for my website, and there is an MySQL with that. Aug 07 14:36:14 Snoxie: in that case: yes, a webservice that just returns e.g. a JSON array in the body of the response holding the data.. Aug 07 14:36:43 tapas: And how would i do that? Aug 07 14:36:54 Snoxie: then transfer the json array elements into a java array and use an arrayAdapter.. Aug 07 14:37:10 Snoxie: write a controller in your webapp that queries the data, assmebles the response and sends it off Aug 07 14:37:19 Snoxie: what are you offering for someone to write your code for you? Aug 07 14:37:37 I just have no idea of how i would do that :P Aug 07 14:38:04 Snoxie: in what language did you write your website stuff? Aug 07 14:38:08 php? Aug 07 14:38:28 did you use some framework or not? Aug 07 14:38:33 My website is just an basic drupal cms lol.. I dont know much PHP Aug 07 14:39:01 Snoxie: ok, so you have php on the system.. Aug 07 14:39:02 Hm you have nice content? I'll make a consuming app, but I want a piece :P Aug 07 14:39:19 tapas: Yeah Aug 07 14:39:23 Snoxie: just add a jokes.php file into the web root Aug 07 14:39:48 Snoxie: that php file queries the DB and writes the response.. there's a #php channel for more info Aug 07 14:39:58 Snoxie http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/8339-connect-android-mysql-database-tutorial.html#post46745 Aug 07 14:40:02 Doesn't drupal have some sort of REST plugin? Aug 07 14:40:05 (especially the security concerns - how do you talk to the DB from the php process?) Aug 07 14:40:19 complete example of what u want but it uses basic4android Aug 07 14:40:34 Which costs like 49$... Aug 07 14:40:39 Nope Aug 07 14:40:42 No thanks lol Aug 07 14:41:04 tapas: So i will get the table in php and something about Json? Aug 07 14:41:16 u will get the idea Aug 07 14:41:20 snoxie Aug 07 14:42:12 What? Aug 07 14:43:42 Snoxie: the short answer is: you can't get data from mysql on a server to an Android app without code at both ends - which you're going to have to find or write Aug 07 14:44:07 aha Aug 07 14:44:52 Snoxie: yes.. Aug 07 14:45:05 snoxie i just want to help you out ,by no means i am not asking u to buy it Aug 07 14:45:15 Snoxie: get the data in the php script into an array, call json_encode on it and send that as response.. Aug 07 14:45:22 what's the deal with open source licensing on the store? Is there any reason i can't charge for an app on the store and provide git access + free apks on my website? I know that opens the possibility of someone forking and undercutting me, but i'm thinking of the store price as basically a donation system, and paying customers get automatic updates, which is nice enough. Aug 07 14:45:24 Snoxie: the #php channel is quite helpful Aug 07 14:45:36 anyone know if it is possible to expose the actual android api AND use phonegap? I just need to expose the users phone Number Aug 07 14:46:25 ninjasenses: depends on phonegap, but in principle you can inject java objects into a webview and then use JS in the webview to access them Aug 07 14:46:56 thebishop: no issue at all doing that Aug 07 14:46:58 HDroid, so, for the sake of simplifying everything i removed the tablelayout and tablerows and replaced it with a linearlayout Aug 07 14:47:09 Leeds, yeah, seems like a workable model to me. Aug 07 14:47:18 HDroid, but now it seems like it's getting laid one on top of the other, so i can only see the first relativelayout and the others are hidden Aug 07 14:47:27 tapas, hmm interesting...ill have to look into it Aug 07 14:47:30 kaneda^: yes, set orientation to vertical Aug 07 14:47:37 HDroid, ooooh ty, i totally forgot about that Aug 07 14:47:45 thebishop: possibly 'better', you can put the apk on the store, and the source on your site, or github, or whatever - that way, anyone who wants to compile it can do so, anyone who wants the convenience of an autoupdating binary... can pay Aug 07 14:48:09 Question: How do you get the --base address to create a boot.img from the kernel? Aug 07 14:48:45 Leeds, i thought of that. And I might go that route. But I think providing sideloadable binaries mitigates the chance that some (jerk?) one will build git and put it on the market for free Aug 07 14:49:16 thebishop: depending on your exact licensing, you do potentially have (legal) ways to limit that Aug 07 14:49:37 yeah, but i do agree philosophically with gpl, so maybe i'll take my lumps Aug 07 14:50:40 they can't claim ownership of your code Aug 07 14:51:50 Leeds, is that a term of the android market? I know gpl is still copyright and the author still retains the copyright Aug 07 14:52:27 HDroid, that fixed everything, ty so much Aug 07 14:52:57 thebishop: You own the name, but nothing stops someone from making derivative works, is what it comes down to Aug 07 14:53:31 thebishop: think firefox vs iceweasel Aug 07 14:54:06 thebishop: get a lawyer to interpret clause 5.5 of http://www.android.com/us/developer-distribution-agreement.html Aug 07 15:02:39 kaneda^: ahh, good to hear. Aug 07 15:02:56 just working out why my padding isn't working on the rightmost element now Aug 07 15:03:52 is it possible to use the MediaRecorder to record a video without sound? Aug 07 15:04:53 something like MediaRecorder.AudioEncoder.NULL or MediaRecorder.AudioSource.NONE would be nice... so I guess if it's possible, it would be a dirty workaround? Aug 07 15:15:20 hello.. i have a ListView of custom views, when i touch each item, it gets highlighted correctly.. now, if i go and call setOnCreateContextMenuListener on each item's view, the item gets a context menu, but doesn't get highlighted any more... any ideas? Aug 07 15:18:24 Yuyo: you can have 1 listener on the list view that works for all the items Aug 07 15:18:41 someone used my email to sign up for Florida Power & Light Company Aug 07 15:18:44 now i have their account number Aug 07 15:18:45 and address Aug 07 15:19:03 hmmm... and if i want different items depending on the item? Aug 07 15:19:08 how many times do i have to click "report spam" in gmail before FPL_Billing@fpl.com is blocked Aug 07 15:20:16 probably quite a while. Aug 07 15:20:33 Call them up, tell them someone signed up using your name, and is probably fraudulent Aug 07 15:20:39 no Aug 07 15:20:40 not my name Aug 07 15:20:47 just my email Aug 07 15:20:50 * lov shrugs Aug 07 15:21:02 see this is what i hate Aug 07 15:21:14 in situations like this, i bet the company would say "you're not the acconut holder we cant talk to you" Aug 07 15:21:26 but if i just say i am the account holder, and give them the billing address... Aug 07 15:21:29 canadiancow|work: you have his billing address, right? Aug 07 15:21:52 yes Aug 07 15:22:11 if he's a tech journalist, hack his twitter Aug 07 15:22:12 canadiancow|work: ahem, you can get quite far with this and a bit of social engineering Aug 07 15:22:21 should be enough to cut off his power Aug 07 15:22:23 i believe i just said that Aug 07 15:22:45 and well... yes, if he is a mac devotee wipe his iDevices ;) Aug 07 15:23:12 i just dnt feel like i should have to waste time calling a company in another country because some dumbass cant spell his email Aug 07 15:24:52 christ what a whiner you are Aug 07 15:25:04 either fix their mistake, or just set a rule in gmail to automatically send it to the trash Aug 07 15:25:11 THE POWER IS IN YOUR HANDS Aug 07 15:25:27 gmail should be smart enough that if i click "repor spam" on an address four times in 24 hours Aug 07 15:25:29 :P Aug 07 15:25:35 wongk, canadiancow|work: yeah setting the listener on the listview works well.. thanks Aug 07 15:25:43 which is great except for users that hit "report spam" instead of "move to trash" Aug 07 15:25:51 and then complain "WHERE ARE MY EMAILS" Aug 07 15:25:54 well then wtf is the point of "report spam" Aug 07 15:26:22 it sends it to learning algorithm Aug 07 15:26:27 if 10,000 users all hit "report spam" on the same newsletter, the sender is marked as a spammer Aug 07 15:47:18 romainguy: You wouldn't happen to know if Android is going to implement RTMFP by Adobe anytime soon do you? Aug 07 15:48:13 It is probably unlikely, but worth an ask. Aug 07 15:48:55 i went down that route once Aug 07 15:49:03 just ended up using a hidden webview with a flash player Aug 07 15:49:05 adobe? I don't want it :P Aug 07 15:49:35 I don't want to use Adobe either, but RTMFP is very handy Aug 07 15:50:00 It is causing the firm I work for endless problems. Aug 07 15:50:16 And a native Android solution would be preferable Aug 07 15:50:49 i couldn't believe "rtmfp" is an actual acronym Aug 07 15:51:13 "read the manual, faggot pansy" Aug 07 15:51:28 Afternoon, all. Anyone got any insight into http://forum.xda-developers.com/showthread.php?t=1816094 ? Aug 07 15:51:50 actually it seems they're dropping flash support Aug 07 15:51:58 lol stork Aug 07 15:52:50 hashbang: well, it's a URL... the host part is forum.xda-developers.com, the path part is showthread.php and it has a single HTTP GET parameter, name t value 1816094 Aug 07 15:52:52 Yep, another reason I need to switch SuD Aug 07 15:53:00 Leeds: hohoho. Aug 07 15:53:27 hint - it's nicer to at least summarise your question, rather than expecting people to visit a random web page just so they can help you Aug 07 15:53:45 nag the html5 people about rtmfp Aug 07 15:54:14 Leeds: OK, essentially, the FAT filesystem of my I9100's internal /sdcard (actually a partition of its eMMC) keep corrupting, without any crashes/power failures/battery pulls etc. Aug 07 15:54:30 Doesn't seem app dev related Aug 07 15:54:33 SuD, but then I would still need a WebView :( Aug 07 15:54:41 And WebViews are bugged to buggery too Aug 07 15:55:18 hashbang: try #android or #android-root Aug 07 15:55:22 this is almost certainly the wrong place Aug 07 15:55:29 SimonVT: well, it's always NewsRob which triggers it. The author says he just uses standard Java IO... Aug 07 15:55:40 lov: OK, thanks Aug 07 15:56:03 hashbang: in which case - yeah, I've seen it Aug 07 15:56:29 lov: I've seen exactly that on at least one non-rooted device Aug 07 15:56:59 Leeds: on your own devices? I9100s? Aug 07 15:57:20 on an i9100 and on a tab 10.1 - but it doesn't belong here, let's go to #android Aug 07 15:57:58 Leeds: OK, no worries. I'll pop on later. Or, if you feel like posting a reply to the thread on xda... :-) Aug 07 16:03:26 anybody know simple sql Aug 07 16:03:55 i need help with a statement i want to fetch those records where op is not empty or null Aug 07 16:05:53 i think: select * from mytable where myfield is NOT NULL or myfield <> '' Aug 07 16:06:10 thanks SuD Aug 07 16:06:40 change OR by AND Aug 07 16:10:48 so here's my new problem: how do you keep your application active with the screen off? Aug 07 16:11:00 dogarrhea2, nohup Aug 07 16:11:05 nohup? Aug 07 16:11:07 why is the porterduff clear black instead of transparent? and is there a way to change it? Aug 07 16:11:19 of course. is it not a unix machine you're writing for? Aug 07 16:11:33 this requires root? Aug 07 16:11:48 i just want mediarecorder to keep going after the screen timesout Aug 07 16:12:01 a service? Aug 07 16:12:31 isnt mediarecorder already a service? Aug 07 16:12:55 somehow the onPause event is called when the screen times out Aug 07 16:13:13 and it interrupts recording Aug 07 16:13:15 dogarrhea2: "somehow" Aug 07 16:13:20 this is part of the activity lifecycle. Aug 07 16:13:37 your application is still running, even when the screen is off Aug 07 16:13:45 you know.. like a phone call Aug 07 16:13:51 Oh, I'm aware. Aug 07 16:14:01 If you need to force the screen or the CPU on, look at PowerManager Aug 07 16:14:09 but there's no way to force your activity to always stay in the foreground. Aug 07 16:14:25 it can always be preempted, be it by phone call, user pressing home, etc Aug 07 16:15:06 again, there's a difference between your activity and your application Aug 07 16:15:21 your application will keep chugging along just fine. Your activity may be backgrounded, although it isn't necessarily destroyed. Aug 07 16:15:23 i'd imagine a typical use case where the user turns my app on, presses the button that turns the screen dark, puts it back into pocket and later turns screen back on and has all of the recording Aug 07 16:15:47 dogarrhea2: for the audio recorder, this is just fine. For the video recorder, this doesn't work, because you need to have a valid window to preview into. Aug 07 16:17:00 does anyone know the ios dev channel? Aug 07 16:17:04 nope Aug 07 16:18:00 i think it's #iphone-dev Aug 07 16:18:31 guess not Aug 07 16:18:32 ios on irc? is irc cool enough for ios devs? Aug 07 16:19:08 there's #macdev Aug 07 16:19:22 #iphonedev has some people Aug 07 16:19:33 thanks guys Aug 07 16:20:34 why would iPhone need an irc "it just works" Aug 07 16:21:30 I see this is #android-derp today Aug 07 16:21:33 iphone devs don't discuss, they read ibooks on their ipads about the issue Aug 07 16:21:43 lol Aug 07 16:21:53 + cry that steve jobs is dead Aug 07 16:22:02 my colleague gets so annoyed when i joke about steve jobs Aug 07 16:22:20 he was a legend. Aug 07 16:22:22 my h1b telegu former coworker is annoyed that steve jobs is muslim Aug 07 16:22:28 well, had a muslim father Aug 07 16:22:30 right there from the infancy of the entire industry. Aug 07 16:22:36 he was buddist wasn't he Aug 07 16:22:43 lsdist. Aug 07 16:22:45 yeah. Aug 07 16:22:47 ah Aug 07 16:22:49 is that not a religion? Aug 07 16:23:30 asshole-ist ;) Aug 07 16:23:42 knowing about many religions helped him a lot Aug 07 16:23:49 hahah. Aug 07 16:23:56 hahahahaha Aug 07 16:23:57 to create his own Aug 07 16:24:23 i-god? Aug 07 16:29:54 the proper syntax would be iGod Aug 07 16:30:09 iThink we should go back to work instead of making stupid apple jokes Aug 07 16:30:29 iAgree Aug 07 16:30:32 iLeave now Aug 07 16:30:36 oh stfu all of you ~_~ Aug 07 16:30:54 ON TOPIC TIME! Should Log messages be externalised too? Aug 07 16:31:00 iOs ami doing it rite? Aug 07 16:31:14 i bought $1000 worth of znga stock a few days ago at $2.48 then sold it just now at 3.07 Aug 07 16:31:18 =) Aug 07 16:31:21 An_Ony_Moose, i generally dont, but mine are like if (BuildConfig.DEBUG) Log.d("Something", "something else"); Aug 07 16:31:30 you bought zynga stocks? Aug 07 16:31:32 why? Aug 07 16:31:34 fuck zynga Aug 07 16:31:37 ? Aug 07 16:31:40 just made $590 in 2 days Aug 07 16:31:42 canadiancow|work: why the if? Aug 07 16:31:45 QubeZ: gotta take advantage of taht dead cat bounce Aug 07 16:31:49 i dont want it in production builds? Aug 07 16:31:50 :P Aug 07 16:31:53 id buy them then sell them half the price just to fuck with their net worth Aug 07 16:32:32 so dont take this the wrong way Aug 07 16:32:36 but why only $1000? Aug 07 16:32:49 because if it nosedived he'd only be out $1000? Aug 07 16:32:55 psh Aug 07 16:33:04 it already did nosedive Aug 07 16:33:10 nosedive MORE. Aug 07 16:33:15 ya, i just had a new baby 4 months ago -- I dont need to take risks :) Aug 07 16:33:38 QubeZ im pretty sure you didnt buy at 2.48 Aug 07 16:33:43 since the lowest it's ever been is 2.66 Aug 07 16:33:52 sorry, typo meant 2.78 Aug 07 16:34:00 QubeZ: how did you make 590$? i count 237 dollars on that trade Aug 07 16:34:15 did you add a x2 multiplier somewhere? Aug 07 16:34:33 you made 28c each stock Aug 07 16:34:46 not bad for a 2 1/2 day trade Aug 07 16:34:47 so you made $280 Aug 07 16:34:49 of which he had 404 shares of. Aug 07 16:34:49 on $1000 Aug 07 16:34:57 might get more Aug 07 16:34:57 ah Aug 07 16:35:01 I bought ZNGA lol Aug 07 16:35:05 i think he is making things up Aug 07 16:35:05 2200 sub 4$ Aug 07 16:35:06 a Aug 07 16:35:10 nd I own January 6$ calls Aug 07 16:35:13 znga is a good buy... i think they will pull out of this slump Aug 07 16:35:21 i wanna see IPO price on my calls Aug 07 16:35:28 300$ investment will turn into 25000 muhahahahahahah Aug 07 16:35:29 one of the guys in the office next door to us bought Facebook shares when they launched their IPO Aug 07 16:35:33 then boasted about it Aug 07 16:35:38 the next day he was completely silent Aug 07 16:35:39 shows how unlikely it is to see 10 again before january expiry 2013 Aug 07 16:35:58 Callum I banked on 21 FB calls last friday Aug 07 16:36:03 bought for .05 13 contracts Aug 07 16:36:06 sold for 1300$ muhahhahahahaha Aug 07 16:36:10 such a dumb stock Aug 07 16:36:13 this g uy gbought them on opening price of $38 what every Aug 07 16:36:14 ever* Aug 07 16:36:24 237 * .85 = after capital gains tax - additional income tax - commission on trade (4$ or so) = how much? Aug 07 16:36:55 znga a good buy? what on earth? Aug 07 16:37:16 bjorkintosh: you read too much bad news :P Aug 07 16:37:28 i have beach front property for sale in tulsa, oklahoma ubert_mac. Aug 07 16:37:35 cause znga ia still making money I thought? Aug 07 16:37:43 any kind of fad that hAs slumped so low can only profit on speculation volatility.. Aug 07 16:37:43 Unlike FB stock dragging them down Aug 07 16:37:46 "still" making money Aug 07 16:37:53 and not making a single original app. just blatantly stealing content. Aug 07 16:37:54 hehe I just bought in Westlake hills in Austin Tx, need to save for next property bjork Aug 07 16:38:01 haha Aug 07 16:38:05 znga is still making money and they still have a shit load of money in the bank... its still a good company and a good buy Aug 07 16:38:24 n. Aug 07 16:38:28 why do you use the word "still" like that Aug 07 16:38:35 it gives me a sense of "wont for long" Aug 07 16:38:42 still as in I have not looked at the last set of financial reports … I thought things were slowing after the IPO tho Aug 07 16:38:52 canadiancow|work: no company lasts forever... still is appropriate Aug 07 16:38:54 you will only make money on speculator volatility. their business model is f*cked. just like angry birds trying to "diversify" into toys Aug 07 16:38:55 just another fad Aug 07 16:38:56 welcome to #android-stocks Aug 07 16:39:07 Im worried the market will change canadiancow|work actually. Aug 07 16:39:20 seriously Aug 07 16:39:24 you are strongly advised not to take any advice from anyone in this channel when it comes to investing - even if they happen to work for the company they're commenting on - including this advice Aug 07 16:39:37 so...what do I do then Aug 07 16:39:39 @_@ Aug 07 16:39:44 shut the fuck up about stocks Aug 07 16:39:44 i invest in the company and never played any of their games Aug 07 16:39:45 that's what you do\ Aug 07 16:39:50 personally I would and might buy znga when it bottoms out Aug 07 16:39:54 but im dong being off topic Aug 07 16:40:01 Did FB ever go public? Aug 07 16:40:03 you are a dong. Aug 07 16:40:08 lol Aug 07 16:40:11 Hey guys, question, how do I make an intent to retrieve an image from the gallery or the camera? On some versions of the gallery app the user can take a pic from within the gallery and it returns like they just picked a photo. Is there a way to get gallery to provide this functionality consistently? Aug 07 16:40:21 :P Aug 07 16:44:56 Well I finally got to play with 4.04 today, and I have to say, the audio latency issues have been greatly improved! Good work Google!! Aug 07 16:45:21 yay! Aug 07 16:47:12 Now I just need another 4.0 device to start implementing some of these Wifi-direct ideas I got going on in my head. Aug 07 16:58:28 hello guys i need little help about git configuration pls help me :) Aug 07 16:59:57 hello Aug 07 17:01:10 is there a way to access contacts from bash scripts? i.e. auto backup scripts via cron, or the like.. Aug 07 17:01:35 my app got "suspended" from Play without any reason given Aug 07 17:01:44 what can i do Aug 07 17:01:49 not much Aug 07 17:01:50 same happened to me Aug 07 17:01:53 never got it resolved Aug 07 17:02:15 i just re-released it under a new package name Aug 07 17:03:39 i see... was gonna do that Aug 07 17:03:52 sucks to lose the 10k users tho :/ Aug 07 17:04:43 i wish i'd only had 10k :P Aug 07 17:10:25 I need to pick an ad solution for our game. We'd like a fullscreen ad to be showed when game-over. Any recommendations? The only choices I know about myself is Greystripe and Google. Have had great experience with Greystripe with earlier J2ME titles. Other suggestions? Aug 07 17:11:15 hmm, in my tabhost my tabs are always at the very top Aug 07 17:11:31 i tried wrapping the indicator in a view and set margins on the inner/outer elements Aug 07 17:11:43 any ideas if/how i can move the indicator around in the tabhost? Aug 07 17:15:03 if i change the height of the widget it cuts off my view :( Aug 07 17:21:11 if i'm using an XML preferences screen, how can i specify the name of the sharedpreferences instance to use? Aug 07 17:23:04 Stew-a: getPreferenceManager().setSharedPreferencesName(Preferences.APP_PREFS_NAME); Aug 07 17:23:26 on a PreferenceActivity Aug 07 17:24:45 wongk: thanks Aug 07 17:29:17 What's the equivalent of the rs_script_call struct when calling forEach through Java? Aug 07 17:44:56 Anyone know how to get adb to recognize a Galaxy Nexus on Mountain Lion? Aug 07 17:46:59 it just should -- thats the way it is on my mulitude of android devices Aug 07 17:53:01 richcollins: adb on OS X should "just work" Aug 07 17:53:19 lov: stopped working after I upgraded to Mountain Lion Aug 07 17:53:20 :-/ Aug 07 17:53:50 You'd think there would be plenty of Android dev's at Google using a Galaxy Nexus and Mountain Lion Aug 07 17:53:51 Don't know what to suggest. Dick around with lsusb or something, sorry. Aug 07 17:53:51 WTF Aug 07 17:54:45 something strange is happening to me: when I download platform tools, I get 'adb' and related, except while it's in the directory, whenever I type 'adb' I get a "no such file or directory" Aug 07 17:54:52 I'm on x86_64 Aug 07 17:55:00 any idea what could be happening here? Aug 07 17:55:13 kmicinski, ./adb Aug 07 17:55:38 kmicinski: or add it to $PATH in .bash_profile Aug 07 17:56:47 what Rayne said. Aug 07 17:56:51 and richcollins too Aug 07 17:59:01 rick rollins? Aug 07 17:59:05 http://pastie.org/private/wxnlqdd1hpxwg5hsimfqw <-- stack trace, the first part (my logging) shows that tabhost is not null just before the exception, what's going on? Aug 07 17:59:20 this only happens the second time i launch the activity with the same intent/bundle Aug 07 17:59:31 at com.merchlar.ubisoft.GameActivity$TabManager.addTab(GameActivity.java:515) Aug 07 17:59:34 pastebin plz Aug 07 18:00:09 kmicinski: don;t ad adb to $PATH, add its directory to it Aug 07 18:00:13 also, for the love of god, don't use tabhost, use viewpager and fragments or something Aug 07 18:00:22 lov, http://pastie.org/private/b9rynfm9lg0l3vjwrdjvjq Aug 07 18:00:32 lov, i'm using tabhost and fragments Aug 07 18:00:47 export PATH="$PATH":"$HOME"/local/opt/android-ndk-r8:"$HOME"/local/opt/android-sdk-linux/platform-tools/:"$HOME"/local/opt/android-sdk-linux/tools/ Aug 07 18:00:51 for example Aug 07 18:01:12 if yo uhave it installed relative to yuor home Aug 07 18:01:18 i can't type today :D Aug 07 18:01:25 drunk huh? Aug 07 18:01:28 Looking in my source for tabhost, I see on line 224 Aug 07 18:01:28 View tabIndicator = tabSpec.mIndicatorStrategy.createIndicatorView(); Aug 07 18:01:31 tabIndicator.setOnKeyListener(mTabKeyListener); Aug 07 18:01:49 before you make your tabhost call, try that tabSpec.mIndicatorStrategy.createIndicatorView() call, see if it returns null Aug 07 18:01:51 oh Aug 07 18:02:01 and don't forget to add the original PATH to it: Aug 07 18:02:15 ok, shoot me :D Aug 07 18:03:03 lov, k, one sec, ty Aug 07 18:03:44 Anyone here using Mountain Lion? Aug 07 18:03:44 lov, i have no field mIndicatorStrategy Aug 07 18:07:46 lov, it was packing the indicator in the tabspec with a button that caused it to poop Aug 07 18:07:50 maybe it's not public. Aug 07 18:07:53 i changed it to a drawable Aug 07 18:07:58 ah, well, glad that worked. Aug 07 18:08:02 yah, weird stuff Aug 07 18:16:19 Rayne, richcollins no, you don't understand, Aug 07 18:16:26 even doing an ./adb doesn't work. Aug 07 18:16:43 i.e., you can "ls" it, and it shows up, it's permissions are all right, but an ./adb doesn't work. Aug 07 18:16:54 what does "doesn't work" mean Aug 07 18:16:56 error message Aug 07 18:17:00 silent failure Aug 07 18:17:02 ... Aug 07 18:17:16 kmicinski, broken glibc? Aug 07 18:17:31 I said: an ./adb produces a "no such file or dirctory", so that's an EEXISTS Aug 07 18:17:55 ah Aug 07 18:17:59 64 bit linux? Aug 07 18:18:01 yes. Aug 07 18:18:06 I had this once while updating glibc on x64 linux. Aug 07 18:18:07 you need hte ia32 libs thing Aug 07 18:18:12 ^^ Aug 07 18:18:15 its the most stupid error ever Aug 07 18:18:23 its trying to link against something that doesnt exist Aug 07 18:18:24 okay, thanks, that's the kind of thing I had expected. Aug 07 18:18:31 so it says "no such file or directory" Aug 07 18:18:35 right. Aug 07 18:18:48 overzealous / unhelpful overloading of EEXISTS Aug 07 18:18:54 basically Aug 07 18:19:00 took me hours the first time i hit that Aug 07 18:19:32 instead I just came to android-dev and had people assume I didn't know to prefix commands with ./ if they weren't in my path ;-) Aug 07 18:20:07 to be fair though Aug 07 18:20:20 I have a view pager with EditText's on some of it's pages... Now I use the keyboard to enter a text on one page and then I move to the next page and use the keyboard to enter text on the edittext of the current page, but the text keep going to the edittext of the previous page Aug 07 18:20:23 most people who come here couldn't tell you the difference between linux and a hole in the ground Aug 07 18:20:32 canadiancow|work: fair. Aug 07 18:20:50 so while in this case, "./adb" wasnt helpful, in 95% of the cases it is Aug 07 18:20:51 :) Aug 07 18:21:27 http://www.h-online.com/open/news/item/Google-forced-to-temporarily-deactivate-copy-protection-for-Android-apps-1661755.html Aug 07 18:21:45 doubt anyone was using it anyhow :) Aug 07 18:22:50 fucking play store bug wont let me buy shit Aug 07 18:23:18 g00s thats the automatic one in jelly bean Aug 07 18:23:34 it forced all paid apps on 4.1 to be installed onto external storage Aug 07 18:23:40 which broke shit with widgets, lwp, etc Aug 07 18:24:07 canadiancow|work: forced all paid apps in 4.1 to be installed on external storage ? :O Aug 07 18:24:42 i actually never tested my app once moved to sdcard, now that i recall Aug 07 18:24:47 shiit Aug 07 18:25:04 i don't understand how that didn't see this coming Aug 07 18:25:09 heh Aug 07 18:25:29 they have a very well documented list of issues associated with doing it Aug 07 18:25:44 I have a question about using declared xml resources. I have a color declared (say foo). I try to use this color, e.g., ObjectAnimator.ofInt(v, _, R.color.foo, R.color.foo2) Aug 07 18:25:49 But that' s obviously wrong Aug 07 18:26:02 you have to use Resources.getColor(R.color.foo) Aug 07 18:26:07 Ahh, gotcha! Aug 07 18:26:10 Figured it was something goofy. Aug 07 18:28:45 Yes, ia32 libs were needed ... Aug 07 18:28:57 Is there any way to fix this, or throw a more informative error Aug 07 18:29:21 perhaps in the 'android' program, making a note after platform tools are downloaded, that you will need ia32-libs Aug 07 18:31:19 Hey all, I've created a network with WifiManager (it shows up in the Networks list), any suggestions on how to activate the network so it can be joined by other devices? Aug 07 18:31:47 It's in the docs that you need ia32-libs Aug 07 18:32:08 Hm, which? Aug 07 18:32:20 I scoured a fair amount of them to find this out Aug 07 18:32:24 sdk install docs Aug 07 18:32:36 http://developer.android.com/sdk/installing/index.html Aug 07 18:32:37 really? I must have missed it, which just makes it my fault Aug 07 18:32:40 who is good with c++ here? Aug 07 18:32:43 Oh, then I'm just an idiot. Aug 07 18:32:47 If you are running a 64-bit distribution on your development machine, you need to install the ia32-libs package Aug 07 18:32:50 I have a quick issue on strings Aug 07 18:32:54 Yeah, that's my fault Aug 07 18:33:06 I guess I'd not installed on a 64 bit linux before. Aug 07 18:33:35 still, a more informative error would be nice Aug 07 18:33:49 CurlyBrace: I'm awesome at writing Hello World programs Aug 07 18:33:56 Agreed, throwing EEXISTS is simply dumb. Aug 07 18:34:06 fair enough Aug 07 18:34:27 I'm not saying the SDK install docs are incorrect, and I figured it must be a 64 bit thing. Aug 07 18:34:30 but stil... Aug 07 18:34:46 I have a const char *foo being passed in through a method - how do I compare this to see if it contains a specific string? Aug 07 18:35:24 strstr() Aug 07 18:35:37 btw, that is a C question, not a C++ question Aug 07 18:36:51 ah, thanks Aug 07 18:36:55 my c/c++ is super rusty Aug 07 18:37:58 mobile web devs will probably like this http://mobilehtml5.org/ Aug 07 18:38:36 why are there two columns for android Aug 07 18:38:54 and what's a "tablet" Aug 07 18:38:57 they havent even defined it Aug 07 18:39:20 cs:go is on preorder on steam Aug 07 18:39:31 EvilPenguin: who gives a shit Aug 07 18:39:39 canadiancow|work: there is even 1 column that is checked for phones and not for tablets Aug 07 18:39:56 2.3 only on Sony Xperia Aug 07 18:40:13 chrome seems to be doing nice though Aug 07 18:40:16 canadiancow|work: looking at those 2 columns, seems like there are some differences :P Aug 07 18:40:24 weird Aug 07 18:40:32 lov: many people but you apparently. Aug 07 18:40:42 EvilPenguin: to rephrase, what does it have to do with android development Aug 07 18:40:51 Position: fixed support Aug 07 18:40:54 how can it be supported in 2.2 Aug 07 18:40:55 but not 3.0 Aug 07 18:41:04 regression? Aug 07 18:41:21 lov: not a damn thing, as you can tell by the clearly stated fact. Aug 07 18:41:34 EvilPenguin: so why did you decide to post it in here? Aug 07 18:41:52 lov: why did you decide to comment on my action? Aug 07 18:42:06 Because I'm trying to keep #android from flooding in? Aug 07 18:42:16 im a developer dont worry Aug 07 18:42:26 I'm sure you are, and people in #android are too Aug 07 18:42:36 I just don't want this channel to be useless like that one is. Aug 07 18:43:01 which it's clearly not :P Aug 07 18:43:14 (hopefully from your stand point to) Aug 07 18:43:47 did anyone actually impose order in it? Last time I was there, it was a fucking wasteland of aolers Aug 07 18:49:22 I am trying to build curl with Openssl with ndk-build. I get an error linking openssl that I think means I need to build libz.so for android. "libz.so, needed by ./obj/local/armeabi/libcrypto.so" Not the host sytstem need for lib32z.so I find on a lot of sites. Correct???? Any hints on how to do an Android ndk build of libz? Aug 07 18:50:15 Or do I jsut not have some critical pathing set up correctly? Aug 07 18:52:58 jshanab_: correct, you'll need an arm version of libz Aug 07 18:54:46 I am not a stranger to linux or java but am new to Android. As I build these libs for Android is there an install location that they go so more than one project can find them. It is sometimes hard to tell with all the historical infromation, if I am doing things the current, correct way. Aug 07 18:57:11 Some documentation says Zlib is already in the ndk. Aug 07 19:07:03 Hi All, I'm checking if a file exists by doing "File file = getContext().getFileStreamPath("/data/data/[pname]/databases/database.db") and I'm getting an error "File [filename] contains a path separator" Aug 07 19:07:08 What am I doing wrong? I can't figure it out! Aug 07 19:08:02 you're using /data/data/[pname].... Aug 07 19:08:09 please don't do this. Aug 07 19:08:19 there's no guarantee as to what the location of your app private data will be Aug 07 19:08:31 lov--I'm using phonegap and I need to put a DB in that directory for PhoneGap to access it... Aug 07 19:08:49 sebumd: and if /data/data doesn't exist at all? Aug 07 19:09:06 lov: it's always existed on all of my dev devices? Aug 07 19:09:12 so far. Aug 07 19:09:17 there's no guarantee that it'll be there Aug 07 19:09:26 and samsung, in their infinite wisdom, put databases in /db on a phone Aug 07 19:09:27 so what do you recommend? it's the only location that phonegap knows to pull databases from... Aug 07 19:09:31 http://developer.android.com/reference/android/content/Context.html#getDatabasePath(java.lang.String) Aug 07 19:09:34 use that. Aug 07 19:10:06 Anyone set up credit card transactions in an app before? Is it a process of connecting the merchant account's api directly to the app, or will there be a need for a service api to be in the middle, sort of like handling a normal website's payment system Aug 07 19:10:09 actually, no, not dbs, they put shared preferences somewhere. Aug 07 19:10:24 geestring: if you're not really sure how to do this, you probably shouldn't be. Aug 07 19:10:26 i have a method with the follow line "String s = list.get(oldIndex);" ... and i am not checking the IndexOutOfBoundsException, but it the method still compiles. how is that that this exception is not force to be checked? Aug 07 19:10:33 geestring: use Google's in-app billing if you're going to be on Google Play anyway Aug 07 19:11:01 sysRPL: It's a runtime exception Aug 07 19:11:02 Wait. You are telling me not to learn how to do something if I don't know how to do it? Aug 07 19:11:19 sysRPL: http://developer.android.com/reference/java/lang/IndexOutOfBoundsException.html Aug 07 19:11:22 I am using -lz in my android.mk but ndk-build says it cannot find libz.so. What am I missing? Aug 07 19:11:27 if an exception extends RuntimeException, it doesn't need to be declared Aug 07 19:11:41 hello, can i get some help running a rom in a emulator? Aug 07 19:11:44 geestring: I'm saying that I'd rather you not do it, because it's hard to do correctly and very easy to fuck up. Aug 07 19:11:46 i used the instructions here http://wiki.cyanogenmod.com/wiki/Android_SDK_Emulator:_Compile_CyanogenMod_(Linux) Aug 07 19:11:51 but it uses the default android10 images if i take the android 10 images and put them in another folder and only keep the cm images it won't boot blackscreen forever, if i run adb devices now i get emulator-5554 offline Aug 07 19:11:57 loin: maybe you should try asking in #cyanogenmod or #cyanogenmod-dev Aug 07 19:12:23 they said it could be a android issue Aug 07 19:12:29 after all i am trying to run an emulator Aug 07 19:12:35 so? Aug 07 19:12:41 I just want to know how it's done. Aug 07 19:12:41 you're trying to run a custom CM rom in the emulator Aug 07 19:12:43 the rom compiles successfully and i am able to run it on my phone Aug 07 19:12:56 i just want to run the rom in the emulator Aug 07 19:13:03 loin: I'm sure you are. Aug 07 19:13:28 Maybe that is actually a QEMU question? Aug 07 19:13:44 geestring: I don't know how you'd end up doing your billing. I'm assuming that you'd end up connecting to your vendor's service, who would authenticate the transaction and enter information into your own servers. Aug 07 19:14:01 If you have your own webservers that handle billing, you'd probably end up connecting to them. Aug 07 19:14:16 If you've got some spare time, feel free to answer this question I created on SO: http://stackoverflow.com/questions/11852486/passing-data-back-to-parent-activity-through-parcel-when-activity-is-canceled :) Aug 07 19:14:40 Just make sure that you A) never, ever write the customer's information to disk on the device, B) always, always use SSL, and you should probably cache a copy of the public cert that the server would expose. Aug 07 19:14:47 Those are the two big things I would think of offhand. Aug 07 19:18:08 lov: new code: file dbFile = getDatabasePath("mydbname.db"); file file = dbFile.getAbsoluteFile(); if(!file.exists()){ // copy DB if it doesnt exist } Aug 07 19:18:15 How's that look? Aug 07 19:18:20 o_O Aug 07 19:18:24 what is that getAbsoluteFile part Aug 07 19:18:37 i need to see if it exists Aug 07 19:18:43 File dbFile = getDatabasePath("mydbname.db"); if(!dbFile.exists()) { .... } Aug 07 19:19:01 hmmm good call, let me see... Aug 07 19:19:09 You don't need getAbsoluteFile, because you don't need the absolute path. Aug 07 19:19:21 Got it. But I need the path for my copy() function Aug 07 19:19:24 phonegap MIGHT, depending on how horrifically stupid it is. Aug 07 19:19:30 dbFile.getAbsolutePath() then Aug 07 19:19:48 got it :) Aug 07 19:19:57 lov: I'm a HTML guy, rough on Java...If you couldn't tell Aug 07 19:20:02 Let me give it a shot Aug 07 19:23:37 lov: http://pastebin.com/ajSukmaw any suggestions? Aug 07 19:24:03 once again, PLEASE PLEASE PLEASE do not hardcode /data/data/ etc Aug 07 19:24:14 in the commetn above i said thats the next thing i'm gonna fix Aug 07 19:24:21 but the .exists() doesnt work Aug 07 19:24:23 use this.copy("database.db", dbFile.getAbsolutePath()); Aug 07 19:24:33 define "doesn't work" Aug 07 19:25:28 How does android seemingly automagically pull exif data out of thin air when saving a jpeg with the default camera app? Aug 07 19:26:15 Is there something deeper in the OS? I see how it carries things like image size, orientation, gps stuff around and writes it out Aug 07 19:26:18 lov: ignoring my file exists issue, if I use dbFile.getAbsolutePath() parameter for my copy() function it doesn't work. The DB Doesn't get copied to (in this case) /data/data/, etc Aug 07 19:26:42 why don't you attach the debugger and see what the path ends up being? Aug 07 19:27:13 I am writing a podcast manager and is currently working on a DownloaderService. But if the user chooses to download a podcast and the downloader service is already running. Is there any good way to give the ID of the episode he/she wants to download to the downloader Service? Aug 07 19:27:15 saecula: I have no idea. I'm assuming that the camera app encodes the exif data into it. Aug 07 19:27:24 Things like exposure/aperture/iso speed/etc just get added to the file out of no where Aug 07 19:27:44 saecula: the camera app is probably using non-public apis to get that information Aug 07 19:27:47 * lov shrugs Aug 07 19:28:01 I am looking at the camera app source though lol Aug 07 19:28:29 lov: do you know much about the Android.mk system? Aug 07 19:30:04 nope :> Aug 07 19:30:11 saecula: no, you're looking at the AOSP camera source! :D Aug 07 19:30:23 if you're running a proprietary ROM, the camera app is probably totally different Aug 07 19:30:25 just wondering why the build system left files like core.jar out of the system completely Aug 07 19:31:27 lov: I was using this plugin, https://github.com/chbrody/Cordova-SQLitePlugin/blob/d2f2a42ec5e05ca620ff744fa5c7e66cd0035bfd/Android/src/com/phonegap/plugin/sqlitePlugin/SQLitePlugin.java Check lines 150-155. Bad code, huh? Aug 07 19:32:15 sebumd: yes, basically. Aug 07 19:32:16 That's an old release Aug 07 19:32:26 It's since been updated, but thats the version I had w/o that commented out Aug 07 19:33:27 ug, craigslist is such a pile of shit - how is this thing still around Aug 07 19:33:50 Anyone had success creating any kind of wifi network that cab be joined by other devices? Aug 07 19:34:15 g00s, i got multiple full time jobs through craigslist Aug 07 19:34:20 MontyCarleau: i have on normal linux systems, but havent tried in android Aug 07 19:34:23 and countless used music equipment Aug 07 19:35:28 thebishop: not the concept, the fucking website Aug 07 19:35:40 g00s, yeah, it's shitty by design ;) Aug 07 19:37:54 http://www.pasteall.org/34369 ??? Aug 07 19:39:08 watching errors go by like they are verbose messages. Aug 07 19:39:39 android must be broken for there to be this many errors Aug 07 19:40:02 mouse coordinates? Aug 07 19:40:08 *pointer/whatever Aug 07 19:42:02 clever: Have you had to deal with wpa_supplicant? Aug 07 19:46:51 MontyCarleau: ive had no issues running it in both slave and master at the same time Aug 07 19:46:58 how do you add a textview programatically? Aug 07 19:47:04 MontyCarleau: wpa_supplicant and hostapd on the same card Aug 07 19:47:34 MontyCarleau: iw phy phy0 interface add wlan1 type managed ; ifrename -i wlan1_rename -n wlan1 ; ip link set wlan1 address 00:15:af:5a:75:0e Aug 07 19:47:53 MontyCarleau: if you want to run both at once, you need a command like this, and the drivers need to support it Aug 07 19:48:18 the mac address at the end, is because linux wont let you up 2 interfaces with the same mac, and they are identical by default Aug 07 19:49:19 not too sure about this R file that's generated.. what are all these things in the layout static final class? Aug 07 19:50:56 ok. so the R file is just some magic that happens after you create a layout file Aug 07 19:51:07 clever: Unfortunately, I have to use the API. wpa_supplicant seems to be timing out – for debugging, I'm trying to create an open network (no authentication), but I wonder if that could be causing problems, as it seems that some of the defaults are WPA specific. Aug 07 19:51:40 MontyCarleau: ive never seen wpa_supplicant being used in master mode before Aug 07 19:53:11 clever: I don't think it is, I think that either (1) I've set invalid network parameters or (2) the network isn't being created. It's certainly not discoverable by other machine, regardless of whether the Android device can connect to itself. Aug 07 19:53:25 The magic happens after a lot of other times. Aug 07 19:53:34 MontyCarleau: as far as i know, the only option is hostapd Aug 07 19:54:56 clever: I don't think hostapd is native to Android, but maybe it'll lead me to something. Aug 07 19:55:03 MontyCarleau: weird, external/wpa_supplicant_8/hostapd Aug 07 19:55:13 MontyCarleau: the hostapd source is within the wpa_supplicant in the android source Aug 07 19:55:42 external/wpa_supplicant_6/wpa_supplicant/src/drivers/driver_hostap.c Aug 07 19:55:51 clever: Strange - I'm seeing a bunch of pages talking about compiling hostapd for Android. Aug 07 19:56:03 it feels like an optional driver you enable at compile time, then select with -Whostap Aug 07 19:56:19 dogarrhea2: it's not android that's broken. It's shitty OEMs that log everything to error level because why not Aug 07 19:56:37 dogarrhea2: it's important to make a distinction between Android the OS and what is on your phone after the OEMs finish fucking with it Aug 07 19:56:55 Regarding the R file, it's an autogenerated resources reference file to allow you to reference your resources from runtime Aug 07 19:57:11 this way you can use calls like getString(R.string.appname); Aug 07 19:57:35 the runtime will handle figuring out what string to return based on translations, etc if you have multiple different definitions of appname Aug 07 19:57:59 (e.g. res/values/strings.xml, res/values-de/strings.xml, res/values-hdpi/strings.xml ) Aug 07 19:59:07 ok Aug 07 20:01:13 ./out/target/product/d630/obj/EXECUTABLES/wpa_supplicant_intermediates/src/ap/hostapd.o Aug 07 20:01:26 MontyCarleau: it looks like it may be enabled, atleast in the build i'm making Aug 07 20:01:44 clever: What Android version are you building? Aug 07 20:01:54 MontyCarleau: 4.something, x86 Aug 07 20:02:38 clever: I think there have been some changes at 4.0+ – unfortunately 9x% of devices are on 2.2 or 2.3. Aug 07 20:03:03 i'm also on the x86 branch, that may massively effect some stuff like hostapd Aug 07 20:14:59 lov: File dbFile = getDatabasePath("database.db"); dbFile.exists(); ALWAYS says that my file exists, even if it's the first launch, before I've copied it Aug 07 20:16:38 sebumd: attach the debugger, set a breakpoint, see if this is in fact the case. Aug 07 20:16:49 sebumd: if you open a SQLiteDatabase instance, even in read only mode, it might create the file. Aug 07 20:17:02 lov: this all happens before I open the instance Aug 07 20:17:10 You can always follow up with a call to .length() to see how large it is Aug 07 20:17:15 lov: I can debug the actual hard disk? Aug 07 20:17:18 Ooh okay Aug 07 20:17:19 er, no Aug 07 20:17:25 I mean debug your app execution Aug 07 20:17:28 i put an if statement Aug 07 20:17:34 set a breakpoint before you check whether it exists Aug 07 20:17:39 if (exists) system.out.println else system.out.println Aug 07 20:17:47 also, if you install your app on top of an existing installation, you WILL NOT clear out your app private data. Aug 07 20:17:59 correct, I'm installing from scratch each time Aug 07 20:18:03 uninstalling the app to test Aug 07 20:18:13 OK, something is creating that DB file then. Aug 07 20:29:17 I created an app that runs fine on ICS, but when I install the apkg on gingerbread there is no launcher icon. any help about what's going on? Aug 07 20:29:27 s/apkg/apg/ Aug 07 20:29:35 s/apg/apk/ Aug 07 20:30:01 when you say that there's no launcher icon, is it just blank, or what? Aug 07 20:31:30 that I can install the apk fine, but on the screens that says it was installed, the open button is grayed out. Aug 07 20:31:45 then, in the app menu, my program is not shown. Aug 07 20:32:15 o_O Aug 07 20:32:34 it sounds like you don't have any sort of main intent filter Aug 07 20:32:37 which is odd. Aug 07 20:33:00 very odd, because it is a basic app created in eclipse, with nothing weird or special going on. Aug 07 20:33:22 (except that there's no launcher on a gingerbread phone) Aug 07 20:33:36 What happens if you try clicking run w/in eclipse with the GB phone hooked up, instead of installing via the device? Aug 07 20:34:47 hello Aug 07 20:34:57 moto Aug 07 20:35:32 im new in here for develop, i try create a game for android Aug 07 20:35:42 lov: it starts, and now there's an icon. Aug 07 20:35:47 * boily is very confused. Aug 07 20:37:03 boily: did you define a default activity? Aug 07 20:37:46 SuD: yes, with the MAIN action and LAUNCHER category. Aug 07 20:38:29 i don't know, maybe some little detail missing. Can you start from a provided example app? Aug 07 20:43:01 boily: I'm assuming that you installed the wrong thing via the command line :P Aug 07 20:44:23 lov: that's the kind of mistake I sometimes do... Aug 07 20:44:42 SuD no need to repeat your beliefs on every channel. #android will do. Aug 07 20:46:39 * SuD too many hours on irc. going for a walk Aug 07 20:47:53 * boily facepalms. Aug 07 20:48:06 two activities with main/launcher in my manifest. Aug 07 20:48:09 problem solved. Aug 07 20:53:53 sebumd: wrong API I think. Try new File("…").exists(); Aug 07 20:54:48 oh, oops, that was ages ago Aug 07 20:58:11 I have a class method that completes a process that takes very long but can be divided into small steps (a for loop loading a large amount of data). How would I go about making a ProgressBar that reflects the progress of this process? Aug 07 20:59:04 An_Ony_Moose: maybe use an AsyncTask? it is specially made for this kind of jobs. Aug 07 20:59:45 boily: ok, let me google that... :) Aug 07 21:00:36 Why does unbindService(ServiceConnection) not call my Service Connection's onServiceDisconnected callback? Aug 07 21:01:37 boily: "AsyncTasks should ideally be used for short operations (a few seconds at the most.)" hmm my process takes more than that. I actually don't know how long, but considerably long. My app won't really be doing anything other than displaying the progress bar during that time. Is AsyncTask still what I want? Aug 07 21:06:36 An_Ony_Moose: if it takes a long long time, maybe use a custom notification with a progress bar. that way, it won't clutter your UI and you will be able to do other tasks in between. Aug 07 21:12:34 boily: not really because it eats up RAM rather quickly. Running anything else at the same time would probably result in my app getting killed for being in the background and using up so much memory Aug 07 21:16:45 Judge William Alsup of the US District Court has ordered that Oracle Google disclose information pertaining to whether or not the parties may have paid off journalists and bloggers to provide biased opinion on their recently settled patent showdown. The court’s “concern” centers on Florian Mueller, known as the author of FOSS Patents … bwahahah, justice ! Aug 07 21:17:55 An_Ony_Moose: I think you should go with an AsyncTask, even if your use case is not "ideal". as you said, your app may get killed if it uses too much resources. Aug 07 21:21:32 lov: So I fixed everything you said. Works great. BUT on the first load, my DB is empty... Aug 07 21:21:50 I'm copying my file from /assets/ to the proper directory when the app is loaded every time Aug 07 21:22:06 It seems tehre is a delay in the copying or something, I can't figure it out :( Aug 07 21:24:19 boily: ok thanks :) Aug 07 21:29:06 so, storing all my bitmaps in memory is way too heavy, is there a way (besides requesting GC) to move bitmaps not currently in use off the heap? Aug 07 21:30:22 e.g., is there a recycle? Aug 07 21:30:59 Bitmap.recycle() Aug 07 21:31:10 Bitmap.bicyle(); Aug 07 21:31:28 i read that way too fast and had a 'wtf' moment Aug 07 21:36:01 ant debug gives the following error, how should i enable -xlint:unchecked? [javac] Note: C:\adk\tools\multitouchtest\src\de\passsy\multitouch\MultiTouc Aug 07 21:36:01 hActivity.java uses unchecked or unsafe operations. Aug 07 21:36:01 [javac] Note: Recompile with -Xlint:unchecked for details. Aug 07 21:36:01 [javac] 1 error Aug 07 21:36:25 what are you doing? Aug 07 21:36:37 i am trying to compile a sample app that i downloaded Aug 07 21:36:41 see you get a compiler error, and your first thought is to disable the error Aug 07 21:36:58 lol Aug 07 21:37:27 it says me to recompile it with -Xlint:unchecked Aug 07 21:37:45 but i have to use ant to compile Aug 07 21:37:50 so i am without any clue Aug 07 21:38:06 oh i get it Aug 07 21:38:29 if i was using javac i could put that switch Aug 07 21:38:30 take a look through http://tools.android.com/tips/lint/ Aug 07 21:38:34 ty Aug 07 21:46:38 It has nothing to do with androids lint Aug 07 21:47:45 oh Aug 07 21:47:47 nm then :) Aug 07 21:48:12 if i post multiple Runnables to a View, are they guaranteed to run in order? Aug 07 21:49:14 oh i see waht i did there Aug 07 21:53:10 canadiancow|work: not if you use delays :) Aug 07 21:53:34 well, ok thats fair Aug 07 21:53:54 i ahd something being posted that really didnt need to be posted, and removing that seems to have fixed it Aug 07 21:53:55 :) Aug 07 21:55:23 well i know why it fixed it, and that's the important thing Aug 07 21:56:27 I don't know if I'd trust you to write apps Aug 07 21:56:41 D: Aug 07 21:56:49 :) Aug 07 21:56:49 haha Aug 07 21:56:59 The truth hurts Aug 07 21:57:02 :( Aug 07 21:57:07 i see how it is Aug 07 21:57:44 why does java and adnroid make everything so damn screwy? example ... creating a timer in code and notifying you int he ui thread when the timer is done Aug 07 21:57:54 wat Aug 07 21:58:01 that is totally screwball in android in java at the moment Aug 07 21:58:28 http://stackoverflow.com/questions/4597690/android-timer-how Aug 07 22:00:04 with other tools/platforms .... timer.Timer = (sender, args) -> MessageBox.Show("Timer Complete"); Aug 07 22:01:09 *resisting the urge for condescension* Aug 07 22:02:37 im afraid it didn't help Aug 07 22:02:52 final int actionPointerIndex = event.getActionIndex(); //this line throws an error Aug 07 22:03:25 where event is a parameter for public boolean onTouch(final View v, final MotionEvent event) { Aug 07 22:03:34 Question, This has been bothering me for 4 hours now. "open failed: ENOENT (No such file or directory)" Aug 07 22:03:44 I get when copying a file for the first time. But the second launch of my app works fine Aug 07 22:04:01 it says ": cannot find symbol symbol : method getActionIndex()" Aug 07 22:04:09 can anyone help me out Aug 07 22:07:57 can anyone help me out? Aug 07 22:10:24 Anyone have experience with file copying? Aug 07 22:31:29 <_genuser_> when you guys working with databases, do you create a new class extending SQLiteHelper as recommended or do you find easier to just put all data interactions in one class handling database activity? Aug 07 22:35:52 _genuser_: both Aug 07 22:36:01 each time i deploy my application on my device, i get an error dialog. and then the dialog disappears and starts the newly deployed application. what could be the reason? Aug 07 22:36:43 jahid: are you running in the debugger? Aug 07 22:37:14 wongk-home, yes Aug 07 22:37:21 did you read the dialog Aug 07 22:37:56 yes, it says something like "....waiting for the debugger to attach" Aug 07 22:38:08 ok, so do you still have a question, then? Aug 07 22:38:28 Not all dialogs are error dialogs Aug 07 22:38:53 wongk-home, so that dialog appearing because i am running the app in debug mode? Aug 07 22:39:10 Anybody here ever do any work on the lockscreen? Aug 07 22:39:10 yes, as it says, it's waiting for the debugger to attach Aug 07 22:39:19 Making changes to some of the layouts in frameworks/base/core/res and local mmm frameworks/base/core/ress && repo sync do not sync changes Aug 07 22:39:27 only full makes && repo syncs Aug 07 22:39:46 wongk-home, thanks Aug 07 22:40:37 Hi guys, I would like to implement that horizontal scroll dragging, the one you see in Google Play store when you scroll between "Top Paid" "Top Free" etc.. Aug 07 22:40:53 any pointers where/what I should be researching Aug 07 22:40:57 the support library has a PagerTitleStrip that you can use Aug 07 22:40:58 It's called ViewPager, and it's in the support lib Aug 07 22:41:09 Oh, the titles Aug 07 22:41:18 i think he means ViewPager Aug 07 22:41:18 Yep, what JakeWharton said Aug 07 22:41:22 but he mentioned titles Aug 07 22:41:30 idunnowatyouwant Aug 07 22:43:00 ok I need both since I plan to display a category name at the top Aug 07 22:43:07 thanks, step1 would be ViewPager Aug 07 22:43:52 I feel it's necessary to warn you that PagerTitleStrip is pretty awful last time I checked Aug 07 22:44:08 Indeed Aug 07 22:44:20 Use ViewPagerIndicator Aug 07 22:44:37 really hmm Aug 07 22:44:46 there's a couple alternatives… but I'm semi-partial to one Aug 07 22:44:52 haha Aug 07 22:46:26 right now I have a ItemListActivity which implements OnScrollListener, and as I scroll I fetch more data - now I want allow users to swipe horizontally to view different groupings Aug 07 22:46:34 I'm assuming ViewPager is the way to go Aug 07 22:46:54 Yep Aug 07 22:47:00 And you probably want to use fragments Aug 07 22:47:10 ya I haven't used any yet Aug 07 22:54:55 you can also use regular views Aug 07 22:55:04 well, fragments are just regular views Aug 07 22:55:07 but i digress Aug 07 23:08:49 ya, right now I have an ItemListActivity implements OnScrollListener, and onCreate I instantiate my CustomPagerAdapter, Aug 07 23:09:16 How can I add image files to my app's directory? I see I can setup res/raw, but I'm hoping there's a simpler way. Aug 07 23:09:17 I'm trying to implement instantiateItem Aug 07 23:09:38 do I need to instantiate in there a new Activity of type ItemListActivity and add it to the collection? Aug 07 23:09:54 that's where I'm stuck Aug 07 23:10:08 arton: res/drawable-* ? Aug 07 23:11:15 I think that's for resource files. Aug 07 23:11:41 arton: i guess everything in res/ is used for resources, not? Aug 07 23:11:55 I think so. Aug 07 23:12:03 Maybe it doesn't go in res/ Aug 07 23:12:22 I recall assets/ somewhere, but I was never able to get that to work. Aug 07 23:13:17 arton: i guess it's important to know how you want to use the images... normally you'd use res/drawable-*dpi etc... Aug 07 23:13:17 arton: please clarify what u mean when u say app's directory Aug 07 23:14:18 themirror: I mean the one under /data/data/net.starlon.myapp Aug 07 23:14:50 It seems assets/ have to be accessed via AssetManager Aug 07 23:15:40 arton: http://www.anddev.org/working_with_files-t115.html Aug 07 23:16:01 if you mean to allow the app itself to add them Aug 07 23:16:13 not premade for the apk Aug 07 23:16:29 which in the latter you should use res Aug 07 23:17:06 argh... i'm using Camera and MediaRecorder to record video by the book but I get corrupted video files *grrr* Aug 07 23:32:21 I would like to display the contents of a .doc file(text only) in my app. Does anyone have a suggestion for the easiest way to do to this? (This will need to be done dynamically as there are a large number of possible documents, but lets handle a single file for now =)) Aug 07 23:36:48 <_genuser_> guys, I would like my app to constantly check against a db and generate alarms or notifications. Is the android.app.Service correct thing to read about? Aug 07 23:36:56 aadq: http://msdn.microsoft.com/en-us/library/dd942138%28v=prot.13%29.aspx Aug 07 23:37:19 <_genuser_> or is there a better way to do that? Addtionally, can one deploy an app and a service together and one package? Aug 07 23:38:01 aadq: sorry, wrong one here: http://msdn.microsoft.com/en-us/library/cc313153 Aug 07 23:40:22 Hi guys I am having some difficulty with the ViewPager, http://pastebin.com/UjdqRC8c this is my ItemListActivity, before adding ViewPager it had the OnScrollListener code - I need to modify line 127 "instantiateItem" so that I can lost different ItemListActivity - I'm stuck here Aug 07 23:41:37 lost->add* Aug 07 23:42:02 JakeWharton: do you have any idea when ABS 4.2 might be released? Aug 07 23:42:14 not really Aug 07 23:42:21 is there a pressing need for it? Aug 07 23:42:49 Not pressing, just weighing up whether to use the dev branch or do other stuff first if it were relatively imminent Aug 07 23:43:01 (searchview) Aug 07 23:43:38 I mean, the lack of testing is really all that's blocking release Aug 07 23:43:51 and you can't use any onClick listeners defined in XML on old APIs Aug 07 23:44:14 which I have to revert since people loooove doing that Aug 07 23:45:16 Why'd you break that Aug 07 23:45:55 because I added overrides for the built-in action mode callbacks that are final since people were overriding them and being all "why does this work on api 11+ only?" Aug 07 23:46:08 http://corner.squareup.com/2012/08/getting-to-the-bottom.html Aug 07 23:46:16 it's a dalvik bug, explanation in the link Aug 07 23:47:55 Oh that's nice Aug 07 23:49:26 so now I have to revert and pray for the intelligence of my users Aug 07 23:49:32 lose-lose Aug 07 23:51:45 interesting... if the default preview size of 320x240 is used, video files are corrupted... if I set parameter.setPreviewSize(640,480), everything works... wtf?! Aug 07 23:52:28 JakeWharton: thanks Aug 07 23:52:34 i'd expect the default to work... according to the errors this qualcomm driver throws with the official camera app, i get the impression that it sucks big time :( Aug 07 23:53:32 Estel: we just started using the SearchView back port at work so testing is forthcoming Aug 07 23:53:36 will try to release relatively soon Aug 07 23:54:06 <_genuser_> JakeWharton: you doing android dev for work? Aug 07 23:54:14 I am Aug 07 23:54:29 <_genuser_> nice. May I ask where you work and what you guys do? Aug 07 23:55:01 I work at Square. We make fun ways to pay and accept credit cards. Aug 07 23:55:22 square enix ? Aug 07 23:55:29 <_genuser_> oh I remember checking out square. I installed the app but realized there's reall not need for me to swipe people's cards, lol. Aug 07 23:55:43 you should try the other app then, Pay with Square Aug 07 23:56:50 <_genuser_> loading on squareup.com. Aug 07 23:57:12 <_genuser_> man , my comp is so slow. what day and age where 4G barely runs IE, chrome and eclipse. Aug 08 00:01:29 <_genuser_> liking the pay with square. once it takes off, that'll be the bomb. Aug 08 00:02:31 I'm having a focus issue with ViewPager. Consider I have 3 pages: The first one have an EditText, the secconde is blank, and the third also has an EditText. When I start the activity, the first page is selected, it's EditText is focused and the keyboard is shown and works ok. When I move to the seccond page and then to the third page, the keyboard is still shown but whatever I type in it Aug 08 00:02:31 won't go to the EditText of the current page, instead it will go to the first page. I noticed as soon as I select the third page, the first one is destroyed. I think as the currently focused view is destroyed, the android framework get crazy. Everything works ok if all pages have EditTexts. Can anyone confirm if it's a known issue, or am I missing something? Aug 08 00:02:49 *sigh* easy payment solutions *dreaming* Aug 08 00:04:38 <_genuser_> BlackYue: the best I can tell after debugging is that when you move to a view, the adjacent views are created anything else is destroyed. Aug 08 00:04:57 <_genuser_> obviously the view you move it also created. Aug 08 00:06:23 yes, in this exemple, when the third page is selected, the first one is destroyed Aug 08 00:06:56 <_genuser_> the keyboard stuff I don't know about. yet. Aug 08 00:13:34 i'm trying to make a 8x4 grid of buttons on the screen, which can contain many more buttons but it'll have to scroll to them… i have a horizontal scrollview inside a scrollview… what kind of layout should i put inside those? Aug 08 00:18:16 Hi! Aug 08 00:18:21 here's my question Aug 08 00:18:35 where ? Aug 08 00:18:38 i don't see it ! Aug 08 00:18:45 lol Aug 08 00:18:50 give me a few seconds to type :P Aug 08 00:19:49 I've been working on a mobile app with android, and I've noticed that animating an element with a background color set in rgba makes it opaque for a few seconds, when either a transform is applied or backface-visiblity is hidden Aug 08 00:20:20 when you say 'mobile app' you mean 'web app', right? Aug 08 00:20:33 yes, sorry Aug 08 00:20:41 here's my test case: http://jsbin.com/ovulan/ Aug 08 00:20:56 I tested it on android 2.3 with a real device Aug 08 00:21:05 and on 4 with the emulator Aug 08 00:22:01 so my question is, is this a bug and it is documented ? Because I've been googling a lot about it and I cannot find anything helpfull Aug 08 00:22:25 Is this in a WebView or Browser? Aug 08 00:22:39 Browser Aug 08 00:25:21 what's the right way to style a spinner's item list Aug 08 00:27:22 Estel: do you see the issue I'm describing on your device ? Aug 08 00:27:51 jpdery: I'm not sure what you're seeing. I see the box animate from white to grey on everything I can find Aug 08 00:28:05 it does not go black for a split second ? Aug 08 00:29:44 No Aug 08 00:30:00 But Aug 08 00:30:15 I only have a JB device to hand, which is on a really updated webkit Aug 08 00:32:23 :-S Aug 08 00:32:39 yes, it happens on a 2.3.3 device Aug 08 00:32:48 same here Aug 08 00:32:55 samsung galaxy s something somewhat Aug 08 00:33:17 LEt me try Aug 08 00:33:20 what's the url Aug 08 00:33:25 http://jsbin.com/ovulan/ Aug 08 00:33:57 It goes black for me Aug 08 00:34:01 for a second on the toggle Aug 08 00:34:06 what's your device ? Aug 08 00:34:07 on my droid x2, stock browser Aug 08 00:34:14 android version ? Aug 08 00:34:18 uhh Aug 08 00:34:22 2.3.3 i think Aug 08 00:34:22 sec Aug 08 00:34:32 2.3.5 Aug 08 00:34:42 alright, thnx Aug 08 00:34:47 i can try on my tablet Aug 08 00:34:50 its running ics Aug 08 00:34:52 if you want Aug 08 00:34:54 :o Aug 08 00:34:56 sure :D Aug 08 00:35:01 k let me go get it and turn it on Aug 08 00:35:16 thnx, I'll finally know if it really happens on ICS Aug 08 00:35:25 because it does on the emulator Aug 08 00:37:01 How can I refresh data on the screen every 5 seconds? I tried a timer, but it won't work because it's running in a different thread. Aug 08 00:37:32 nope Aug 08 00:37:36 it doesn't show any black Aug 08 00:37:50 Xonk: delayed post to a handler? Aug 08 00:38:19 T-Dub: Thanks! Aug 08 00:38:31 T-Dub: At least it's fixed in android 4 Aug 08 00:38:35 jpdery, running 4.0.3 on my Asus transformer, it displays exactly how it does on my macbook tablet. No black at all, perfect fading Aug 08 00:38:49 np Aug 08 00:38:57 :) Aug 08 00:39:08 brb Aug 08 00:39:09 What's your guyses download to install % Aug 08 00:39:18 What would a "normal" app be? in your opinion Aug 08 00:39:27 once again, thanks for your time Aug 08 00:39:30 im at 59.72% and idk if that's crazy good or horrible Aug 08 00:40:59 #android-nexus Aug 08 00:41:03 lol Aug 08 00:41:11 It's like bounce rates of a website, it really depends. Aug 08 00:43:14 I wish google analytics worked properly for android Aug 08 00:43:24 My bounce rate and average time on site is horrible for my apps Aug 08 00:43:43 because every new page adds a new page Aug 08 00:44:00 so the time on page is like under 1 second Aug 08 00:45:23 Thanks Leed. That's what I needed. Aug 08 00:46:33 pleasure Xon Aug 08 00:47:01 i'm trying to make a 8x4 grid of buttons on the screen, which can contain many more buttons but it'll have to scroll to them… i have a horizontal scrollview inside a scrollview… what kind of layout should i put inside those? Aug 08 00:50:32 Depends on what you plan on doing with it. Aug 08 00:50:37 Most people use LinearLayouts Aug 08 00:50:44 I like RelativeLayout Aug 08 00:50:59 Although I've been starting to use LinearLayout due to layout weight Aug 08 00:51:04 to help for different screen sizes Aug 08 00:54:57 well, say the grid of buttons ends up being 20x10… i still want 8x4 to show on the screen, and be able to drag it around to see the other buttons Aug 08 00:55:07 ideally it would 'snap' to center the grid Aug 08 00:55:25 Do you want to only scroll each row? Aug 08 00:56:01 it all scrolls together… later i'll get into how to make an additional row that stays on the screen (only scrolls vertically), but for now i want one grid that all scrolls together Aug 08 00:56:37 most of my experience is with python for back-end stuff and c for microcontrollers, this thing is confusing me Aug 08 00:59:11 I guess I've found the weirdest android bug: http://code.google.com/p/android/issues/detail?id=36088 Aug 08 01:02:22 that's not the weirdest android bug I've seen, but it's up there Aug 08 01:05:14 hmm.. I have a quick question.. is go a valid language for writing Android code? Aug 08 01:05:21 s/code/apps/ Aug 08 01:05:24 it's not weird at all Aug 08 01:05:26 and already fixed internally Aug 08 01:06:03 Anyone ever seen strange locations like this? or know what may cause it? https://groups.google.com/d/topic/android-developers/lc2RVG6_WCc/discussion Aug 08 01:07:17 romainguy_: can you tell me what's going on there? Aug 08 01:07:52 romainguy_: when will the fix be released? next minor or major release? what's the best way to workaround this problem? Aug 08 01:10:10 I want to get illegal iOS app packages -.- Aug 08 01:10:32 the iOS division of the project of which I am the Android division is terminally AFK Aug 08 01:10:39 and I need data that only they have Aug 08 01:10:51 I want to hack it out of the iOS package Aug 08 01:11:00 "=.= Aug 08 01:11:24 izibi: the fix will be delivered in a future update of Android Aug 08 01:11:26 marcolorenzo_: install it on jailbroken iOS, copy? Aug 08 01:11:43 I don't have an actual iOS Aug 08 01:12:35 and the onyl one I know who does have a jailbroken iOS is also terminally afk Aug 08 01:12:45 this annoys me greatly Aug 08 01:14:43 marcolorenzo_: #ios ? Aug 08 01:15:04 they claim there are so few users in there since iOS dev doesn't cause much trouble Aug 08 01:15:19 I claim apple users are too "hip" for IRC :) Aug 08 01:15:28 hey guys im getting an error trying to switch activites. Both activities are in the manifest. please help! Aug 08 01:15:29 s/hip/stupid/ Aug 08 01:15:42 what error Aug 08 01:16:44 kingargon: tried http://lmgtfy.com/?q=android+switch+activity ? Aug 08 01:17:20 unable to start activity binary xml file line 14. And i checked and it looks fine. Aug 08 01:17:44 inflate exception Aug 08 01:18:02 rigid, im checkin it out right now Aug 08 01:21:36 romainguy_: can you please share some more details so that I can work-around this issue without having to dig into the whole sdk source? Aug 08 01:26:10 oi Aug 08 01:26:49 rigid: thats hilarious ("too much trouble") Aug 08 01:27:02 hm, xcode 4.4.1 is out Aug 08 01:27:59 g00s is it any better? Aug 08 01:28:32 i actually didn't use 4.4, i used 4.3.x tho Aug 08 01:28:39 or whatever it was Aug 08 01:29:08 i usually wait for .1 release of apple :) Aug 08 01:29:45 i want to try the new visual studio , supposedly its c++ support is very good Aug 08 01:31:14 Anyone experiencing order numbers going missing with people who buy things from the market with the nexus 7 $25 gift card? Aug 08 01:34:38 g00s every vs release has been fantastic with c++ Aug 08 01:34:45 even visual studio prior to visual studio .net Aug 08 01:35:01 ron_frown: i guess the intellisense stuff is getting really good now Aug 08 01:35:01 vs.net 2010 is great Aug 08 01:35:09 I havent used 2012 yet Aug 08 01:35:13 I dont do rc's =) Aug 08 01:35:14 (with c++) … like what i expect with Java Aug 08 01:35:29 yeah its the best ide for c++ with the exception of its platform dependence Aug 08 01:35:48 with c++ in the old days, i used to write like 1 or 2 lines of code and then build :) Aug 08 01:36:22 even if i hate java, i find eclipse autocomplete stuff pretty productive, i can write a whole bunch without starting a build and feel more confident Aug 08 01:36:30 even latest cl.exe is still a bit behind on the whole C++11 thing Aug 08 01:36:44 i wonder if herb sutter still works there Aug 08 01:37:18 like vs.net c# and resharper Aug 08 01:37:28 * p_l|repairing-os is also for another wild ride in live OS transplantation Aug 08 01:38:13 p_l|repairing-os: did you finish porting vms to 2n222 transitors ? Aug 08 01:38:19 *transistors Aug 08 01:39:00 lol Aug 08 01:43:18 Hello. About these apps that are always running, even after you killing them. Where can I find to tweak this behavior? I mean, theres a common place (like crontab), where this is set or it's particular on each app? Aug 08 01:44:13 * g00s senses another app killer is in the works :) Aug 08 01:44:19 lol Aug 08 01:47:02 DanDare: tweak MinFree settings Aug 08 01:47:36 g00s: as for why my current nick - OSXitis infected Arch and I decided to better jump shit Aug 08 01:47:39 *ship Aug 08 01:47:40 Cool, thanks p_l|repairing-os, will take a look in it Aug 08 01:48:00 p_l … a man of many nicks Aug 08 01:48:07 DanDare: MinFree tells the OS what are the points where it should kill some kind of application to free memory Aug 08 01:48:19 points being "how much free memory is left" Aug 08 01:48:24 p_l|repairing-os: but this is the year of linux on the desktop ! Aug 08 01:48:42 g00s: you don't make it by mucking around with FHS Aug 08 01:48:47 So instead of blocking apps to run automatically I must make a regular check on whats running and kill them ? Aug 08 01:49:05 p_l|repairing-os: so what to use now ? i bet you're going for slackware Aug 08 01:49:45 I'm at a loss. I get an error "Call requires API level 3 (current min is 1): android.media.SoundPool#load" every time I touch a file I wrote named SoundHandler. I've got uses-sdk:minSdkVersion="7" in my Manifest. This class hasn't had a problem until now (and I've got the app on my phone playing sound files to prove it). I'm completely stumped. Any ideas why eclipse is suddenly freaking out? Ubuntu 10.04, Ecl Aug 08 01:49:45 ipse Indigo. Aug 08 01:49:48 DanDare: depends what you're doing. MinFree parameter tells the OS that if you have X free memory left, remove an empty process (which would be a "cached" app) Aug 08 01:50:09 Understand Aug 08 01:50:12 didn't HTC tweak that behavior on the One X ? Aug 08 01:51:15 Im just new to Android. Android uses swap memory when RAM becomes full ? Sounds like not.... but I make no idea Aug 08 01:51:33 farkerhaiku: in the package tree on the left, what version does it say after android in this list? Aug 08 01:51:54 2.1 Aug 08 01:52:45 farkerhaiku: have you tried to clean the project? sometimes i get warnings from lint that just disappear when i do so Aug 08 01:53:25 DanDare: there's no swap in standard builds Aug 08 01:53:34 ok, thanks Aug 08 01:53:45 instead of swapping applications to disk, it kills them telling them to save state Aug 08 01:53:54 sounds smart Aug 08 01:53:56 so that they can be recovered to same point Aug 08 01:54:15 DanDare: with "normal" applications you don't have it as easy as with android ones :) Aug 08 01:55:15 hi all Aug 08 01:55:19 izibi: yeah, i've had problems with that before as well.. I refreshed in the package explorer and then did a clean and right clicked the project and cleared the lint markers Aug 08 01:56:10 izibi: still having the same problem. when i touch the java file, the class file becomes "broken" and refuses to deploy the app to either the emulator or my phone Aug 08 01:56:59 Im bit disappointed. I thought I had some kind of usable linux prompt in Android, but its totally different Aug 08 01:57:15 *would have Aug 08 01:57:45 experimenting with busybox already but its very limited Aug 08 01:57:50 i figured out the problem. i was trying to use a string for a dimen. Aug 08 01:58:07 I'm trying to do something quite simple, but cannot manage to do it... I've not developed much with Android, so please be patience. I have a simple app, that shows in a LinearLayout, a ScrollView with different fields inside (EditText, TextView and Spinners). When someone presses a button, I show some results. All I'm trying to do is move this into fragments Aug 08 01:58:07 DanDare: you can do some pretty weird stuff, but it requires time :) Aug 08 01:58:28 Yeah I know, its just a new thing to discover it all Aug 08 01:58:44 How can I add programatically to a Fragment different components? Aug 08 02:00:14 Most examples show a ListFragment with a list of text, but what I need is a scrollable list with different components inside - not all the lines in it are the same Aug 08 02:02:34 Can anyone help, been trying to solve this all night :( Aug 08 02:03:16 why does the theme i chose in the graphical layout editor not showing on my device? Aug 08 02:03:22 it's giving me the default theme Aug 08 02:06:03 izibi: I'm pretty sure it's an eclipse update I did earlier today via the android sdk manager, i did a git checkout of the last known working branch and it's still giving me the same problems. Pretty sure it's got to be the update causing the problems Aug 08 02:10:33 Hi, can anyone tell me what CF-root actually does/installs to the phone? Aug 08 02:33:26 hmm, vert.x looks pretty cool Aug 08 02:36:18 hmmm... anyone using SDK with 32bit jvm? **** ENDING LOGGING AT Wed Aug 08 02:59:58 2012