**** BEGIN LOGGING AT Thu Jan 16 02:59:59 2014 Jan 16 03:00:13 Hey all. Can someone help me remove ads from this app: https://www.dropbox.com/s/72oz9yvb7dxpomv/app_268728_283794.apk Jan 16 03:00:28 I'm pretty nooby and want to get rid of the annoying ad bar at the bottom :) Jan 16 03:00:37 no Jan 16 03:02:55 besides him ^ Jan 16 03:06:40 Or just give me info on how to do it.? Jan 16 03:07:47 just to be clear, you're in a channel full of developers, and you're asking how to rip off an app? Jan 16 03:08:53 Seems to be the situation... Jan 16 03:09:14 you don't see anything wrong with that? Jan 16 03:09:41 More or less Jan 16 03:09:47 The app is mine so Jan 16 03:10:00 I'm not trying to remove ads on my favorite app or anything ;) Jan 16 03:10:03 so remove the code then Jan 16 03:10:27 that's even dumber Jan 16 03:11:35 can you set your own message.what values? Jan 16 03:14:08 nvm Jan 16 03:14:50 is there a preferred method in android for bulk sqlite inserts? Jan 16 03:15:35 you can use a transaction Jan 16 03:15:53 I just meant in terms of efficiency Jan 16 03:16:01 rather than inserting row by row Jan 16 03:17:01 o Jan 16 03:17:03 BeginTransaction(); SetTransactionSuccessful(); EndTransaction(); Jan 16 03:17:09 i'd imagine there bulk insert method Jan 16 03:17:12 yeah, if you do that, it will be efficient Jan 16 03:17:19 http://developer.android.com/reference/android/content/ContentProvider.html#bulkInsert(android.net.Uri, android.content.ContentValues[]) Jan 16 03:17:30 ^^ Jan 16 03:17:54 "the default implementation will iterate over the values and call insert(Uri, ContentValues) on each of them" Jan 16 03:18:04 you definitely want a transaction though, itwill be much much faster Jan 16 03:18:15 Hey uh. Jan 16 03:18:20 Can I get me some advice? Jan 16 03:18:26 ok Jan 16 03:18:27 thanks Jan 16 03:18:47 wabz: how does making somethign a transacation makes it faster? Jan 16 03:19:08 I'm on the last stages of this app and I kinda need to take the filename I wrote an image to in one intent, and use that to attach the same file to an email in the other intent. Jan 16 03:19:24 I thought I had it down, but the app crashes with the new revisions. Jan 16 03:19:27 ruser: http://www.sqlite.org/faq.html#q19 Jan 16 03:20:45 Immaterial: stack trace Jan 16 03:21:03 I uh. I'm pretty new to this, what exactly do you mean by that. Jan 16 03:21:05 wabz: right. so really it's not the transaction that makes it faster, but an actually batching of inserts into one transaction Jan 16 03:21:20 yes of course Jan 16 03:21:50 wabz: right nobody want's huge transaction logs. gotcah. just the phrasing got me a bit off :) Jan 16 03:22:01 Basically I want to take this; Uri photoPath = Uri.fromFile(file); Jan 16 03:22:19 And it use it as the path for this; intent1.putExtra(Intent.EXTRA_STREAM, photoPath); Jan 16 03:22:33 But I'm not sure java is going to be happy with that. Jan 16 03:23:55 Immaterial: if your app 'crashes', it's going to dump a stack trace in logcat, so read it and see what it says Jan 16 03:24:17 Ah, even if it's running on a real device? Jan 16 03:24:22 of course Jan 16 03:24:36 ...I'll google where that file is then. Jan 16 03:24:49 you can view it in your IDE or 'adb logcat' Jan 16 03:27:28 bankai_ why does the transaction make it quicker? Jan 16 03:27:41 wouldn't it only make it quicker if there were concurrent queries? Jan 16 03:27:52 didn't wabz just explain that ? Jan 16 03:28:01 ok sorry Jan 16 03:28:06 I didn't see wabz link Jan 16 03:28:45 remember that sqlite is a pretty basic "engine" - really a structured flat file with an SQL front-end Jan 16 03:29:28 "By default, each INSERT statement is its own transaction. But if you surround multiple INSERT statements with BEGIN...COMMIT then all the inserts are grouped into a single transaction. " -- ah, makes sense. cheers wabz :) Jan 16 03:29:54 ir7466: it's nto the transacations that makes it faster. it's not having a transaction per insert, but rather one transaction containing all your inserts Jan 16 03:30:26 yeah, that makes sense Jan 16 03:39:09 FIXED IT. Jan 16 03:39:14 Ungh, yes, indeed. Jan 16 03:52:10 So is Robotium developed with Java or Dalvik? Jan 16 03:53:04 I figure the difference would be: Does it run in the device/emulator or on the development host? Jan 16 04:01:07 Does anyone here develop for Android using the NetBeans IDE? (See http://netbeans.org.) Jan 16 04:01:23 If so, which plugin, if any, do you use? Jan 16 04:02:52 no one uses netbeans Jan 16 04:03:06 and robotium runs on device Jan 16 04:03:40 OK. Thanks. Jan 16 04:04:30 wlp|tab: you against giving Android Studio, Eclipse, or Intelli-J a try? Jan 16 04:04:59 canvs2321: No, it's NB that I know. Jan 16 04:05:16 wlp|tab: but maybe go with what is current Jan 16 04:05:17 anyone used Sencha? Jan 16 04:05:35 I've never heard of Android Studio. Jan 16 04:06:11 wlp|tab: if you are a developer, the learning curve won't be that bad. Believe it's googles take on intelli-j builds, focused on android design Jan 16 04:07:42 i was a strictly eclipse dude, because that's how i started, i used it for years, but shit just got retarded. Too many bugs started building. So i had to try something else. Then came Android Studio&the Darkcula(sp?) theme. It's beautiful, and well worth fighting with the betas. I haven't updated it in awhile, but I like it's swag Jan 16 04:07:47 canvs2321: Thanks. Jan 16 04:09:39 I appear to have a bit of a learning curve ahead if I end up using Robotium. I've never developed for mobile devices. Java is as close to Dalvik as I've come. Jan 16 04:10:14 used Eclipse for years, not proud I took so long to switch to intellij Jan 16 04:10:30 android is basically java Jan 16 04:10:38 it's more Java than j2me Jan 16 04:10:40 With new classes. Jan 16 04:11:06 Only thing to focus on is, getting the IDE setup with the android sdk, learning how to add/import libraries, then just figuring out how to be efficent with hot keys. other than that, you'll learn the actual coding part by trial and error Jan 16 04:12:01 Well, I do have a reputation for picking up new languages quickly. ;) Jan 16 04:12:46 hotkeys are easy, just reconfigure them to how you like Jan 16 04:13:05 setting up ide with sdk is terribly easy as well Jan 16 04:13:26 well then the add/import libraries is last, then the coding is easy :) Jan 16 04:13:49 and pfn, this is your opinion, others may not find it so with a fresh IDE :) Jan 16 04:14:00 but they shouldn't be scared Jan 16 04:14:11 It's the different classes that concern me. Does Dalvik support classes like java.util.ArrayList? Jan 16 04:14:41 wlp|tab: trial and error, but yes there are ArrayList Jan 16 04:14:49 not sure if it's java.util.ArrayList Jan 16 04:15:02 canvs2321, even with a fresh ide, easy Jan 16 04:15:21 wlp|tab, everything in javase is in android Jan 16 04:15:22 pfn: but to make the change, and to keep a focus is hard. Jan 16 04:15:29 minus ui and some javax Jan 16 04:15:30 pfn: nio2? Jan 16 04:15:47 ruser, nio2 isn't in javase6 Jan 16 04:15:54 so,no Jan 16 04:15:56 Also, is there an IRC channel for Robotium? searchirc.com didn't turn up anything. Jan 16 04:15:56 oh my bad Jan 16 04:16:36 ideavim is so much better than viplugin Jan 16 04:16:36 Like me i want it all now now now, but the thought of having to learn everything now now now, is the off putting part. But everything is easy, if you have a focus, a list, a structure to the madness, that is simply programming Jan 16 04:16:44 probably the main reason I switched Jan 16 04:17:18 wlp|tab, no, bug their forums mailing list group issue tracker whatever Jan 16 04:17:36 Thanks. Jan 16 04:22:30 Hi does anybody know about lightweight libraries for cropping and rotation a mp4 video? Jan 16 04:22:38 on android of course lol Jan 16 04:38:50 Hey uh. Jan 16 04:38:55 How do you newline in java? Jan 16 04:39:21 newline? Jan 16 04:39:32 like /n? Jan 16 04:39:32 Or. Jan 16 04:39:53 It's just I'm inserting text into an email with an intent and I want the variables to all be on separate lines. Jan 16 04:41:00 Can my Android app be tested as part of the Selenium-based tester we have for the site? The Android app would just be a thick-client interface for the website. The existing tester creates a dozen users and provides inputs for all of them. I'm envisioning a modification of that where some users appear to be on mobile devices. Jan 16 04:41:38 Immaterial, it depends. \n might do it in a String, depending how the intent is unbundled Jan 16 04:41:47 Agh. Jan 16 04:42:04 So far this whole thing's been very frustrating. Jan 16 04:44:12 The existing Java program has a lot of analysis code to detect errors by the site's code. First, I don't want to duplicate that code. Second, I would like to keep the data tracking what is going on in one place. Jan 16 04:46:10 If anyone is good at parsing JSON, I'd appreciate it if you take a look at my question. Thanks: http://stackoverflow.com/questions/21153469/trying-to-parse-json-in-android-with-gson-keep-getting-a-crash Jan 16 04:53:00 Android 4+ now supports 77.4% of devices on the globe. Jan 16 04:53:52 What do you guys think about targeting only 4+ for all apps we develop from now on? Jan 16 04:55:08 And which version of Java/JDK is most compatible with Dalvik? I'm used to Java/JDK 7. Jan 16 04:55:09 Interesting fact is that Gingerbread is currently at 21.2% shrinking very slowly. Jan 16 05:14:24 is it possible to be using two SQLiteStatements concurrently? Jan 16 05:15:06 if I have a list of objects to be added to table X, some of those contain sub-objects which can be added to table Y. so I set up 2 SQLiteStatements at the beginning of the transaction .... or is this not possible? Jan 16 05:15:07 pfn, canvs2321: You guys still here? You may have missed what I asked in the past half hour. Jan 16 05:15:56 ir7466: i know you can do it with mysql5 not sure with SQLite Jan 16 05:15:57 Well, 35 minutes. Jan 16 05:17:50 is anyone familiar with the bouncycastle library? I was wondering if it is possible to have backwards compability with earlier android skds (min version 8) Jan 16 05:17:59 min version 8 Jan 16 05:46:23 I am setting a String and then logging it and the log gives me a nullPointer. Any help? http://stackoverflow.com/questions/21154129/set-a-string-in-android-log-the-string-null-pointer Jan 16 06:18:01 if I installed Eclipse through my package manager, any special stuff I need to do besides installing the ADT plugin? Jan 16 06:19:37 don't install it from a package manager Jan 16 06:19:46 why not? Jan 16 06:20:16 because it'll be old and weirdly packaged Jan 16 06:20:38 i'm on Arch Jan 16 06:20:47 should be brand-spanking new Jan 16 06:22:52 if I do use the Eclipse provided here http://developer.android.com/training/basics/firstapp/index.html ... what is the correct directory to put it in? /usr ? Jan 16 06:23:27 /opt? Jan 16 06:27:33 anywhere you want Jan 16 06:27:37 it doesn't matter Jan 16 06:27:51 in your home directory is probably best Jan 16 06:29:15 you have ~/Eclipse ? Jan 16 06:29:37 and ~/sdk Jan 16 06:30:59 pfn, ^^ Jan 16 06:53:00 I know it might be annoying, but I'm still looking for someone with a HTC One X+ ... Jan 16 06:53:41 lh^work: maybe worth looking in a device-specific forum on xda, or one of the user sites like androidcentral Jan 16 06:54:55 Leeds: Thx, I have a thread on XDA, but althoug it had 100 views or so, noone replied. Maybe non of them knows how to get a logcat :/ Jan 16 06:55:26 logcat for what? Jan 16 06:55:41 Funny enough that I depend on the community when doing stuff in that scale. But noone here would just buy that damn phone. getting new test devices is like a months long process Jan 16 06:56:02 canvs2321: a problem with out app, which only happens on that speciic device Jan 16 06:56:06 our* Jan 16 06:56:27 get your stacktraces Jan 16 06:56:38 it's not a crash ;) Jan 16 06:56:53 then elaborate, quit being so vague Jan 16 06:56:56 It's just a WebView staying white (webview is not the root of the problem though) Jan 16 06:57:08 well... Jan 16 06:57:37 basically I call an Intent for an Activity with a webview. it receives the actionbar title as extra and the Uri in the data Jan 16 06:57:53 And it works fine on every device but the One X+ Jan 16 06:58:30 One the X+ the webview stays white and the AB title stays to the default Jan 16 06:58:37 That's all I know Jan 16 06:59:09 find that person with the one x+&send them betas with debugging code Jan 16 07:00:01 if it works on ALL other devices, consider user error? Jan 16 07:00:36 maybe they just keep hammering taps til things change, even if it means an error screen Jan 16 07:00:46 I totally would, but I work in a huge company and the responsible guys are not fond of the idea to use our customers as testers -.- Jan 16 07:01:00 And no, not user error. There is no input, just a button to click Jan 16 07:01:54 It really sucks, but thanks for trying to help! Jan 16 07:02:20 lh^work: what's the deal? Jan 16 07:02:50 thepoosh: An Intent thats not working on a specific device (HTC One X+) Jan 16 07:02:56 just a simple activity start Jan 16 07:03:04 how do you mean? Jan 16 07:03:10 please add some details Jan 16 07:03:18 I have a One X and never had this Jan 16 07:03:26 It doesn't happen on the X Jan 16 07:03:29 only the X+ Jan 16 07:03:39 basically I call an Intent for an Activity with a webview. it receives the actionbar title as extra and the Uri in the data Jan 16 07:03:43 what Intent is not working? Jan 16 07:03:51 ok Jan 16 07:03:54 but the webview stays white and the AB title default Jan 16 07:03:57 show code Jan 16 07:04:02 so i suppose the intent is empty Jan 16 07:04:06 one sec Jan 16 07:04:07 lh^work: did you debug the onCreate? Jan 16 07:04:21 thepoosh: that's the problem. I can't debug without the device ;) Jan 16 07:04:40 you don't have it? Jan 16 07:05:27 No, I got 7 reviews from customers describing the same problem Jan 16 07:05:33 lh^work: try running this - http://stackoverflow.com/a/15074150/1056359 Jan 16 07:05:37 in your code Jan 16 07:05:46 ask them to run this and send yourself the logs Jan 16 07:06:47 Thanks, but first I need to convince the people around here to use customers as testers... They don't like the idea :/ Jan 16 07:06:52 That'S why it sucks :D Jan 16 07:07:34 lh^work: tell your boss that device manufacturers sometimes override Android and do things differently and this might cause issues Jan 16 07:07:39 then tell them to get that device so u can test Jan 16 07:07:48 so they can either buy you the device or let you talk to the users Jan 16 07:08:54 Yep, I'll try that again. I was just hoping to find anyone around here with the device. But it seems to be really rare Jan 16 07:09:14 I have 2 HTC devices but they're One X Jan 16 07:09:36 lh^work: you can try globals Jan 16 07:09:55 [A3G1S]: DUDE!!! Jan 16 07:10:30 Hm, globals? Jan 16 07:15:49 lh^work: application level public static variables Jan 16 07:16:21 Okay, but how would they help? Jan 16 07:24:11 lh^work: if instead of send the info in the Intent, you keep them in the application level you can pass information that way Jan 16 07:25:50 by the way, this is the code in question, where the Intent gets sent: http://pastebin.com/evPMLTT7 Jan 16 07:26:53 thepoosh: Thx, I'll haver to look into that as the app strcuture is not so easy. (Which I'd like to change, but that's highly unlikely to do company politics) Jan 16 08:16:56 Hey guys? Jan 16 08:17:01 http://inphamousdevelopment.wordpress.com/2010/10/11/using-a-viewswitcher-in-your-android-xml-layouts/ Jan 16 08:17:17 With this thing, it....seems a hell of a lot like he didn't define startScan(); Jan 16 08:20:02 is github.com down for anyone… or just me? Jan 16 08:20:48 cd Jan 16 08:20:54 sry Jan 16 08:21:26 eghdk: website is up Jan 16 08:23:25 eghdk, http://www.downforeveryoneorjustme.com/ Jan 16 08:23:45 ;) Jan 16 08:29:33 hi, i am trying to build aosp, and could able to build successfully. After than i have added a new app, into AOSP, and trying to build. for the build i use the command 'm', and it compiles everything all the time? how can i make sure if that builds only the new application? Jan 16 08:31:03 could someone kindly help me ? Jan 16 08:32:07 wrong channel Jan 16 08:33:31 lemonxah, thanks, which channel then to ask ? Jan 16 08:34:07 read the topic .. #android-root Jan 16 08:37:29 Thanks lemonxah ;) Jan 16 08:37:36 no worries Jan 16 08:42:59 Took http://alpha.androidbootstrap.com/ for a spin. The default "./gradlew" file is a Windows bat file, nearly identical to "./gradlew.bat" (sans one byte or so). The maven build instructions do not work either. Not very impressive for something that is supposed to be plug and pray. Jan 16 08:44:12 I'm not the only one apparently; https://github.com/donnfelker/android-bootstrap-site/issues/21 . 14 days, and bug still not fixed. Oh well... Jan 16 08:52:26 kjeldahl you wanted to use parse.com? Jan 16 08:53:42 Hi all, If you put a parcelable customObject into a bundle for a fragment, does the fragment receive a reference to the object? Jan 16 08:54:08 g00s: No, I do not think so. Should I? ;-) Jan 16 08:54:42 kjeldahl oh, that project looked like a template for a project with parse backend :) Jan 16 08:56:00 g00s: To be honest, I was looking for something usable to use as a test case for ready to run Kawa based Android apps. It's something that is pretty low on my todolist, but still.. ;-) Jan 16 08:58:15 ugh, fuck amazon kindle fire Jan 16 08:59:16 hello, how to change pointer arrow size in android ics? Jan 16 09:03:40 ugh, hacker news down again :| Jan 16 09:08:35 that's your mistake Jan 16 09:20:23 Okay, that's it. Jan 16 09:20:30 What the hell's up with viewswitcher? Jan 16 09:21:01 you're going to have to be a little more specific Jan 16 09:21:15 I've tried like three different implementations and I can't get it to change the view. Jan 16 09:22:09 thats nice, seems no trolls are around tonight ;) Jan 16 09:23:00 setChild.. ? Jan 16 09:23:15 I tried setting it. Jan 16 09:23:23 Both zero and one on both, no dice. Jan 16 09:23:47 You mean switcher.setDisplayedChild(0);, correct? Jan 16 09:24:29 any stable 4.4 roms out there for an i19300? Jan 16 09:24:44 should I buy a chromebook? Jan 16 09:24:49 cyanogenmod has been freezing/rebooting every 30 minutes the past 10 nightlies Jan 16 09:25:02 lite_: read channel topic, please Jan 16 09:26:07 oh dear. thought i was in android-root - sorry Jan 16 09:29:13 hello all, can u help me? Jan 16 09:31:31 Leeds now imagine something like this, but only … bacon http://imgur.com/D7EjGAP Jan 16 09:31:46 Apiq404: with anything in particular? Jan 16 09:32:12 g00s: I think that would suit me *just fine* with NO BACON Jan 16 09:32:44 If you have FragmentA, then add FragmentB, pushing the back button, which lifecycle event will be triggered in FragmentA? Jan 16 09:33:10 hello Jan 16 09:34:21 how can I bring the previous ACTIVITY in the current TASK to the foreground? Jan 16 09:34:53 I know I can bring a specific activity if I know it's class, as exemplified here - http://stackoverflow.com/questions/10435678/hide-activity-in-android Jan 16 09:35:30 but I want the previous task, whatever its class may be (may even be from another app) Jan 16 09:37:08 hi, i want to modify motion events on the fly for a web view to simulate mousedown/mouseup. i do not need long press events at all. i've set a custom onTouchListener like this http://pastebin.com/b6mK12hy - but i have no idea how the event needs to be created in order to be correctly interpreted by the view. Jan 16 09:37:19 I want to make games, I constrained on how to make the event such as shaving, please folow my picture: http://imgur.com/r055ttN Jan 16 09:37:20 can anybody point me the right direction please? Jan 16 09:38:19 So if I have a task with activities "A,B,C,Z", where Z has launchMode="singleTask", I will capture the back button and I want to go back to activity C so I now should have "A,B,C" Jan 16 09:38:38 but the problem is this KILLS activity Z which I don't want Jan 16 09:39:08 to clarify, if I do "activity.onBackPressed()" it KILLS activity Z Jan 16 09:39:23 Apiq404: er... shaving? Jan 16 09:39:50 if I do "activity.moveTaskToBack(true);" it doesn't kill Z, but it takes me to the desktop, hiding the whole task which is not what I want either Jan 16 09:40:32 is there any way to go back to C, or hide activity Z without killing it (it's set as singleTop so it should always remain alive) Jan 16 09:42:47 @leeds.. yes, you can do it? Jan 16 09:42:57 yes, I can shave... wtf? Jan 16 09:43:29 ah... the word you're looking for is shearing Jan 16 09:43:36 how can you add a right-pointing double angle quotation mark to a string? Jan 16 09:43:49 + "»" doesn't work Jan 16 09:53:21 shearing is for sheep Jan 16 09:53:39 g00s: see Apiq404's screenshot :) Jan 16 09:54:55 g00s please folow my capture http://imgur.com/UCEMLfc Jan 16 09:55:25 aww cute ;) Jan 16 09:56:30 anyone? :| Jan 16 09:57:20 i don't understand logic this game.. please help me.. maybe you have a source of tutorial I can learn. Jan 16 10:00:58 is there any way to hide an activity without killing it? Jan 16 10:01:48 what do you mean with hide? Jan 16 10:02:10 FrancescoV: try "\u00BB" Jan 16 10:02:15 activities are hidden when u open another one. Jan 16 10:03:03 danijoo: I mean I want the activity to retain its current state Jan 16 10:03:10 shmooz, tnx but looks like it works now, i tried your suggestion but I got a special "a", it was something weird but tnx anyway Jan 16 10:03:26 Hey, how can i do this: R.layout.fragment_ + ARG_SECTION_NUMBER ? Jan 16 10:03:52 i want to create fragment_1.xml, fragment_2.xml en fragment_3.xml Jan 16 10:04:24 and use them via the line i just asked about Jan 16 10:04:33 Dude321: you can store all your stuff in a bundle at onSaveInstanceState(Bundle b) by overriding it Jan 16 10:04:46 if the activiy is recreated, this data is passed to onCreate Jan 16 10:04:46 danijoo: so if user opens my GALLERY activity, then opens image "img1.jpg" for editing in an EDITOR activity, I want him to be able to go back to the GALLERY without losing the editing he's done to the image Jan 16 10:05:07 Dude321: this should be handled by android itself. Jan 16 10:05:16 as long as you didnt call finish() on the galery Jan 16 10:06:14 danijoo: "this should be handled by android itself." - do you mean that android should not be killing te EDITING activity and I'm doing something wrong, like calling finish() manually? Jan 16 10:06:24 yes Jan 16 10:06:42 it only kills the old activity if you told it to do so, or if u run into memor problems.. Jan 16 10:06:57 or have some weird settings in your manifest Jan 16 10:09:14 danijoo: this is the activity xml: http://pastebin.com/vkyPeVt2 Jan 16 10:10:04 anyone? Jan 16 10:12:24 im not sure but try it without launchMode="singleTask" Jan 16 10:13:12 ISDP: ?? Jan 16 10:13:40 i want to create fragment_1.xml, fragment_2.xml en fragment_3.xml and then use something like this: R.layout.fragment_ + ARG_SECTION_NUMBER, ARG_SECTION NUMBER is a int that counts from 1 to 3 Jan 16 10:13:56 danijoo: it still kills it after removing android:launchMode="singleTask" Jan 16 10:13:58 how do i that? Jan 16 10:14:04 ISDP: getResources().getIdentifier() to get the id from the file name Jan 16 10:14:04 Reflection? Jan 16 10:14:23 Ah, ok. Jan 16 10:14:23 danijoo, example? Jan 16 10:16:20 getResources().getIdentifier(String filename, String type, String package) - so in ur case it would be something like getIdentifier("fragment_1", "layout", getPackageName()) Jan 16 10:16:31 because View rootView = inflater.inflate(R.layout.fragment_ + ARG_SECTION_NUMBER, Jan 16 10:16:31 container, false); doesn't work Jan 16 10:17:49 View rootView = inflater.inflate( getResources().getIdentifier("fragment_1", "layout", getPackageName()), container, false) Jan 16 10:18:28 but that only gets fragment_1 Jan 16 10:18:31 then i dont know Dude321, im not so familiar with all those maiefst keywords. Jan 16 10:18:40 its a string. you can modify it. Jan 16 10:18:43 ahhh Jan 16 10:18:57 put whatever you want for "fragment_1" Jan 16 10:19:03 so "fragment_" + ARG_SECTION_NUMBER would work? Jan 16 10:19:08 yep Jan 16 10:19:13 niiice =D Jan 16 10:19:14 ISDP: mybe you must add event condition (if ARG_SECTION_NUMBER = 1) { rootView = inflater.inflate(R.layout.fragment_1) } Jan 16 10:19:42 Yeah Apiq404, thats a lot better style. Jan 16 10:19:50 Apiq404, how about a switch/case? Jan 16 10:20:36 works, too ISDP Jan 16 10:20:47 what is more efficient, though? Jan 16 10:22:03 theres no point in efficiency.. both are somewhere near instant. But if you only have 3 frags, i would do an if/else or switch statement Jan 16 10:25:44 in my code, I connected the hardware menu button to a PopupMenu, for some reason, if I long click the menu button, the menu opens onKeyDown and closes onKeyUp. is there a normal way to prevent the menu from closing when the user triggers the onKeyUp? Jan 16 10:27:00 how can you detect if a fragment's back on top (after adding another fragment , followed by backbutton pressed) Jan 16 10:28:29 FrancescoV: Fragment.isVisible() Jan 16 10:29:30 thepoosh, I need a listener for that, to get an event like (isBackVisibleEventListener) Jan 16 10:29:56 you can do that with an interface and in the fragment's onResume Jan 16 10:43:07 :) Jan 16 10:48:52 danijoo, you still here? Jan 16 10:58:28 Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted Home.java /TriangleRecycling/src/nl/deadpixel/trianglerecycling line 109 Java Problem Jan 16 10:58:41 i get this error after trying to use switch/case Jan 16 11:10:04 anyone? Jan 16 11:11:48 apparently switching on string types isn't supported, now i guess i have to convert the string to int? Jan 16 11:12:52 it is supported Jan 16 11:13:15 you just have to follow the directions in the gradle docs Jan 16 11:13:46 gradle? Jan 16 11:14:05 http://stackoverflow.com/questions/17637179/how-to-set-source-1-7-in-android-studio-and-gradle Jan 16 11:14:24 If you're using eclipse then *shrug* i'm afraid Jan 16 11:14:51 see the end of http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Using-sourceCompatibility-1.7 Jan 16 11:16:00 1.8 plz Jan 16 11:17:17 g00s, so... i'm using eclipse, why would i use Android Studio? Jan 16 11:17:25 which one of the two is better? Jan 16 11:17:39 ISDP oh, i dont know how to change it in eclipse Jan 16 11:18:00 doesn't matter, which IDE is better? Jan 16 11:18:12 hmm Jan 16 11:18:22 i like both Jan 16 11:18:29 does code hinting work better in AS? Jan 16 11:18:30 no one likes eclipse Jan 16 11:18:41 but i'm using gradle so … AS it is Jan 16 11:18:56 yeah, completion is better in AS Jan 16 11:19:36 what's so special about gradle? Jan 16 11:19:50 please convince me why i should use AS :> Jan 16 11:19:56 its a far superior building system than ant Jan 16 11:20:16 it has dependancy injection, build flavours, pre build scripting abilities Jan 16 11:20:19 storkme java 8 will be the most interesting java since 8. and i think, a lot of devs are going to want java 8. but google has a big problem Jan 16 11:20:26 since 5 Jan 16 11:20:27 its more stable than ant (i've found) Jan 16 11:20:40 more stable than ant? Jan 16 11:20:45 i've found anyway Jan 16 11:20:52 ant used to crash for me all the time Jan 16 11:21:34 storkme also, not just language features, but a lot of apis are changing Jan 16 11:22:02 yeah, it's going to be a mess. Unsure if Google will ever pick up on it. Jan 16 11:22:09 but I want it very very badly. Jan 16 11:22:14 i bet Larry said, make it though for android - let their fragmentation work against them Jan 16 11:22:20 *tough Jan 16 11:23:56 how easy is it to convert from ECL to AS? Jan 16 11:24:15 because i think i might try the new way, since i'm relearning anyways Jan 16 11:24:32 if it's good enough or better than eclipse then yes please Jan 16 11:24:40 ISDP: you just import from AS Jan 16 11:27:01 who in here thinks AS is better? Jan 16 11:27:11 * JuiceSSH raises his hand Jan 16 11:27:13 ISDP, use an else/if instead, it switch does not work Jan 16 11:27:15 and who in here thinks that ECL is the way to go? Jan 16 11:27:24 ISDP: I wouldn't skip learning Eclipse Jan 16 11:27:26 danijoo, good idea. Jan 16 11:27:29 use the one you prefer Jan 16 11:27:39 i've always used eclipse Jan 16 11:27:56 but i would love better hinting and no more xml code view glitches Jan 16 11:28:01 asking ppl which IDE, OS etc they prefer always results in wars and shitstorms Jan 16 11:28:06 you can run them both Jan 16 11:28:41 danijoo, if people go head to head yes, but i just want a constructive objective comparison Jan 16 11:29:26 i never used AS, but i tried intellij and ran into some problems with that which is why i switched back to eclipse Jan 16 11:29:52 and because AS is some kind of intellij.. i wont try it ;) Jan 16 11:30:08 what's intellij? Jan 16 11:30:33 the IDE that AndroidStudio is based on Jan 16 11:31:27 but dont ask me what kind of problems. I dont remember anymore Jan 16 11:33:15 my computer's ram has thanked me for switching to AS Jan 16 11:33:18 heh, okay, i think i'll stick to eclipse for now Jan 16 11:33:32 i have 4GB but a rather slow HDD Jan 16 11:33:40 4GB ram * Jan 16 11:33:42 AndroidStudio has got a lot better in the last few months at detecting problems and showing messages that include a "Auto-fix this problem" Jan 16 11:33:51 i have 16gb and an SSD and eclipse is still slow for me Jan 16 11:33:55 heh, that does sound nice though Jan 16 11:34:08 Yeah, I spent ~6months developing on a 2GB macbook air which crawled with eclipse Jan 16 11:34:15 sorry, i lie, 8gb ram Jan 16 11:34:23 I hate the git implementation of intellij derivatives though Jan 16 11:34:24 AS was lightning quick in comparison Jan 16 11:34:45 (although this might had improved too) Jan 16 11:34:50 i dislike the git implementation in AS, although I do like the file highlighting in the project tab Jan 16 11:34:55 Can't say i've used much of the git bits, i either use cli for git, or SourceTree if things get really hairy :) Jan 16 11:35:28 brb Jan 16 11:35:41 gotta walk the dogs Jan 16 11:44:43 AS builds are much slower than ADT Jan 16 11:45:04 also, like right now - i went to go launch my project on a device, and the build blew up Jan 16 11:45:11 simple problem with the xml file Jan 16 11:45:20 but, AS and gradle are often not on the same page Jan 16 11:45:50 in eclipse, i would have seen a red X on my messed up xml file Jan 16 11:46:03 but AS thought everything was fine Jan 16 11:46:24 i think if you really like Intellij, AS is for you Jan 16 11:46:34 if gradle worked well in eclipse, i would use that Jan 16 11:51:30 i'm really suck at trying to override touch event handlers to ignore double tap and long tab, but fire touchstart event immediately when screen is "pressed" to a web view and touchend when all fingers are "released". Jan 16 11:52:44 the default behavior seem to react on MotionEvent.ACTION_UP and MotionEvent.ACTION_CANCEL, and then fires both touchstart and touchend at once Jan 16 11:53:30 what i need is behavior known from mousedown/mouseup in ordinary desktop browsers Jan 16 11:55:29 i meant stuck, not suck Jan 16 11:57:14 is this really such a rare issue or the question too dump for beeing commented? i'm quite new to android development and would be glad if someone points me the right direction Jan 16 12:23:15 aaaaaaaaaaaaaand i'm back Jan 16 12:32:53 g00s, do you know a better way than the integrated eclipse GUI Builder? Jan 16 12:34:39 or anyone else for that matter? Jan 16 12:41:12 ISDP: dont know your specific issues but try android studio.. its superior to eclipse anyways Jan 16 12:41:23 especially the gui-builder imo Jan 16 12:41:38 just a dedicated tool for gui'ing Jan 16 12:42:18 yep... try the one that comes with android studio.. its better than the one for eclipse... and I doubt that there are others around that are as good as or even better than the both Jan 16 12:42:29 except for a text editor to manipulate the xml directly of course Jan 16 12:42:58 let's see how it holds up :) Jan 16 12:43:02 downloading now Jan 16 12:43:13 i hate designing the UI in eclipse Jan 16 12:43:22 especially on the resolution my laptop runs on. Jan 16 12:43:29 you should not use android studio solely for its ui-functionality Jan 16 12:43:36 you gotta decide which IDE you use at the end.. Jan 16 12:43:37 imo Jan 16 12:44:15 you dont need to switch to gradle just yet, but you should someday and you can't create new projects with android studio without using gradle, so keep that in mind Jan 16 12:44:34 ISDP, you'll have to write XML manually for any decent UI work anyway Jan 16 12:44:47 yes Jan 16 12:45:29 Mavrik: but it helps to see what you wrote manually immediately and android studios layout-xml-editor is quite good at that Jan 16 12:45:37 mhm Jan 16 12:45:42 hopefully on topic - When navigating to an android or java sdk source file in eclipse how do I know which one eclipse has opened? Since its read only I cant see how to determine its file path properties. I ask because I want to be sure its the correct source - I have various jdks installed on my debian machine. Jan 16 12:46:42 rgr: your project is parsed and compiled kinda constantly.. so if everything else is correct, eclipse will show you the exact source of the class you are using in your code (provided the source is available on your system) Jan 16 12:46:42 ohcibi, how good is AS on linux? Jan 16 12:47:55 i dont use AS, i just use intellij idea community. and its freeking awesome in linux Jan 16 12:48:03 ISDP: except for some window-manager-issues I tend to have with all java-programs there shouldnt be any differences.. if you use xfce/gnome/thelike there shouldnt be wm-problems as well... I read that the linux version of idea recently got support for full screen (which windows and os x already had) but in terms of functionality there should be anything remarkable (but I dont know it) Jan 16 12:48:20 ohcibi: yes, but I want to be sure. Is there no way to query the class file properties? (its also a learn by doing process too btw). Jan 16 12:48:29 ISDP: and I can second the "freeking awesome" comment... I'll never look back to eclipse, I promise Jan 16 12:48:50 rgr: *off-topic* you cant be sure if you are using ecilpse Jan 16 12:48:52 8-)) Jan 16 12:48:54 eclipse is a freeking abortion Jan 16 12:49:27 you cannot turn of folding in eclipse. except for "current file this time" Jan 16 12:49:40 rgr: seriously: I dont know.. you should notice that something is wrong when eclipse won't compile anymore.. I meant that if you can run your program with eclipse, it has the correct sources bound (i.e. that would be my "test" for the binding) Jan 16 12:49:53 no way in eclipse to turn folding off globally FOR EVER. Jan 16 12:49:53 well, i'm looking to reinstall my laptop, after i've reinstalled my desktop, i'll rip one of my SSD's from the raid array, and just use one SSD in each system. Jan 16 12:49:56 And on the subject : google shows a host of conflicting ways to the android sdk source. The easiest seems to be the adt plugin but that only seems to download down to API 14. Is there a more comprehensive way of installing the correct SDK sources into the anroid sdk directories sdk/sources that includes all APIs down to 2.3 or so? Jan 16 12:50:02 ohcibi: thanks , point taken. Jan 16 12:50:47 rgr: what do you mean with conflicting ways? you mean AS has problems with api14 or something like that? Jan 16 12:51:02 because I cannot spot any differences in the handling of ADK of both eclipse and AS Jan 16 12:51:31 ADK is indepent from both IDEs, so I have the very same APIs in both IDEs available Jan 16 12:52:02 just google "attaching android source" - some recommend using git. The "proper way" seems to the adt sources plugin *but* it only downloads the source down to API level 14. This in itself isnt "oh so terrible" but I really would like the sources down to 2.3. Jan 16 12:52:25 (or it could be I've got myself all confused ;)) Jan 16 12:52:28 rgr: now I'm getting which topic you are talking about Jan 16 12:52:47 rgr: I confused you with ISDP Jan 16 12:52:54 no worries. Jan 16 12:53:10 btw. I have no sources attached Jan 16 12:53:20 I have a jd (java decompiler) plugin for AS Jan 16 12:53:30 I can open whatever (nonscrambled) class and it will decompile it for me Jan 16 12:53:37 just the line-numbers arent that exact anymore Jan 16 12:53:41 downloading jdk 7u51 Jan 16 12:54:33 I'm a seasoned programmer but a beginner Android programmer and most of the tutorials etc seem to be for eclipse and being an emacs user I certainly dont want to get into a pissing competition of the IDE ;) In fairness to eclipse I've got accustomed to its bloated humongousness... ;) Jan 16 12:55:24 Also don't forget that the source is likely modified for different devices Jan 16 12:55:30 In different ways Jan 16 12:55:40 So it's not going to be perfect line/line matching Jan 16 12:56:25 irrelevant to the Q in hand which is the android sdk pure and purely for class and member/attribute browsing and line numbers dont come into it so far. Jan 16 12:56:42 thanks for your help. I'll google some more. Jan 16 13:03:47 hello Jan 16 13:05:30 JakeWharton, just a question you have already heard, im sure. How can i change the background of the theme if i use @style/Them.Sherlock ? or if someone else knows how to help me, then please help me :) Jan 16 13:06:50 so i just imported my gradle project Jan 16 13:07:05 to C:\workspace_gradle\ Jan 16 13:07:16 does it add my app name after the slash? Jan 16 13:12:33 qualche italiano? Jan 16 13:16:56 No Jan 16 13:17:02 :( sorry Jan 16 13:41:23 nm got it working :D Jan 16 13:45:05 Hi, hope someone can help me. I'm trying to add a fragment to a LinearLayout use a FragmentTransaction. However the fragment I'm trying to always ends up in the parent fragment that's currenly active on screen, instead of the one I'm trying to add it to. Any suggestions? Jan 16 13:53:47 you are still in bootloader? Jan 16 13:53:52 WesleyL: Jan 16 13:55:14 danijoo? Jan 16 13:55:42 yes? Jan 16 13:56:21 your question about the bootloader was directed at me? Jan 16 13:56:30 yep Jan 16 13:57:02 euhm, I'm just debugging a application on my device. not sure what that has to do with the bootloader Jan 16 13:57:32 well, just ignore it Jan 16 13:57:40 wrong window Jan 16 13:57:48 ^^ Jan 16 13:57:51 hehe Jan 16 13:57:59 any chance you can help me out tho? ;) Jan 16 13:57:59 red a question in another chan and somehow got your name into it :D Jan 16 13:58:33 maybe.. can u show us the code? http://pastebin.com/ Jan 16 13:59:06 http://pastebin.com/aYsdtEXY Jan 16 13:59:30 problem is around line 258 where I'm trying to add the fragment Jan 16 14:02:56 Morning Jan 16 14:05:25 no ideas danijoo? ;) Jan 16 14:05:38 still digging into your code ;) Jan 16 14:05:56 :) Jan 16 14:06:16 I'm just starting out with android app deving, so it might be messy Jan 16 14:06:59 can you show me the XML from this? Jan 16 14:07:14 cant find anything wrong in the java code Jan 16 14:07:34 as long as R.id.dayContent is the layout you want to add the fragment to Jan 16 14:08:46 it is, though there are several of those Jan 16 14:08:51 hmmhmm Jan 16 14:09:03 every fragment inside the FragmentStatePagerAdapter has a dayContent Jan 16 14:09:09 anyone figured a way how to inflate XML layouts from files? Jan 16 14:09:28 I'm trying to add the eventfragment to whatever dayfragment I'm in Jan 16 14:09:42 and its been added to the viewpager instead, or what? Jan 16 14:09:46 but apparantly that ID always points to the dayContent currently on screen Jan 16 14:09:57 ah mh. Jan 16 14:09:58 wait Jan 16 14:11:10 i didnt even knew that its now possible to have fragments in fragments lol Jan 16 14:12:28 hehe, seems its possible, only not the way i want it to work ;) Jan 16 14:12:50 if there's another way to do this please tell me, no idea if my way is even near being correct Jan 16 14:12:54 i have no idea. sorry. seems like its because there are multiple fragments all with the same id for their view Jan 16 14:13:07 and then it automatically selects the one that is in front Jan 16 14:13:55 Add tags I think Jan 16 14:14:04 Sorry I can't be more help, have a killer migraine Jan 16 14:14:52 tags can only be added to fragments i think, i'm trying to get a piece of layout within that fragment Jan 16 14:14:56 how would you guys do this? Jan 16 14:15:21 Do the findviewbyid on the fragments root view Jan 16 14:16:01 fragment.getView().findViewById() that willow ignore the hierarchy above that fragment Jan 16 14:16:01 problem is that for multiple fragment instances, the ID is the same Jan 16 14:16:28 and u can add fragments only by int ID, not by View v Jan 16 14:16:29 You have the same fragment nested in itself? Jan 16 14:17:01 there's several DayFragments inside a pager, those days have events in them Jan 16 14:17:04 if i understood him right, he has a viewpager with multple fragments "day" Jan 16 14:17:13 everyone has a layout with an ID Jan 16 14:17:30 if he now wants to add a fragment inside of the day fragment to that id, its not in the correct fragment Jan 16 14:17:54 but always in the frag thats currently showed by the pager Jan 16 14:18:23 because the transaction.add() method wants the ID, which is the same for every fragment Jan 16 14:19:00 (i would recommend to not use fragments in fragments, btw :p ) Jan 16 14:19:26 what would you recommend then? Jan 16 14:21:39 i dont know. Depends on your design :p looks like you have something like a calendar with days, and each day has events Jan 16 14:22:18 yes its sorta like a calendar Jan 16 14:22:31 maybe rethink the design of the activity Jan 16 14:22:43 you could move the event from the fragment to the activity Jan 16 14:22:52 so you have a viewpager at the top Jan 16 14:22:59 and a layout for the event below it Jan 16 14:23:04 sth like that Jan 16 14:23:18 theres no easy way to force an aspect ratio for a view right? Jan 16 14:24:41 hm, not sure what you mean danijoo, the events would sort of float on top of the days then? Jan 16 14:25:25 no. i mean at the moment you have a fragment, and inside that you have another fragment Jan 16 14:25:49 make it so you have two fragments in one activity insead. one is showing the day, one is showing the event Jan 16 14:26:09 and if you switch day in the viewpager, it automatically triggers the second fragment to switch, too Jan 16 14:28:06 hm okay, thanks, not sure how I'll make that happen, but I'll give it a try Jan 16 14:31:00 Bleh, converting my code to use fragments is going to be a pain. Is that a sign of bad code design? lol Jan 16 14:31:33 maybe a sign of "dont touch a running system" :p Jan 16 14:32:17 Afternoon people! i'm a bit stuck, is there anyone that could give me a hand? Jan 16 14:32:42 DougieT: just ask your question. if anyone can help, they will Jan 16 14:32:52 danijoo lol! but I think I really need to do it before adding the navigation drawer and optimizing for tablet, but it's just a gut feeling Jan 16 14:33:05 DougieT good afternoon! (wait, where are you at?) Jan 16 14:33:25 theblang: i know that feel. went through it for a while, too Jan 16 14:33:41 Theblang :The lovely UK Jan 16 14:35:45 okiday here we go! My company has 4 apps on the play store, they were added by one of our employee's who has since been a very naughty person and been booted from the company and is currently serving time, my problem is he put the apps on his personal googlemail account, and i want to get them removed and added back under the company gmail account, but all the people i've tried to ring have kinda bounced me around. I've got the Jan 16 14:36:37 and the employee does not want to cooperate? Jan 16 14:36:38 process of getting my new account as a developer, but i'm just wondering if anyone knows who i would be best to contact/which form? it's not quite a leagal issue just it's to stop messing my customers around Jan 16 14:36:57 Anyone here have any experience with actionbarsherlock? Jan 16 14:37:03 Im having a really strange issue here Jan 16 14:37:18 I can load it as a library for my project Jan 16 14:37:19 nahh, he left in a huff because he was caught messing us over. changed his passwords, locked his macbook etc. Jan 16 14:37:30 oh oh. Jan 16 14:37:34 Ouch. Jan 16 14:37:39 but I only get a error in my manifest, saying theme' with value '@android:style/Theme.Sherlock' Jan 16 14:37:42 he's in the nick now for 20months Jan 16 14:37:45 Hi all, if you put a parcelable (custom object) in a bundle to a Fragment, when is it (not) a refference to that object? or is it always a refference? Jan 16 14:37:51 but it works well for the demos Jan 16 14:38:07 so I know I am referencing the library correctly Jan 16 14:38:14 gulli: the sherlock theme isnt part of android, but of your library Jan 16 14:38:23 remove the android part. Jan 16 14:38:23 I know Jan 16 14:38:32 lol Jan 16 14:38:33 omg Jan 16 14:38:41 its only 'style/Theme.Sherlock' Jan 16 14:39:02 Kill me now please Jan 16 14:39:05 :) Jan 16 14:39:09 I've been spending at least 3-4 hours on this Jan 16 14:39:09 gulli lol Jan 16 14:39:12 thanks man :D Jan 16 14:39:21 you are welcome Jan 16 14:39:23 DougieT, did he pay for the android dev license himself or was it your company that paid for it and he linked it to his gmail? Jan 16 14:40:07 i think he paid for it himself and got reimbursed from us. Jan 16 14:40:12 I would imagine it'd be a little easier to get changed if your company card paid for the license Jan 16 14:40:21 man, that could be a pain... hmmm Jan 16 14:40:26 DougieT: Short of radically changing your appearance, getting yourself sent down on a small-time crime, earning the trust of said ex employee, waiting for him to brag about the situation and then tricking him into giving you the play store account/signing keys from him... I'm not sure I fancy your chances of sorting it with google directly. Jan 16 14:40:54 if you are unlucky, you have to move to the court with this :/ Jan 16 14:41:28 ^, if you have a receipt for the reimbursment you may be able to use that in an email Jan 16 14:41:35 but that'd be about it Jan 16 14:41:48 yeah, you mentioned he is serving time. for what he did to the company? Jan 16 14:41:53 i was just looking for a kind of nuke option for this, report the app as infringing copyright and stating us as copyright owner ask them to pull the app Jan 16 14:42:15 he stole products, a lot of prodcuts Jan 16 14:42:21 £100k + Jan 16 14:42:58 eah but i think google wont handle this without a court decicion though Jan 16 14:43:27 mehhhhhh! Jan 16 14:44:10 any advice on an email address to contact to get the ball rolling? Jan 16 14:44:16 that sounds... horrid Jan 16 14:44:53 also a lesson not to have that sort of thing in the hands of a single employee, but still... horrid Jan 16 14:45:51 I'm using android studio, why is it that I can import com.google.android.gms.ads.* but I can't declare an AdView? It says it cannot resolve the symbol. Jan 16 14:45:56 yeah, well unfortunately it was one of those things, we thought we could trust him. guess we were wrong :( Jan 16 14:47:22 DougieT yeah, I hate that man :( . let us know what happens if you contact Google! Jan 16 14:48:17 will do! Jan 16 14:49:13 I started to load a wikipedia dump into a local mariadb last night, I am thinking it is going to take ~4 days Jan 16 14:49:37 Does anybody know? Jan 16 14:49:40 oO Jan 16 14:49:46 jonc: how many space? ^^ Jan 16 14:49:59 the xml file uncompressed is like 50gb Jan 16 14:50:15 wow. thought this to be much bigger Jan 16 14:50:26 (no images or media, just text) Jan 16 14:50:34 also missing all of the revision history and such Jan 16 14:50:44 the full text dump is like 100gb, but don't need it Jan 16 14:50:46 yeh well. but its wiki :p Jan 16 14:51:27 From what I can find there are something like ~35 million pages, and the mwdumper tool is processing them at about 130 pages a second Jan 16 14:52:59 Got bored at home a couple of days ago and decided to make an app that sort of steals from the style of the Hitchhiker's Guide from the movie Jan 16 14:53:20 so decided I needed something to show and will create a java rest server to get wikipedia pages Jan 16 14:54:56 danijoo referencing the fragment conversion I mentioned, I think one of my problems is that each Activity has a lot of custom components customized for it, like AsyncTasks, CursorLoader, CustomAdapter, and I share globals between these, for example storing Toasts stored as global so I can cancel when leaving activity, so since fragments have to be a static class I think it is messing with my head a bit on how to refactor. lik Jan 16 14:57:44 danijoo, how can i set different fonts, and just make the UI look good :( Jan 16 14:58:05 somehow, the text always looks ugly and out of place :( Jan 16 14:58:10 you ask me how to make the UI look good? ^^ Jan 16 14:58:50 ok this is annoying, on my desktop i run my apk in the emu and it works fine. on my laptop the emu basically doesnt update its display at all with my app active. on my phone itself i run the apk in debug and it gets up to loading the NDK libraries and then does NOTHING Jan 16 14:59:36 I440r: what does logcat say? Jan 16 14:59:48 nothing. got up to loading the libs and then nothing Jan 16 15:01:27 adds my two shared ndk libraries and then no logs at all Jan 16 15:12:08 could someone explain why this thing throws an error on line 122? http://pastie.org/private/ll0hrka058p1qlihwqq Jan 16 15:13:44 danijoo, you around? Jan 16 15:14:31 ISDP: initialize to null, or use switch-case Jan 16 15:14:43 and you are comaring a string using == Jan 16 15:14:49 alankila, switch case won't work right? Jan 16 15:14:51 these are all mistakes that indicate you don't know java Jan 16 15:15:08 i'm learning it, and i'm coming from C# & PHP Jan 16 15:15:28 i'm used that = sets and == compares Jan 16 15:15:36 whats the error you get? Jan 16 15:15:41 actually that whole ARG_SECTION_NUMBER == "1" is bogus Jan 16 15:15:47 the left hand side is a static constant Jan 16 15:15:55 hi all Jan 16 15:16:12 btw. why dont u use integers instead of "1", Jan 16 15:16:22 good morning, I have a question about the google play dev console, with the APK production and beta testing, does the package name have to be the same? com.foo.org.android.productName or com.foo.org.andriod.productNameBeta Jan 16 15:16:36 hyperlink: yes Jan 16 15:16:48 danijoo so don't worry about changing the name then Jan 16 15:16:50 well that's awesome Jan 16 15:16:55 yeah Jan 16 15:17:07 you can also move betas directly into production wo chaning anything Jan 16 15:17:12 danijoo, i'm using code provided by eclipse... Jan 16 15:17:14 pretty sweet Jan 16 15:17:22 when creating the project Jan 16 15:17:40 is there a way to get the resource ID of the current theme at runtime? Jan 16 15:17:51 the only way I found to do this is expose via reflection ContextThemeWrapper.getThemeRes(), but is there a better way? Jan 16 15:19:12 danijoo, what should i do? Jan 16 15:20:06 ISDP: whats wrong? Jan 16 15:20:17 danijoo do I need a beta and production keystore? Jan 16 15:20:22 I"m guessing it's one keystone then? Jan 16 15:20:39 nope Jan 16 15:20:47 its just the same app Jan 16 15:20:49 i now have three xml files, i want to show the appropriate fragments. Jan 16 15:20:57 and ou can decide to upload it to beta, alpha or production Jan 16 15:21:02 danijoo that's great! Jan 16 15:21:21 the difference is only in how many and which users are able to download it Jan 16 15:21:24 i lost my key store Jan 16 15:21:33 i can't update an app because of that. Jan 16 15:21:49 backup, backup, backup Jan 16 15:21:50 ISDP: the way to do it is to have 3 fragment classes, and instantiate them, and depending on user action, to replace your placeholder or view fragment with right one Jan 16 15:22:05 thata actually the worst thing an android dev can happen ISDP ^^ Jan 16 15:23:03 alankila, you lost me :C Jan 16 15:23:11 danijoo, i knowww :( Jan 16 15:25:06 is there anyway to use userLandscape for devices that support it, and landscape for those who don't within the manifest? Jan 16 15:26:48 Hey, is anyone familiar with NFC? I have the following problem: I have a NFC tag with an aar record that starts a specific app. Now when the app is startet i want to access the nfc tag - but without moving it away from the smartphone to get a new intent. Jan 16 15:27:03 is there an upper time limit for how long a JNI_OnLOad can take? Jan 16 15:29:28 what is the activity idle timeout? Jan 16 15:29:35 i think thats whats burning me here Jan 16 15:29:47 my activity is NOT idle, its just taking too long to complete a task Jan 16 15:29:55 a native task Jan 16 15:31:01 uh Jan 16 15:31:13 it shouldn't basically :) Jan 16 15:31:27 I440r, can you elaborate on what you're doing exactly? Jan 16 15:32:01 alankila, could you please provide me with an example or documentation? Jan 16 15:32:15 my JNI_OnLOad is doing something fairly complex tho it does not take forever im thinking my phone is thinking it is taking too long Jan 16 15:32:26 9:28:16.524 32075-32080/com.reality.retrorpg I/dalvikvm? at com.reality.retrorpg.retrorpg.(retrorpg.java:73) Jan 16 15:32:26 01-16 0 Jan 16 15:32:37 that line is the system loadlibrary call Jan 16 15:32:52 and its attempting to load that library repeatedly Jan 16 15:33:08 What's the best way to track API response times with volley? Jan 16 15:33:16 i think because the JNI_OnLOad is doing this complex stuff that the system is idle timing it out Jan 16 15:33:29 does anyone know of a css stylesheet generator (based on rules) that works on Android? Jan 16 15:33:42 09:28:11.308 32075-32075/com.reality.retrorpg D/dalvikvm? Added shared lib /data/data/com.reality.retrorpg/lib/libnaf.so 0x4051cb10 <-- the library is being added Jan 16 15:34:06 but the "job" i have the onload do never gets completed because the system is reloading the library i think Jan 16 15:34:17 You want to generate Cs's style sheets on an android device? Or generate css for android apps to use? Jan 16 15:34:21 1640-1660/system_process W/ActivityManager? Activity idle timeout for HistoryRecord{411b7cb8 com.reality.retrorpg/.retrorpg} Jan 16 15:34:21 01-16 09:28:18.816 Jan 16 15:34:53 anyone else who could help me out here? Jan 16 15:35:06 mikedg: basically, based on a set of rules (that the android app itself contains), I want to pass a generated css stylesheet onto a webview .. I know how I can pass it, just dont know if there's anything that will help me generate it Jan 16 15:35:08 ISDP: yes. Jan 16 15:35:09 funny thing is, on my desktop running the game in an emu this does not happen Jan 16 15:35:37 funkbox, could you provide me with examples, documentation or a working solution? Jan 16 15:36:22 ISDP: what's your questoin? Jan 16 15:36:58 could someone explain why this thing throws an error on line 122? http://pastie.org/private/ll0hrka058p1qlihwqq Jan 16 15:37:03 that was my question Jan 16 15:37:10 which error is thrown ISDP Jan 16 15:37:33 ISDP: there are code paths that don't assign rootView Jan 16 15:37:34 that rootView isn't initialized and AS warns me that my if-else will not work. Jan 16 15:37:38 NullPointer? Jan 16 15:37:41 actually. i just put a log outout in that code and logcat does not show it. so something else is happening here. weird Jan 16 15:37:42 root null? Jan 16 15:37:44 it wouldn't compile Jan 16 15:37:49 tr it with rootView = null; Jan 16 15:37:55 that's still wrong Jan 16 15:38:00 or make the last else if and else-only Jan 16 15:38:01 you don't want to return null for a view Jan 16 15:38:07 if i comment out the call to this code the game runs but if i dont comment it out the log output never happens Jan 16 15:39:15 ISDP: try this: http://pastebin.com/NVguLtyu Jan 16 15:39:32 rebuilt for armeabi-v6 instead of v7a and... no difference Jan 16 15:39:37 blargh lol what a pita! Jan 16 15:41:21 wish i could debug NDK using intellij idea :/ Jan 16 15:41:39 danijoo, trying, setting rootView to null resulted in three empty apps Jan 16 15:41:42 tabs* Jan 16 15:41:55 ahhhh wait ;) Jan 16 15:42:09 because null isn't valid Jan 16 15:42:34 its because yout ARG_SELECTION_NUMBER will always be null Jan 16 15:42:45 you never set it to 1,2,3 or anything Jan 16 15:43:18 yea, your fix worked danijoo Jan 16 15:43:34 with line 65+66 (fragment.setArguments(args);) you are pushing the argument to the fragment Jan 16 15:43:54 but in your fragment there is no method to read it and store it as ARG_SELECTION_NUMBER variable Jan 16 15:46:01 danijoo, yes there is :o Jan 16 15:46:44 now onto the hard part, creating a form that grabs the gps position, translates it to address data and fills in the form for you, but with the possibility to make changes. Jan 16 15:47:27 best layout for that would be a tablelayout, right? Jan 16 15:47:33 instead of a relativelayout? Jan 16 15:47:58 you really start with something more easy, i think ;) Jan 16 15:48:01 some tutorials Jan 16 15:48:14 danijoo, i can't lol, i have to make this app Jan 16 15:48:15 XD Jan 16 15:48:21 you have to? Jan 16 15:48:25 yeah Jan 16 15:48:37 y? Jan 16 15:49:01 it has to be finished, including the backoffice app, by 6pm on friday Jan 16 15:49:04 tomorrow. Jan 16 15:49:19 i unlearned java >_< Jan 16 15:49:29 sounds like u are fucked, lol Jan 16 15:49:43 not if i can find all solutions to my problems, lol Jan 16 15:49:49 : > Jan 16 15:49:52 good luck Jan 16 15:49:56 but yeah, i'm screwed :') Jan 16 15:50:14 but i am very grateful for all the help i recieve Jan 16 15:50:30 what do u need this for? some kind of school/university ? Jan 16 15:52:20 danijoo, it's an app to make appointments for scrap pickup Jan 16 15:52:39 i volunteer for a recycling company of a friend of mine, he just started out Jan 16 15:52:48 ISDP, how is the dev going? Getting the hang of it? Jan 16 15:52:50 and my deadline is 6PM tomorrow. Jan 16 15:53:02 jonc, yes, it's all coming back at a deadly slow rate, though Jan 16 15:53:09 sound like you're fucked Jan 16 15:53:20 What is the app supposed to do? Jan 16 15:53:30 also, AS is better than goddamn eclipse, getting the hang of gradle now Jan 16 15:53:31 and you started today with implementing your first viewpager? mh.. Jan 16 15:53:42 danijoo, i started two days ago >_< Jan 16 15:54:01 that's not a reasonable timespan to develop an app Jan 16 15:54:11 jonc, basically send a form to the server, that's all Jan 16 15:54:22 sonOfRa, i had two weeks and a nagging GF Jan 16 15:54:27 i work at home >_> Jan 16 15:54:42 That's not terrible then, if it only has 1 form to send Jan 16 15:54:43 that not even a reasonable plan for the first design of the app. Jan 16 15:55:06 but overall I'd say if the design wasn't already done and it was anything more complicated 2 weeks would never work Jan 16 15:55:49 jonc, i know right? it has to gather a gps location, accurate as possible, geocode it, fill in the fields, and allow editing, then when the form is sent, save gps location and the form's contents. Jan 16 15:55:49 if it was a splash screen + 1 page that just gets sent to a server (and design is already finished), sure you can have a pretty beta worthy version done Jan 16 15:56:00 gecode it? Jan 16 15:56:03 that's an issue :P Jan 16 15:56:07 splash screen is the first tab Jan 16 15:56:24 geocode is for later business, as long as it sends the form Jan 16 15:57:09 getting the location is fairly simple, sending a network call, again fairly simple, but lots of little cases you have to worry about (no connection, no good GPS etc) Jan 16 15:58:25 i thinnk your biggest problem will be that you seem to know little to nothing about the android framework and how things are working Jan 16 15:58:54 the project itself sounds simple, but if you have to learn and google every api call and stuff, it takes a lot of time Jan 16 15:59:22 but thats how everyone started :) Jan 16 15:59:38 u just gave yourself a hard timeplan :p Jan 16 16:01:18 danijoo, if there's no challenge, i don't work as hard as i can. Jan 16 16:01:27 hehe Jan 16 16:01:30 so am i :) Jan 16 16:07:18 danijoo, what's a good way to keep the submit button at the bottom of the screen, centered horizontally, but have a nice form on top? Jan 16 16:07:39 also, i guess i won't need labels next to the text field, right? Jan 16 16:07:55 since android shows what the field is about automatically to save space? Jan 16 16:31:10 wee, had a race condition in my unit tests, awesome, no wonder shit hung Jan 16 16:35:45 Mornin'! Jan 16 16:37:06 IDSP, you want submit at the bottom? Jan 16 16:37:14 centered? Jan 16 16:37:22 pfn: write test for your tests :D Jan 16 16:37:30 Napalm, what's up homeslice, where you been hiding out Jan 16 16:37:32 brb Jan 16 16:41:08 Hi all, doe somebody have experience with btle? or ibeacons Jan 16 16:41:54 pfn: working hard on a miracle Jan 16 16:41:55 ;) Jan 16 16:46:19 ISDP, http://pastebin.com/U0GYPHvi <--- should do what you want (the linear layout can be changed out with another relative layout if need be) Jan 16 16:58:15 grrr, my coworker on the ios version of my project wants to learn android. I want to learn ios. he can do it for free. I have to buy a Mac (or get my Hackintosh working well). dang it, lol. Jan 16 16:58:49 yeah, ios dev sucks Jan 16 16:59:10 if you have an intel processor you can run OSX in a VM Jan 16 16:59:45 pfn: sure beats writing scala for android :) Jan 16 17:00:38 funkbox what are you working with that uses scala for android? Jan 16 17:00:58 jonc yeah, but would that be good enough for development? running the emulator in a virtual machine Jan 16 17:01:28 funkbox, but it doesn't Jan 16 17:01:35 pfn yeah... i don't necessarily WANT to, but I think it would be very helpful for me to at least understand a little about the IOS side. it is a necessary evil at the moment Jan 16 17:01:43 theblang, unfortunate for you Jan 16 17:01:47 theblang: depends on how fast your machine is Jan 16 17:01:57 android dev on os x is the way to go as well Jan 16 17:02:01 the simulator isn't an emulator Jan 16 17:02:12 * pfn prefers the windows desktop environment over osx, sadly Jan 16 17:02:21 onlyu thing I like about osx is terminal.app Jan 16 17:02:28 and the unix-like filesystem Jan 16 17:03:30 theblang, yeah a vm is pretty close to normal speed Jan 16 17:03:55 jonc interesting..... I may need to try that Jan 16 17:04:06 I have a FragmentStatePagerAdapter which shows a fragment with a picture in a viewpager. I need to load the count of Likes associated with each of the pictures from the web. Since the user might be keep swiping randomly, what is the best way to keep network threads in control? Jan 16 17:04:27 virtual box and an x86 operating system you won't have many speed issues Jan 16 17:04:45 jonc if you have done it or know someone who has, which version did you try it with Jan 16 17:04:55 getting osx to run in vbox is something of a pita Jan 16 17:05:10 better to just go and buy a macbook Jan 16 17:05:16 it is, but if you don't want to partitiion your harddrive or buy a mac Jan 16 17:05:58 time is better spent buying a mac Jan 16 17:06:07 I'd rather not buy a mac Jan 16 17:06:08 especially if it's for work Jan 16 17:06:11 you have your company buy it Jan 16 17:06:20 yeah Jan 16 17:07:24 jonc I really don't want to buy a Mac either, just out of principle. which is why im trying realy hard to get a hackintosh working. got Mavericks installed, but still need to do drivers and get xcode if that is possible Jan 16 17:09:19 theblang: what principle? Jan 16 17:09:42 overpriced machines Jan 16 17:09:53 funkbox that they are forcing me to use their hardware, use their software, do everything through them with zero freedom Jan 16 17:10:24 but hackintosh you still use os x and you're de facto stealing Jan 16 17:10:54 not necessarily, you used to be able to (may have changed it) buy a license for OSX Jan 16 17:11:20 you can run it virtualized and not break the license Jan 16 17:11:24 funkbox I am stealing, yes, but to learn skills that will be used to build apps one day, which makes them money. I don't actually want to use the stupid operating system, I just want to learn ios development. that is what pisses me off Jan 16 17:12:05 eh Jan 16 17:12:41 apparently, the aim is to develop for iOS devices, then you are left with Apple's monopoly. With a hackintosh, I don't think a proper app can be pushed through the door till the appstore. Jan 16 17:14:16 I'm doing something like this. myImageButton.setLayoutParams(new LayoutParams((int) (120 * scale + 0.5f), LayoutParams.FILL_PARENT)); Jan 16 17:14:23 but now I don't know which immport to use Jan 16 17:14:44 eghdk: The parent layout's Jan 16 17:15:02 IIRC Jan 16 17:15:28 napster: Can you explain more? I'm still unsure of what you mean. Jan 16 17:15:50 eghdk: what's the parent of the image button? Jan 16 17:16:00 if it's a FrameLayout use FrameLayout.LayoutParams, etc.. Jan 16 17:16:22 it technically doesn't have a parent yet. Jan 16 17:16:33 I am adding the button later on. Jan 16 17:16:37 to a view. Jan 16 17:16:52 you can try using ViewGroup.LayoutParams Jan 16 17:16:52 To a linearLayout. So I guess use android.widget.LinearLayout import? Jan 16 17:17:08 if you know it's going tobe a linearlayout then linearlayout.layoutparams Jan 16 17:18:18 Okay, so now I have myImageButton.setLayoutParams(new LinearLayout.LayoutParams((int) (120 * scale + 0.5f), LinearLayout.LayoutParams.FILL_PARENT)); Jan 16 17:18:26 So FILL parent is depracted? Jan 16 17:18:42 use MATCH_PARENT Jan 16 17:19:14 Ah. Rookie mistake. Thanks guys. Appreciate it. Jan 16 17:19:17 eghdk: what are you trying to achive? Jan 16 17:19:20 achieve* Jan 16 17:20:34 I just want to add my imageButton to a LinearLayout programatically Jan 16 17:29:23 they are functionally identical and the same constant Jan 16 17:29:59 I am really trying to resist refactoring my code to use fragments, but I am thinking that if I want to implement a navigation drawer maybe it would be easier to just go ahead and do it? Jan 16 17:38:44 Im trying to call my first activity from my Application class at the start of my program, i use Intent i = new Intent(this, NetActivity.class); then startActivity(i); Jan 16 17:38:52 program crashes on start with a null pointer exception Jan 16 17:38:58 http://pastebin.com/KGbxp7Fd for the trace Jan 16 17:39:20 im not sure whats missing here, since i is initialized in the class constructor and assigned Jan 16 17:39:40 and NetActivity.java is a FragmentActivity in the root of src Jan 16 17:40:10 shinkamui: You don't explicitly need to start the first activity from the application class Jan 16 17:40:28 you may pass an intent filter through the manifest file Jan 16 17:41:05 as in intent action main? Jan 16 17:41:13 yes Jan 16 17:41:27 will it still initialize my application class constructor? Jan 16 17:41:34 i want to use it for global data storage Jan 16 17:41:59 yes the app class will be initiated just before your activity is shown on the screen Jan 16 17:42:14 ok, ill try that and see how it goes Jan 16 17:42:16 thanks brohan Jan 16 17:42:23 np Jan 16 17:46:55 Is it possible to create a transparent bitmap with solid images at various locations on the bitmap? Jan 16 17:49:03 Spynxic: Well, it is a bitmap Jan 16 17:49:17 you can do anything with it, at the pixel level Jan 16 17:50:48 Hi! Jan 16 17:51:02 i have a problem with background selector and listview items Jan 16 17:51:07 can someone help me? Jan 16 17:51:17 i am setting some selectors.. but i cant make the "selected" state to work Jan 16 17:51:18 If my app is closed I want to notify my service that it should also shutoff, is the best way to start a new intent and send a finished signal in the extras? Jan 16 17:51:38 depends on if you are binding the service or not Jan 16 17:51:47 not binding, thats probably a reasonable ay Jan 16 17:52:28 although if my app gets closed by the OS I don't want my service to stop Jan 16 17:52:37 only if the user has closed it (swiping it away) Jan 16 17:52:43 is there a nice way to catch that? Jan 16 17:53:21 if your app is closed by the system the service is going with it Jan 16 17:53:35 you might be able to do it with a second process but i havent touched than in a long time Jan 16 17:54:11 I thought part of the benefit of a service was that it was one of the last things to be closed / taken out of memory Jan 16 17:54:14 are you talking about swiping away from the task switcher? Jan 16 17:54:24 where is a good easy to understand resource to drawing graphics on android? Jan 16 17:54:28 you probably shouldnt have that be the trigger for killing a service, it's not a common thing Jan 16 17:55:09 poopster: If you find one, please let me know as well :) Jan 16 17:55:30 Does anyone know a way to gradlify a non-gradle Android Studio Project? Jan 16 17:55:33 napster: our names are similar sounding. Jan 16 17:56:02 but you are mostly "poop"ster Jan 16 17:56:12 you nap Jan 16 17:56:14 i poop Jan 16 17:56:23 that's what ppl do. Jan 16 17:56:44 are you claiming to be ppl? Jan 16 17:56:47 if you're the shawn fanning then you're the original napster Jan 16 17:57:08 napster: i on the other hand is the one and only and original ---> POOPSTER! Jan 16 17:57:14 poopster: I'm the original napster, if you are the original poopster Jan 16 17:57:22 ok Jan 16 17:57:28 Is the play-store-service-app OAuth authentication mechanism documented anywhere [I mean, the implementation details; not its usage.] Jan 16 17:57:28 http://pastebin.com/4yE4zGWX Jan 16 17:57:34 can someone check that? and helps me? Jan 16 17:57:37 napster: were that's just great! Jan 16 17:58:05 napster: security question - who's your gf? Jan 16 17:58:39 lol there is no more mp3 on my HDD to be secured by any meaning Jan 16 17:59:36 its' all about streaming these days. Jan 16 17:59:43 i'm kind of old school Jan 16 17:59:53 because well... i'm kind of ancient (internet years) Jan 16 17:59:59 poopster: I born after napster was taken down. Jan 16 18:00:53 so you're 9? Jan 16 18:01:07 wait whe was napster taken down? Jan 16 18:01:10 poopster: Yeah, just like you are the original poopster Jan 16 18:01:19 well i am. Jan 16 18:01:23 What listener provides information on a device's orientation? (north, south, east, west) Jan 16 18:01:24 google poopster Jan 16 18:01:53 google throws me to some urban dictionary for that poopster Jan 16 18:02:18 well i'm not really defined by urband dictionary Jan 16 18:02:33 my nick reflect the fact that i poop 3-4 times a day Jan 16 18:02:34 :D Jan 16 18:02:41 too much fiber Jan 16 18:02:42 i dunno Jan 16 18:02:47 ibs Jan 16 18:02:49 I used to that when I was 9 :D Jan 16 18:02:50 i dunno Jan 16 18:09:27 so nobodoy can help me? Jan 16 18:10:10 tksko: What do you want/need help with? Jan 16 18:13:04 poopster: any luck getting a graphics guide for Android? Jan 16 18:14:55 I have a problem with a background selector Jan 16 18:15:02 in an item layout in a list view Jan 16 18:15:14 i dont know why, the "selected option" state doesnt work Jan 16 18:15:18 http://pastebin.com/4yE4zGWX Jan 16 18:17:04 napster: not yet Jan 16 18:17:09 its a stupid problem.. but i cant make it to work Jan 16 18:17:57 poopster: Something is here, if you haven't already came across : https://developer.android.com/guide/topics/graphics/index.html Jan 16 18:20:32 I wonder if you'll have better luck using the listview selector, rather than hope that the underlying view's selected state is being updated Jan 16 18:23:10 the problem happens in the Drawer Navigation component Jan 16 18:23:30 I cant highlight the selected menu option Jan 16 18:23:41 actually, does look like listview updates the setSelected on the view, if I read this code properly Jan 16 18:24:15 Is there any function to simply prevent sql injection problems on API level eight and below? Jan 16 18:25:13 napster: those are kind of hard to read. Jan 16 18:25:28 napster: i would like to find something more easier to understand. Jan 16 18:26:48 what's special about level-8 and below? Using bind args in general should catch most of the basic issues; and that's available from api 1. Jan 16 18:30:23 Does anyone one know of a pull for more listview library that doesn't bug out to clipToPadding="false" ? Jan 16 18:36:59 hey I am trying to create a JSONObject but I am having a hard time understanding where to include it, as it errors when i do a .put Jan 16 18:37:22 do I have to surround the put with a try and catch? Jan 16 18:37:31 Android studio seems to only load recent logs from logcat, can I get it to go through all of them? Jan 16 18:38:34 To import a bitmap, do you really have to make a different sized one for each separate drawable folder? (hdpi, ldpi, xhdpi, etc) Jan 16 18:38:43 you do not have to Jan 16 18:38:53 you can just put it in /drawable Jan 16 18:38:57 but it is best practice to Jan 16 18:39:06 or at least for ones you will be supporting Jan 16 18:39:06 how do you scale them differently? Jan 16 18:39:40 http://stackoverflow.com/questions/8232322/graphic-dimensions-for-hdpi-ldpi-mdpi Jan 16 18:39:48 thanks Jan 16 18:41:08 it'll autoscale but i've had less than satisfactory results with that Jan 16 18:41:12 aliasing and whatnot Jan 16 18:41:27 take your xhdpi image, scale down by 75% to get hdpi, then scale the xhdpi to 50% you get mdpi, and finally take the hdpi and scale to 37.5% to get ldpi Jan 16 18:42:00 scale down from your largest Jan 16 18:42:02 * kbs also uses icon fonts when possible Jan 16 18:44:12 and if there's text you probably want to rerender it at the smaller sizes instead of just resizing Jan 16 18:58:00 Can someone help me with Android Studio Gradle? It asks me to use Gradle 1.8, was using 1.10. Then I downloaded and set 1.8 up. Then it says I need to update to 1.9, I'm not 1.9 now and it tells me to go back to 1.8.. >.> Jan 16 18:58:20 I'm on 1.9 now* Jan 16 18:58:58 This also pops up: If using the gradle wrapper, try editing the distributionUrl in C:\Users\.... but the path given is non-existend. Jan 16 18:59:02 Hey guuuuuys Jan 16 18:59:12 I'm struggling with something.. Jan 16 18:59:24 Get to the point? Jan 16 18:59:50 i'm trying to create a screen where a part of the screen should be swippable.. Jan 16 18:59:59 and I just don't know how to do it.. Jan 16 19:00:05 Part of the screen swipeable? Jan 16 19:00:15 yes a second pls Jan 16 19:01:19 Try Fragments? Jan 16 19:02:04 http://www.directupload.net/file/d/3504/8ishwd59_png.htm Jan 16 19:02:22 the top part should be swippable.. Jan 16 19:02:38 to take you to another part of the screen? Jan 16 19:02:43 i get really confused with fragments.. Jan 16 19:02:55 fragment with FragmentViewPager would be best Jan 16 19:03:19 with a ViewPager* Jan 16 19:04:20 so viewpager is the right thing? i thought it's only for switching between like whole pages Jan 16 19:04:24 ok thanks for now :) Jan 16 19:06:41 Im in need of some method of cropping and rotating an mp4 videofile on android. Any suggestions? Jan 16 19:09:47 FabianH, best to use Fragments. I'm currently converting my app to Fragments. But Android Studio and IntelliJ can't even compile my project because of Gradle and I need it for libraries... I'm not even getting responses on the IDEA Issue tracker thingy Jan 16 19:10:50 I'm kinda not understanding them.. but i'll try to learn about fragments now :) Jan 16 19:10:53 thaaank you! Jan 16 19:11:20 i think android studio is just trashy.. and the whole gradle thing to Jan 16 19:11:31 "unpopular opiniion penguin" Jan 16 19:11:58 Hello Jan 16 19:12:02 Morning!! Jan 16 19:22:06 Is an acceptable fragment design pattern to create one main activity that swaps out your different fragments? Or would this get to convoluted? Jan 16 19:28:57 LoneSoldier728, what's the error? Jan 16 19:29:45 theblang, it depends on the situation, but if it seems like it makes sense for your situation then it's probably the way to go Jan 16 19:30:09 (For instance, a tabbar, sliding menu that selects pages, etc) Jan 16 19:30:52 Benornstin honestly, at the moment, I dont necessarily need fragments. but I want to implement a navigation drawer, and I do at some point want to optimize for tablets. from what I have seen I have an intuition that I probably need to go ahead and embrace them Jan 16 19:33:10 Yup, sounds like fragments are the way to go Jan 16 19:33:46 How do I open a file stored under assets? Jan 16 19:34:49 Once you get used to fragments they become a shit ton better than having a bunch of activities Jan 16 19:37:09 jonc, BenOrnstin do you still usually have one fragment per activity, until you need to do a layout for a tablet or some similar requirement? Jan 16 19:37:29 jonc, BenOrnstin because I could imagine making one activity that just switches fragments out, but that doesn't seem like a good idea Jan 16 19:37:52 why is it not a good idea? Jan 16 19:39:12 tildo honestly I don't know.. maybe that is a good design patern Jan 16 19:46:39 how do I refer to a file stored under assets? Jan 16 20:02:48 tildo: AssetManager is what you want Jan 16 20:02:57 it has a way to open the asset as inputstream Jan 16 20:11:15 I noticed that MapView has an onSaveInstanceState... anyone know if this method saves markers and zoom state? Jan 16 20:25:12 danijoo_ around? Jan 16 20:25:34 hm? Jan 16 20:27:05 Which sensor provides information about the direction? (0 degrees corresponding to north and 180 to south) Jan 16 20:27:16 the direction of a device* Jan 16 20:27:18 dont know Jan 16 20:27:23 never worked with sensors Jan 16 20:27:50 alexfu: why not just try it.. Jan 16 20:32:32 alankila: but what path is it to the asset? just the filename? Jan 16 20:33:23 just the name as it appears in the assets directory Jan 16 20:34:42 what happens if you call finish() in onResume after you hit the back button, does it show the activity behind that on the stack, or the activity that you original went back from Jan 16 20:36:51 InputStream s = AssetManager.open( path ); => cannot refer to the non-static method open(String)... Jan 16 20:37:29 you call context.getAssetManager() Jan 16 20:37:33 unfortunately android is like that Jan 16 20:38:19 hmm or was it getAssets().... I forget Jan 16 20:50:59 anyone run into this bug using KeyChain before? https://code.google.com/p/android/issues/detail?id=62319 Jan 16 20:51:37 not sure if i need to keep a reference to the first, last, any, or all PrivateKeys to prevent the GC related crash Jan 16 20:51:52 since my app will use several Jan 16 20:52:45 if I set a PlusClient scope to "profile" does that allow non-Google+ users to sign in using my app? Jan 16 20:52:49 like, plain Google suers Jan 16 20:52:50 *users\ Jan 16 20:59:49 theblang, sorry, I'm in and out. That's actually one of the main uses for fragments, the ability to swap them in and out. It's a fine design pattern -- in fact take a look at ViewPager. Jan 16 21:00:48 ah, hold on to ref of first privatekey Jan 16 21:04:31 hey guys Jan 16 21:04:47 how can i configure how many titles get shown in pagetitlestrip? Jan 16 21:08:44 ok, that worked. * gross * Jan 16 21:17:44 if I use the Eclipse provided here http://developer.android.com/training/basics/firstapp/index.html ... what is the correct directory to put it in? /usr ? /opt ? ~/eclipse and ~/sdk ? Jan 16 21:19:10 that's a rather philosophical question. Jan 16 21:21:21 indeed :) Jan 16 21:22:29 put it where your distro/personal religion orders you to Jan 16 21:22:29 Hey fellows as a noob starting out now, which android device should I focus on learning on. I mean there are 21 different devices in eclipse when setting up an AVD. Which device holds the most market share at this point? Thanks for any help provided! Jan 16 21:22:34 it'll work in any case :P Jan 16 21:23:00 xMYTHICx, that's a silly question. Jan 16 21:23:22 Why is it silly? Jan 16 21:23:28 xMYTHICx, avd configurations don't matter Jan 16 21:23:35 agh thanks Jan 16 21:23:35 only focus on 2 configurations, a tablet and a phone Jan 16 21:23:50 I apologize for my ignorance Jan 16 21:23:53 lol Jan 16 21:24:28 xMYTHICx, basically, what you're seeing there are just different versions of API's that were upgraded over time and are backward compatible :) Jan 16 21:24:42 xMYTHICx, and corresponding emulators for different Android versions :) Jan 16 21:24:48 it's not something you focus on :) Jan 16 21:25:05 xMYTHICx, so, grab the newest one and run to d.android.com training part :) Jan 16 21:25:24 Got it! Thanks buddy! Jan 16 21:25:45 appreciate the help! Jan 16 21:27:54 can somebody help me with this activity: http://pastebin.com/QXbf9vwd Jan 16 21:28:24 I'm getting an IllegalStateException: No activity on orientation change Jan 16 21:28:50 and here's my Fragment class if that helps http://pastebin.com/zZtyz0MJ Jan 16 21:34:23 does PlusClient automatically show an account chooser and stuff? or do i have to do that myself? Jan 16 21:35:54 frankdrey, IIRC it shows it itself Jan 16 21:36:31 ok thanks :P Jan 16 21:36:40 hmm Jan 16 21:37:17 AphelionZ: at least don't do mContext in your fragment Jan 16 21:37:32 only use getActivity() to always receive the newest activity your fragment is attached to Jan 16 21:37:49 keep it pure ui, only respond to interaction events outside of lifecycle events. Jan 16 21:38:46 and honestly it seems to me you should be calling findViewById() in the fragment, not on activity Jan 16 21:38:48 Hello Jan 16 21:38:51 Morning!! Jan 16 21:39:45 alankila: thanks, I'll try that Jan 16 21:47:54 Is there any point in supporting screens smaller than 4.3 inches? It must be a very small nbr of people thta have that... Jan 16 21:48:09 seriously? Jan 16 21:48:38 all middle and lower end phones are smaller than that Jan 16 21:48:43 yes, why is the question stupid? Jan 16 21:48:59 where did you get an idea that most people have high-end devices? Jan 16 21:49:34 i have a samsaung galaxy s4 mini. 4.3". But im swedish. maybe it is different elsewhere. here everyone have 4.3"+. Jan 16 21:50:09 uh Jan 16 21:50:21 http://developer.android.com/about/dashboards/index.html Jan 16 21:50:24 20%. Jan 16 21:50:31 sorry, 30. Jan 16 21:51:04 always remember with these things: if you're a tech person, you're not the representative of general population Jan 16 21:51:07 neither are your friends. Jan 16 21:51:37 its not hard to support a range of screen sizes. Jan 16 21:53:37 mhm, also it's not the physical size that matters really :) Jan 16 21:57:51 I picked up a nexus 7 2013 LTE about 9 days ago and it will reboot randomly, I haven't been able to track down why yet as there is no specific time or action that causes it to reboot Jan 16 21:58:15 Is there any way to capture the logcat when it reboots Jan 16 21:58:49 I notice it more because it's encrypted so i'll pull it out of my jacket and the screen will be on and asking for a password Jan 16 21:59:40 well that pretty much wrecks any chance of you getting a usable log Jan 16 22:01:05 I may go to best buy today and have them replace it Jan 16 22:04:57 Mavrik: any way to get the kernel log without root Jan 16 22:05:08 hmm, doubt it Jan 16 22:05:12 also, not a dev question. Jan 16 22:05:55 that seems dev-y to me Jan 16 22:07:08 Mavrik: not explicitly but the chance that people would know is much higher than in here Jan 16 22:07:11 er Jan 16 22:07:17 s/than in here/than anywhere else/ Jan 16 22:07:24 adb dmesg Jan 16 22:07:30 may work... Jan 16 22:07:40 helo: that will only give me the log of the device booting up Jan 16 22:07:49 err... adb shell dmesg, that is Jan 16 22:07:52 unfortunately not before the crash Jan 16 22:08:30 can you solder a ttl -> serial to the board? Jan 16 22:08:59 it's a non root/dev nexus 7 Jan 16 22:09:07 can i, yes, willing to? no Jan 16 22:09:18 uhh its a nexus device Jan 16 22:09:18 root it Jan 16 22:10:12 Mrono: http://hackaday.com/2013/05/30/giving-the-nexus-4-a-serial-port/ Jan 16 22:10:21 not quite as difficult apparently Jan 16 22:11:01 "If the Nexus detects more than 2.8 Volts on the mic, it switches over to a hardware UART, allowing everything from an Arduino to an old dumb terminal to access the port." Jan 16 22:11:06 neat! Jan 16 22:11:37 that's pretty cool Jan 16 22:11:51 o neat Jan 16 22:12:42 apparently something similar should work with the nexus 7, but i don't see anything specific Jan 16 22:14:49 hey can someone tell me what i am doing wrong here Jan 16 22:14:50 http://pastebin.com/y8jGu1Sc Jan 16 22:15:07 this is my code and I am not sure why it is error-ing for line 117 when i do a put for the json object Jan 16 22:15:51 it is telling me to surround it with a try and I am not sure why Jan 16 22:16:10 because it might fail and throw an exception Jan 16 22:16:28 android hates uncaught exceptions Jan 16 22:16:50 hm so I just have to throw a try around it and there should not be a proble? Jan 16 22:16:52 problem Jan 16 22:17:02 maybe Jan 16 22:17:14 basic rules Jan 16 22:17:16 ok lets see Jan 16 22:17:19 read the error message and follow it Jan 16 22:17:22 thanks Jan 16 22:17:34 btw can I post to a localhost Jan 16 22:17:39 or is it going to error? Jan 16 22:17:40 i'm trying to send a message attached to a text message: https://gist.github.com/asparagui/8464567 Jan 16 22:18:25 via intents, but i'm getting a toast popup that says "You can't add this picture to your image" Jan 16 22:18:53 LoneSoldier728: are you running a web server on your device? Jan 16 22:19:06 i have roughly the same code sending an image via an email intent, so i feel like it's just my basic code, but i don't see where the problem is Jan 16 22:19:46 what do you mean? I am actually running a website and i am making an app and basically I want to let people create a new item and post it to the same server (node.js) Jan 16 22:20:05 LoneSoldier728: ... define localhost Jan 16 22:20:14 but can i call it to a localhost:8000/page Jan 16 22:20:26 because I know there are Cross Browser possible problems Jan 16 22:20:50 LoneSoldier728: ... define localhost Jan 16 22:21:32 server on my computer Jan 16 22:21:33 ? Jan 16 22:22:00 http://en.wikipedia.org/wiki/Localhost Jan 16 22:23:51 oh ok, so i can just use the ip address? is that what you are getting at? or Jan 16 22:24:03 :/ Jan 16 22:24:19 localhost is the virtual pointer to it's self Jan 16 22:25:15 going to localhost on a device will go to 127.0.0.1 (which is binded to your computer) Jan 16 22:25:23 s/computer/device/ Jan 16 22:26:05 ok thanks Jan 16 22:36:26 so I set up a test Google+ Sign In, and I just revoked access from the Google account settings, yet the app still has access Jan 16 22:38:08 howdy, i've always used the android cmd tool to start a new project, which uses ant as a build tool, shall i move to gradle? if so, how? Jan 16 22:38:34 don't if you value your sanity. Jan 16 22:41:09 Anyone here have an iPhone at their disposal at the moment? Jan 16 22:47:34 i just woke up from a 1.5hr nap at work Jan 16 22:48:06 good thing i used my hoodie as my pillow, i woke up fully torqued and could use it to hide my boner Jan 16 22:48:16 i'm about .5hrs from pulling my hair out Jan 16 22:48:20 wha? Jan 16 22:48:22 dream sexy time :P Jan 16 22:49:20 Mavrik, are you talking to me? Jan 16 22:49:57 Seems like compasses are extremely popular with android yet I can't manage to find a single reference of how to get cardinal directions (in degrees) Jan 16 22:52:07 Hi, noob in android dev comming from the world of C#. Just wondering about the id you set on your views. How do I change them? Jan 16 22:52:35 Get a cannot resolve symbol changing the name Jan 16 22:53:01 Spynixic, don't you use the location manager to get the bearing? Jan 16 22:53:12 A bearing is a direction, in degrees :) Jan 16 22:53:15 hi Jan 16 22:53:24 omg hi Jan 16 22:53:26 is it possible to load a local html5 app on a webview? Jan 16 22:53:32 omg yessssss Jan 16 22:53:33 100% offline Jan 16 22:53:36 YESSSSS Jan 16 22:53:38 ring3: technically yes Jan 16 22:53:46 explodes, If that really is the right word, I love you. Google has been utterly useless without knowing the correct terminology Jan 16 22:53:48 ring3: you might need to write some java code to manage loading etc. Jan 16 22:53:51 but actually the links doesn't work Jan 16 22:54:00 p_l any sample? Jan 16 22:54:08 ring3: nope Jan 16 22:54:13 :/ Jan 16 22:54:14 * p_l is violently against html5 apps Jan 16 22:54:21 lol Jan 16 22:54:30 is just a test :) Jan 16 22:54:35 a serius app must be native Jan 16 22:54:36 they are recognizable by being ugly and slow :P Jan 16 22:54:42 but it should work Jan 16 22:54:44 but there are niches were it fits, yes Jan 16 22:54:58 unfortunately, I haven't really looked into actually implementing necessary code Jan 16 22:55:06 I think you can hook some stuff into WebView Jan 16 22:57:09 Mavrik, what's your preference for location of "installation"? Jan 16 22:58:36 p_l: animated gifs doesn't work on webview? Jan 16 23:00:25 I think they do Jan 16 23:09:12 is it possible to make 2.1 spinners look like 4.0 ones? Jan 16 23:35:31 http://pastebin.com/jrStTgkx Jan 16 23:35:35 hm it does not post Jan 16 23:36:04 everything gets logged except for line 312 Jan 16 23:36:37 i am having a problem with the line above it maybe? not getting an error but the post never occurs (at least I do not see it on my system Jan 16 23:36:47 on my backend code Jan 16 23:37:02 so either the url is not working but i have that as the url... Jan 16 23:48:02 it is as if it is not being executed? Jan 16 23:50:04 Is there a way to detect the end of the screen? (x max, I guess. Not 100% sure about how screen coordinates are laid out) Jan 16 23:52:14 http://stackoverflow.com/questions/21175340/post-not-occuring-on-android Jan 16 23:52:29 if anyone knows what is wrong there please let me know Jan 16 23:59:20 LoneSoldier728: have you got the correct permissions ? Jan 17 00:02:18 your URL is also wrong Jan 17 00:21:32 hey bankai Jan 17 00:21:36 what permissions? Jan 17 00:22:07 http://developer.android.com/reference/android/Manifest.permission.html Jan 17 00:22:18 specifically http://developer.android.com/reference/android/Manifest.permission.html#INTERNET Jan 17 00:22:39 internet nope should that do it Jan 17 00:22:43 if you look in logcat you'll see an error hinting at that Jan 17 00:23:25 but besides that Jan 17 00:23:48 does it have to be the address u said instead of 127 because it is runnning off a real device connected to eclipse Jan 17 00:24:17 127.0.0.1 is localhost ... Jan 17 00:27:14 ok Jan 17 00:27:30 i added internet permission but now it is crashing on submit at that point Jan 17 00:27:32 so hm Jan 17 00:27:45 nice! a crash is better than nothing happening :) Jan 17 00:27:55 yep trying to figure out why now llol Jan 17 00:28:30 http://pastebin.com/4gFqfyJX Jan 17 00:29:20 forth line, buddy Jan 17 00:29:55 network on main ya but what is that Jan 17 00:31:16 are you making a network request? Jan 17 00:31:28 it means you need to start a new thread to do your network fun... can't be done on the UI thread coz it'll hang your interface Jan 17 00:31:55 im trying to POST the data Jan 17 00:32:03 to the server Jan 17 00:32:20 it is a form Jan 17 00:32:45 and on the submit button i call the async task that should be performing the http connection and posting it? Jan 17 00:34:53 you're async task is wrong Jan 17 00:35:15 you need to use execute() Jan 17 00:35:20 what part Jan 17 00:35:38 HttpResponse response = httpclient.execute(httppost); Jan 17 00:35:45 that calls execute? Jan 17 00:35:58 new dataSend().postData(dataWardrobe); Jan 17 00:36:39 ah yes Jan 17 00:37:17 changed it now it seems to work on the android side but it does not call the second log post Jan 17 00:37:32 and the server does not get hit on my comp Jan 17 00:37:37 i dont see any post requests coming in Jan 17 00:37:45 did you change that IP? Jan 17 00:38:45 ya Jan 17 00:38:49 i tried Jan 17 00:38:50 10.0.2.2 Jan 17 00:38:55 and the original Jan 17 00:39:04 both do nothing and do not call that second log Jan 17 00:39:51 what's the "second log" you're talking about ? Jan 17 00:41:07 // execute http post request Jan 17 00:41:07 HttpResponse response = httpclient.execute(httppost); Jan 17 00:41:07 Log.v("posteed", "posteed 22"); Jan 17 00:41:16 all the way on the bottom Jan 17 00:41:22 after stating the url Jan 17 00:41:44 ok, so you've caught two exceptions there, you need to handle them - log or something Jan 17 00:42:57 it does not let me put logs in the catch Jan 17 00:43:46 i've never had a problem before... what's it saying Jan 17 00:43:58 nvm let me see Jan 17 00:44:31 well when i put the message as an e Jan 17 00:44:35 it gives me an error? Jan 17 00:44:52 ah get message Jan 17 00:44:52 kk Jan 17 00:45:50 ah ok Jan 17 00:45:56 connection is being refused Jan 17 00:45:57 hm Jan 17 00:46:05 01-17 02:45:39.347: E/sds 22(5225): Connection to http://10.0.2.2:3000 refused Jan 17 00:49:37 hm i see this Jan 17 00:49:42 http://stackoverflow.com/questions/4529784/android-cannot-access-localhost Jan 17 00:52:22 what about it ? Jan 17 00:52:37 it is sayin that 10.2.2 is just for emulators Jan 17 00:52:43 trying to figure out the device solution Jan 17 00:53:07 if you're using a device just use the IP of the machien you want to connect to... what's the problem ? Jan 17 00:53:59 is that what i put the url as? Jan 17 00:54:12 my pcs ip 192.... Jan 17 00:54:15 yep Jan 17 00:55:46 Connection to http://192.168.0.1:3000 refused Jan 17 00:56:00 is it weird that i am getting that still? Jan 17 00:56:28 test with telnet Jan 17 00:58:08 ah i read something but i dont have access to the router? Jan 17 00:58:11 password Jan 17 00:58:22 like the ip address admin section...? Jan 17 00:58:28 what's that got to do with anything Jan 17 00:58:33 http://stackoverflow.com/questions/4779963/how-can-i-access-my-localhost-from-my-android-device Jan 17 00:58:42 you're not accessing localhost... Jan 17 00:59:24 is your device even on the network ? Jan 17 00:59:33 ya through wifi Jan 17 00:59:38 and it is connected by usb Jan 17 01:00:26 well actually not wifi Jan 17 01:00:34 ..... Jan 17 01:00:36 but i just logged into the wifi could that be it Jan 17 01:02:09 well it is timing out now Jan 17 01:02:33 as i said before, test with telnet. If you don't have that access at the very least test with a browser Jan 17 01:03:56 test the browser how so... if i type in 192.168.1.1 it wants admin account Jan 17 01:04:01 but localhost Jan 17 01:04:03 is running find Jan 17 01:04:22 well this time it was refused mpw j, Jan 17 01:04:32 Connection to http://192.168.1.1:3000 refused Jan 17 01:04:35 now* Jan 17 01:04:45 before you said 192.168.0.1:3000 Jan 17 01:04:54 i misspelled it Jan 17 01:08:34 if i go to that link though it asks for password and username for the router Jan 17 01:08:42 if i go to localhost:3000 that works Jan 17 01:09:03 are you doing this on your device or on your computer? Jan 17 01:09:49 computer Jan 17 01:09:55 should i be doing that on my device Jan 17 01:10:17 the idea was to test whether your device can talk to that machine Jan 17 01:10:36 just tried 192.168.1.1 from device browser Jan 17 01:10:43 same thing expects admin credentials Jan 17 01:11:15 i think you have the wrong IP ... Jan 17 01:11:31 i did ipconfig Jan 17 01:11:48 i got also this ipv4 address Jan 17 01:11:55 that is 107 not just 1 Jan 17 01:11:58 if that makes a difference Jan 17 01:12:21 192.168.1.107 ? Jan 17 01:12:30 ya Jan 17 01:12:44 but you're trying to connect to 192.168.1.1 not 192.168.1.107 Jan 17 01:13:06 right Jan 17 01:13:25 192.168.1.1 is your router, 192.168.1.107 is your computer Jan 17 01:13:51 should it be asking me for admin username and password when i go to that ip Jan 17 01:14:12 like i know it should regularly so im not sure Jan 17 01:14:28 i added port :3000 the servers port Jan 17 01:14:35 and it just times out or takes long to load Jan 17 01:14:58 i don't understand what you're saying, but i think the address you want is 192.168.1.107:3000 not 192.168.1.1:3000 Jan 17 01:17:10 ok it just times out either way? : / Jan 17 01:17:26 it seems like it is loading forever then says oops Jan 17 01:17:52 perhaps you have your server listening on 127.0.0.1 and not all IPs -- are you running apache or something else ? Jan 17 01:18:25 just running from command promp nodejs Jan 17 01:25:34 getting my motox replaced :( Jan 17 01:30:25 isn't replacement a good thing ? Jan 17 01:31:20 Hi, I am storing images in my android app's sqlite database as BLOB format Jan 17 01:31:29 I want to send this to a php web service with JSON Jan 17 01:31:55 Could you please inform me the best way to do this? for example, I have seen articles suggesting to encode it with base64 and others saying not to Jan 17 01:31:58 what is the best way to go? Jan 17 01:32:49 ir7466 i won't store the images as blobs Jan 17 01:33:10 what would you store it as? Jan 17 01:33:47 regular files Jan 17 01:33:53 oh Jan 17 01:33:58 it needs to be in the sqlite databse Jan 17 01:34:14 on nothing with sqlite itself; on the Desktop Lightroom keeps its thumbnail previews in sqlite Jan 17 01:34:48 has more to do with android's cursor impl Jan 17 01:34:57 getting it to the php webservice is my concern at the moment though Jan 17 01:35:18 php is a concern, yes Jan 17 01:35:54 well emulator works at least Jan 17 01:36:05 let's pretend it's not a php webservice then :) Jan 17 01:36:12 one last thing if someone can help how do i actually send an image through json or something Jan 17 01:36:28 I just need to convert my blob image into something I can send through JSON Jan 17 01:36:46 im in the same boat ir7466 hehe Jan 17 01:36:48 if anyone can answer that question, you can sort LoneSoldier728 and me out at the same time :) Jan 17 01:37:16 I am trying to POST an image uploaded on the device Jan 17 01:37:25 Have you thought about converting the image to base64 before sendign as json? Jan 17 01:37:30 i saw something like this about turning it into bytes or something Jan 17 01:37:32 I was looking at http://stackoverflow.com/questions/18495663/send-base64-image-from-android-with-json-to-php-webservice-decode-save-to-sql Jan 17 01:37:35 Yeah Jan 17 01:37:42 I converted it to a byte stream Jan 17 01:38:27 If you have a bitmap image, just do something like: imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayStream); byte[] byteArray = byteArrayStream.toByteArray(); Jan 17 01:38:32 then you have a byte array Jan 17 01:39:02 and i can throw it in with the json Jan 17 01:39:06 when post-ing it? Jan 17 01:39:17 or is it sent on it's own Jan 17 01:39:25 this is what i'm trying to figure out Jan 17 01:39:28 ah ok Jan 17 01:39:32 are BLOBS supported by JSON ? Jan 17 01:39:40 I don't think so bankai_ Jan 17 01:39:43 but i'm not sure Jan 17 01:39:48 does it not specify it in that post u sent me Jan 17 01:39:50 I think it needs to be converted to a string Jan 17 01:39:56 thought JSON was very simple and you'd have to base64 encode Jan 17 01:39:59 hence my question about encoding as base64 Jan 17 01:40:06 oh sorry, missed it Jan 17 01:40:17 no worries Jan 17 01:41:21 how do you convert a byte[] to a base64 string? Jan 17 01:41:41 ir7466: you an aussie ? Jan 17 01:41:53 yes Jan 17 01:41:55 Why does my App's ringtone picker not pick up ringtones that my phone's ringtone picker pick up ? Jan 17 01:42:01 where you from? Jan 17 01:42:06 LoneSoldier728: http://stackoverflow.com/questions/10513976/how-to-convert-image-into-byte-array-and-byte-array-to-base64-string-in-android Jan 17 01:42:18 maybe that could help us Jan 17 01:42:22 WA Jan 17 01:42:33 ir7466: Perth ? Jan 17 01:42:39 yeah Jan 17 01:42:41 BNE here :) Jan 17 01:42:42 Hai :D Jan 17 01:42:50 g'day mates Jan 17 01:43:14 I think the English are due to lose another game today? Jan 17 01:43:40 bankai_ you in Australia too ? Jan 17 01:44:02 this is starting to feel like that beer ad where everyone just happens to be at the same hotel at the same time Jan 17 01:44:07 hahah Jan 17 01:44:10 never checked, your nick sounded japanese so i assumed stupidly you were in japan :) Jan 17 01:44:19 * g00s == dumbass Jan 17 01:44:40 g00s: I just assume no one is in Australia haha Jan 17 01:44:53 yeah coz aussies suck Jan 17 01:45:29 g00s: well you'd be even more confused if you saw the location of the server i'm on atm :P Jan 17 01:45:50 bankai_: which server ? Jan 17 01:46:02 linode server in .jp Jan 17 01:46:06 ahaha Jan 17 01:46:17 only coz they don't have an AU one and it's faster than a .us one Jan 17 01:46:23 I'm an aussie on a linode server in atlanta Jan 17 01:46:46 wabz: you're VIC, right ? Jan 17 01:46:50 no, sydney Jan 17 01:47:03 at least your packets aren't melting there hehehe Jan 17 01:47:09 yeah heh Jan 17 01:47:11 haha Jan 17 01:48:21 my office is on the water Jan 17 01:48:35 oh you poor thing, how do you ever cope :P Jan 17 01:48:37 so... when it gets too hot we can just jump in the harbour Jan 17 01:49:01 wabz: just make sure you don't have your phone in your pocket when you do that :D Jan 17 01:49:04 every now and again the aircon breaks because sea creatures grown in it Jan 17 01:49:11 ir Jan 17 01:49:13 it's ok, I have an xperia z Jan 17 01:49:16 did u try it Jan 17 01:49:17 ahahaha nice Jan 17 01:52:20 wabz: is the Xperia Z *actually* waterproof ? Jan 17 01:53:15 he's swimming with it atm Jan 17 01:53:23 haha Jan 17 01:53:32 hi all Jan 17 01:53:43 hi Jan 17 01:55:20 Why does my App's ringtone picker not pick up ringtones that my phone's ringtone picker picks up ? Jan 17 01:55:57 i've built the picker into my preferences.xml but for some reason it misses out some ringtones =/ Jan 17 01:56:33 onlly thing i can think of is you have two 'types' of tones - ring and notification Jan 17 01:56:49 hmm Jan 17 01:57:21 its using the notifications style ringtones, but it doesn't pick up all the ones that my phone's notifications picker picks up Jan 17 01:57:24 i'm confused =/ Jan 17 01:57:54 bankai_: maybe i'll set it to all ringtones and see how i go though. thanks for that Jan 17 01:58:27 SirLagz: yeah it's pretty good, I've tried it in the bath for a laugh and washed it a couple of times Jan 17 01:58:38 wabz: nice Jan 17 01:58:42 I dont' think I'd want to take it in salt water or actually swim with it Jan 17 01:58:50 I've wanted to get the new Z1 but need to wait till my contract ends Jan 17 01:59:20 as long as you washed it off after you got it in salt water it should be right haha Jan 17 02:00:20 I got a question regarding webview in a dialog fragment. It seems changing orientation will refresh the webview even when I save state during onSaveInstanceState and restore it in onCreateDialog Jan 17 02:00:22 Any idea? Jan 17 02:05:04 setRetainInstanceState ? Jan 17 02:07:22 can someone help meh Jan 17 02:07:26 @bankai, doesnt work. Jan 17 02:07:39 my phone wont boot in to recovery mode Jan 17 02:08:20 removed the android os and as I tried to add a rom it no longer alows me to go in to recovory Jan 17 02:08:28 Maziz: I assume you must have google'd and seen the workarounds proposed [essentially, directly handling orientation changes]? Jan 17 02:08:56 aswell as not booting the phone up Jan 17 02:08:59 i want to avoid direct orientation handling Jan 17 02:09:12 however...... i just found theres this class called WebViewFragment.. Jan 17 02:09:15 could give that a try Jan 17 02:15:47 In case someone new is awake :) has someone figured out the actual mechanism/protocol google play uses, to validate android apps that use play services to get OAuth tokens? Jan 17 02:18:32 anyone know if there is a way to forward a port on my android device to my local machine? Jan 17 02:18:48 Normally I'd just connect to the same local network but there's no wifi here, so I'm connected over USB Jan 17 02:19:31 cubahero: adb forward Jan 17 02:20:54 p_l: oh, ok cool Jan 17 02:29:52 not gonna cuti t... .web view fragment only support 11 above.. Jan 17 02:29:57 any suggestions? Jan 17 02:30:55 i don't understand why setRetainInstance doesn't work -- the fragment isn't destroyed on config change Jan 17 02:35:54 when you retain the instance Jan 17 02:35:58 you will encounter this http://stackoverflow.com/questions/12433397/android-dialogfragment-disappears-after-orientation-change Jan 17 02:36:10 then after you fix it the webview will be refresh after orientation change. Jan 17 02:38:30 interesting.... i guess you're launching the dialog straight from an activity, not a fragment, right ? Jan 17 02:40:32 ugh, why is getActivity() final?? Jan 17 02:40:58 im working with fragments for the first time, i see that i can access the parent activity scope with a getActivity(), but how do i call public methods from the parent? Jan 17 02:41:02 or is that not possible Jan 17 02:41:32 if i do Activity parent = getActivity(); and then try parent.methodOfParentActivity(); its not valid Jan 17 02:41:45 if I have a library that's targeting version 19 but my app is targeting version 15 can I still use that library? It uses classes from API level 16 Jan 17 02:42:00 kamui: you need to cast appropriately when doing that Jan 17 02:42:32 bankai_ do i need to cast it as an activity at the assignment point? Jan 17 02:42:35 coz your activity extends Activity, you'll need to do something like MyActivity activity = (MyActivity)getActivity(); Jan 17 02:42:36 or each time i want to use a method Jan 17 02:42:43 ok got ya Jan 17 02:42:45 ill try it Jan 17 02:43:44 cubahero: only if the library is itself written to avoid using api-16 APIs at runtime. [or I guess, if you're able to avoid using that part of the library at runtime.] Jan 17 02:43:59 well - at runtime, when running < api-16 I mean... Jan 17 02:44:06 negative - it uses level 16 APIs Jan 17 02:44:35 Is there some way to build that library into a binary file that I can include, and which would include the API-16 API's? Jan 17 02:46:52 bankai_ perfect, thanks. I fixed the object assignment to my actual class, and then casted getActivity and it looks good now Jan 17 02:46:58 <3 Jan 17 02:47:07 cubahero: there's no real magic here - if the library doesn't have something like if (Build.VERSION.SDK_INT < ...) around its api-16 usage, then you'll have to have some similar wrappers, or backport the apis of interest Jan 17 02:47:40 if I use the Eclipse provided here http://developer.android.com/training/basics/firstapp/index.html ... what is the correct directory to put it in? /usr ? /opt ? ~/eclipse and ~/sdk ? Jan 17 02:48:02 and by "correct", I mean "your preference" Jan 17 02:48:06 there is no correct Jan 17 02:48:10 put it wherever you want Jan 17 02:48:21 and by "correct", I mean "your preference" Jan 17 02:48:26 have you taken a whole day to decide where to put it? Jan 17 02:48:28 wtf does it matter Jan 17 02:48:35 OCPD Jan 17 02:48:47 if it takes you this long to figure out where to put it, I don't want to know how long it'll take you to actually write an app Jan 17 02:48:57 / /tmp :-) Jan 17 02:49:01 kbs: ok - thanks Jan 17 02:49:03 lol :) Jan 17 02:49:22 * kbs should probably own up to being an unabashed emacs user, and cannot resist the occasional dig Jan 17 02:49:25 /tmp is my favourite storage area on solaris ;) Jan 17 02:49:44 bankai_, you keep eclipse in /tmp? Jan 17 02:49:50 seems odd Jan 17 02:49:54 it's the only place it deserves Jan 17 02:50:03 you destroy it that often? Jan 17 02:50:24 i think my humour has been lost :S Jan 17 02:50:36 oh ok, where do you actually keep it? :) Jan 17 02:50:48 pfft like hell i'd use that shit Jan 17 02:50:53 haha Jan 17 02:51:03 IJ all the way, buds Jan 17 02:51:09 anyone wanna let me know where they actually keep eclipse? Jan 17 02:51:09 IJ ? Jan 17 02:51:19 raj: i use my package manager's eclipse lol Jan 17 02:51:36 SirLagz, pfn said to try not to do that Jan 17 02:51:51 are you on arch? Jan 17 02:51:54 nope Jan 17 02:51:55 Debian Jan 17 02:52:01 isn't it old? Jan 17 02:52:33 isn't what old ? Debian ? Jan 17 02:52:38 raj, if you're ocd, you should already know where to put it Jan 17 02:52:43 the eclipse in debian's package manager Jan 17 02:52:54 i don't remember what version i'm on, but it works... Jan 17 02:52:56 raj: eclipse in any package manager seems to be a disaster Jan 17 02:53:02 no matter the version Jan 17 02:53:10 whooooooooooo Jan 17 02:53:10 p_l: why ? Jan 17 02:53:22 coz eclipse is a disaster to begin with Jan 17 02:53:33 ok, noted, thanks p_l Jan 17 02:53:33 bankai_: What's IJ ? Jan 17 02:53:42 bankai_: and why is it a disaster ? Jan 17 02:54:09 bankai_, I'm interested in that answer too Jan 17 02:54:10 SirLagz: Eclipse is a mess sometimes when fitting versions of components together, so distro-packaged eclipse is IMO bad idea when you use components from outside distro Jan 17 02:54:25 because you don't want a system update to break your config Jan 17 02:54:26 ah i see Jan 17 02:54:46 p_l: in other words, if you never update eclipse then it'd be ok :D haha Jan 17 02:54:56 p_l, so if using the version here, eclipse is a great choice? http://developer.android.com/training/basics/firstapp/index.html Jan 17 02:55:22 raj: the copy from the bundle might work fine. Jan 17 02:55:25 SirLagz: IJ - intellij Jan 17 02:55:32 There's a lot of other reasons to not deal with eclipse, of course Jan 17 02:55:39 bankai_: I'll have to google that. Jan 17 02:55:41 p_l, such as? Jan 17 02:56:16 raj: messy UI, random unreasonable slowness, aforementioned mess of components Jan 17 02:56:36 I agree Jan 17 02:56:37 let's not forget having to 'clean' all the time Jan 17 02:56:42 I've actually never used an IDE Jan 17 02:56:48 I do all programming within gedit :) Jan 17 02:57:16 but I hear it's impractical not to use an IDE for android dev Jan 17 02:57:37 if you have tools to make life easier, why not use them Jan 17 02:57:48 raj: s/android/java/ Jan 17 02:58:15 * kbs has been a happy, contented java/android coder with emacs since the hotjava days Jan 17 02:58:40 kbs: can you document your setup? Jan 17 02:59:01 nothing special. plain emacs, TAGS to index the android source. Jan 17 02:59:08 bankai_: clean ? Jan 17 02:59:17 I've been pondering about doing similarly, keeping IJ for debugging **** ENDING LOGGING AT Fri Jan 17 02:59:58 2014