**** BEGIN LOGGING AT Sat Jun 08 02:59:58 2013 Jun 08 03:01:45 hey every1.. just got GCM going finally. what is the limit of registration IDS i can notify at once? Jun 08 03:45:43 Does anyone know how to make an existing project in Android studio to be backed by gradle? Jun 08 03:46:12 If i ever try run buid.gradle on my existing project i get the error "Module 'x' is not backed by gradle" Jun 08 03:54:15 Well, if someone does know, just send me a dm or something, cheers Jun 08 03:59:11 hey androids, quick question. my screen off code stopped working with a recent android version, I believe 4.2... setting screenBrightness for the window to 0 now only dims the screen Jun 08 04:00:59 I am getting a "ERROR: APK path is not specified for module 'MyApp' in Android Studio after pulling the source from git. Jun 08 04:07:57 Well Jun 08 04:08:19 Maybe on that version, the screenbrightness "0" will only dim your screen... Jun 08 04:37:31 Any ideas about how one might go about implementing "swipe cards" a la Google Now? Jun 08 04:50:50 could anyone with Google api experience check this out for me? Jun 08 04:50:52 http://reddit.com/comments/1fo2gp Jun 08 04:51:10 responses there or here are fine Jun 08 04:54:58 anybody? Jun 08 05:01:43 does anyone here have Google api experience? Jun 08 05:01:53 maps specifically Jun 08 05:03:30 is this more for apps or roms? Jun 08 05:29:04 is there anyone here who has any experience with Google maps api? Jun 08 05:33:16 anyone? Jun 08 05:36:45 hello? Jun 08 05:38:09 so i guess I'll come back another time then Jun 08 05:39:17 *whew* thought he'd never leave :p Jun 08 06:33:00 hello, can anyone please explain what am i doing wrong here? http://paste.ubuntu.com/5744175/ http://paste.ubuntu.com/5744177/ Jun 08 06:33:05 why is find view by id not working? Jun 08 06:33:51 i mean, why doesn't find view by id return what i expect it to return, i'm sure it's actually working but i'm not using it properly :) Jun 08 06:34:00 what have those to got to do with each other ? Jun 08 06:34:27 well, the xml is defined as com.notbed.android.log.LogTextView Jun 08 06:34:34 doesn't that link it to LogTextView object? Jun 08 06:34:38 as in your textViews and the customView parent Jun 08 06:35:42 a view only has access in a hierachy "from" that hierachy Jun 08 06:35:51 and there is no hierachy in your customVIew Jun 08 06:36:04 there is simply "this" which extends linearLayout Jun 08 06:36:11 nothing in it Jun 08 06:36:33 but what is the point of having that xml Jun 08 06:36:36 if it doesn't link it? Jun 08 06:36:41 it does Jun 08 06:36:49 in the view hierachy Jun 08 06:37:04 that exists in your activity Jun 08 06:37:10 eg Jun 08 06:37:14 in your activity Jun 08 06:37:27 myCustomView v = findViewBlaaa Jun 08 06:37:45 mMessage = v.findViewBlaaa Jun 08 06:38:10 but like I say there is no hierachy in that view class you have Jun 08 06:38:22 unless you either create one in it Jun 08 06:38:22 but what's the difference between v.findViewBlaa and findViewBlaa inside of v ? Jun 08 06:38:26 or inflate on into it Jun 08 06:38:41 setContentView(R.layout.fooLayout); Jun 08 06:39:09 capella, there is no setContentView inside linearLayout Jun 08 06:39:49 loin: look at it this way Jun 08 06:39:55 what if you have another xml Jun 08 06:39:57 ah ... hadnt noticed Jun 08 06:40:07 that has your view, with 2 image view in it Jun 08 06:40:16 how does your customView know what the hell is there Jun 08 06:40:21 when it's there Jun 08 06:40:25 or how to use it Jun 08 06:40:30 it does not :) Jun 08 06:41:26 StingRay_, another xml for the same object? Jun 08 06:41:38 as in LogTextView can have more than one xml? Jun 08 06:41:41 your not using that xml in that class are you ? Jun 08 06:41:43 . o O (thought it was an activity :P ) Jun 08 06:41:57 your xml has nothing to do with that class Jun 08 06:41:59 capella, not an activity :P Jun 08 06:42:13 other than using that class, IN the xml you pasted Jun 08 06:42:18 StingRay_, then why have an xml in the first place? Jun 08 06:42:31 for layout of view structures Jun 08 06:42:42 in your case your attempting to do it backwards Jun 08 06:44:37 you have to understand in your view class, there are no children Jun 08 06:44:44 so there is nothing to find Jun 08 06:44:54 in your activity, that is using that xml Jun 08 06:44:57 then yes there is Jun 08 06:45:12 but why is my activity using that xml? Jun 08 06:45:22 the activity has its own xml file Jun 08 06:45:29 oh then it;s not Jun 08 06:45:38 i just want to have custom objects inside my activity Jun 08 06:45:41 that xml is not being used then Jun 08 06:45:42 that are stuctured in a special way Jun 08 06:46:36 if it's not being used at all, then my origional question was valid :) Jun 08 06:46:38 yay Jun 08 06:48:58 i guess my question would be 'what is the correct way to link them' Jun 08 06:49:57 well, lots of ways Jun 08 06:50:18 the basic approach there is to "inflate" a layout into your custom class Jun 08 06:50:32 so it actually has the views you want to reference Jun 08 06:50:35 or Jun 08 06:50:42 create them in code and addView Jun 08 06:51:45 i think i want to inflate them Jun 08 06:52:25 well that would create an unnecessary level Jun 08 06:52:39 and if you just want to have a view that has 2 textViews Jun 08 06:52:48 and share that lots Jun 08 06:53:10 you can use in your layout for the activity and specify that xml set Jun 08 06:56:11 i don't think i understand Jun 08 06:56:15 the inflating part Jun 08 06:56:28 i suppose i'm suposed to use something like Jun 08 06:56:41 LogTextView inflate = (LogTextView) inflator.inflate(R.layout.log_item, mainView); Jun 08 06:57:22 is this correct? Jun 08 06:57:34 I think your missing a bit of knowledge to understand views and layouts etc in android Jun 08 06:57:51 and maybe becuase of that, thinking about it a little wrong Jun 08 06:58:14 i'm afraid i am missing the knowledge Jun 08 06:58:18 which is why i am here Jun 08 06:58:24 tis in the docs Jun 08 06:58:31 into to android dev Jun 08 06:58:35 offical docs I mean Jun 08 06:58:40 on d.android.com Jun 08 06:58:48 in the getting started tutorials Jun 08 07:00:22 got it Jun 08 07:00:22 thanks Jun 08 07:59:29 soooo, does everyone love gradle yet? Jun 08 08:01:08 not till some1 can show me external library projects linked in Jun 08 08:01:20 AS + ant for me Jun 08 08:02:46 StingRay_, depends, are those external library projects also being built with gradle? Jun 08 08:02:59 no, it really dont Jun 08 08:03:17 Ah, if the answer was yes, this would be the link I'd give you https://code.google.com/p/dashclock/source/browse/ Jun 08 08:04:06 how come my app looks like crap but the one in the tutorial looks nice? http://i.imm.io/18CtM.jpeg Jun 08 08:04:14 source sets dont work Jun 08 08:04:23 well didnt for me Jun 08 08:04:40 loin, is yours the one on the left? Jun 08 08:04:46 right Jun 08 08:04:52 there is no diff Jun 08 08:04:59 other than theme/holo Jun 08 08:05:06 What does 'AS' stand for? Jun 08 08:05:06 looks fine to me, yeah, what StringRay said Jun 08 08:05:14 min_ch Android Studio Jun 08 08:05:22 if you think it looks crap, you gonna run into problems Jun 08 08:05:23 :) Jun 08 08:05:44 how can i get the nice dark theme? Jun 08 08:05:54 Afzal: see the source paths used in gradle only seen ../path Jun 08 08:06:04 so still within the root gradle path Jun 08 08:06:13 ohh, you want absolute paths? Jun 08 08:06:18 loin: read about styles and themes Jun 08 08:06:35 Afzal: I want any path that exists outside the gradle root Jun 08 08:06:38 just like I can in ant Jun 08 08:06:57 and with AS + ant, AS does it for me too Jun 08 08:06:58 :) Jun 08 08:07:21 StingRay_, sorry but what is gradle root? https://code.google.com/p/dashclock/source/browse/example-extension/build.gradle has the dependency path from the current folder Jun 08 08:07:33 StingRay_: latest version of AS supports syncing IDE settings to build.gradle Jun 08 08:07:51 Jc_Dev, isn't it the other way? syncing rom build.gradle to IDE? Jun 08 08:08:08 from* Jun 08 08:08:29 Afzal: ah yeah looks like it's that direction, my bad Jun 08 08:08:39 Afzal: well I mean the primary project root, normally where gradle.settings lives Jun 08 08:09:05 ohh i see, well then it's equally useless in my case as well Jun 08 08:09:06 :D Jun 08 08:09:48 when some1 can show me that, and in AS it takes care of gradle config, just like it does ant Jun 08 08:09:57 then I will make the switch Jun 08 08:10:54 StingRay_: are you talking about http://www.gradle.org/docs/current/userguide/multi_project_builds.html Jun 08 08:11:22 yeah Jun 08 08:11:31 that dont exist combined Jun 08 08:11:49 as in NOT what they call a sub project Jun 08 08:12:05 just exactly like libaray projects in a workspace in eclipse Jun 08 08:12:09 dont matter where it is Jun 08 08:12:30 oh i see so you're resisting the new project structure Jun 08 08:12:41 not at all Jun 08 08:12:51 I still have no clue on how to convert a normal project to gradle Jun 08 08:13:00 some obscure error always thwarts my attemps Jun 08 08:13:01 I'm resisting COPIES of libs (the same libs) inside the root Jun 08 08:13:03 lol Jun 08 08:13:24 like this createbuildtask must not be null Jun 08 08:13:42 i understand createBuiltTask must not be null but no clue on what i can do to fix that :/ Jun 08 08:13:44 Afzal: use the export option from eclipse and it generates a gradle.build for you Jun 08 08:14:03 Jc_Dev, haha but I already use AS + ant for developing this app :p Jun 08 08:14:06 Jc_Dev: ok /projects/smsace depends on /projects/libs/mylibandroid Jun 08 08:14:14 thats what I mean Jun 08 08:14:45 StingRay_: gotcha - let me try that Jun 08 08:14:57 currently my lib is under my project, i'll try moving it out Jun 08 08:15:09 ah but Jun 08 08:15:20 mylibandroid also has linked libs Jun 08 08:15:26 jars and lib projects Jun 08 08:15:38 should be ok as long as mylibandroid has a functioning build.gradle Jun 08 08:15:44 indeed Jun 08 08:15:46 you would think Jun 08 08:15:51 just guessing thoug Jun 08 08:15:57 well I had Jun 08 08:16:09 but then attempted to put the two together Jun 08 08:16:12 and couldn't Jun 08 08:16:24 after a few hours I gave up, switch to ant Jun 08 08:16:28 actually did some work Jun 08 08:16:29 :) Jun 08 08:16:50 maybe doesn't help that I'm not natively a programmer Jun 08 08:16:56 but still quite techy Jun 08 08:17:02 techi Jun 08 08:17:06 huh Jun 08 08:17:07 oh would you look at that! Jun 08 08:17:11 teki Jun 08 08:17:13 ABS has gradle support not Jun 08 08:17:25 techie Jun 08 08:17:37 now* lol Jun 08 08:17:37 there you go hehe Jun 08 08:17:50 3.5 hours sleep Jun 08 08:18:02 may go have a nap :) Jun 08 08:19:01 Jc_Dev, if I export gradle files for all the library projects that i have Jun 08 08:19:05 and then for my project Jun 08 08:19:10 that should work? Jun 08 08:19:30 Afzal: not in my attempts Jun 08 08:19:34 haha Jun 08 08:19:39 not even creating fresh new projects Jun 08 08:19:54 oh, fresh new projects work for me. It's only the libraries Jun 08 08:20:01 the only way I found of a build to work, is if the lib is inside your project structure Jun 08 08:20:11 kinda defeats the purpose Jun 08 08:20:34 I would do that only when we can link library to sources/documentation jars Jun 08 08:20:39 otherwise, yeah Jun 08 08:20:55 3rd party libs* Jun 08 08:21:20 Jc_Dev: is attempting the library project gradle mess, see how he gets on Jun 08 08:21:27 :) Jun 08 08:21:45 i haven't tried it, but i think you can import external build.gradle's as modules within your project, then state that your project's module depends on the referenced module Jun 08 08:22:14 yeah i'm fully using AS and gradle, but i have everything under a single project structure, so i'm not running into the problem you guys are talking about Jun 08 08:22:41 thought you were gonna move it out and try ? Jun 08 08:23:14 cause I still say it dont work till some1 shows me it… so not suitable alternative when code sharing across multiple lib projects Jun 08 08:23:22 oh i was going to, but my lib is just a jar, i thought it was pointless since it would have needed sub-dependencies to test out your scenario Jun 08 08:23:39 you dont really Jun 08 08:23:59 just projectA and libProjectA and libProjectB Jun 08 08:24:15 making sure that the lib projects are well outside the projectA path Jun 08 08:24:20 ok well let me make a dummy libproject quick in some random location not under my projectA, that should do the trick... Jun 08 08:24:49 cause I could get my libaray to build fine Jun 08 08:25:06 and with deps. nulled my app to build fine Jun 08 08:25:13 but not together Jun 08 08:25:20 AS obviously had no problems Jun 08 08:25:24 just gradle Jun 08 08:25:46 StingRay_, thing is, because of how i organize my projects, my workspace folders don't have any projects inside them :p Jun 08 08:26:08 so naturally, when I switched to IDEA, I created this dummy "project" folder that has no modules inside it :d Jun 08 08:26:24 similar situation? Jun 08 08:26:58 well I have a core android libaray project Jun 08 08:27:06 that any of my apps reference Jun 08 08:28:00 like a project (IntelliJ project?) with all the libraries you use in all your apps? Jun 08 08:28:31 Hello guys, any idea on W/System.err: org.json.JSONException: Value {"id":"8626","type":"БВ","leaves":"03:34:00","arrives":"06:11:00"} at 0 of type java.lang.String cannot be converted to JSONObject Jun 08 08:29:08 tagrudev, what's the code? Jun 08 08:30:51 maybe is to do with ":" ? Jun 08 08:31:25 json is valid though Jun 08 08:31:34 it is a perfectly valid json object Jun 08 08:31:45 tagrudev, can you share the lines that cause this? Jun 08 08:32:25 noob gradle question, if something is building nicely, how can i know for sure it's building with gradle? :p Jun 08 08:32:47 I just pulled the dev branch of ABS, and I'm not sure if it's building with gradle or if I need to do something Jun 08 08:33:00 I am making a gist with the class and the response moment Jun 08 08:33:45 https://gist.github.com/tagrudev/5734523 Jun 08 08:34:09 line 93? Jun 08 08:34:46 yup Jun 08 08:35:55 ah Jun 08 08:36:15 the call is apparently not getJSONObject(int) Jun 08 08:36:26 but getJSONObject(java.lang.String) Jun 08 08:36:29 http://stackoverflow.com/questions/9830447/having-trouble-with-getjsonobject-method Jun 08 08:36:35 at least that's what this link says Jun 08 08:38:54 hmm I don't think it's the same issue Jun 08 08:38:56 since I get Jun 08 08:38:56 W/System.err: org.json.JSONException: Value {"id":"8626","type":"БВ","leaves":"03:34:00","arrives":"06:11:00"} at 0 of type java.lang.String cannot be converted to JSONObject Jun 08 08:38:56 W/System.err: at org.json.JSON.typeMismatch(JSON.java:96) Jun 08 08:39:25 oh, it's not line 93 Jun 08 08:39:27 it's 96 Jun 08 08:39:42 actually wait, i'm wrong nvm Jun 08 08:40:10 nope it's 96 on the JSON.java file Jun 08 08:40:33 yeah, disregard everything i said Jun 08 08:42:18 I like how you can waste a day on an issue like this in android development Jun 08 08:42:22 :) Jun 08 08:43:57 tagrudev, holds try for every platfomr :) Jun 08 08:44:06 true*, man i must be sleepy >_< Jun 08 08:46:07 Afzal: I think there is an error in my response hmm did you check the json response in the gist Jun 08 08:46:29 ohhhh, your response is a string it seems Jun 08 08:46:38 it must be unescaped if i'm right Jun 08 08:46:57 wow, i didn't look at the response :/ Jun 08 08:47:27 hang on Jun 08 08:47:37 that response is an jsonArray no ? Jun 08 08:47:45 yes Jun 08 08:48:03 it's a jsonArray still, yes Jun 08 08:48:16 but it doesn't form a JsonObject because there's no key and value Jun 08 08:48:18 just strings Jun 08 08:48:22 (am i right?) Jun 08 08:48:33 I am on the same line as you Afzal Jun 08 08:48:48 hmm maybe my api is doing something wrong Jun 08 08:48:58 wait a sec Jun 08 08:49:05 thats the exact response from server ? Jun 08 08:49:12 it's in the gist Jun 08 08:49:28 tagrudev, response should be like this https://gist.github.com/AfzalivE/5734564 Jun 08 08:49:31 where did that response come from ? Jun 08 08:49:36 well, besides the prettfiying Jun 08 08:49:53 actually not even Jun 08 08:50:12 Afzal: hmm let me try it like this Jun 08 08:50:15 moment Jun 08 08:50:22 yeah, look now Jun 08 08:50:23 https://gist.github.com/AfzalivE/5734564 Jun 08 08:50:57 was going to say that was not json with the leading " Jun 08 08:51:20 between array and object there is no \" Jun 08 08:53:58 * StingRay_ is getting tired Jun 08 08:54:34 * StingRay_ wonders how Jc_Dev got on with a clean library project Jun 08 08:54:40 :) Jun 08 08:55:29 StingRay_, now I'm not sure but I just pulled the latest ABS and exported gradle files for SlidingMenu from eclipse after that Jun 08 08:55:35 and SlidingMenu compiles in IDEA Jun 08 08:56:09 IDEA is not the problem Jun 08 08:56:15 nothing to do with it Jun 08 08:56:17 ugh, nvm, remember when i asked how to see whether gradle was being used to compile? It wasn't >_< Jun 08 08:56:25 (yeah sorry, i mean gradle in IDEA) Jun 08 08:56:28 StingRay_: still trying out various things - i at least understand why it's difficult - they don't want you to do that, they want those kinds of external dependencies to be retrieved as project outputs through a system like maven Jun 08 08:57:09 Jc_Dev: yeah, but then thats 2 build deps that my ide needs Jun 08 08:57:18 Jc_Dev, what if you wanna modify the library a little, like how you have to modify SlidingMenu to use ABS Jun 08 08:57:19 was not the case with eclipse + ant Jun 08 08:58:00 Afzal: fork it if it's not yours, or else edit it via the project specific to the lib, and re-publish via maven (which you add as a build step to build.gradle) Jun 08 08:58:14 oh boy Jun 08 08:58:15 lol Jun 08 08:58:45 thanks Jc_Dev, I guess this will have to wait for much later Jun 08 08:58:57 Afzal: the only difference is a second instance of Android Studio to work on that other dependancy, from what i can tell Jun 08 09:00:00 i'm thinking you could also make a giant project that includes the lib plus every project that uses it, and then have separate build configs for each project, and you select from dropdown which one you want to build - that could work too i think Jun 08 09:00:25 hmm Jun 08 09:00:35 i'm currently trying a "hack" to allow referencing a lib via relative paths (even though this goes against the grain) Jun 08 09:01:00 the hack involves using the backwards compatibility support they added for eclipse projects Jun 08 09:02:25 see they want you to reference external dependancies using the "POM", which is a special syntax like this: compile 'org.hibernate:hibernate-core:3.6.7.Final' where it knows how to retrieve in from your local maven repo Jun 08 09:02:54 it can even reference online repos this way Jun 08 09:03:02 and how is that nice for a noob dev like myself that does not do it professionally / Jun 08 09:03:06 ugh Jun 08 09:04:01 StingRay_: i'm almost tempted to say make a hard-link on your file-system to make it appear under each of your projects lol Jun 08 09:04:15 but let me test this last thing, it might do the trick... Jun 08 09:04:23 symlink didnt follow Jun 08 09:04:39 could just be UNIX/BSD (osx) Jun 08 09:04:46 but nope :( Jun 08 09:04:48 you can do it on NTFS too Jun 08 09:05:13 oh you're saying you tried it? Jun 08 09:05:18 indeed Jun 08 09:05:28 yeah it would have to be a hard link, not a symlink Jun 08 09:06:01 so now I have to have lib projects at the root of a file system ugh Jun 08 09:06:10 this just gets too….not me Jun 08 09:06:11 :) Jun 08 09:06:17 hence AS + ant Jun 08 09:06:22 cause it just works Jun 08 09:06:24 you can make links anywhere, no need to put them at root Jun 08 09:06:58 if you want to have some fun, make one that points to it's parent :) Jun 08 09:07:05 define hard link Jun 08 09:07:34 as in ln Jun 08 09:07:44 hlink etc Jun 08 09:07:56 cause I have a cripped link system Jun 08 09:08:02 thanks to apple gods Jun 08 09:08:24 or rather apple daemons Jun 08 09:08:33 i've never tried it on a mac, but the difference is that one is like a shortcut, the other is an actual file that points to the same data Jun 08 09:08:59 terms are hardlink vs softlink usually, let me see if you can do a hardlink on a mac Jun 08 09:09:53 oh my, they've crippled ln Jun 08 09:10:06 they suggest compiling a 4 line c program lol Jun 08 09:10:13 http://stackoverflow.com/questions/80875/what-is-the-unix-command-to-create-a-hardlink-to-a-directory-in-os-x Jun 08 09:10:41 ok maybe scratch that idea, that's getting a bit crazy Jun 08 09:11:16 see my pain ? Jun 08 09:11:18 :) Jun 08 09:13:10 does java have a console i could use to test some things out? like python does Jun 08 09:13:44 Jc_Dev, isn't it ls -s ? Jun 08 09:13:59 ln -s will create a symbolical link Jun 08 09:14:07 oh okay Jun 08 09:14:13 ln without -s should create a hardlink Jun 08 09:14:20 right, hence the s. lol Jun 08 09:15:19 java 1 : ruby 0 Jun 08 09:15:26 did it thanks peeps Jun 08 09:17:01 StingRay_, "Why Gradle" Very flexible. Allows using best practices but doesn’t force its own way of doing things. Jun 08 09:17:04 hahahahahaha Jun 08 09:17:24 primski: yes, in Android Studio it's called Evaluate Expression from the Debug window Jun 08 09:18:07 Jc_Dev: in eclipse? Jun 08 09:19:17 not sure, probably something similar - keep in mind it's not a shell like what python gives you, you still have to be debugging your app before you can enter commands Jun 08 09:19:39 aha, ok i'll look into it, thanks Jun 08 09:19:58 np Jun 08 09:20:55 Jc_Dev, where is gradle home? Jun 08 09:21:35 not exactly sure what that term means - is it referring to directory containing settings.gradle perhaps? Jun 08 09:22:08 for example, from that directory the command ./gradlew build packageDebug will compile your project Jun 08 09:22:16 Jc_Dev, when you import a module and choose import from gradle module Jun 08 09:22:47 oh just ignore that Jun 08 09:22:56 oh okay, thanks Jun 08 09:23:08 that's only applicable if you're running gradle locally, it's easier to just use the gradle wrapper though Jun 08 09:23:11 i'm trying to get ABS to compile with gradle since the build files are there in dev branch Jun 08 09:23:25 ah ok, good idea Jun 08 09:23:43 Hello, guy i am trying to simulate Reboot on emulator Jun 08 09:24:01 But, my emulator not sending Activating BootReceiver Jun 08 09:24:38 biggenius: i haven't tried that, but my understanding is that you have to re-install your apk every time the emulator starts up, so you might have to do somethnig special to test that flow Jun 08 09:25:45 biggenius: you capturing and intent ? Jun 08 09:25:51 no, that's not true Jun 08 09:25:54 Yes. Jun 08 09:25:57 biggenius, did you request the permission for that intent? Jun 08 09:26:49 Jun 08 09:26:52 biggenius: you can send intents Jun 08 09:27:07 Yes, i already addded appropirate permission for this in my android manifest file. Jun 08 09:27:13 adb shell am broadcast -a android.intent.action.SOMEREBOOTCRAP Jun 08 09:27:15 mane! ndk-build is still not finding #include and although I did put in the Application.mk APP_STL := stlport_shared. Jun 08 09:27:26 Yes. I already tried that but its not working :( Jun 08 09:27:45 oh, then you have a skillz code problem ;) Jun 08 09:28:05 either way, tis likely that it's your mistake Jun 08 09:29:30 :StingRay_ it works on Real Device. Jun 08 09:29:58 oh so why care ? Jun 08 09:30:14 as in .." it works " move on :) Jun 08 09:30:38 alright then. Jun 08 09:59:32 hi Jun 08 10:02:25 mane! ndk-build is still not finding #include and although I did put in the Application.mk APP_STL := stlport_shared. Jun 08 10:03:39 just graduated from uni and hope to get into android development, thankfully there's a channel for that in this server :P Jun 08 10:04:33 I do have a question regarding android though, how possible is it to have real-time networking on it between devices? I think most networked applications I've seen are mostly turn based rather than realtime Jun 08 10:04:44 anyone know any apps that do use real-time networking? Jun 08 10:04:55 hi all, I'm following some tutorials.. where do i define a variable that i want to use later on? http://paste2.org/4YHmcJN6 Jun 08 10:06:30 beefsteak, what do you mean by realtime networking? Jun 08 10:06:32 what use cases? Jun 08 10:06:48 apps usually avoid running the radios all the time because that kills battery in matter of hours Jun 08 10:07:36 many fps multiplayer games are what you can think of as real-time networking :) Jun 08 10:07:36 say for example, online gaming vs. other users? Jun 08 10:07:47 lots Jun 08 10:08:32 perfect Jun 08 10:08:36 how do i define a variable? manager = (AudioManager) context Jun 08 10:08:37 .getSystemService(Context.AUDIO_SERVICE); Jun 08 10:08:44 where do i place it Jun 08 10:08:50 http://paste2.org/4YHmcJN6 Jun 08 10:09:00 rved you should start with some java tutorials Jun 08 10:09:04 i am Jun 08 10:09:12 thats android Jun 08 10:09:19 I mean basic 101 java Jun 08 10:09:33 do i need to typ var manager? Jun 08 10:09:46 seriously Jun 08 10:09:57 they have lots of learning java basics all over Jun 08 10:10:04 oracle has some good starters Jun 08 10:10:52 networking in android is the same as in Java right? Sockets, streams and all that? So being familiar with those will make the transition easier? Jun 08 10:11:06 Unless there are some holes that you have to look out for in android Jun 08 10:11:16 beefsteak: right. but take care not to do networking on the UI thread Jun 08 10:11:33 well not that you can Jun 08 10:11:42 so none issue Jun 08 10:12:26 guessing doing it on the UI thread will just cause a freeze? had that before on normal Java Jun 08 10:12:56 beefsteak, well, Google did just announce whole new set of APIs just for realtime gaming between devices ;) Jun 08 10:13:10 using that is probably the smarter way around Jun 08 10:13:18 but yeah, you have sockets and stuff if you wan Jun 08 10:13:37 but you just need to remember that mobile devices and networks don't behave the same way as cable connecitons do Jun 08 10:13:52 wicked. Thanks a lot, would make my life easier Jun 08 10:16:45 beefsteak, http://developer.android.com/google/play-services/games.html Jun 08 10:18:20 StringRay_: why can't i do: http://paste2.org/Ht5t52N8 Jun 08 10:18:37 i get red crosses in Eclipse Jun 08 10:18:50 cause your lacking basics of java ? Jun 08 10:19:05 and attempting to learn android sdk without knowing it is a bit silly Jun 08 10:19:13 thanks Mavrik. Since I've only only programmed in Java and C alone, I may have to start from the beginning to understand android better Jun 08 10:19:27 will go through basics again quickly before looking at these api's Jun 08 10:19:37 i haven't used library project's before, do they automatically compile to a jar? Jun 08 10:20:03 android library projects are strange and usually don't compile to jar :) Jun 08 10:20:15 I think gradle builds AARs Jun 08 10:20:33 StringRay_ i rather learn 'on the go' Jun 08 10:20:36 aar, oh ok, i just want to include one project's output into my second project Jun 08 10:21:02 rved: to learn to drive you dont jump into a racing car and enter a race Jun 08 10:21:30 rved: also this is for android dev help, not really for java 101 tutorials Jun 08 10:21:42 lol, then what is the channel to ask Jun 08 10:21:48 #java Jun 08 10:21:57 or just do some basics Jun 08 10:22:00 tutorials Jun 08 10:22:03 java 101 Jun 08 10:22:05 StingRay sure i do if it's a self driving car! Jun 08 10:22:35 * StingRay_ really has to think of better analogies Jun 08 10:22:57 Jc_Dev, if it's just a Java project that doesn't use Android resources (xmls, images, etc.) then you'll get .jar yes Jun 08 10:24:13 Mavrik: oh gotcha, it does that automatically? all i did was checkbox "Library" when i made a new project, it's still has a bunch of android stuff in it though Jun 08 10:24:20 anyone has experience with google play services? Jun 08 10:24:44 StingRay_: is your external lib project a jar file (Java Library Jun 08 10:24:46 )? Jun 08 10:25:00 god no Jun 08 10:25:15 I wouldn't care if it were Jun 08 10:25:32 it does have jar files as deps. but it is a src tree Jun 08 10:25:41 Jc_Dev, depends on build system really, I don't remember what Eclipse does :) Jun 08 10:25:49 ok Jun 08 10:25:59 ant will jar them wont it ? Jun 08 10:26:07 Jc_Dev, the deal is, you can't package stuff from "res" Android directory into a .jar, that's why they're not used for projects which need resources Jun 08 10:26:12 gradle dont .. ? Jun 08 10:26:28 Jc_Dev, so Maven now uses apklib, gradle has it's own aar format and if you're using ant you're fucked :P Jun 08 10:26:41 well no your not Jun 08 10:26:46 cause the combine Jun 08 10:27:08 they* Jun 08 10:31:09 hi Jun 08 10:31:16 Hi ;-) Jun 08 10:31:38 does it make sense to provide both a dark and a light design for within one app? Jun 08 10:31:51 -for Jun 08 10:32:43 depends on the app I'd say ;-) Jun 08 10:33:26 have you seen apps that offer this option? Jun 08 10:34:34 many do Jun 08 10:34:41 many offer lots more Jun 08 10:34:49 mine will offer "the most" :) Jun 08 10:36:57 I would never use an option to change it as a user Jun 08 10:37:19 that goes to show what type of user you are Jun 08 10:37:41 I do use options to change it Jun 08 10:37:53 and many many apps sell themes, lots of them Jun 08 10:43:36 k^^ Jun 08 10:47:50 spobat just simple white / dark contrasts Jun 08 10:48:06 i mean do you prefer white text on black background or black text on white background Jun 08 10:48:27 i think most people find one or the other definatly preferential for reading Jun 08 10:49:39 oh i am tired didn't see even left Jun 08 11:55:01 why dosnt sw1080dp work> Jun 08 11:56:06 I very much doubt you have a 1080dp device in your hands. Jun 08 11:56:48 htc one Jun 08 11:57:14 what would be the swXXXXdp to target htc one type of screen Jun 08 11:57:21 well. Jun 08 11:57:38 I suggest you go read the documentation on those qualifiers and clear up the difference of what units mean. Jun 08 11:57:45 "dp" aren't pixels. Jun 08 11:58:11 this whole bloody multiple screen development is soo confusing Jun 08 11:58:58 so i canrt target devices on there physical with Jun 08 11:59:10 dp is a physical size Jun 08 11:59:18 1080dp is about 6.75 inches Jun 08 12:00:48 should i use xhdpi or swXXXdp Jun 08 12:01:04 what is recomended Jun 08 12:01:10 Anyway, you're going about this wrong Jun 08 12:01:15 You don't target specific devices Jun 08 12:02:01 You group them.. e.g. so you have one set of resources for 10" tablets, 7" tablets, phones, small phones Jun 08 12:02:11 i know Jun 08 12:02:27 this is my problem Jun 08 12:03:09 i have a gridview and the variables like columns size etc are in a dimens.xml file Jun 08 12:03:43 on a galaxy nexus i can only fit 3 rows at 90dp*90dp Jun 08 12:03:53 on my htc one i can fit 4 rows at 90*90 Jun 08 12:04:23 That doesn't make sense Jun 08 12:04:27 so i want a values-XXXX for screens that can fit 4 rows Jun 08 12:04:31 Galaxy nexus and htc one has the same screen size Jun 08 12:04:54 this is what is confusing me Jun 08 12:04:57 So 3 or 4 rows should look the same on both Jun 08 12:05:04 Your problem is that you're hardcoding 90x90dp Jun 08 12:05:06 my sizes for my layouts are in dp Jun 08 12:06:46 You just need them to fill whatever space is available to them.. match_parent and gridview will figure out the width for you Jun 08 12:10:09 well i got it to compile, but StingRay is offline hehe Jun 08 12:24:39 right i changed my gridview items to be match parent but now it has room for 5 rows on htc and only shows 2 rows on galaxy nexus Jun 08 12:33:48 no matter what i try its different for every device.... Jun 08 12:34:00 Set a fixed number of columns Jun 08 12:36:08 yup i have 3 Jun 08 12:36:14 : 3* Jun 08 12:37:30 i have 3 cols 3 rows Jun 08 12:37:46 gridview is set to fillparent for height and width Jun 08 12:38:07 and gridview items are set to matchparent Jun 08 12:38:24 on nexus the 9 items fills ave the screen Jun 08 12:38:31 oon htc one i mean* Jun 08 12:38:46 on gnex it only shows 4 on screen and you have to scroll for the rest Jun 08 12:39:02 6* on screen sry Jun 08 12:39:58 sorry its a nexus s emulator not galaxy my heads mashed Jun 08 12:42:14 Ash__: do you have alternative layouts for that activity defined? like under large or sw600dp? Jun 08 12:43:15 Jc_Dev: no i removed all other layout and values files Jun 08 12:43:22 k Jun 08 12:43:53 are the two devices using different API versions? Jun 08 12:43:59 yes Jun 08 12:44:17 nexus s 2.3.3 htc one 4.1 Jun 08 12:44:33 if you want i can take a quick look at your layout file (pastebin.com) Jun 08 12:45:15 wait gridview items are matchparent? that doesn't sound right Jun 08 12:45:27 you probably want wrapcontent Jun 08 12:45:29 Hi! Somebody already used AsyncListView (Smoothie) and EndlessAdapter, together? Jun 08 12:45:30 htc one is taller, so there's obviously going to be more rows visible at a time Jun 08 12:46:32 so what i was doing in first palce was correct... Jun 08 12:47:04 i just need to have different number for items for differnt screen hegihts Jun 08 12:48:06 is it possible to specify a values file on screen height? Jun 08 12:48:06 Ash__: or just use a listview and they can scroll through the items Jun 08 12:48:47 Jc_Dev: so can a standard gridview but im using it with viewpager Jun 08 12:48:48 Ash__: yep, http://developer.android.com/guide/practices/screens_support.html#qualifiers Jun 08 12:51:42 syntax of qualifiers depends on api level, you have less flexibility with older apis (just small, large, etc), but newer api's (introduced in 3.2) respect a hdp syntax, where is dp units Jun 08 12:53:25 yeah i know mate Jun 08 12:53:38 pre 3.2 can just use values lol Jun 08 12:54:14 Hey, somebody here already used Smoothie lib? Jun 08 12:54:41 should i use qualifiers ro change the number of rows or should i code it in to detect device screen height and how many items inc an fit on screen? Jun 08 12:54:44 to* Jun 08 12:54:47 With gridview you figure out the number of columns, that's it.. It's going to show however many rows it can based on each items height Jun 08 12:55:12 my app needs to limit rows as im using multiple gridviews on viewpagers Jun 08 12:55:19 say i have 18 items Jun 08 12:55:21 Ash__: why not show all the rows and allow vertical scrolling? Jun 08 12:55:47 i show 9 on each viewpager so need a gridview on each page with 9 items 3*3 but so on htc one i can fit 4 rows Jun 08 12:55:55 If you think you can define the number of rows in xml you're gonna have a bad time Jun 08 12:56:23 i am already defining in xml Jun 08 12:56:57 i did have vertival scrolling but people wasnt realising there was more rows to scroll down to Jun 08 12:57:09 so i limit gridview and have viewpager Jun 08 12:57:39 wish android had horizontal gridview :( Jun 08 12:58:03 There are thousands of different devices out there, you can't tailor the number of rows to each of them Jun 08 12:58:06 SimonVT: as it its a pain or you cannot do that? as i said im already doing it Jun 08 12:58:15 Not in xml at least Jun 08 12:58:57 no rows number of items lol Jun 08 12:59:01 not* Jun 08 12:59:02 You're probably better off creating a custom viewgroup that calculates columns/rows based on some minimum item size and the screens dimensions Jun 08 12:59:25 Well, you have to do both Jun 08 12:59:50 First you need to set the number of columns.. Then you need to calculate the height of each item so they fit on the screen with no scrolling Jun 08 12:59:54 there's a reason the listview is typically used for this role - it scales well to different dimensions Jun 08 13:00:03 tell me about it lol Jun 08 13:00:28 Listview is typically not used when you want columns.. Jun 08 13:00:28 my gridview works well i just dont want vertical scrolling Jun 08 13:01:21 also i im using gridview as i can then change number of columns on a tablet wtc... 1 column on phone looks like listview and on tablet i can have 3 columns Jun 08 13:01:29 Ash__: (waves hand in jedi manner) yes... yes you do want vertical scrolling... Jun 08 13:01:30 etc* Jun 08 13:01:58 looks soo much nicer with horizontal tho lol Jun 08 13:02:14 horizontal what? Jun 08 13:02:20 scrolling Jun 08 13:02:22 oh you mean paging sideways Jun 08 13:02:24 GridLayout is probably better for this Jun 08 13:02:25 eah Jun 08 13:02:31 Or just a custom viewgroup Jun 08 13:02:54 Definitely not gridview Jun 08 13:03:32 at the moment the app works perfect and smooth its just the num or items depending on screen height that i need to do Jun 08 13:03:47 gridview inside of a viewpager probs isnt the best option but its working lol Jun 08 13:04:12 it's working .. on the 2 or 3 devices you tested on Jun 08 13:04:14 Yay Jun 08 13:04:21 fair enough - you can make a separate height based alias for every different row count you want to support Jun 08 13:04:31 It's probably going to look shit on the thousands of other devices out there Jun 08 13:04:47 Simon why u alwys have attitude... Jun 08 13:04:47 But hey, it works :) Jun 08 13:04:58 Dicks like u pu tpeople of fcoming ot places like this Jun 08 13:05:16 the problem is you'll have to have fixed height rows, which means you can't display arbitrary amounts of text Jun 08 13:05:30 its very text limited Jun 08 13:05:35 its a guessing game based on pictures Jun 08 13:05:56 fair enough Jun 08 13:06:18 If I can keep a few shitty apps off play store, I've achieved my goal Jun 08 13:06:44 awsome attitude there sip shit Jun 08 13:06:48 dip* Jun 08 13:06:55 dp works as well Jun 08 13:07:11 Jc_Dev: im just trying to use up the extra real estate on larger devices Jun 08 13:07:27 banner ad! Jun 08 13:07:31 lol Jun 08 13:18:11 when testing license library with a non yet published app, what license key do I have to put inside the code? Jun 08 13:21:45 can someone point me to a link about what is an adapter, what they are for and possibly how they are used? Jun 08 13:24:48 omid8bimo, in which context? that is, what are you trying to do? Jun 08 13:37:30 Mavrik: actually here is my scenario. i have a form which inserts 4 data into a sqlite db. name,location,date and a captured photo from camera app, which since i dont know if i can insert the photo itself, (if i can please tell me how! maybe its easier this way!) i insert its uri into the last column of the table (something like file:///sdcard/DCIM/myapp/429487924.jpg). then in another activity i query Jun 08 13:37:31 the db to show the result in the database, so each row will show a comma separated string of name,location,date,image url. i wanna know how can i show the image for each row instead of the photo url on the sdcard? Jun 08 13:37:44 that was a long description. sorry! :) Jun 08 13:38:07 but im really stuck. i would appreciate any help. i have no idea how to do this. Jun 08 13:38:38 first things first: never store large binary data in sqlite Jun 08 13:38:46 so, no, don't put photos into database. Jun 08 13:39:14 omid8bimo, are you showing the data from database in listview? Jun 08 13:39:53 Mavrik: ok so no photo insert into db. yea, i've created a new activity which extends the ListActivity Jun 08 13:40:46 omid8bimo, and now you're stuck since you need an adapter right_ Jun 08 13:40:47 ? Jun 08 13:42:39 Mavrik: as far as i know. here is my class. http://paste.debian.net/9178/ Jun 08 13:43:24 ah, yeah if you want to show the image you'll have to create your own adapter Jun 08 13:43:25 i dont know what should i write/change here to make the image appear in each row for each result came back from cursor Jun 08 13:44:06 omid8bimo, the adapter actually creates the items you see in a listview (or gridview, etc) Jun 08 13:44:15 yeah. i read in several documents about it but its i cant really understand how to do this in my case. Jun 08 13:44:39 from docs: The Adapter behaves as a middle-man between the data source and the AdapterView layout—the Adapter retreives the data (from a source such as an array or a database query) and converts each entry into a view that can be added into the AdapterView layout. Jun 08 13:45:08 omid8bimo, you need to create a class that extends a BaseAdapter Jun 08 13:45:18 which will force you to implement a few methods Jun 08 13:45:23 most important being getView() Jun 08 13:45:42 where you prepare the exact view your item in listview will show as and fill it with data Jun 08 13:46:18 omid8bimo, check this article out: http://www.vogella.com/articles/AndroidListView/article.html Jun 08 13:47:11 yeah. i tried to do that in a inner class in my class Jun 08 13:47:55 Mavrik: i've read that link but they all use a static string array. i dont know how to use it via a cursor that returns my data Jun 08 13:47:59 Mavrik: could you please write a simple code for my case according to my class in the pastebin above? Jun 08 13:48:11 sorry, I don't have time to write code for you Jun 08 13:48:19 omid8bimo, you just need to fill proper data in getView() Jun 08 13:48:31 you get passed the position of item you need to return Jun 08 13:48:50 Mavrik: ok but how to get the data from cursor? or should i write a new cursor inside getView? Jun 08 13:48:52 and then you call "setText, setImage, etc." on your view to set proper displayed data from your cursor Jun 08 13:49:28 omid8bimo, no, definetly not Jun 08 13:49:39 omid8bimo, you already read all your data into an "results" arraylist Jun 08 13:49:58 omid8bimo, when you read data from db you have everything stored in "results" Jun 08 13:50:05 then you pass this to your custom adapter Jun 08 13:50:09 oh, so i can use the "results" arraylist in getView? Jun 08 13:50:11 and in getView you just do Jun 08 13:50:16 results.get(position) to get proper data Jun 08 13:50:32 omid8bimo, yep, that is what arrayadapter does Jun 08 13:50:35 you pass the results to it Jun 08 13:51:04 Android doesn't care how you get the data in Adapter Jun 08 13:51:21 it just wants you to return the item at "position" when it calls getView and it's going to display that Jun 08 13:52:24 ok. so my setListAdapter would be this -> this.setListAdapter(new MyFinalAdapter(this, R.layout.listviewfinal, R.id.label, results)); ? Jun 08 13:53:13 your setListAdapter would be this.setListAdapter(new YourAdapter( … whatever you want or need … )); Jun 08 13:53:35 you don't have to pass all taht to your adapter if you don't need it there Jun 08 13:53:47 after all, you'll probably hardcode your layout into getView() Jun 08 13:55:18 Mavrik: ohom. ok thanks for the info. i'm working on it to see what i can do with these. i will get back to you if i had a question. :) thanks Jun 08 13:57:00 hey folks, is there a way to override the font for the whole activity, without messing with every individual view? Jun 08 13:57:30 Override Activity#onCreateView and set the font on every textview created Jun 08 13:58:03 Remember to always use the layout inflater Jun 08 13:58:24 this is a kind of messing with every view :( Jun 08 13:59:11 Then "no" Jun 08 14:00:10 ok, good to know Jun 08 14:00:31 hm. now all I need is to figure out if MS Comic Sans can be used without a license in OSS apps :> Jun 08 14:09:13 hi everyone Jun 08 14:10:16 hi guys, having a problem using setTextOn and setTextOff for Switch api 16, simply wont work but using standard setText does. any ideas? thanks Jun 08 14:12:46 my thread seems stuck when I work on pixels of a big bitmap Jun 08 14:14:25 my bitmap is a static variable, lol Jun 08 14:20:27 does anyone around here know much about the new maps API? Jun 08 14:21:50 why? Jun 08 14:22:31 im getting an error regarding authentication Jun 08 14:22:36 or authorization idr Jun 08 14:22:51 http://i.imgur.com/7001kSM.gif Jun 08 14:23:28 and then my map doesn't show up in my app Jun 08 14:23:47 its there, with the in/our control, but no map Jun 08 14:24:03 *in/out Jun 08 14:24:25 you compile in debug or release mode? Jun 08 14:24:44 the key change with this mode Jun 08 14:24:53 the key is different Jun 08 14:25:01 not actually sure. thats with running on my device from eclipse Jun 08 14:25:33 try to generate a debug key Jun 08 14:25:49 from the api console or eclipse? Jun 08 14:26:10 api console, eclipse can't generate a key Jun 08 14:26:21 just making sure Jun 08 14:27:26 but your 'can't open file reading" is a little bit strange.. drinfernoo Jun 08 14:27:46 what exactly does that mean? Jun 08 14:28:07 did you google it? Jun 08 14:28:20 nope :P Jun 08 14:28:34 i figured since my app runs, it shouldnt be a big deal Jun 08 14:28:37 but i will Jun 08 14:29:11 i dont really have an option for a "debug" key Jun 08 14:29:29 if it occurs before integration of your map, this error is not a problem Jun 08 14:31:08 do you use a correct certificate generated by keytool on the sdk ? Jun 08 14:31:17 http://mdetras.com/2011/07/10/use-google-maps-in-android-using-eclipse-and-debug-key/ Jun 08 14:43:34 ok. so in order to get my SHA1, i ran keytool on the keystore that was generated when i built my apk. i put that into the api console, and i put that key into my manifest. still not working. Jun 08 14:44:08 http://i.imgur.com/BiugGY1.png Jun 08 14:44:20 the bottom one is what i had before, the top one is what i have now Jun 08 14:50:11 on the topic of GC if i pass some object or array to a function, where the original object is still referenced by whatever, the transient object allocated for the duration of the method who accepts it as a parameter will not cause garbage? Jun 08 14:50:26 i know this is probably a java question more in general... Jun 08 14:54:09 lasserix, ehhh, what? Jun 08 14:56:59 You just passing a reference to the method, there's no object creation Jun 08 15:03:50 SimonVT ahh i see thanks Jun 08 15:04:07 for some reason i was confusing this with things created in a method, which do cause garbage Jun 08 15:10:23 lasserix, you might want to read about "stack frames" and "calling conventions". it will give you some intuition as to what's going on. when you call the method the stack will have pushed onto it a bunch of primitives (int, bool, char, etc, and references), all of which are comparatively small. the reference itself is something like a memory address. Jun 08 15:11:14 hmm thanks just what i need to comprehend Jun 08 15:21:13 hi, i can't adb logcat my emulator Jun 08 15:21:16 if i adb devices Jun 08 15:21:21 i get emulator-5554 offline Jun 08 15:49:01 Hi! I notice that because the new, official android gradle plugin is not deriving (if that Jun 08 15:49:34 's how it works) from the Java plugin, it means that the current AndroidAnnotations and Scala gradle plugins fail to work. What's the story on that? Jun 08 16:02:53 Android studio is better than eclipse? Jun 08 16:18:10 hi. im trying to set the margin top of a view but it isnt working. the code is here http://pastebin.com/zg7CyEGX am i doing anything wrong? Jun 08 16:19:52 You're giving it LinearLayout.LayoutParams then adding it to a RelativeLayout Jun 08 16:20:05 ill try that Jun 08 16:21:45 yes it works now. thanks :) Jun 08 16:23:44 still hoping for help with maps api stuff Jun 08 16:23:48 hi, i have this MapFragment http://pastebin.com/t30Er1FQ how can i add other View Jun 08 16:23:52 if anyone is around Jun 08 16:24:26 i keep getting an authentication error, and a blank map in my app Jun 08 16:38:34 is there anyone actually around? Jun 08 16:58:10 hi, my service works fine when the usb cable is attached to the phone but when i unplug it it no longer works Jun 08 17:00:05 loin, what kind of service Jun 08 17:00:38 /me cues up Tina Turner - Private Dancer. Jun 08 17:01:25 raz86, sensor listener Jun 08 17:01:43 raz86, power button broke so i'm using sensors to wake up my device Jun 08 17:01:51 while the usb cable is attached, it works wonderfully Jun 08 17:01:57 as soon as i unplug it, it no longer works Jun 08 17:02:46 maybe, sensors are desactived for baterry seving Jun 08 17:03:28 do you know how i can enable them? Jun 08 17:05:40 (it is just an idea loin) Jun 08 17:06:01 in a relative layout can you get 2 children to share 50/50? there's no weights involved Jun 08 17:06:03 I didn't code a service yet Jun 08 17:06:10 no weight attribute* Jun 08 17:06:36 loin, probably the CPU powers down Jun 08 17:06:39 raz86, the power savings thing make sense Jun 08 17:06:47 and the sensors get disabled. Jun 08 17:07:00 Bear10, not really Jun 08 17:07:09 hmph alright Jun 08 17:07:27 loin, maybe a service can launch an activity which can activate sensors? Jun 08 17:08:02 bad idea, sorry Jun 08 17:08:43 loin, if you want to keep the system up you need to grab a wakelock Jun 08 17:08:47 but that will kill your battery Jun 08 17:09:34 i'm trying to avoid the wake lock Jun 08 17:09:47 the sensors do indeed power down when the screen gets turned off Jun 08 17:09:52 but i did the workaround thing Jun 08 17:10:00 try to monitor all of sensors in a file.. Jun 08 17:10:11 loin, um Jun 08 17:10:31 loin, how do you expect for sensor result data to be processed without wakelock when the CPU clock is off? Jun 08 17:11:03 i don't Jun 08 17:19:05 why i can't use SupportMapFrament in ViewPager Jun 08 17:19:21 it works first time but second time have errors Jun 08 17:22:49 is there a way to query for a contact's default text messaging number? Jun 08 17:51:34 what's the easiest way to fetch http data, using a lib? or the standard android / java implementation? Jun 08 18:06:08 hi, I am taking a look at this phone, Galaxy Y, it says Java: No, it means that i cannot run external jar inside it ? Jun 08 18:07:48 ANyone know why i'd get a "Could not find a method myMethodName(View) in the activity class com.blah.blah.... for onClick handler on view class android.widget.Button with id 'blah' ? The method is in the activity Jun 08 18:08:02 but i've set a new contentView Jun 08 18:08:16 do i need to set the context so the button can find it? or might i be doing something else wrong? Jun 08 18:08:19 :-\ Jun 08 18:10:49 nevermind. misnamed the method >:| Jun 08 18:11:20 Why do we always find the answer 30 seconds after we finally ask someone for help? :) Jun 08 18:13:06 daivyk: no android phone runs java natively Jun 08 18:13:25 android apps are typically written in java, and then converted to dalvik bytecode to run on the phone Jun 08 18:13:45 you can load a jar that has dalvik bytecode on the phone, but not a normal java jar. Jun 08 18:16:15 JesusFreke: ok, so when I use an external jar file inside my project the compiler translates this to dalvik bytecode, right ? Jun 08 18:17:34 yes Jun 08 18:18:11 ok, thanks. Jun 08 18:22:36 I'm trying to work out the best way to give my users the option of sharing the app on Facebook. Does anyone just include a Facebook 'share' button in their app? Jun 08 18:22:56 I want to show a dialog after a certain period of use which suggests sharing on Facebook Jun 08 18:24:58 why not a generic share button Jun 08 18:25:16 so if i prefer google+, or twitter, or email, or sms, or hangouts, or... then i can still share your app Jun 08 18:28:47 canadiancow: Generic share isn't necessarily something I'm trying to avoid - I just want to prioritise social sharing over, say, sharing with Gmail or Bluetooth or Dropbox (like the standard sharing intent includes. Jun 08 18:29:10 well, my first two were g+ and twitter :P Jun 08 18:29:14 It's the same reason why websites explicitly feature Facebook, Twitter, G+ buttons. Jun 08 18:29:26 the problem with doing that in an app is it takes up a lot of space Jun 08 18:29:39 either you need an extra screen just for sharing, which makes it harder for people to get to Jun 08 18:29:52 or you need multiple buttons in your actionbar or elsewhere on the screen, taking up valuable space Jun 08 18:30:21 canadiancow: This will be in a dialog which pops up after users have completed a certain action, which they conceivably might want to share with friends. Jun 08 18:30:37 dialogs have even less space :P Jun 08 18:31:19 http://developer.android.com/design/patterns/pure-android.html Jun 08 18:31:24 look for "Don't hardcode links to other apps" Jun 08 18:31:29 I feel that the flow of a dialog popping up suggesting sharing with friends, followed by clicking a generic share button which launches the share option picker, is a bit too complicated. Jun 08 18:31:46 Verses having the dialog popup, with a Facebook/Twitter/G+ button. Jun 08 18:32:07 but what if i use orkut Jun 08 18:32:24 you can't know what social network a user will primarily use Jun 08 18:32:38 which is exactly why the standard share action provider works so well Jun 08 18:36:04 canadiancow: Yes, I see. How do you suggest I should best prompt a user to share then? I still would like a dialog to appear congratulating the user and suggesting they share with friends. Jun 08 18:36:34 you could just stick the same share view in the dialog Jun 08 18:36:46 it will show their most recently used social netowrk, as well as the dropdown with the full list Jun 08 18:36:57 but i'm not a UX person, so you might be better off just trying to see what other apps do :P Jun 08 18:47:14 i am trying to add views to a linearlayout dynamically but i am getting some weird results.. if i add the views in xml i get the image on left (the desired), but if i add by code i get the image on the right http://s9.postimg.org/6frc03knj/Untitled.png .. the xml code of the image on the left and the java code of the image on the right is here http://pastebin.com/nyp3tThi i dont know what Jun 08 18:47:14 im doing wrong to make this happening. can anyone check where is the error? Jun 08 18:56:49 hello Jun 08 19:02:17 Does anybody know if the ContactsContract.Contacts._ID value (the id of a contact in the contacts application on a device) even tries to be unique at a global scale? Jun 08 19:02:53 I.e. is it more like a guid value than some running integer (well, big ones at that)? Jun 08 19:24:29 @.@ fragments Jun 08 19:30:41 BustyLoli-Chan: i hated fragments at first.. and i still don't like all the aspects of the implementation, but they do make a lot of things cleaner Jun 08 19:48:43 i deleted bin, gen, and the apk to try to force eclipse to recompile my latest code. Now it's complaining about R being missing and won't compile. is there anything I can do besides creating a new android project and copy/pasting all the code over? Jun 08 19:49:25 BullShark, quit & relaunch eclipse Jun 08 19:49:33 it worked for me when i hit this issue Jun 08 19:49:46 after you already dead, a clean + manual delete of "gen" Jun 08 19:49:49 oops Jun 08 19:49:52 s/dead/did/ :) Jun 08 19:51:10 adq -> it's been restarted. even the entire system has been rebooted because im dual booting windows and linux. Jun 08 19:51:29 :/ Jun 08 19:51:35 If R is not being generated then you have an error somewhere in your xml Jun 08 19:51:50 If eclipse doesn't tell you where, do a command line build Jun 08 19:52:35 how to do a command line build? Jun 08 19:52:52 does eclipse generate a build.xml for ant like netbeans does Jun 08 19:53:21 https://developer.android.com/index.html#q=command%20line%20build Jun 08 20:04:18 SimonVT -> something is wrong with my xml, but i don't know what http://i.imagebanana.com/img/10joaxb9/JavaAndroidTutorialsrcexpectusafterl.png Jun 08 20:06:27 248 warning, heh Jun 08 20:07:54 kakazza -> that's not from my code. i git cloned all of gitblit so i could write a groovy hook script for it Jun 08 20:09:32 You need to build your project so R is re-generated Jun 08 20:15:02 i am trying to add views to a linearlayout dynamically but i am getting some weird results.. if i add the views in xml i get the image on left (the desired), but if i add by code i get the image on the right http://s9.postimg.org/6frc03knj/Untitled.png .. the xml code of the image on the left and the java code of the image on the right is here http://pastebin.com/nyp3tThi what i am doing Jun 08 20:15:02 wrong to make this happen? Jun 08 20:21:32 SimonVT -> from the first search result you gave me, it says " You cannot distribute an application that is signed with a debug key." I am just curious how the debugged mode apk would know whether it was running on the developers device or another device Jun 08 20:21:56 It wouldn't Jun 08 20:22:01 They're talking about play store Jun 08 20:22:07 oic Jun 08 20:28:55 also, you can distribute an apk with debugging stuff in it, on the play store or not.. you just have to have it signed with a non-public key. Jun 08 20:37:35 <_abc_> http://freecode.com/projects/pride opinions? Jun 08 20:37:57 <_abc_> Can one make a completely script driven build and test (fire up simulator or publish) environment using this? Jun 08 20:40:21 SimonVT -> that article is talking about a building a release mode and a debug mode apk. what's the difference? release mode outputs nothing to logcat and debug mode does? Jun 08 20:44:54 also it says Open a command-line and navigate to the root of your project directory. Jun 08 20:45:03 Use Ant to compile your project in debug mode: ant debug Jun 08 20:45:41 however there is not a build.xml in the projects root directory. i tried the find command like this find project_root_dir -name build.xml Jun 08 20:45:43 no results Jun 08 21:04:03 i put SupportMapFragment in a ViewPager, when change page a i see a black bad effect Jun 08 21:10:28 Hi. Jun 08 21:16:03 newinandroid: sounds like a known issue, and there isn't a great solution other than the few workarounds described here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=4639 Jun 08 21:16:27 i'd suggest starting with the transition workaround maybe Jun 08 21:16:37 bluesm: Hi Jun 08 21:17:22 newinandroid: more details on the transition technique here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=4639 Jun 08 21:22:50 thanks Jc_Dev Jun 08 21:22:56 np Jun 08 21:27:53 this link is saying to use ant debug, but my none of my android projects have a build.xml in them. https://developer.android.com/tools/building/building-cmdline.html Jun 08 21:28:20 BullShark: what are you using for your IDE? eclipse? android studio? Jun 08 21:28:43 SimonVT -> following your suggestion to build from the command line. however it's not working. see above. Jun 08 21:29:09 Jc_Dev -> Eclipse Jun 08 21:29:27 i will switch to studio when it's not beta Jun 08 21:30:16 BullShark: i suspect your send.xml not being seen, do you have the same issue with tv_text? Jun 08 21:33:42 Where can I read about Themes and Styling of apps? I haven't found any documentation that goes into depth on the subject on the Android Developer site. Jun 08 21:33:56 I particularly want to style the tabs of the ActionBar. Jun 08 21:39:11 Zta: http://developer.android.com/guide/topics/ui/actionbar.html#Style Jun 08 21:39:44 hi, after updateing android studio to 0.1.3 most of my layouts are messed up.preview seems no longer to recognize layout instructions like layout_below. Jun 08 21:40:00 something like this is not recognized "android:layout_below="@id/topLinearL"" Jun 08 21:40:50 but this works "android:layout_below="@+id/topLinearL"" Jun 08 21:40:50 Jc_Dev: thanks, I'll have a look at it tomorrow. Jun 08 21:40:59 which is obviously wrong. Jun 08 21:41:18 I know android studio is in an early development state Jun 08 21:41:21 saedelaere: although RelativeLayout is the default for a new layout, it's not really the best one, maybe try a LinearLayout Jun 08 21:42:03 with android:orientation="vertical", then you can avoid the whole chaining the id's together thing Jun 08 21:45:10 it only affects the preview mode in android studio. when I run the app everything looks ok Jun 08 21:45:42 just wanted to know if anyone else has this problems with android studio 0.1.3 Jun 08 21:46:27 I haven't noticed myself, but i also don't use RelativeLayouts, so not sure if i would Jun 08 21:46:51 hopefully it will be fixed in next week's update Jun 08 21:57:59 Jc_Dev: ok thanks. And I will make use of LinearLayouts more often :) Often easier to use... Jun 08 21:58:20 np :) Jun 08 22:35:32 [14:41:23] saedelaere: although RelativeLayout is the default for a new layout, it's not really the best one, maybe try a LinearLayout Jun 08 22:35:42 the problem with linearlayout is that it's very easy to do very deep hierarchies with it Jun 08 22:35:46 and that leads to performance issues Jun 08 22:35:50 that's why relativelayout is the default Jun 08 22:41:20 I'm turning my one app into several similar apps and using a base library project. I want to load a video that will be in res/raw/welcome.m4a in the dependent applications. How do I refer to it with a URI that will not trigger a resource not found in the base library. This is how is was being done: vv.setVideoURI(Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.welcome)); Jun 08 22:49:45 i noticed that some of my xml layout files have this on the first line and some don't. should i have it or not? Jun 08 22:50:24 R is not being generated. my projects don't see it. i wondered if it had to do with that line in xml Jun 08 22:54:16 Jc_Dev -> i was not having the problem with tv_text or any other View id's, but now R cannot be found, so i am having problems with all of them =/ Jun 08 23:13:59 i've just commented out all of my xml in case there was an error in it, still nothing Jun 08 23:33:09 16:35 that's why relativelayout is the default Jun 08 23:34:37 good to know - not sure making it more work to make layouts is really the best defensive against that, but whatever works i guess Jun 08 23:35:15 BullShark: still fighting with R not being defined? Jun 08 23:36:00 make sure you don't have an "import android.R" at the top of your file Jun 08 23:36:43 or wait, i guess you're in an xml file so that wouldn't apply i don't think Jun 08 23:37:26 btw BullShark, that declaration at the top is fine Jun 08 23:39:05 BullShark: other troubleshooting ideas if that doesn't work: http://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error Jun 08 23:39:22 Jc_Dev -> yes, still fighting it. each Java file that has a R.something is in reg squiggly lines Jun 08 23:39:31 and no import android.R is there Jun 08 23:39:33 check out that thread, there's a few things that can cause it Jun 08 23:39:52 also maybe try running lint on it Jun 08 23:41:31 Jc_Dev -> i'm missing a gen folder from one project and have an empty gen folder for the other project Jun 08 23:42:09 gen? Jun 08 23:42:33 oh right eclipse Jun 08 23:43:28 yes, im not using studio yet because i hear of a lot of problems with it still being in beta but maybe i should consider switching with all these problems in eclipse =/ Jun 08 23:43:29 it probably means you have a broken file somewhere under /res Jun 08 23:43:29 Would it work to have multiple GLSurfaceViews on the screen at a time? Jun 08 23:44:39 Sonicadvance1: i think so Jun 08 23:45:07 Jc_Dev -> they are all lowercase in name, some containing an underscore. the only file i've added, send.xml since all of these problems occurred, i commented out everything but the LinearLayout part and commented out the setContentView(R...send) Jun 08 23:45:16 R.layout.send Jun 08 23:45:46 Cool, Was hoping it would. It would be nice for an idea of mine Jun 08 23:45:49 BullShark: are you using source control? you could take a quick look at diffs since your last check-in to see if anything stands out Jun 08 23:46:06 Multiple GLSurfaceViews in a listview to show animations next to each file Jun 08 23:46:45 Sonicadvance1: sounds fancy :) Jun 08 23:47:19 Jc_Dev -> yes, i am using git Jun 08 23:47:26 Sounds like a fancy plan anyway Jun 08 23:47:43 find -iname '*java' -exec fgrep 'android.R' '{}' \; finds only in one place Jun 08 23:47:51 setListAdapter(new ArrayAdapter(Menu.this, android.R.layout.simple_expandable_list_item_1, activities)); Jun 08 23:49:47 Still haven't done a command line build? Jun 08 23:51:45 SimonVT -> i was reading the first search result in that link you sent. it said to run 'ant debug' in the project's root directory. however, a build.xml does not exist there nor does it exist in the workspace and any sub-directories of it Jun 08 23:52:22 Buildfile: build.xml does not exist! Build failed Jun 08 23:53:26 And googling "android missing build.xml" gives you no results? Jun 08 23:53:54 SimonVT -> does any of your projects contain a build.xml? Jun 08 23:54:14 BullShark: here i googled it for you: http://www.howtoforge.com/android-buildfile-build.xml-does-not-exist Jun 08 23:54:16 Should I use a shortened form of my nick as the package "TLD"? Jun 08 23:54:37 I don't have a domain. Jun 08 23:54:39 No, because I don't use ant Jun 08 23:55:12 Jc_Dev -> what is --target 5? is that the api level? Jun 08 23:55:28 com.gmail.mynick.pkg seems odd to me. Jun 08 23:55:50 Eduard_Munteanu: I had the same question, and after looking into it, i used "com.nick.projectname", the idea is that it should be more or less globally unique, and it should look like a reverse domain name Jun 08 23:56:14 BullShark: my first google for you is free, subsequent one's are gonna cost you ;) Jun 08 23:56:53 one google leads to another that leads to another do while(true) Jun 08 23:57:05 i was already googling stuff when you sent me that link Jun 08 23:57:17 * BullShark is a heavy googler Jun 08 23:57:23 Jc_Dev: I see.. I wouldn't get a .com though Jun 08 23:58:24 BullShark: fair enough - i only used eclipse for android dev for about a week before i switched to android studio, and i never tried a command line compile via eclipse Jun 08 23:59:14 Eduard_Munteanu: fair enough, it doesn't really matter, it's just a convention, the only restriction is that you can't register your app on play store if there is a collision, but i've seen people just use single words as their package name, but i decided to try and follow the convention as close as a could Jun 08 23:59:30 I wonder what's an appropriate TLD for individual FOSS hackers. Jun 08 23:59:38 Ah. Jun 09 00:00:00 anyone who has experience with USB host? Jun 09 00:00:18 I've seen people use .org and .net for that. Jun 09 00:00:38 vvu: what do you mean USB host? Jun 09 00:01:29 usb host api. i have some issues receiving some data from my device. i can claim the interface, see the enpoints but when is to receive i always get no answer Jun 09 00:07:02 hello Jun 09 00:07:28 is there a term to differentiate between the old community android gradle plugin and the new official Google one? Jun 09 00:07:54 why is it important to add in menifest file? in http://agileswaran.blogspot.com/2011/12/how-to-show-another-activity-in-android.html . I just made a similar but didnt aded that in manifest file and it still works. why ? Jun 09 00:21:29 Is the Facebook Android SDK download ZIP corrupted for anyone else? (https://developers.facebook.com/android/downloads/) - I can't extract it. Jun 09 00:21:31 You can't launch an activity in your app unless you add it to your manifest Jun 09 00:25:12 ejcweb: how big is your zip? Jun 09 00:25:26 should be 12.1 MB Jun 09 00:25:49 Jc_Dev: I'm only getting 10.1MB. Thanks for that! Jun 09 00:25:58 np Jun 09 00:26:09 i downloaded the first link fyi Jun 09 00:34:11 SimonVT: i'm trying to decide how my various activities should obtain data that is fetched by a p2p client that is running in my service. I seem to have 3-4 different ways of talking to the service: LocalBroadcastManager, Messenger, binding the activity to the service, and possibly a fourth option, having the service be a static singleton and calling methods on it directly, is there one that stands out in your mind as a better Jun 09 00:34:11 pattern for what I described? Jun 09 00:34:45 why is it important to add in menifest file? in http://agileswaran.blogspot.com/2011/12/how-to-show-another-activity-in-android.html . I just made a similar but didnt aded that in manifest file and it still works. why ? Jun 09 00:34:57 Quest scroll up SimonVT answered you last time you asked Jun 09 00:39:37 Jc_Dev, use an event bus Jun 09 00:40:09 oooh sounds fancy, that's not like AIDL is it? Jun 09 00:41:21 SimonVT: the messenger technique looked promising: http://stackoverflow.com/a/9448146/25837 Jun 09 00:41:22 Like this: http://square.github.io/otto/ Jun 09 00:42:34 All of those are too much work Jun 09 00:42:51 When you just need to pass around objects within your own app, something like otto is as simple as it gets Jun 09 00:43:05 interesting, checking it out now Jun 09 00:43:07 thanks! Jun 09 00:44:25 SimonVT: hey do you use maven or something like it for dependancy management? Jun 09 00:46:26 Yeah, I use maven Jun 09 00:47:04 cool, was reading about it a bit last night, i need to start using it i think Jun 09 00:47:25 SimonVT, Jc_Dev i didnt added the activity as in this manner. but rather it was auto added by eclipse when made the activity as android:name="com.example.myapp.SecondActivity" Jun 09 00:47:42 That's the same thing.. Jun 09 00:47:51 SimonVT, oh . i see. thanks Jun 09 00:48:00 Quest: the "." means your package name i believe, just a shortcut Jun 09 00:48:13 .SomeActivity adds the manifest package name for you Jun 09 00:48:50 thanks Jun 09 00:49:03 I found eclipse for android is buggy Jun 09 00:49:20 true? Jun 09 00:49:59 Quest: it isn't without problems, but the same can be said of any software really. if you want another option, check out Android Studio Jun 09 00:53:31 is that eta time shown when updating the sdk tools the time for one component to finish downloading or the total time? Jun 09 00:53:39 i'm starting to think it's for one component Jun 09 00:57:54 anyone know where to report bugs for android studios? Jun 09 00:59:07 Jc_Dev, oh ok. what options are there, eclipse, Android Studio, InteliJ Idea? Netbeans. How do you rate them or any other? Jun 09 00:59:10 SimonVT, ^ Jun 09 01:32:09 hello Jun 09 01:50:12 what's the difference in using IntelliJ IDEA with Android support opposed to using Android Studio? Is it just the same thing with a different name? Jun 09 02:01:36 there are differences though i don't know what they are Jun 09 02:02:44 BullShark: the stuff in Android Studio is part of the *next* IntelliJ release Jun 09 02:02:52 not the current one Jun 09 02:03:23 i hated eclipse always and i was suggested to use IntelliJ from the beginning Jun 09 02:04:10 i only used eclipse because that's what google made the adt plugin for =/ Jun 09 02:05:19 the java's user group for my city does a raffle and at the end of the meeting, gives a license to IntelliJ every time they get together Jun 09 02:06:00 i used a eclipse for a long time but have shifted to Studio Jun 09 02:06:16 still using ant for release builds though, but i'll switch to gradle when that's more finalized Jun 09 02:38:20 i am usually watching android programming porn jacking off to it and when my wife catches me, she bans me from the computer for an entire fucking week Jun 09 02:40:16 hello. I have a lengthy but important question. anyone wants to participate? http://stackoverflow.com/questions/17005837/persistent-foreground-android-service-that-starts-by-ui-and-also-starts-at-boot Jun 09 02:40:21 * Sircle waits Jun 09 02:57:17 hi Sircle Jun 09 02:59:34 your question is asked very frequently, it pretty much has the same answer every time: http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/ **** ENDING LOGGING AT Sun Jun 09 02:59:59 2013