**** BEGIN LOGGING AT Wed Apr 16 02:59:58 2014 Apr 16 03:12:38 i'm using the google drive api. i am using the examples from https://github.com/googledrive/android-demos/tree/master/src/com/google/android/gms/drive/sample/demo. My Goal is to create a file and populate it with content. First, i use createFileInAppFolder, then EditContents. I'm saving the DriveID while creating (createFileInAppFolder) and try to re-use it in EditContents but driveID.getResourceID() gives null in EditConten Apr 16 03:12:56 What am i doing wrong? Apr 16 03:27:01 so how can fetchDriveID be completed without using EXISTING_FILE_ID? Apr 16 03:27:19 or how to get driveID from just created file? Apr 16 03:30:55 is it reasonable for my andoird app to use the local time for display everywhere (the app uses lots of times), but to always convert to UTC BEFORE sending to server, so server ALWAYS assumes a datestamp is UTC? Apr 16 03:31:06 because it's causing me some grief Apr 16 03:31:30 dates are 'walking' backwards every time they are edited in a date picker Apr 16 04:26:01 Where do I get little pop sounds and things to use in my user interface? Apr 16 04:26:27 I need a sound for a refresh button, and one to show there is new data to the user Apr 16 04:28:12 i'd get the pop sounds from the weasel Apr 16 04:38:17 hi Apr 16 04:40:06 i have a list of apps(apps) and hashmap of popularity(hashmap) with package name as string and usage as integer Apr 16 04:40:06 what is the best way to register SensorEventListener in new bask thread, save data from sensors into data base and send data to UI. I tried with new class (implements Runnable) and run it as new Trhead (I send data bask to UI via Handler). The probelm is I don't know how to unregister sensor, stop new thread. Because andorid Runnabel only has run method. I found one sugsetion here http://stackoverflow.com/questions/17513352/acclerometer-sensor-in-separa Apr 16 04:40:39 how can i sort apps list according to package usage Apr 16 04:40:41 ? Apr 16 04:44:13 any idea? Apr 16 04:53:06 My debug.keystore is missing ;__; Apr 16 04:55:28 don't panic Apr 16 04:56:41 but I nede it to get my maps API key g00s Apr 16 04:57:16 its automatically created if not there Apr 16 04:57:24 just get a new debug key and a new maps api key Apr 16 04:57:39 I want to build simple chatting and list conversionation there. The list also need to be appended by new messages. What objects (eg. ListView, ArrayAdaper) I should use? Apr 16 04:57:49 but what generates a new keystore file if I dont have it? Apr 16 04:58:10 GEEGEEGEE all the build tools i think Apr 16 04:58:35 Oh :/ I've built a few projects for debugging and it hasnt generated it Apr 16 04:58:35 actually, if you rm -fr ~/.android and run the sdk manager, its there again Apr 16 04:58:57 eclipse adt would also Apr 16 04:59:06 im using android studio Apr 16 04:59:41 can someone help me about this: Apr 16 04:59:42 http://stackoverflow.com/questions/23100219/sort-apps-according-to-usage-in-android Apr 16 05:02:57 I have a PreferenceScreen in a PreferenceScreen and I'm trying to update the summary of a ListPreference in the sub-PreferenceScreen, but the OnPreferenceChangeListener I have set isn't getting the changes from the sub-PreferenceScreen. How do I listen for those changes? Apr 16 05:05:56 is it possible to use an old android phone as a gsm box? Apr 16 05:11:28 any idea? Apr 16 05:21:15 the build tools generate the debug keystore Apr 16 05:21:40 how can I get events from handler http://developer.android.com/reference/android/hardware/SensorManager.html#registerListener%28android.hardware.SensorEventListener,%20android.hardware.Sensor,%20int,%20android.os.Handler%29 Apr 16 05:23:48 can some one help me : how can i sort apps list according to package usage Apr 16 05:23:55 http://stackoverflow.com/questions/23100219/sort-apps-according-to-usage-in-android Apr 16 05:26:41 run() Apr 16 05:53:23 How do I tell MediaPlayer to not stream a file from the internet, but download the whole thing then play it? Apr 16 06:07:23 wget Apr 16 06:07:48 oh haha not in a unix channel, am i? ;) Apr 16 06:09:14 wget: missing URL Apr 16 06:09:16 ;) Apr 16 06:09:50 wouldn't it be curl anyhow :| Apr 16 06:10:00 or netcat ;D Apr 16 06:10:36 nc? oohh g00s ... you warm my heart Apr 16 06:10:44 ;) Apr 16 06:11:30 i know you hate it, but i just setup teamcity and youtrack (both jetbrains, of course) as a continuous integration and problem management Apr 16 06:11:46 man it was easy... soo much nicer than jenkens. especially offloading builds to other servers Apr 16 06:13:20 i don't hate it; never even used them :) Apr 16 06:13:28 it's clicky click, you said you hate the clickers Apr 16 06:21:27 interesting, so FB is getting into mobile payments Apr 16 06:23:16 how's that ? Apr 16 06:23:22 kinda like paypal? Apr 16 06:24:12 can you help me about this: Apr 16 06:24:12 http://stackoverflow.com/questions/23100219/sort-apps-according-to-usage-in-android Apr 16 06:24:53 bankai_au seems so Apr 16 06:32:17 I'm trying to check out the kernel version corresponding to the AOSP head for the Nexus 5. Apr 16 06:32:45 According to the commit log, in December, the prebuilt kernel was built from revision fc777b6d3b2b20ba7270059dd2df284c94844abf of the kernel tree. Apr 16 06:32:57 But in the msm repository, this revision doesn't exist. Apr 16 06:33:58 Meh. I just got the hash from the kernel binary itself. Apr 16 06:34:29 Is it possible to have a gap between the group elements of an ExpandableListView? http://stackoverflow.com/questions/23082905/android-expandablelist-gap-between-groups-not-between-children Apr 16 06:46:22 anyone got a good tutorial for starting with Path? Apr 16 06:46:42 class that brings lineTo() and quadTo() Apr 16 07:06:03 http://www.fireeye.com/blog/technical/2014/04/occupy_your_icons_silently_on_android.html Apr 16 07:07:22 If I have a SSL certificate in the PEM format can I verify it against the system CA certs database ? Apr 16 07:07:59 I can't draw! Apr 16 07:08:01 ffffffff Apr 16 07:08:59 Sicp: you can , you just think you can't Apr 16 07:09:10 lel Apr 16 07:09:15 I meant draw using Path Apr 16 07:09:28 noooo idea what these methods really mean Apr 16 07:09:56 android docs aren't enlightening? :P Apr 16 07:10:25 nah all I found was http://developer.android.com/training/custom-views/custom-drawing.html Apr 16 07:11:04 it does use Path but I want someone all-encompassing, must draw sinewave Apr 16 07:11:48 i had hopes for http://www.amazon.com/Learning-Android-Canvas-Nauman-Tahir/dp/1783285397 Apr 16 07:12:02 CodePulsar, http://stackoverflow.com/a/6342399/677024 Apr 16 07:12:04 but it got awful reviews :) Apr 16 07:12:08 maybe that would help Apr 16 07:12:16 this draws a sine wave, I've done it, http://pastie.org/9084193 but I have no idea how to edit it as I just am bad at understanding things like this especially Apr 16 07:12:49 I have to simulate a string being pulled and then released Apr 16 07:12:56 wtf Java doesn't support PEM? Apr 16 07:13:11 ah, a book Apr 16 07:13:12 great Apr 16 07:13:15 thanks Apr 16 07:13:28 tagrudev: I don't want to add another library to the project Apr 16 07:13:32 seems like it should be avoided Sicp Apr 16 07:13:39 yea....just reading now Apr 16 07:13:41 tagrudev: I want to be able to do it with what's provided in the SDK / NDK Apr 16 07:15:08 CodePulsar, then dive deep in it Apr 16 07:15:42 CodePulsar , i think you need to read the JSSE docs ;) Apr 16 07:15:47 but thats from java Apr 16 07:17:02 good guy oracle: leave java 6 shit up Apr 16 07:17:09 for us losers Apr 16 07:19:00 How can I calculate the distance between 2 points with the gmaps api Apr 16 07:20:29 hackkitten :) Apr 16 07:21:20 I’m only getting an example-debug-unaligned.apk and an example-release-unsigned.apk.. shouldn’t there be just an example.apk? Apr 16 07:21:26 g00s: do you have any idea if I need some kind of permission to be able to read files from /system/etc/ ? Apr 16 07:21:41 CodePulsar check "ls" :) Apr 16 07:21:42 hi g00s :) Apr 16 07:21:47 g00s: ls works Apr 16 07:22:00 g00s: and the reable permissions are there, but NOT from within the application Apr 16 07:22:06 s/reable/readable Apr 16 07:22:32 to sign the file? Apr 16 07:22:41 I feel like I’m not signing the right file Apr 16 07:26:48 can anybody pls explain me how to set parameters to fill result.getContents() in https://developers.google.com/drive/android/create-file (Creating files programmatically)? Apr 16 07:36:45 anyone? Apr 16 07:37:56 cprodigy29: do you have a release keystore set up? Apr 16 07:38:02 yes Apr 16 07:38:42 try to export signed app Apr 16 07:39:21 project -> android -> export signed Apr 16 07:49:43 hi, how can I handle the purchase of real world products from within my app? Apr 16 07:50:28 or do I just count the purchase as "in-app"? Apr 16 07:52:06 I it the Google Play Services library that I need to import to use Google Maps in an app? Apr 16 07:52:42 @integer/google_play_services_version isnt resolving Apr 16 07:55:40 hi Apr 16 08:04:16 Hi guys. Regarding my multi purpose AsyncTask, defined in its own file, I'm using reflection to determine if the method I want to call in my execute() method is valid. But I'm having some difficulties to get the value of the field. Any idea would be greatly appreciated. Line 46. http://pastebin.com/kPCfKxTc Apr 16 08:05:24 wget did i mention rxjava ? Apr 16 08:05:26 :) Apr 16 08:05:30 reflection O.o Apr 16 08:05:37 "you're doing it wrong" Apr 16 08:06:25 g00s: Yes, you did mention rxjava. But I don't want to use a lib for now. Apr 16 08:06:25 (10:05:37) g00s: "you're doing it wrong" --> maybe, this is why I'm asking ;-) Apr 16 08:06:30 http://www.catonmat.net/blog/wp-content/uploads/2008/12/john-mccarthy-programming-completely-wrong.jpg Apr 16 08:11:29 g00s: Any refactoring idea then, without using rxjava but still AsyncTasks? Apr 16 08:11:39 no, not really Apr 16 08:18:17 hope i will find solution right here.... Apr 16 08:22:55 I it the Google Play Services library that I need to import to use Google Maps in an app? Apr 16 08:25:50 Hi all, how can I generate the *$$ViewInjector classes? Apr 16 08:28:30 I'm using Butterknife and found this: " It seems like your IDEs were configured incorrectly? If that's not the case then comment. Ensure that your *$$ViewInjector classes are being generated!", But I don't know how I can do this Apr 16 08:30:20 Please i can i read a particular folder on android where i have different ebooks Apr 16 08:33:17 GEEGEEGEE, yes. Apr 16 08:34:33 Mavrik, Im having a problem including it in my project, I cant resolve "@integer/google_play_services_version" Apr 16 08:34:40 I added the .jar as a module library Apr 16 08:34:48 GEEGEEGEE, what's your IDE/build system? Apr 16 08:35:23 Im using Android Studio 0.5.4 and JDK 1.7.0 Apr 16 08:35:33 GEEGEEGEE, Gradle? Apr 16 08:35:42 yeah Apr 16 08:35:42 Mavrik any preference for deserializing a configuration file? could be json or xml Apr 16 08:35:56 not gonna bring antlr into my app :) Apr 16 08:35:59 g00s, I prefer JSON just because it's less hassle to work with :) Apr 16 08:36:09 Mavrik which lib? Apr 16 08:36:18 gson / jackson / etc Apr 16 08:36:24 just saw jackson-jr Apr 16 08:36:51 I usually end up using Jackson, but if I use libs that bring something else in (e.g. I think Retrofit needs Gson) I use that to lower filesize Apr 16 08:37:43 ok, thanks. might give this jackson-jr a try Apr 16 08:37:53 Need little advice h Apr 16 08:37:59 GEEGEEGEE, you shouldn't add the .jar then, you should add "compile 'com.google.android.gms:play-services:4.0.30'" to dependencies in your gradle file Apr 16 08:38:05 GEEGEEGEE, that'll pull in all the stuff you need Apr 16 08:38:14 Need little advice on how to build eLibrary for Android Apr 16 08:38:20 hackable, you'll have to be more specific about what you're doing and what exactly is the problem Apr 16 08:38:27 GEEGEEGEE, see http://developer.android.com/google/play-services/setup.html :) Apr 16 08:38:34 ok thanks Apr 16 08:38:34 How do I tell MediaPlayer to not stream a file from the internet, but download the whole thing then play it? Apr 16 08:38:50 nebby, you can't, you'll have to handle that yourself Apr 16 08:38:58 e.g. do the download and then open MediaPlayer on the stored file Apr 16 08:39:34 Ah okay Apr 16 08:39:35 thanks Apr 16 08:42:14 g00s: If you had to use an AsyncTask, how would you proceed? Apr 16 08:42:14 Knowing that, you want to reuse the same AsyncTask in several locations in your application (in the addUser fragment, connection activity, ...) and avoid code duplication. Apr 16 08:42:14 The DAO has been coded in a way to be transparent if the application was talking to the local sqlite database or a remote webservice. Apr 16 08:42:42 g00s: Will you do as me, determinate the user intention with a tag passed as argument to the execute() method? Apr 16 08:42:52 i honestly never use asynctask Apr 16 08:43:25 so i can't give any tips on how to use it Apr 16 08:43:50 just do what hackbod says here, minimally http://stackoverflow.com/questions/3357477/is-asynctask-really-conceptually-flawed-or-am-i-just-missing-something Apr 16 08:44:09 forget about composing tasks, etc it just doesn't work Apr 16 08:44:23 g00s: What are you using then, if you want to display a progress dialog and inform the GUI of the task progress? Loader, and Handlers don't seem to allow that Apr 16 08:44:51 g00s: what do you mean by "composing"? Apr 16 08:45:08 wget for business, its usually an event on a bus Apr 16 08:45:23 also listview has "empty" views Apr 16 08:45:31 so if its empty, it can just show a spinner :) Apr 16 08:45:37 (assuming you plan on filling it) Apr 16 08:45:57 composing means Future>> Apr 16 08:47:03 *busy-ness "_ Apr 16 08:47:57 * flan3002 rages about Java not allowing nested block comments. -.- Apr 16 08:48:19 flan3002: Like any other language noh? Apr 16 08:48:39 No, some new languages got this right. Apr 16 08:48:50 If somebody know the solution for this: let me know pls: http://stackoverflow.com/questions/23104302/generate-viewinjector-classes Apr 16 08:49:05 g00s: an event on a bus --> an intent service with a broadcast listener then? Apr 16 08:49:21 i use rxjava for the eventbus too Apr 16 08:49:27 wget: And it really was only because of the preprocessor in C, that it was disallowed IIRC. Apr 16 08:52:28 FrancescoV why not just say View = findVieById () :D Apr 16 08:52:30 Mavrik: actually, i want to build eLibrary for students, where student can select specific books and read Apr 16 08:53:21 Mavrik:: i'm thinking of creating a folder inside an android phone, copy the ebooks the write a program to read all the file and show the display one Apr 16 08:53:27 g00s: good question but that's not the solution ;) It's a project with multiple developers, and somebody else have implemented this for all the Views Apr 16 08:53:47 FrancescoV then ask him to fix it :) Apr 16 08:55:52 stab him with a butterknife Apr 16 08:56:01 make sure he doesn't have a dagger Apr 16 08:56:45 g00s: tnx for the tip, but other person isn't in the office today. Are the viewInjector classes generated by Butterknife or is this a java / android thing? Apr 16 08:57:12 i'm guessing you need to add some annotation processor to your build Apr 16 08:57:31 but i have no idea really Apr 16 09:08:48 Anyone got Java 8 working on Android? Apr 16 09:09:18 s/working/fully working/ Apr 16 09:12:38 anyone using sdk under linux? In my cas eclipse is unusable under the ddms perspective, under the system info and heap tabs for example Apr 16 09:12:47 gui gets all garbled up Apr 16 09:14:13 flan3002 jdk? sure - java 8 language features? of course not ;) Apr 16 09:15:33 g00s: What do you mean by JDK? What have you got working, if not the language features? Apr 16 09:15:54 i'm still using jdk 7. Apr 16 09:16:15 you can use jdk 8 if you have source / target compat set to 7 Apr 16 09:16:20 But what was the 'sure' for in your answer? Apr 16 09:16:32 * flan3002 is mildly confused Apr 16 09:16:42 yes you are confused :) Apr 16 09:17:36 But just because I don't understand why you wrote 'sure'... Apr 16 09:19:27 sure because, sure people are using jdk 8 Apr 16 09:20:57 hi? Apr 16 09:21:27 I need to sync data between sqlite databases on one or more devices...what options do i have? Apr 16 09:22:01 g00s: That wasn't my question. I know Java 8 is not supported by Dalvik/ART currently, but using Tools like Retrolambda one can at least use Lambdas on Android. My question was if people got more than the lambdas working on Android. Apr 16 09:22:22 gmg85: How many devices? Apr 16 09:24:26 flan3002 i haven't heard of anything. it would be great if they announce java 8 compat at io this year :) Apr 16 09:24:33 one can only dream ;) Apr 16 09:28:40 up to 5 devices Apr 16 09:29:09 * flan3002 doesn't believe so. The Oracle/Google war has already gotten too expensive, but on the other hand they're buying robot factories and solar-powered planes... Apr 16 09:31:12 gmg85: Have you tried anything, and failed? Apr 16 09:34:24 gmg85: As an app on Goole Play? Apr 16 09:35:46 So If I'm specifying a login method and I want to return Apr 16 09:35:47 either a User or Null, What should I do? Option? Apr 16 09:36:00 Option? Sounds like Scala... Apr 16 09:36:12 gmg85, PuercoPop, Flan3002... please help! Apr 16 09:36:18 I found it here: http://functionaljava.googlecode.com/svn/artifacts/2.17/javadoc/fj/data/Option.html Apr 16 09:36:39 how can i build eLibrary on Android... need hint and tutorial that can help Apr 16 09:37:06 hackable you aren't asking a legitimate question Apr 16 09:37:32 hackable: Don't you ping random people. If anyone can help you, he will. If you ping him/her he will do so less likely. Apr 16 09:38:20 alright.. Thanks, will not ping anyhow.. Apr 16 09:38:41 okay, how can i ask legitimate questions... Apr 16 09:38:55 just ask them sans the pinging? Apr 16 09:39:31 PuercoPop: So, back to the topic. Be aware that interfaces that allow null as valid values can get ugly to use. In what cases can the login method return null? Apr 16 09:39:35 g00s, actually, i was given a project to develop an application for students eLibrary on android... something like this.. https://code.google.com/p/ebookdroid/ and https://code.google.com/p/ebookdroid-fontpacks/downloads/list Apr 16 09:40:07 hackable: Then, it seems like you got good examples to learn from, right? Apr 16 09:40:23 that's a document viewer Apr 16 09:40:29 also.. something related to this... i would have used this... but it have to scan all the folder on the android phone.. which we don't want https://drive.google.com/folderview?id=0B6y-A-HTzyBiYnpIRHMzR1pueFU&usp=sharing Apr 16 09:40:38 I thought by eLibrary you meant like a client to some online library service Apr 16 09:40:43 flan3002, Yes... i got Apr 16 09:41:11 So, you're asking for tutorials/hints, but got several projects to learn from? Apr 16 09:42:21 flan3002, Yes... that's what i need Apr 16 09:42:41 flan3002, so i will be able to get start from scratch Apr 16 09:43:11 flan3002: I am unaware of most Java Idioms. I'm reading Effective Java but not Much of a Java Programmer. Is throwing an exception or Returning a StubUser a prefered method? Apr 16 09:43:39 I also don't know any Java libraries so i don't know what to read/look for to get an idea Apr 16 09:44:00 the idea is for it to return null when the credentials are invalid. Apr 16 09:44:05 PuercoPop: Not necessarily, it depends on your usecase. Again, when can the login fail? Where do you login? Apr 16 09:44:39 Oh, okay. In that case, do you wan't to return invalid credentials? (Hint: You don't) Apr 16 09:44:58 flan3002, i tried building czmq for android and failed :-) Apr 16 09:45:14 in the UserLogin Activity (Currently just using a Mock so basically testing against hardcoded values.) Apr 16 09:45:25 flan3002: are u with me Apr 16 09:45:34 PuercoPop: In that case, you probably want to notify the user. This can be done by aborting it via an exception. Apr 16 09:45:58 gmg85: I don't know czmq and my connection to google it, sorry. Apr 16 09:46:16 hackable: I don't know of any tutorials for an eLibrary. Apr 16 09:46:27 hackable: I don't what that is, because you didn't explain it. Apr 16 09:47:16 flan3002: ok, I'll do that. Thanks Apr 16 09:47:23 flan3002,cool...next i want to try bluetooth...if they fix the czmq bug then i can go back to trying czmq with ndk Apr 16 09:47:39 gmg85: What is czmq? Apr 16 09:48:12 gmg85 why not use https://github.com/zeromq/jeromq Apr 16 09:48:12 zeromq? Apr 16 09:48:26 But i've done that...??? Apr 16 09:48:46 Is there quickway to open the documentation for a java class from android studio? Apr 16 09:48:46 something related to this... i would have used this... but it have to scan all the folder on the android phone.. which we don't want https://drive.google.com/folderview?id=0B6y-A-HTzyBiYnpIRHMzR1pueFU&usp=sharing Apr 16 09:49:07 g00s, that doesn't have security built in like czmq does.. Apr 16 09:49:11 You can press CTRL + q when hovering the relevant item. Apr 16 09:49:21 (Applies to IntelliJ IDEA) Apr 16 09:49:21 g00s, or does it? Apr 16 09:49:31 ohsit, really ? Apr 16 09:49:38 I type adb shell su and then cd /sdcard/ and then it hangs why ? Apr 16 09:51:02 that would be a great open source project....adding security to jeroMQ.... Apr 16 09:51:36 CodePulsar: It does for me too. Let's find out. Apr 16 09:52:18 CodePulsar: Use 'adb shell', then 'su', then 'cd /sdcard' Apr 16 09:52:30 Thanks flan3002 Apr 16 09:53:22 flan3002: it does what? Apr 16 09:53:38 flan3002: change directory or hangs? Apr 16 09:54:16 CodePulsar: It hangs with 'adb shell su', then 'cd /sdcard' Apr 16 09:54:28 CodePulsar: As I said, use 'adb shell', then 'su', then 'cd /sdcard' Apr 16 09:54:40 yeah that works but why Apr 16 09:55:02 adb shell - run remote shell command Apr 16 09:55:21 valid syntax, bug maybe Apr 16 09:55:37 you want to connect to the emulator for DB or something? Apr 16 09:55:58 flan3002: thanks! Apr 16 09:56:37 you do adb devices, get the name of the emulator and do ` adb -s emulator-name shell ` Apr 16 09:57:14 you can then cd data/data/com.myapp.something/databases/ and then sqlite3 yourDatabaseName.db Apr 16 09:57:34 Sicp: are you talking to me? Apr 16 09:57:47 whoever will find it useful Apr 16 09:59:03 flan3002: I've done what you said and I've cd'ed into the sdcard dir now I do this: root@maguro:/sdcard # chmod -R 744 mydir/ BUT the permissions of the files inside mydir doesn't change... Apr 16 09:59:52 Yeah, the sdcard is weird. You can't execute native executables from it e.g. Apr 16 10:00:20 CodePulsar: Try if you can chmod somewhere else. Apr 16 10:01:22 CodePulsar: I don't know which filesystem the sdcard is formatted with, and therefore it might not even have POSIX permissions. After all, it's supposed to be readable from MacroHard Door. Apr 16 10:01:43 I don't have an SD card Apr 16 10:01:49 Device? Apr 16 10:01:55 I have a Galaxy Nexus devices Apr 16 10:02:02 *Samsung Apr 16 10:03:04 CodePulsar: chmod works for me on the sdcard... Apr 16 10:04:03 Wait. Apr 16 10:04:43 flan3002: http://paste.kde.org/pitbr7zjj/a8uuz9 Apr 16 10:07:32 CodePulsar: Yeah, same for me on the sdcard. Works in /data/data though... Apr 16 10:07:46 on my device sdcard -> /storage/emulated/legacy Apr 16 10:11:15 ./dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 Apr 16 10:11:24 CodePulsar: Same for me. Let's just accept it. /sdcard has no permission. Apr 16 10:16:23 flan3002: /storage/emulated/legacy -> /mnt/shell/emulated/0 and /mnt/shell is mount with /dev/fuse filesystem and options Apr 16 10:27:10 I'm getting an unexpected error about an exception never being throwed in the corresponding try statement. It is being throwed in a methoded called inside the try body, I'm guessing that is not enough? Apr 16 10:27:37 Is it declared using 'throws'? Apr 16 10:28:13 no, so it goes in the signature Apr 16 10:28:28 It doesn't have, it can. Apr 16 10:29:01 but it fails to compile if it doesn't? Apr 16 10:29:57 Usually not. Apr 16 10:30:12 Post a snippet... Apr 16 10:32:32 flan3002: https://gist.github.com/PuercoPop/10849607 (It compiles by adding the throws) Apr 16 10:32:48 although now I got to figure why the alert is not displayed Apr 16 10:33:19 Let me load that site... Apr 16 10:34:38 Loaded. Apr 16 10:34:49 is there a prefered pastebin here? Apr 16 10:35:41 Gist is fairly good, though I prefer ix.io Apr 16 10:35:54 Less clutter for my connection. ;) Apr 16 10:36:21 Though I don't see why it wouldn't work... Apr 16 10:39:30 PuercoPop: Can you remove the 'throws' and give me the compiler message? Apr 16 10:43:49 flan3002: error: exception InvalidCredentialsException is never thrown in body of corresponding try statement Apr 16 10:44:48 btw can I use the R (resources) outside of an activity? Apr 16 10:45:07 Yes, it is just a class with autogenerated int constants... Apr 16 10:46:24 so it is at compile time, I thought it was done on runtime. Perfect Apr 16 10:47:08 The resource loading still is at runtime, but R is generated by 'aapt' (someone correct me) at compile time. Apr 16 10:50:36 PuercoPop: Can you give me the full Error? Including line numbers and everything? This shouldn't happen (I think)... Apr 16 10:50:51 Paste it somewhere. Apr 16 10:56:09 hmm I'm getting an error with using R to define the string of a exception, apparently it returns an Int Apr 16 10:56:18 sure, sec. Apr 16 10:57:33 where do I see the compiler error output? Apr 16 10:57:45 R only contains integers. The resource represented by these id can be loaded at runtime, but of course you can't pass integers as Strings. Apr 16 10:58:13 PuercoPop: This is joke, right? Apr 16 10:58:35 *PuercoPop: This is a joke, right? Apr 16 10:59:12 no, I am unfamiliar with the IDE, I use Emacs for everything that is not the browser Apr 16 10:59:32 I basically double click my way through Apr 16 10:59:46 Is there no android plugin for Emacs? Apr 16 11:00:06 I'd personally use ViM, if Java wasn't so IDE dependent... Apr 16 11:00:22 Which IDE do you use? Apr 16 11:00:38 flan3002: I've been told to just used Android Studio. there is eclim. I'm using Android Studio Apr 16 11:01:23 You click that green arrow in the top right, and look at the red lines at the bottom. Paste them. Apr 16 11:01:27 Doc says to put snippet in Application class, but I only have a MainActivity class. What to do? Apr 16 11:02:13 Create the Application class, or just put it into MainActivity. Apr 16 11:02:36 Using an Application class is only useful if you have multiple Activities. Apr 16 11:03:00 hey Apr 16 11:03:24 im trying to edit a line of a .txt file with a shell command Apr 16 11:04:04 flan3002: https://gist.github.com/PuercoPop/10849607/#comment-1212384 (That is where they tell to check the compiler error output) Apr 16 11:05:53 flan3002: I have multiple activities, but haven’t needed Application so far.. but maybe I’ll do that now Apr 16 11:06:05 what’s the benefit? Apr 16 11:06:32 PuercoPop: Uhh, great. I don't use Gradle based build yet. You should ask the guy who told you to use AS. Apr 16 11:06:49 mylord: It automatically starts every time the app starts. Apr 16 11:07:05 Google it. Apr 16 11:07:19 * flan3002 makes some food now. Go ask someone else. Apr 16 11:07:23 I've a custom list item with text and 2 buttons (http://pastebin.com/EUeivxBu) in listfragment (http://pastebin.com/w9MtgCej). the problem is, itemclicks, or buttonclicks doesn't write anything to log, it looks like the whole list is "dead". Apr 16 11:07:45 any idea why? Apr 16 11:07:52 and how to fix it? :) Apr 16 11:07:53 flan3002: will do he wakes up. Btw so is there a way to get R to resolve at compile time? Apr 16 11:09:04 http://pastebin.com/DhM5EAwW and here is the queue adapter Apr 16 11:11:48 ok, the sun is rising, off to sleep, thank you very much flan3002. You've been most helpful. Apr 16 11:28:37 In SDK manager, I see Google Play Service 16, but how does that tranlate to what I should put in build.gradle? ie, this: play-services:4.0.30 Apr 16 11:33:17 which build.gradle do I alter, the one in app/ or outside app/? https://developer.android.com/google/play-services/setup.html#Install Apr 16 11:34:54 Well, I have min set to 7 target set to 15 and have this manifest for parentActivity http://ideone.com/zGZqku Apr 16 11:35:04 I am aware that it was introduced at API 17 Apr 16 11:35:08 But, I am doing metadata Apr 16 11:35:15 and I suppose, it shall work. Apr 16 11:35:22 But it dosn't, so kindly correct me. Apr 16 11:35:31 error: No resource identifier found for attribute 'parentActivityName' in package 'android' Apr 16 11:51:11 Who all think eclipse >>>> android studio Apr 16 11:51:37 Depends on whether >>>> means 'far superior' or 'go to'. Apr 16 11:52:29 Far superior Apr 16 11:53:01 I don't like either. Apr 16 11:54:12 Feels like I've been unbalanced using android studio Apr 16 11:54:21 Eclipse feels so much like home Apr 16 11:56:05 rookie211: Eclipse feels like the toilet at primary school if you ask me, you don't want to use it Apr 16 11:56:20 rookie211 if you are unbalanced, maybe just drink some V8 Apr 16 11:57:23 Lol its afternoon at work g00s Apr 16 11:58:34 I guess Eclipse's "doesn't work with anything, must contain everything" mentality can make a problem later on... Apr 16 11:59:10 Java is the only language that is not fun in ViM... Think about that. Apr 16 11:59:33 (Excluding languages which really suck, think Malbolge) Apr 16 11:59:51 (But those won't be fun in Eclipse either) Apr 16 12:00:23 Nano for me Apr 16 12:01:13 How long? Apr 16 12:01:44 ?? Apr 16 12:03:01 How long have you been using nano? Apr 16 12:03:28 4 years Apr 16 12:03:52 Why? Have you ever tried vi/vim? Apr 16 12:04:19 Tried .... Its just too painful...for me at least.. Apr 16 12:04:24 I may be wrong Apr 16 12:04:38 Many of my friends swear by it though Apr 16 12:04:56 How long have you tried vim? Apr 16 12:04:59 I should really look into using it though Apr 16 12:05:05 5-6 times Apr 16 12:05:17 In days. Apr 16 12:05:29 3-4 days at max Apr 16 12:05:48 Vim takes time to get used to, don't expect immediate benefit. Apr 16 12:06:06 Okay...y do they say its so powerful? Apr 16 12:06:18 oh come on you guys ! Apr 16 12:06:18 Because it is. Apr 16 12:06:20 http://vim-adventures.com/ go Apr 16 12:06:23 stop. now. Apr 16 12:06:25 I mean I have heard a lot...but what makes it so legendary Apr 16 12:06:57 Eh, can anyone kindly help :) Apr 16 12:07:05 g00s maybe you :P Apr 16 12:07:09 Like you did the other day Apr 16 12:07:27 not sure why that isn't working. if using the compat lib, look at res-auto Apr 16 12:08:05 one thing is for sure, AS takes about 2x the memory eclipse / adt on my old box Apr 16 12:08:15 1G vs ~45mb max Apr 16 12:08:20 i think its gradle Apr 16 12:08:28 oops, 450mb Apr 16 12:08:49 Omnipotent also look at iosched to see how they did it Apr 16 12:09:32 Actually, if I exclude that parentActivity attribute completely Apr 16 12:09:34 it just works Apr 16 12:09:35 Heh Apr 16 12:10:41 Holy smokes that is amazing yuizy Apr 16 12:10:54 Gonna do that thing tonight Apr 16 12:10:58 After work Apr 16 12:11:09 rookie211: There's so much information out there, search for it. http://stackoverflow.com/questions/4942591/i-used-to-use-nano-to-edit-text-but-i-switched-to-vim-which-is-more-powerful-w Apr 16 12:11:10 rookie211 no way, emacs ! Apr 16 12:20:16 Niiice Apr 16 12:20:23 Now I have to try vim Apr 16 12:21:13 And in two years you'll sit at your terminal and tell someone how superior vim is... Apr 16 12:24:46 the weirdest thing in vim I had to learn was SHIFT + J to join the below line to the current one, a common thing done in other editors using the backspace or delete key Apr 16 12:24:48 the eternal flame (war) Apr 16 12:25:13 me, i worship all powerful athiesmo Apr 16 12:25:15 Emacs is superior. Apr 16 12:25:43 Let the flame wars begin. Apr 16 12:28:04 Nah, in the end the butterflies win... Apr 16 12:28:20 Hehe flan3002 Apr 16 12:29:09 shmooz: you can use delete for that ,why not? Apr 16 12:29:12 And if you say Emacs has a macro, show me. Apr 16 12:29:28 nick9998: delete never worked for me Apr 16 12:29:40 nick9998: maybe in gvim Apr 16 12:29:47 not in terminal mode Apr 16 12:30:06 hmm Apr 16 12:31:08 shmooz: set backspace=2 Apr 16 12:31:17 SHIFT+J is supposed to be the proper vim way ;) Apr 16 12:31:17 and it works with backspace Apr 16 12:31:54 and you gotta be in command mode not edit mode Apr 16 12:33:58 Someone knows of a channel where I might ask about the behaviour of dialups? Apr 16 12:34:23 #notsureaboutthatone Apr 16 12:34:39 Nah, not even better than #ancienttech Apr 16 12:35:01 boo Apr 16 12:35:24 boo-urns Apr 16 12:39:20 circles look much more like ellipses in openGL ES Apr 16 12:39:43 Uhm, then you scale them wrong... Apr 16 12:39:54 Have you accounted for the aspect ratio? Apr 16 12:39:57 im drawing it along the z-axis Apr 16 12:40:37 z-axis plane Apr 16 12:40:52 So what? Apr 16 12:41:15 please help Apr 16 12:41:16 so my frustrum and projection matrix stuff is there Apr 16 12:41:58 hey Zylinx, whats up Apr 16 12:42:33 i have a layout which defines a button with a style attribute. i then inflate this button with an inflator and add it to a relative layout programatically.... but i cant figure out how to resize the button!! iv been on StackOverflow past hour Apr 16 12:43:09 would the size be affected by the Style ? Apr 16 12:44:14 hang on Apr 16 12:44:39 il make a paste bin if that helps Apr 16 12:47:24 sure Apr 16 12:47:35 Helo, I tried to register sensoreventlistener in new thread. But handleMessage method in handler is never called. What I'm doing wrong. http://paste.ubuntu.com/7261266/ Apr 16 12:50:14 http://pastebin.com/Zqkt3S6U Apr 16 12:50:37 the style and selector can be found here: http://www.mindfreakerstuff.com/2012/09/50-useful-android-custom-button-style-set-1/ Apr 16 12:51:28 i just want to make the buttons height lower Apr 16 12:51:45 and center it horizontally in the relative layout Apr 16 12:51:45 ??? please help me Apr 16 12:53:00 hi guys... i have arrayList populate... i want setText array[1] into textview Apr 16 12:53:07 how^ Apr 16 12:53:09 ? Apr 16 12:53:23 Zylinx: can u try calling .getLayoutParams Apr 16 12:53:29 tv5.setText(flights.get(1)); i get an error Apr 16 12:53:33 then change params.height Apr 16 12:55:08 ? Apr 16 12:56:00 roxdragon simple, read the docs Apr 16 12:56:12 tada ! Apr 16 13:00:58 roxdragon also check out all 13 listview ApiDemos Apr 16 13:01:10 i know , its hidden away :) Apr 16 13:01:20 nick9998, i get null pointer when i try submit.getLayoutParams().height Apr 16 13:01:27 okok Apr 16 13:01:33 where submit is the Button Apr 16 13:02:40 how is this such a pain Apr 16 13:02:45 i just want to set the button height Apr 16 13:02:59 g00s: Ever transmitted bits by manipulating PCM data? Apr 16 13:03:12 noo O.o Apr 16 13:03:30 You should. It's an interesting challenge. Apr 16 13:04:05 Not entirely working yet, though... Apr 16 13:04:24 hej have a problem setting up devices on my ubuntu 12.01 LTS Apr 16 13:05:10 i changed my udev rules to match my nexus 5 SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee1", MODE="0666", OWNER="" Apr 16 13:05:18 but still not detecting it Apr 16 13:05:38 i have the device started on boot Apr 16 13:06:25 that means i can recover start stop and not so much more... is possible to get access to the device in this stage? Apr 16 13:06:51 hi all Apr 16 13:07:02 im setting my own custom layout on a expandable list Apr 16 13:07:05 for a group Apr 16 13:07:18 well, im extending SimpleCursorTreeAdapter Apr 16 13:07:42 if i use androids default layout then i can expand the group Apr 16 13:08:02 if i use my own layout, tapping the group does absolutely nothing Apr 16 13:08:05 wutdo? Apr 16 13:08:26 g00s, can you maybe help me ? Apr 16 13:11:50 Morning Apr 16 13:11:58 Morning Apr 16 13:16:44 can anyone help me ? Apr 16 13:16:52 That depends. Apr 16 13:17:03 depends on what Apr 16 13:17:41 What you need help with. Apr 16 13:17:57 resizing a button Apr 16 13:18:09 What button? Apr 16 13:18:16 The more specific you are the better. Apr 16 13:18:17 Zylinx> i have a layout which defines a button with a style attribute. i then inflate this button with an inflator and add it to a relative layout programatically.... but i cant figure out how to resize the button!! iv been on StackOverflow past hour Apr 16 13:18:32 Zylinx> http://pastebin.com/Zqkt3S6U Apr 16 13:20:10 much appreciated Furah Apr 16 13:20:16 if you could help Apr 16 13:21:27 I'm like really tired, and know nothing on xml, but aren't you assigning the width and height the same value at two locations. Apr 16 13:22:39 well those are the defaults, i have provided you with the code where i havent tried anything. because iv tried multiple ways to resize the damn button Apr 16 13:22:41 Zylinx, how do you want to resize the buttons? Apr 16 13:22:49 i want to shrink its height Apr 16 13:23:13 after changing the size of the button try calling invalidate on the relative layout Apr 16 13:23:34 ok il try that! Apr 16 13:24:20 but what if i define the height in the xml ? instead of wrap_content i put 20dp... that also doesnt work ? and when i try to use .getLayoutParams() on the button view i get null pointer exception Apr 16 13:24:28 but il try that now and get back Apr 16 13:25:05 buttonView.getLayoutParams() throws a null pointer exception? Apr 16 13:25:12 yes Apr 16 13:25:19 then buttonView is null Apr 16 13:25:29 but its not i can see the button Apr 16 13:26:22 weird Apr 16 13:27:29 if it is indeed throwing an exception on a line that only has: buttonView.getLayoutParams(), there are 2 ways that a null pointer exception is thrown Apr 16 13:27:44 Can I use https://ifttt.com on Android ? Apr 16 13:27:49 If yes how? Apr 16 13:27:51 1: it is thrown from inside the function (stack trace would tell you this) or 2: buttonView is null Apr 16 13:28:35 jonc, sorry! the nullpointer is not on buttonView.getLayoutParams() its actually coming from buttonView.getLayoutParams().height which i wanted to read Apr 16 13:28:40 or my app connects to the channel services and a https://ifttt.com registered user activates channels he listens to and the actions specified? Apr 16 13:29:16 gotcha, Zylinx, I don't believe the layoutParams will be valid until the parent view is remeasured Apr 16 13:29:27 if I remember how this works correctly at least Apr 16 13:29:52 bad english is bad. If I remember how this works* Apr 16 13:30:21 the problem is invalidate will not cause anything to be measured instantly Apr 16 13:30:40 neither will requestLayout Apr 16 13:32:01 oh ok Apr 16 13:32:12 i just dont get why i cant set a size for the button ? Apr 16 13:32:15 even in xml ?! Apr 16 13:32:54 because uxnazis have souls Apr 16 13:33:46 A parent has to be passed to LayoutInflater#inflate for its layout_ attributes to be parsed Apr 16 13:34:00 Without a parent it doesn't know what type the layoutparams should be Apr 16 13:34:58 Zylinx:in xml you can Apr 16 13:35:15 From an Android's point of view, which kind of web services is more suitable : SOAP or RESTful ? Apr 16 13:35:28 Zylinx, you are using parent oriented width and height for your button. It can't know what those are until it has a parent and the parents view tree has been remeasured Apr 16 13:36:06 oh Apr 16 13:36:09 so ... Apr 16 13:36:22 hmm Apr 16 13:36:35 I would say just combine the 2 xml's into a single one Apr 16 13:36:48 if you want a specific type of button all over the place, create a style for it Apr 16 13:37:21 is there no other way ? i am using a style Apr 16 13:37:38 Is /data/data guaranteed to always be in internal memory and therefore never dismounted? Apr 16 13:37:45 s/dismounted/unmounted Apr 16 13:37:57 Zylinx: You can Apr 16 13:37:57 Bouska, I prefer rest. The SOAP standard is xml and I hate xml Apr 16 13:38:17 There's a doc for it somewhere on d.android.com Apr 16 13:38:36 Zylinx: http://developer.android.com/training/improving-layouts/reusing-layouts.html Apr 16 13:38:48 I have been reading about google play statistics and that it is possible to see the number of uninstalls of your app on a daily basis. Does this mean that when I uninstall an app from my android phone is reported to google play? Apr 16 13:40:15 shadej, you know how on google play u can see "Your Apps" it knows what you have installed currently Apr 16 13:41:54 Zylinx: okay yeah obviously I am new to android btw. Apr 16 13:46:46 jonc: ty :) Apr 16 13:49:43 Hi, I have a custom Seekbar View and a media player View. Is it good practice to let them communicate via custom events? As in create a "progress changed" event and emit it when I change the seekbars position and subscribe to it in the media player and change the position of playback in the handler? Apr 16 13:49:55 Or should I tie them together differently. Apr 16 13:50:27 :( Apr 16 13:50:47 can anyone help? I said my problem earlier, I'll do that again, considering its been a lot time since that Apr 16 13:50:54 I have min set to 7 target set to 15 and have this manifest for parentActivity http://ideone.com/zGZqku Apr 16 13:50:59 I am aware that it was introduced at API 17 Apr 16 13:51:02 But, I am doing metadata Apr 16 13:51:10 error: No resource identifier found for attribute 'parentActivityName' in package 'android' Apr 16 13:51:24 Kindly correct me where I am going wrong Apr 16 13:51:32 If I remove parentActivityName completely, it works Apr 16 13:52:38 So you're building against api15.. And trying to use something added in api17.. Apr 16 13:52:47 Do you see why that might not work? Apr 16 13:53:31 Well, SimonVT as far as I learned, the part is suppose to handle previous version support Apr 16 13:53:59 SimonVT, Do you see where I am confused now? Apr 16 13:54:01 The meta-data part has nothing to do with your question Apr 16 13:54:07 what? Apr 16 13:54:10 You're using android:parentActivityName Apr 16 13:54:13 It was added in api17 Apr 16 13:54:18 You're building against api15 Apr 16 13:54:32 parentActivityName doesn't exist, so the build system tells you that Apr 16 13:54:38 Oh. Apr 16 13:54:45 I thought it uses the It probably does at runtime Apr 16 13:55:08 the facility is old Apr 16 13:57:34 With Otto why would I get: http://pastebin.com/qwXkeLKb Apr 16 13:58:24 does Otto not use weak references? Apr 16 13:59:21 Hi, I have a custom Seekbar View and a media player View. Is it good practice to let them communicate via custom events? As in create a "progress changed" event and emit it when I change the seekbars position and subscribe to it in the media player and change the position of playback in the handler? Apr 16 14:01:40 hey flan3002 Apr 16 14:01:44 whats shaking Apr 16 14:02:47 Huh? I'm trying to transmit 42 via raw PCM audio... Not yet working... Apr 16 14:03:04 using ALSA drivers? Apr 16 14:03:24 No, using AudioTrack from the Java API. Apr 16 14:03:39 ah yes, because that would make way more sense Apr 16 14:04:56 It's still raw short[]... And doing loads of FFT is no fun either. The first two FFT implementations made the GC sprint, so I had to borrow an implementation from a friend... Apr 16 14:05:09 people, do you know how to get the link of video which official YouTube app is about to play Apr 16 14:05:25 I am sure there has to be an intent filter for that as well Apr 16 14:05:42 Uhm, won't any youtube link do? Apr 16 14:06:24 Or what do you mean? Apr 16 14:06:27 So my jpg file is 1920x1080 and I decode it to half size, that means 960 * 540 * 4 byte for each pixel = 2M but Logcat gives me : Grow heap (frag case) to 17.355MB for 4665616-byte allocation Apr 16 14:06:39 which is more than double size Apr 16 14:06:58 http://pastie.org/9085136 line 34-37, it is regarding Butter Knife. Why btn_send_message still not clickable? Apr 16 14:08:12 csst0111: Are you sure you don't read the entire image and then scale down? Apr 16 14:08:25 csst0111, is the jpg in /drawable? Apr 16 14:08:34 yes its in res/drawable Apr 16 14:08:38 a silly question; how do I switch to graphical view of an XML i have open in eclipse... Apr 16 14:08:39 that's the problem Apr 16 14:09:01 android treats /drawable as a mdpi folder Apr 16 14:09:32 so if you are on an xxhdpi device it actually scales everything by ~3 when it loads anything from /drawble Apr 16 14:09:44 drawable* Apr 16 14:10:49 jonc, let me try and change it to xxhdpi then and check again Apr 16 14:11:28 flan3002, I think so cause if I dont use the decode I get >> 04-16 17:09:06.000: I/dalvikvm-heap(30498): Grow heap (frag case) to 18.837MB for 8294416-byte allocation Apr 16 14:11:28 04-16 17:09:06.330: I/dalvikvm-heap(30498): Grow heap (frag case) to 36.633MB for 18662416-byte allocation Apr 16 14:12:18 csst0111, there is also a nodpi or something like that, that is where I've put most of my actual images Apr 16 14:13:27 jonc, you are right. Changed it to xxhdpi , scale id by 2 and getByteCount() gives me 518400 Apr 16 14:13:28 :) Apr 16 14:14:04 button and ui elements still go in the appropriate folders, but things that will essentially be fullscreen images always go into the nodpi folder Apr 16 14:16:54 hm, i'm confused; if i put an xml file in res/xml … is that 'compiled' by aapt ? Apr 16 14:16:55 jonc, using nodpi gives me 2073600 which is exactly 960*540*4 Apr 16 14:22:52 hi guys.. i have a problem with holderView.. can u help me please? Apr 16 14:23:14 http://paste.ubuntu.com/7261749/ this is my code, but i see only a flight....1 row.. why? Apr 16 14:28:07 csst0111, yeah, I was running into a huge issue before. Loading like 4 900x500 images would crash the app Apr 16 14:28:57 So I was kind baffled at why, that should have never taken up 40mb+ of memory Apr 16 14:29:29 jonc, same here. You were using /drawable ? Apr 16 14:29:33 yeah Apr 16 14:29:38 and moved to nodpi Apr 16 14:34:02 can anyone help me pleasE? Apr 16 14:34:26 g00s, if thats old what new do you propose Apr 16 14:34:47 Omnipotent look at the iosched code, they do all this Apr 16 14:35:13 what i meant was tag is old, but SimonVT pointed out that specific string was new Apr 16 14:35:24 Using Android Studio, I pressed Build > Generate Signed APK... . It gave me a warning that I must modify my Gradle config, and then the UI wizard walked me through signing. I didn't modify my Gradle config but jarsigner thinks it's signed. Should I be concerned? Apr 16 14:35:47 Should I modify my Gradle setup anyway? Apr 16 14:35:47 g00s, oh I thought you meant its depriciated Apr 16 14:35:48 mike-burns do releases from the command line ;) Apr 16 14:36:12 I wonder if I should just remove that attribute, for now, considering my device is not API 17 Apr 16 14:36:16 g00s: Because that's more awesome, or because it doesn't work from Android Studio? Apr 16 14:36:36 mike-burns because, best practice since its automatable Apr 16 14:36:40 Are there any 3r party videoview libraries? Changing videoview's mediacontroller is too involved. Apr 16 14:37:52 too involved? Apr 16 14:38:02 VitamioBundle is worth a shot JustSighDudes Apr 16 14:38:31 Zharf: Too many steps. Thanks Looney. Apr 16 14:38:41 uhhuh... Apr 16 14:38:59 im trying to create an android app that connects to a GAE backend. is it possible to generate this backend in python straight from android studio? Apr 16 14:41:44 mantazer: I would be shocked if that was possible Apr 16 14:43:03 JustSighDudes: ok. so say if i create a GAE backend in python separately (without creating it through android studio)... I can still connect to it from an android app right? Apr 16 14:43:30 Yes, you can connect to HTTP APIs from Android apps. Apr 16 14:44:21 mike-burns: ok, is there any advantage to creating an GAE connected app right off the bat via android studio over creating a separate backend and interfacing with it? Apr 16 14:44:37 I don't know anything about GAE. Apr 16 14:44:52 mike-burns: ok Apr 16 14:57:00 hiya Apr 16 14:57:15 Llogcat is not showing anything all of a sudden.What might have happend? Apr 16 14:57:38 I have a question in laying out my application. I want the app to load a main menu with two options "Single Player" and "Double Player" Apr 16 14:57:55 should Single Player and Double Player be new fragments or activities Apr 16 14:59:11 [Main Screen - Options] -> First_Player || Double_Player -> New Fragments or Activities for each? Apr 16 14:59:41 clar,anything you want to use. Apr 16 15:00:20 One way isn't more beneficial than the other? Apr 16 15:00:51 At the moment, I'm going to have the main_activity display the two options. Then onclickmethods for each will bring up the corresponding fragments Apr 16 15:02:58 clar,fragments are apt if you want to swipe view and activities can launch on click of main activity options. Apr 16 15:04:14 it appears that if I load a http page in my WebView, its css cannot access file:///android_asset, but if I load a file:///android_asset page, its style can access other files under file:///android_asset. why? how can I allow http pages access to file:///android_asset? Apr 16 15:04:15 Vitamio has almost no documentation Apr 16 15:04:35 Anyone have other videoview third party alternatives Apr 16 15:05:01 man, commonsware's big 2000+ page book is great, i've been missing out! Apr 16 15:05:42 how long does it take for google analytics to update? Apr 16 15:06:04 should it be almost instantly (eg <1 minute) after clicking around? Apr 16 15:07:32 2000 page... Apr 16 15:09:00 pfn: it's a good alternative to the android docs at the very least Apr 16 15:09:07 there are 4 chapters on gradle! Apr 16 15:09:18 * pfn shrugs Apr 16 15:09:28 Logcat not showing anything, how to fix it? Apr 16 15:10:15 restart logcat Apr 16 15:10:46 i accidentally created an activity and its class file Apr 16 15:10:53 then remove it Apr 16 15:11:02 is there a way to safely delete these and any dependancies in the project? Apr 16 15:11:29 i have to delete the activity, class file, entry in manifest, and entry in string xml file... anything else? Apr 16 15:12:23 Helo, I tried to register sensoreventlistener in new thread. But handleMessage method in handler is never called. What I'm doing wrong. http://paste.ubuntu.com/7261266/ Apr 16 15:16:13 guys.. how to set listview not scrollable? Apr 16 15:16:44 roxdragon: listView.setScrollContainer(false) Apr 16 15:20:02 Mango_Man: doesn't work for me... Apr 16 15:20:58 i have a problem.. when i scroll . DOWN to UP i see > This is a normal image..http://imagebin.org/305932 if i scroll >>> : http://imagebin.org/305930 Apr 16 15:24:07 pfn, that didn't do it. Apr 16 15:25:05 is it possible to hook into ScrollView's touch events? Apr 16 15:25:41 i have a touch listener on the layout inside the scrollview, but when i scroll, the scrollview seems to take over and the other layout does not get touch events anymore Apr 16 15:25:56 can anyone help me? Apr 16 15:27:19 pfn, i restarted logcat but still nothing Apr 16 15:27:31 then plug your phone back in Apr 16 15:27:38 osxorgate: http://stackoverflow.com/questions/2646028/android-horizontalscrollview-within-scrollview-touch-handling Apr 16 15:27:57 its not even working for the emulator Apr 16 15:28:04 then restart the emulator Apr 16 15:28:53 my JsonWriter is throwing "java.lang.IllegalStateException: Nesting problem: [EMPTY_DOCUMENT]" on the first .name() call Apr 16 15:29:04 it's being thrown by JsonWriter.beforeName() Apr 16 15:29:21 why might this be? Apr 16 15:30:51 vixus: ah yes, it does send CANCEL.. Apr 16 15:31:34 still nothing, not even the filter names are showing Apr 16 15:32:33 SanB: is the device/emulator selected in the DDMS perspective? Apr 16 15:33:42 under Console->DDMS? Apr 16 15:33:55 do you know how to change perspectives in eclipse? Apr 16 15:34:09 in the top right Apr 16 15:34:22 there are some buttons to select perspective Apr 16 15:34:39 there should be one that says "DDMS". click it, and your eclipse layout should change Apr 16 15:34:46 on the left there's a Devices panel Apr 16 15:35:02 select your physical device or the emulator Apr 16 15:36:10 in Retrofit is there a way to log the responses? Apr 16 15:38:01 Is it possible to have duplicate app names in the google play store? Apr 16 15:38:05 vixus, i have selected my device there now Apr 16 15:38:57 Is there a place where I can get a bunch of drawables for free? Apr 16 15:39:02 Like a play button, full screen button etc. Apr 16 15:39:11 check out thenounproject Apr 16 15:39:37 good day, where is the amount of dock icons defined? Apr 16 15:39:45 that was @JustSighDudes Apr 16 15:40:03 Wow those are high quality Apr 16 15:40:14 WeeBo: I think you want #android Apr 16 15:40:31 i asked, no one answered, figured the dev's might know. Apr 16 15:40:36 JustSighDudes yeah, that website is pretty sweet. don't forget that you can download the icon packs too (https://developer.android.com/design/downloads/index.html) Apr 16 15:41:12 vixus, great help, its working now, thanks Apr 16 15:42:15 I wasn't sure if it was ROM specific, thought perhaps after changing the DPI, I could add another set of icons to the dock, just as I can change the amount on the home screen..since more fit. alas no can do. Figured it might be in a config file within the system Apr 16 15:43:29 i'll try android root Apr 16 15:43:43 WeeBo pretty sure it's hard coded somewhere Apr 16 15:44:18 that's what I'm worried about :/ Apr 16 15:45:16 Please ask general android questions in #android Apr 16 15:47:20 really worried about ot chat in such a busy place... just thought i might engage in conversation.. oops Apr 16 15:48:32 hello Apr 16 15:48:47 SanB: great :) Apr 16 15:49:50 do you guys know how can i make google now to uso my own information? i mean sending an email to the user and let google now to create a card with a link and information about what i sent by email? Apr 16 15:50:10 vixus, can we change time format inside logcat Apr 16 15:50:50 SanB: probably via plugins or something Apr 16 15:51:08 SanB: are you using eclipse? Apr 16 15:52:48 vixus, android ADT Apr 16 15:53:09 ok Apr 16 15:53:31 i'm not sure anyway, i'm pretty ok with logcat's output (only use it for debugging) Apr 16 15:54:24 its eclipse only, i.e.;plugin for eclipse IDE Apr 16 15:56:24 vixus, actually my activity is dumping data to server database after the set time interval, so i wanted to see it in 12 hour format for more convenience Apr 16 15:58:59 SanB: have you googled? Apr 16 15:59:28 vixus, doing that simulateously Apr 16 16:00:59 Gson question. Let’s say I have a network request that returns a foreign key among other things. I want to treat it as a foreign key in the database and deserialize it correctly. How should I fill in the POJO for the foreign object in my model? Does anyone know of a good example? Apr 16 16:03:17 I think the worry is that I need multiple requests to fill in foreign key values, so I’ll have temporary holes in my model. Apr 16 16:09:37 Should I be calling notifyDatasetChanged in my custom adapter, or a fragment that uses it? Apr 16 16:09:46 I cannot get my list view to update Apr 16 16:14:08 call it on the adapter Apr 16 16:19:33 hello guys Apr 16 16:19:39 anyone here familiar with the Path class? Apr 16 16:19:58 can it be used for animation? Apr 16 16:20:41 are there any advantages/disadvantages to using a path to animate on a surfaceview or simply just moving the bitmap along manualy (ie - alter coords manualy) Apr 16 16:23:01 danijoo: I'm calling it on the adapter but the list does not change. Where should the actual code which updates the adapters data go..? Ie: I've got a list of Folder objects. Where should I update that list before calling notifyDatasetChanged to do the refresh? Apr 16 16:23:27 u first have to update the list in the adapter eg set a new list Apr 16 16:24:27 danijoo: when is the adapters getView called? I changed the list and called notifyDatasetChanged, but get an array index out of bounds E in the adapter getView Apr 16 16:24:51 Hey, I'm going mental here Apr 16 16:25:12 I have a fragment in a viewpager Apr 16 16:25:12 your adapterclass should have a list object (where u get ur items from with getItem). this list must be changed Apr 16 16:25:24 show us ur code sugarat Apr 16 16:25:35 Ankhwatcher: you could not put the whole thing in there? Apr 16 16:25:50 ;) Apr 16 16:26:20 danijoo: Sure thing. http://pastebin.com/QnAiEgEB Apr 16 16:27:07 when I move away from the viewpager it stops my fragment but it doesn't saveInstanceState, when I switch back to that fragment it restores the data it's showing and hits onCreateView onActivityCreated and onResume but it doesn't restore the heights of my views Apr 16 16:27:58 Any idea how I can save the height of this view? Apr 16 16:28:25 is there a nicer way of interfacing with SharedPreferences other than just dealing with individual gets and sets? Apr 16 16:28:44 it feels like there could be some kind of databasish thing I could do Apr 16 16:28:54 it's not meant to be anything more than a small collection of key value pairs Apr 16 16:29:03 if you want a database then use sqlite Apr 16 16:29:12 no key value pairs is perfect Apr 16 16:29:21 but my main issue is typing Apr 16 16:29:27 you should do it in one step Sugarat: Apr 16 16:29:41 it's not meant for any sort of object, essentially just primitives Apr 16 16:29:45 public void newFolders(Folder[] newFolders) Apr 16 16:29:45 { Apr 16 16:29:45 this.folders = newFolders; Apr 16 16:29:47 this.notofyDatasetChanged(); Apr 16 16:29:49 } Apr 16 16:30:04 Please use pastebin Apr 16 16:31:09 danijoo, I have made that modification but the list is still not changing Apr 16 16:31:17 hi, if im creating a new file on google drive, the drive id is always the same. how can i get a reference to the created file? (https://github.com/googledrive/android-quickstart/blob/master/src/com/google/android/gms/drive/sample/quickstart/MainActivity.java) Apr 16 16:31:33 I'm not sure why. hmmm Apr 16 16:31:44 There is a chance that the previous fragment on the back stack will be GCed before I press back correct? Then it just gets recreated on back press? Apr 16 16:31:46 maybe the list isnt changing? same folders? Apr 16 16:32:19 I'll dump the folder list in newFolders() hang on Apr 16 16:32:54 hi, looking for help unit testing android Apr 16 16:33:04 anybody doing it and what tools are you using? Apr 16 16:33:07 The issue is that you're using ArrayAdapter, but not telling the ArrayAdapter about the new dataset Apr 16 16:33:19 So stuff like count, etc, will always be messed up Apr 16 16:33:39 That's the indexoutofbounds anyway Apr 16 16:33:57 oh. didnt realize he extends arrayadapter Apr 16 16:34:29 http://www.dx.com/p/r430c-cartoon-pattern-android-4-2-tablet-pc-w-4-3-screen-wi-fi-ram-4gb-blue-white-311746 Apr 16 16:34:35 I hate relativelayouts and wrap_content Apr 16 16:34:38 shit misbehaves so badly Apr 16 16:34:47 for git, should i be adding the gradle build file? Apr 16 16:35:15 Sugarat: Dont extend ArrayAdapter for that. Use the BaseAdapter Apr 16 16:35:47 mantazer, yes Apr 16 16:35:48 getting array index out of bounds in getView() - the line that says : Folder folder = folders[position]; Apr 16 16:36:30 pfn: ok cool. im unsure of which files to ignore. would you be able to take a look at a pastebin of my gitignore? Apr 16 16:36:35 are there any advantages/disadvantages to using a path to animate on a surfaceview or simply just moving the bitmap along manualy (ie - alter coords manualy) Apr 16 16:36:49 danijoo, - what's the difference.. array adapter descends from BaseAdapter.. ? Apr 16 16:37:07 arrayadapter dont uses ur list but an internal one Apr 16 16:37:13 pfn: http://pastebin.com/bL7jVmBL Apr 16 16:37:13 Oh! Apr 16 16:37:26 pfn: I have some custom views where measuring breaks in RelativeLayout in certain situations.. Fixed by wrapping in a wrap_content FrameLayout! Apr 16 16:37:33 I can just change that line to BaseAdapter? Apr 16 16:38:31 it now says that I must implement getItem() Apr 16 16:38:38 yes and then implement the other methods properly Apr 16 16:38:46 like getItem(), getCount() etc Apr 16 16:39:05 getItem gets item at position X from ur list Apr 16 16:39:11 getCount for list size Apr 16 16:41:30 SimonVT, yeah, just annoying, 4.3 or 4.4+ seems to resolve it Apr 16 16:41:39 by making relativelayout do multiple measuring passes, or something Apr 16 16:41:47 mantazer, I don't use gradle Apr 16 16:41:47 There is a chance that the previous fragment on the back stack will be GCed before I press back correct? Then it just gets recreated on back press? Apr 16 16:41:56 jonc, huh? no Apr 16 16:42:02 pfn: k no worries Apr 16 16:42:02 jonc, if it's in the back stack, why would it get gc Apr 16 16:42:31 I was thinking kind of like a view pager, it can be GCed, but it gets recreated when it needs to Apr 16 16:47:15 pfn, now if the activity is destroyed and things are brought back when I come back in, am I guaranteed to have all fragments in the backstack recreated before I ever hit back? Apr 16 16:48:53 unit testing? Apr 16 16:51:56 Hi, why is the ADT 22 version is using default fragments when you create a new activity? how do you disable this? Apr 16 16:52:31 I've got my list view updating now, but how come when I change screen orientation it goes back to the old list ? Apr 16 16:54:03 Sugarat: U should use the Bundle object Apr 16 16:54:12 Anybody has experience Google API Client and or Google Play Services? Apr 16 16:54:20 emotionnull: use it ? Apr 16 16:54:50 do I use that in my custom adapter ? Apr 16 16:54:57 wait a min Apr 16 16:56:52 U hv 2 repopulate on list Apr 16 16:57:29 Sugarat: with the appropriate Lifecycle methods Apr 16 16:57:39 Anybody has experience Google API Client and or Google Play Services? Apr 16 16:57:42 http://stackoverflow.com/questions/23112744/android-googleauthutil-userrecoverableauthexception-needpermission?lq=1 Apr 16 16:57:55 Sugarat: Show some code Apr 16 16:58:27 do you want to see the fragment or the adapter ? Apr 16 16:59:22 Sugarat: I hope u knw when and which Lifecycle methods are called on Orientation change Apr 16 16:59:43 Sugarat: your fragment gets destroyed and recreated. thats why Apr 16 17:00:10 makes sense. I'm just trying to work out how to handle that. I need to check if savedInstanceState is null apparently Apr 16 17:00:32 Is it possible to have duplicate app names in the google play store? Apr 16 17:01:08 my onCreateView method seems to create the fragment Apr 16 17:01:56 http://pastebin.com/KVSVdfg5 Apr 16 17:02:12 jonc are you around ? Apr 16 17:02:19 emotionnull: I'm slowly getting more familiar with the lifecycle methods Apr 16 17:02:49 so I need to check if savedInstanceState is null in onCreateView() ? Apr 16 17:03:32 read the android dev docs on that Apr 16 17:03:41 SimonVT ? Apr 16 17:05:58 when the screen is rotated, does the fragment get recreated, i.e.: is onCreate() called ? Apr 16 17:07:44 if you dont omit that, yes Apr 16 17:07:55 again: read dev docs on fragments and lifecycles Apr 16 17:08:08 this cant be explained in a few sentences Apr 16 17:10:08 Hi guys, anyone about this new thing on ADT 22 where when you make a new activity it set a fragment as default layout? anyone know how to disable this? Apr 16 17:11:51 Why does this button not get centered ? the usage of addRule was sourced from StackOverflow but i cant get it working ?? http://pastebin.com/b6MkiRTb Apr 16 17:15:36 anyone ? Apr 16 17:15:56 the .addRule(RelativeLayout.CENTER_VERTICAL) seems to work for everyone else Apr 16 17:16:10 people need to learn how to ignore templates Apr 16 17:16:11 they're useless Apr 16 17:16:36 pfn is that directed at me ? Apr 16 17:16:41 no Apr 16 17:16:45 ok lol Apr 16 17:17:05 it is centered, your layout probably isn't tall enough Apr 16 17:17:15 can't center something in a container that's only big enough to contain the view Apr 16 17:18:37 pfn the RelativeLayout is 50dp high and the button i set to 40 in the layout params Apr 16 17:18:42 i just want the button centered Apr 16 17:19:42 requestLayout then Apr 16 17:19:51 changing params makes no difference unless it occurs before layout Apr 16 17:21:15 i requested layout it didnt help Apr 16 17:21:27 occurs before layout ? Apr 16 17:21:50 nvm Apr 16 17:21:59 so yeah that didnt work, il try invalidate Apr 16 17:23:01 that won't change anything Apr 16 17:23:07 oh ok Apr 16 17:23:15 hmmm :/ Apr 16 17:23:43 any other ideas? Apr 16 17:27:12 pfn could it be something about how im inflating the button ? Apr 16 17:27:44 i was helped early and there was some talk about parsing layout params but my irc's scrollback maxed out Apr 16 17:32:28 ;( Apr 16 17:33:27 Can someone help me figure out why my app stops working everytime I try to access a Fragment method while in my main_activity? Apr 16 17:33:28 http://pastebin.com/UDbRLB3j Apr 16 17:36:24 http://imgur.com/jacoj Apr 16 17:39:31 here's the log Apr 16 17:39:32 http://pastebin.com/JaLdTKjK Apr 16 17:40:17 Can I make the header of listView not focusable? tried android:focusable="false" android:focusableInTouchMode="false" android:clickable="false" && in isItemEnabled item 0 to false. but when i touch the item it gain focus from another item Apr 16 17:41:17 *isEnabled Apr 16 17:44:07 i'm looking to take a sequence of button presses on the lock screen to start a service. i've been googling for ages. can anyone have any idea how this is possible? Apr 16 17:50:00 Why android:layout_height with fixed size does not work as a listview layout header? Apr 16 17:56:35 Zylinx: you shouldn't have to center a button using java unless you have to do it during runtime for some reason, do it in the xml Apr 16 17:57:18 and yeah it sounds like your surrounding layout_height is wrapping content Apr 16 17:59:11 Why android:layout_height with fixed size does not work as a listview layout header? Apr 16 18:04:52 yoavst: it does work, I just tried it Apr 16 18:05:24 shmooz, if my surrounding layout params are wrapping content then you cant center ? Apr 16 18:06:18 it will still center but it won't look like its centered within parent layouts because it is wrapped by the immediate parent layout Apr 16 18:06:55 so if i use fill parent instead on the parent of the button it will work ? Apr 16 18:07:19 give it a try Apr 16 18:08:08 I usually change the background color of the inner layout to see how it is inside the outer parent layout Apr 16 18:08:14 shmooz: http://pastebin.com/swySX7eJ Apr 16 18:08:37 and i'm using addHeaderView(view, null, false) Apr 16 18:08:47 shmooz, thank you <3 Apr 16 18:08:53 i cant believe i didnt know that Apr 16 18:09:18 yoavst: maybe your maxHeight is stopping it from changing Apr 16 18:10:37 shmooz: removed but still the same Apr 16 18:12:07 yoavst: it probably has to do with the surrounding layout Apr 16 18:13:13 yoavst: check the layout height of the layout that is surrounding it Apr 16 18:13:42 shmooz: u mean parent layout? Apr 16 18:13:52 yeah Apr 16 18:13:57 parent to the listview Apr 16 18:14:06 it is a drawerLayout Apr 16 18:14:20 https://github.com/Arasthel/GoogleNavigationDrawerMenu Apr 16 18:14:23 could it be causing the height not to change ? Apr 16 18:14:48 I've never used drawer layout yet Apr 16 18:15:14 Never used DraweLayout with header before, so idk Apr 16 18:15:54 how can I getSystemService from Application, or some other non Activity? Apr 16 18:16:12 ie, how can I get the Context? Apr 16 18:16:15 shmooz: it looks like even match_parent doesn't work here Apr 16 18:18:03 when setting up actionbar themes, is it really necessary to add both "android:background" and "background" items? Apr 16 18:18:14 and if so, what is the difference between the two? Apr 16 18:18:15 heater89: u use actionbarhserlock? Apr 16 18:18:33 yoavst: no i don't Apr 16 18:19:09 if you use AppCompat then yes Apr 16 18:19:32 if your app support 4.0+ only and you don't use ActionBarCompact then no Apr 16 18:19:54 App only supports API level 15 and up, and does not use ActionBarCompact Apr 16 18:20:03 hello Apr 16 18:20:07 do you guys know how to send an email and make it a google now card? Apr 16 18:20:42 yoavst: so from the sounds of it i only need to define the "android:background" item Apr 16 18:21:46 yep Apr 16 18:22:14 yoavst: lastly, does it make a difference if i set the background to @null vs android:color/transparent? Apr 16 18:22:47 http://stackoverflow.com/questions/9311123/is-there-any-diff-null-vs-00000000 Apr 16 18:23:40 yoavst : thanks Apr 16 18:24:23 if im creating a new file on google drive, the drive id is always the same. how can i get a reference to the created file in onActivityResult? (https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/CreateFileWithCreatorActivity.java) Apr 16 18:26:00 so shmooz u got any idea? Apr 16 18:29:51 yoavst: all I can say is my listview works when I change height, and it is in a linear layout Apr 16 18:30:13 so I would suspect it has to do with your layout Apr 16 18:32:26 I'll try to add the view programmatically Apr 16 18:32:28 not from layout Apr 16 18:40:41 why would setting the background of an actionbar to null or transparent cause it to be white? other colors work. Apr 16 18:41:11 can I add 2” theme elements, like this: @android:style/Theme.NoTitleBar" and this? "@android:style/Theme.Holo" Apr 16 18:41:29 heater89: it has to show some color, did you expect black ? Apr 16 18:41:59 shmooz: no i expected fully transparent Apr 16 18:45:59 heater89: maybe you need getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); Apr 16 18:48:01 shmmoz: yea i am seeing that now, i'd like to do it in the styles.xml, i've hadded that attribute and set it to true to see if that fixes my issue Apr 16 18:48:06 added* Apr 16 18:48:38 heater89: they talk about it here some .. http://stackoverflow.com/questions/6749261/custom-translucent-android-actionbar Apr 16 18:49:37 shmooz: yup, looks like I am going to have to do it programatically (i was just trying to keep it all in xml) Apr 16 18:49:46 shmooz: thanks for the help and the link Apr 16 18:50:15 heater89: my pleasure :) Apr 16 18:52:19 are you targeting api's below 14? Apr 16 18:52:50 Helo, I tried to register sensoreventlistener in new thread. But handleMessage method in handler is never called. What I'm doing wrong. http://paste.ubuntu.com/7261266/ Apr 16 18:55:22 Anyone using AdMob to advertise their app? Apr 16 18:55:55 if so, what max bid do you have yours set to? i can't seem to get any with mine Apr 16 18:57:04 Hi. Just wondering what is the preferred JDK version to be used with the Android SDK? Apr 16 18:59:12 1.7.0_51 Apr 16 18:59:26 or at least thats what im using Apr 16 19:04:55 what is the most common/advised way of having data notified from server to client ? Apr 16 19:05:44 on desktop a permanent TCP connection would be the choice, but on mobile would you just use the c2dn to notify the app and then this prompts the app to do http ? Apr 16 19:06:07 obviously the benefit of this means even if the app is not in foreground the user (and app) will be notified Apr 16 19:06:29 is there still use/benefit of having permanent tcp connection ? Apr 16 19:06:50 If I change the main layout color in a listview item, the blue that surrounds it when I select it disappears. Any way to tackle that? Apr 16 19:07:12 android:drawSelectorOnTop Apr 16 19:08:22 Is that for me? Apr 16 19:09:05 Thanks RingoMcKraken Apr 16 19:09:21 Anything running the SDK against JDK8? Apr 16 19:09:26 no prob bro Apr 16 19:09:47 not sure but that would be badass, jdk8 is pretty awesome Apr 16 19:10:10 You running 32bit or 64bit JDK RingoMcKraken? Apr 16 19:10:39 64 Apr 16 19:10:51 oh i think i found a work around http://zserge.com/blog/android-lambda.html Apr 16 19:11:31 anyone ? Apr 16 19:12:27 ingsoc what do you mean exactly by permanent tcp? Apr 16 19:12:49 RingoMcKraken: opening a socket to a server Apr 16 19:13:05 for the purpose of notifications without the app running? Apr 16 19:13:48 The holder pattern I use in my ArrayAdapter causes some issues when I asynchronously fetch images from a URL while a user is scrolling. What can I do about this? Apr 16 19:13:49 ingsoc: are you talking about gcm ? Apr 16 19:13:57 scrolling the list* I mean Apr 16 19:14:04 as far as i know c2dm is deprecated, gcm is the next wave Apr 16 19:14:15 RingoMcKraken: oh ok Apr 16 19:14:46 in the old school days of ye ole droid many servers would have a cron job setup, but this causes a carier spike Apr 16 19:15:06 you might want to check out reto meir's dev bytes on efficient data transfers Apr 16 19:15:39 the cell radio drains a lot of battery and has a tail time of up to a minute or so where it stays on full power Apr 16 19:15:54 RingoMcKraken: looks like this has more features than c2dm (i am completely new to android dev and have not actually built my app I am just looking at what is possible) Apr 16 19:16:07 ok Apr 16 19:16:17 right on man we need more android dev's out there ;) Apr 16 19:17:12 RingoMcKraken: isn't the GCM comms using radio anyway Apr 16 19:17:16 Angelo: are you fetching the images in the getView method of your adapter? Apr 16 19:17:41 yes it is but its initiated by the server only when an event triggers it Apr 16 19:17:54 RingoMcKraken: Yes Apr 16 19:18:02 Well, that's where I start the AsyncTask Apr 16 19:18:05 server->gcm cloud->device Apr 16 19:20:11 you might want to try the volley networking library it has an async image loader, if you use this in conjunction with some type of bitmap cache (or lrucache) it will save you from making too many repeat calls for the same image Apr 16 19:20:35 asynctasks have a darkside to them Apr 16 19:20:54 unless you properly use the thread pool scheduler Apr 16 19:21:20 use the force luke! Apr 16 19:30:25 can someone please help me Apr 16 19:30:35 folks, can you tell me how do i add a created bitmap onto a layout which has some view elements in it Apr 16 19:31:09 i mean layout elements like buttons and so on Apr 16 19:31:42 slani, speak your problem :) Apr 16 19:32:07 droidNub: setBackground Apr 16 19:33:11 hehe, but background is already defined in xml, unless i do a transparent bitmap with some things drawn onto it, and set backgroud would still keep parts of uncovered xml background, innit? Apr 16 19:33:39 no Apr 16 19:33:58 once you set the background it overrides what's already in there Apr 16 19:34:21 thepoosh: your suggestion is to take background image as a bitmap and draw on it and put aas background, thanks, got it Apr 16 19:34:35 wat? Apr 16 19:34:51 oh Apr 16 19:34:53 no Apr 16 19:35:07 you need to override the draw method Apr 16 19:35:14 and add whatever you want Apr 16 19:35:42 Don’t see a proguard.cfg in my eclipse project. It’s supposed to be created by default, I’ve read. Apr 16 19:35:52 What to do? I want obfuscation. Apr 16 19:36:20 there are rules of how to use proguard Apr 16 19:36:24 i did override my onDraw method, but it is in another class and i have set this already made bitmap onto a background within the activity Apr 16 19:36:26 they are pretty simple Apr 16 19:36:40 droidNub: I tried to register sensoreventlistener in new thread. But handleMessage method in handler is never called. What I'm doing wrong. http://paste.ubuntu.com/7261266/ Apr 16 19:36:50 so why do you want to put the bitmap on the view? to match a design comp? Apr 16 19:37:19 Hi. I'm having some troubles with a list view I've made. It seemed to be working fine, but I've found that the id of the item which I was sourcing from 'position' in getView() is not the index of my data! I feel like this is somehow related to getItemId() but can't work out how to actually access the id of the list item Apr 16 19:37:31 ie: if its 12th down in the list, I need to access that 12 Apr 16 19:38:50 slani: sorry mate too nub for this :) Apr 16 19:38:52 how do I get the id of the item that was clicked on Apr 16 19:38:56 id != index Apr 16 19:39:02 so I've found hehe Apr 16 19:39:34 you can specify a specific id in the getItemId(int position) function of your adapter Apr 16 19:40:01 you have to override it Apr 16 19:40:08 I don't follow.. sorry. then how does getItemId know the ID of my data ? Apr 16 19:40:28 I've overridden it, just not sure what to put in that method Apr 16 19:41:15 are you talking about a Resource id? like whats stored in the generate R file? Apr 16 19:41:18 droidNub: :( thanks anyway. Apr 16 19:41:34 its an index to an array that lives in my custom adapter class Apr 16 19:42:02 i would just return the position in getItemId then Apr 16 19:42:14 that way they will be one in the same Apr 16 19:42:52 that's not working unfortunately. The first 7 items in my list work, but when I click on the 8th I get the wrong result back. Apr 16 19:42:57 so what kind of operation are you doing in getview that needs an id Apr 16 19:43:09 setting the onClickListener Apr 16 19:43:25 probably better to do that elsewhere ? Apr 16 19:43:26 ohhhhhh Apr 16 19:43:34 are you using the listview in a fragment? Apr 16 19:43:39 yep Apr 16 19:44:28 then you can inherit ListFragment and overide onListItemClick Apr 16 19:45:31 ah okay. When I override that, how would I get the index number in there ? I'll lookup that method Apr 16 19:46:33 its a paremeter of the method Apr 16 19:46:57 okay. I'll give it a go. Thanks very much :-) Apr 16 19:47:02 Muchos helpful Apr 16 19:47:04 onListItemClick(ListView l, View v, int position, long id) Apr 16 19:47:08 no problemo Apr 16 19:47:42 i usually only use id if there is some type of lookup associated with the data model Apr 16 19:50:52 yeah that's working now.. awesome! It's because I'm not that familiar with how it all hangs together, it's hard to workout in my head sometimes how data gets from one method to another Apr 16 19:51:09 all feels like magic when it works, and I'm not entirely sure how Apr 16 19:58:17 RingoMcKraken: so, an app can request GCM notifications. and i then create server side app to send messages to GCM servers and they will notify device which notifies app. The messages seem limited in data they can contaiin etc. so I expect its usual to just have notification tell the app, you need to connet to server an then retrieve the actual data that way ? Apr 16 19:59:59 i spose the server app could then know not to keep sending notifications if the device hasn't connected to pick up data since the last push notification Apr 16 20:00:34 ingsoc: thats correct Apr 16 20:00:45 but the GCM documentation also states there are no gurantees of delivery so there is no way to know if the message was never sent and that is why the device hasn't been notified and so connected ack to the application servers Apr 16 20:01:12 it is just a queuing mechanism Apr 16 20:01:27 that's why notifications(which is currently being cracked down on in the store) need to be relevant and useful Apr 16 20:01:31 not a synchronous do this, and then responds when delivery has been successful Apr 16 20:01:48 ok Apr 16 20:02:11 hmmm. so, the other option is a service where I have a permanent connection to my backend servers Apr 16 20:02:14 at all times Apr 16 20:02:17 too many apps out there send useless notes saying "hey im an app" Apr 16 20:02:31 but obviously this is a battery life tradeoff Apr 16 20:02:41 permanent connection will get terminated by the os Apr 16 20:02:49 (*this is for enterprise use so it is not like i am eating someones personal battery life) Apr 16 20:03:03 ok Apr 16 20:03:15 its a hard problem to tackle on mobile Apr 16 20:03:21 are you syncing lots of data? Apr 16 20:05:07 i think what your looking for is a sync adapter Apr 16 20:05:35 lots of data means different things to different people but I would say only a few KB's of data per mesage. this is not an issue if the push notfication is only used as a trigger to tell the app to call home Apr 16 20:05:40 i wouldn't think Apr 16 20:05:51 exactly Apr 16 20:07:02 i spose, as a mechanism around potential loss/dropping of push notifications by GCM i could just implement a basic resend strategy after a predetermined time, or escalate to other mechanism like email or SMS Apr 16 20:07:12 i will have a think, thanks for the info Apr 16 20:08:10 RingoMcKraken: you are saying that a TCP connection held by an app to a server will be terminated even if the app is running as backgriund service ? Apr 16 20:08:16 is this correct ? Apr 16 20:08:28 no prob man, and yeah you could have the app send your server a packet if they click on the notification by find it's intent Apr 16 20:09:37 so, if you wanted to have a an app running as a background service it would have to do something like polling to check for data ? (if not relying on push notifiations) Apr 16 20:10:29 yep Apr 16 20:10:53 services and intents, check out the official docs, it gets pretty hairy Apr 16 20:11:01 :/ Apr 16 20:12:25 yeah mobile can suck at times Apr 16 20:15:03 RingoMcKraken: sorry to be a pest, but i am assuming a foreground app can have a permanent tcp connection to a server and not have it forcibly terminated by android (as long as it stays in foreground) ? Apr 16 20:16:26 yep Apr 16 20:16:33 and its per activity Apr 16 20:16:51 you'll also want to be sure to be mindful of the activity lifecycle Apr 16 20:17:25 i usually set up a broadcast reciever that detect network connectivity before doing any data transfers Apr 16 20:17:57 RingoMcKraken: yeah i noticed you can find out whether ther eis a data connection and what type it is Apr 16 20:18:15 e.g. if you do need to transfer lots of data hang off until wifi Apr 16 20:18:24 yep Apr 16 20:18:47 sync adapters work really well with that as well because they can do it in the background without the app being open Apr 16 20:18:55 then there's iOS after android Apr 16 20:19:00 you just have to set up feux "accounts" Apr 16 20:19:03 i think this is gonna be a fair bit of work and testing Apr 16 20:19:35 yep Apr 16 20:19:50 iOS is a whole other ball of wax Apr 16 20:19:55 think i may prototype with mobile web first (UI/user interaction flow/basic comms) Apr 16 20:20:20 you want to be mindful of the fact that everything on an iOS app syncs with iCloud by default Apr 16 20:20:26 /crazy i know Apr 16 20:20:34 i get the impression iterative, interactive development is gonna be fairly heavyweight with native from the get go Apr 16 20:20:44 oh yeah Apr 16 20:21:13 you'll get a better quality app out of it in the long run that will be easier to maintain than a hybrid solution Apr 16 20:21:16 RingoMcKraken: what is the net result of the iOS clouid sync thing Apr 16 20:21:56 it syncs everything in core data Apr 16 20:22:20 so this makes things easier ? Apr 16 20:22:26 : Apr 16 20:22:28 or worse :( Apr 16 20:22:30 :) Apr 16 20:22:52 I have a project in android studio that keeps telling me that it isnt using Gradle, but I need to include the google play services library so that I can i use the Google Maps stuff. What do I do? I cant find a guide that tells me what I need to put in the gradle files in a simple way. Apr 16 20:23:18 update android sdk geegee Apr 16 20:23:33 ingsoc: worse im afraid Apr 16 20:23:34 It is all up to date and every package is downloaded Apr 16 20:23:49 you have to edit your code to ignore icloud Apr 16 20:25:24 http://source.android.com/source/building-running.html says you can use parallel tasks with make, how can i tell how many hardware threads available when using ubuntu on a virtual machine? Apr 16 20:26:18 gege: invalidate your caches and restart Apr 16 20:26:29 what version of android studio/os are you running Apr 16 20:26:39 you may have to edit build.gradle file Apr 16 20:27:04 Yeah the issue is with the build.gradle files. My project isnt using Gradle at the moment, and I dont know what to put into the gradle files Apr 16 20:27:34 did you import from an eclipse project? Apr 16 20:27:47 GEEGEEGEE: if your project is in ADT eclipse you can use the auto import feature to Gradle Apr 16 20:28:43 I craeted it with android studio on another machine and ive just cloned it from git onto this one Apr 16 20:28:47 if so you may have to start a new project and just piece by reimport Apr 16 20:28:58 oh Apr 16 20:30:00 Anyone use Retrofit? I am checking it out, and it seems nice that it can remove the unecessary need to specify which function parameters are path/queryparams/headers etc. I was wondering if you all have any pattern of associating say enums or constants with the api calls you would create in a Retrofit interface class Apr 16 20:30:01 RingoMcKraken: thanks for your time, appreciated Apr 16 20:30:21 yiati: i do, and i do that with enums Apr 16 20:30:29 If I just created a new project and then copied in my src folder would that work RingoMcKraken Apr 16 20:32:02 no prob man anytime Apr 16 20:32:30 yes gee Apr 16 20:33:43 shmooz: just wanted to give you an update Apr 16 20:34:01 gotta go folks keep on rockin Apr 16 20:34:09 alright thanks Apr 16 20:34:38 shmooz: soo, if you put in the style for the Activity android:windowActionBarOverlay=true instead of the style for the action bar (where is where i was putting it) it is not necessary to request it in the activity Apr 16 20:35:20 shmooz: this also allows for the preview screen to get the same style while the main activity is loading. Again thanks for your help :) Apr 16 20:39:09 heater89: good to hear you got it working :) I'll try to take note for when I'll need it myself Apr 16 20:42:45 yiati: https://github.com/JakeWharton/u2020/blob/master/src/main/java/com/jakewharton/u2020/data/api/GalleryService.java and https://github.com/JakeWharton/u2020/blob/master/src/main/java/com/jakewharton/u2020/data/api/Section.java Apr 16 20:44:26 JakeWharton: Cool, yeah I forgot that I could implement functions in an enum, that would do it. Thanks! Apr 16 20:53:31 somebody knows how to retrieve the driveID of a just created file with newCreateFileActivityBuilder in Android Drive SDK? the example(https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/CreateFileWithCreatorActivity.java) always returns the same driveID regardless of new files created Apr 16 20:53:42 perhaps it is not even possible Apr 16 20:53:48 ?? Apr 16 21:03:01 I don't get it, to get in the lottery, you actually have to pay the $900 first? that's kinda lame Apr 16 21:03:10 they refund it if you aren't selected? Apr 16 21:03:19 pfn: its an auth Apr 16 21:03:23 pfn, you don't pay Apr 16 21:03:28 they reserve funds Apr 16 21:03:30 I see Apr 16 21:03:40 e.g. 900$ gets blocked on your credit card but not transfered Apr 16 21:03:52 yeah, I know the diff 'tween auth and collection Apr 16 21:03:59 if you win the lottery, they issue a capture immediately Apr 16 21:04:40 last year it took them awhile to clear my card Apr 16 21:04:53 IIRC they waited until the end of the period where you can cancel it Apr 16 21:05:16 last year the first time i got past the gates, the wallet site wouldnt even load anything, just errors Apr 16 21:05:29 the second and third time my payment timed out before the 5 minutes Apr 16 21:06:51 this will be my third year in a row that i will not be able to attend Apr 16 21:07:03 (yes, im not optimistic about their lottery system) Apr 16 21:07:07 how to get ViewPager to swipe to next page without swiping? Apr 16 21:07:37 mylord: you want to animate a swipe without swiping or just show the next page? Apr 16 21:07:53 animate it Apr 16 21:08:23 probably going to have to animate the fragment transaction yourself and then then set the pager adapter index Apr 16 21:09:02 unless there is a scrollTo/animateTo on the adapter Apr 16 21:09:04 mylord, setCurrentItem has smoothScroll parameter. Apr 16 21:09:12 it does what you want Apr 16 21:09:14 ^ Apr 16 21:09:19 however it does that only for neighbour pages Apr 16 21:11:05 hey guys, I'm declaring an intent Intent serviceIntent = new Intent(this, IcarusService.class); Apr 16 21:11:15 and calling it with startService(serviceIntent) Apr 16 21:11:23 yay for you Apr 16 21:11:23 but I get an error saying that I've already started the service Apr 16 21:11:45 any ideas on what could be wrong? I'm quite new to android dev Apr 16 21:12:14 what is the exception? Apr 16 21:12:57 Mavrik: it animates too fast.. any way to slow it down? i can barefly tell its scrolling it Apr 16 21:13:32 Unable to start service Intent { act=com.research.icarus..class }: not found Apr 16 21:13:45 woops, thats an old one Apr 16 21:13:54 let me get that logcat output again, one sec. Apr 16 21:14:39 anyone here do Kindle development? Apr 16 21:18:17 04-16 17:17:53.194: E/AndroidRuntime(1460): java.lang.RuntimeException: Unable to start service com.research.icarus.IcarusService@b2e57288 with Intent { cmp=com.research.icarus/.IcarusService (has extras) }: java.lang.IllegalStateException: Cannot execute task: the task is already running. Apr 16 21:18:22 what’s the TestAdapter here? https://github.com/JakeWharton/Android-ViewPagerIndicator Apr 16 21:18:33 empty data Apr 16 21:18:39 whatever data you want Apr 16 21:19:15 if anyone has issues with inflation and XML layout params beign ignored read this: http://www.doubleencore.com/2013/05/layout-inflation-as-intended/ Apr 16 21:19:23 took me the whole day to figure it out Apr 16 21:20:13 pfn thanks for the help earlier btw. Apr 16 21:21:43 JakeWharton: I want to have “the dots”. Is there a pre-made adapter for that? Or what do I do? Apr 16 21:21:59 the adapter has nothing to do with those Apr 16 21:22:13 the dots come from the count of the adapter Apr 16 21:23:45 zerofaith: never seen that error. you should be able to call startService() as often as you want. it will call onStartCommand() each time Apr 16 21:26:20 JakeWharton: So far I’ve followed only the Usage here: https://github.com/JakeWharton/Android-ViewPagerIndicator Apr 16 21:26:49 I didn’t make an adapter, and don’t know if I need to. Can I use something already made? I just want to add dots to my ViewPager Apr 16 21:28:16 if you have a viewpager than you have an adapter Apr 16 21:32:40 I only recall doing this to get my ViewPager: what should I have for pager.setAdapter(thePa); // where to get thePa? Apr 16 21:34:08 Or do I not need to call setAdapter? Apr 16 21:34:15 When I don’t, I get a crash Apr 16 21:50:25 any expert for threads and sensors are hire Apr 16 21:54:35 ??? Apr 16 21:54:42 How would I go about solving "Gradle 'FinalNewNew' project refresh failed: Artifact 'com.android.support:support-v4:13.0.0:support-v4.jar' not found." ? Apr 16 21:55:32 open sdk manager, download 'Support Repository' Apr 16 21:55:41 also change that dependency to 19.1.0 Apr 16 21:55:46 also, drop '.jar' off the end Apr 16 21:55:54 and support-v4 off the end Apr 16 22:00:35 droidNub: I tried to register sensoreventlistener in new thread. But handleMessage method in handler is never called. What I'm doing wrong. http://paste.ubuntu.com/7261266/ Apr 16 22:33:10 hi guys there is anyone? Apr 16 22:36:24 i think there is anyone. Apr 16 22:37:01 anyone running the Android sdk etc in a vm? Apr 16 22:38:03 I am having problems running 'android avd' in a Linux kvm vm (fedora) Apr 16 22:39:48 i have a problem with baseadapter, can anyone help me? Apr 16 22:41:53 If I want to use the guava libraries, do I just adding the 'compile ...' line to dependencies in gradle what should I do? Does gradle auto download the package? Apr 16 22:44:45 is layout_gravity always ignored if the parent of that view is a RelativeLayout?? this is what iv read but then if i take the LayoutParams in java and addRule(RelativeLayout.CENTER_VERTICAL); it centers ? im really confused Apr 16 22:46:36 problem with audio: http://paste.fedoraproject.org/94813/68828913/ Apr 16 22:56:50 is a file in res/xml and retrieved with getXml() considered "compiled" ? Apr 16 22:57:01 trying to understand the docs for AttributeSet Apr 16 23:08:57 I need to grab some mp3 files from a website so i can use them as resources in my android app. but im not sure how to grab these sound files from the website. any tips? Apr 16 23:11:35 Is it possible to have 4 alert buttons in an action menu. Currently I can only one for neutral, positive, and negative, but I also need a cancel button. Apr 16 23:25:37 what do you mean by compiled, g00s ? Apr 16 23:26:07 leslie the 2nd paragraph of http://developer.android.com/reference/android/util/AttributeSet.html Apr 16 23:26:21 This interface provides an efficient mechanism for retrieving data from compiled XML files" ...... Apr 16 23:26:31 … "however it is more useful in conjunction with compiled XML resources: " Apr 16 23:27:07 that's what it sounds like to me. Like, AndroidManifest.xml is compiled to some kind of binary format, maybe the files in res/xml are too Apr 16 23:48:06 should I check the gradle dir into VCS? Apr 16 23:48:47 shvelo yes Apr 17 00:00:10 How do I deprecate my app for older versions of android? Apr 17 00:00:46 I want to publish one final version of it for Froyo before I move to ICS and above Apr 17 00:01:10 AS 0.5.5 is out :) Apr 17 00:01:21 For some reason I can't update my AS. Apr 17 00:01:49 I want to start using it soon. Apr 17 00:01:52 echeese i get the impression you simply upload a new APK Apr 17 00:02:05 so there will be 2 apks? Apr 17 00:02:10 Anthaas get the full download then Apr 17 00:02:18 Tried. Apr 17 00:02:25 hm\ Apr 17 00:02:26 It just installed a previous version (the same one I have now) Apr 17 00:02:33 And then refused to update again. Apr 17 00:02:33 echeese upload new app, set targetSdkVersion to froyo(min to w/e u want) then publish a new one with the min as ICS Apr 17 00:02:39 the ics one will take precedence Apr 17 00:02:57 jug6ernaut so there are 2 apks then right ? Apr 17 00:03:01 yup Apr 17 00:03:06 Okay, thanks Apr 17 00:03:11 do you have link of github about sample app sync data on mysql db to sqlite db? help me please :) Apr 17 00:03:17 two apk's, two versions. Apr 17 00:04:18 & make sure you don't deactivate the froyo one, so u will end up with two active versions. Apr 17 00:06:11 hm, crap. 0.5.5 is based on EAP. i'll pass Apr 17 00:06:29 somebody knows how to retrieve the driveID of a just created file with newCreateFileActivityBuilder in Android Drive SDK? the example(https://github.com/googledrive/android-demos/blob/master/src/com/google/android/gms/drive/sample/demo/CreateFileWithCreatorActivity.java) always returns the same driveID regardless of new files created Apr 17 00:06:41 When i make my own project i start with the src to work on my android app if i am right? Apr 17 00:06:50 Yes. Apr 17 00:07:14 oh i think i understand it right so far. Apr 17 00:07:17 g00s y no love for EAP Apr 17 00:07:33 they've been bad luck for me Apr 17 00:07:42 Start by perhaps creating an Activity. Set this as the Launcher activity in your manifest file. Create a layout for the activity. Override onCreate and use setContentView(R.layout.activity_myfirstactivity); Apr 17 00:07:46 :\ bo Apr 17 00:07:58 g00s: I have a very specific question, would you mind seeing if you can shed some light? Apr 17 00:08:25 thanks you Antaas and sorry for the newbie question:) Apr 17 00:08:55 Anthaas perhaps, i have to run soon Apr 17 00:09:07 I have an Activity with 4 fragments, the first has 2 radio buttons in a radio group. The second has a rating bar. The third has an EditText. The radio buttons have an OnCheckChangedListener which increments a value in the activity it is associated with Apr 17 00:09:22 The ratingbar as an OnRatingChangedListener which does the same. Apr 17 00:09:39 The EditText has a TextWatcher which has the same code in OnTextChanged Apr 17 00:10:01 The fourth fragment reads the incremented value and displays it. Apr 17 00:10:48 If I hit the listener for the radio buttons, the text on the 4th fragment changes, if I change the rating, the text changes, if I change the text content in the edittext, the text does not change on the fourth fragment (updates in the onResume() function) UNTIL I change one of the Apr 17 00:10:52 previous 2 fragments again Apr 17 00:12:22 g00s: Any ideas why that might be? Apr 17 00:13:48 Anthaas: the text in the 4th fragment changes on onResume, not if you change the edittext Apr 17 00:13:50 no idea :( changeListeners are sometimes pretty idiosyncratic. for example, for a compoundButton, if you are going to call setChecked() , then the listener gets fired on your change. so there is no differentiation between a user changing it, and you Apr 17 00:14:21 in aosp code, a lot of times what they will do is say .setChangedListener(null); setChecked(); setChangedListener(this) Apr 17 00:14:44 briefchain: Yes, the changing of the text in the edittext changes a value in the Activity of the fragments, which is read in onResume(). Apr 17 00:15:45 so the listener is fired on textchange? Apr 17 00:15:51 g00s: Hmm, thats unusual. They have a boolean flag in OnRatingChanged for a RatingBar called "fromUser" to see if a human changes it or you. Apr 17 00:16:14 briefchain: Yes, because if I them go and change of the previous fragments again, the text is updated as it should be. Apr 17 00:16:35 g00s: No idea why they wouldnt implement that across the chain. Apr 17 00:16:55 spinners and compoundbuttons come to mind Apr 17 00:18:02 Anthaas: so the edittextlistener is not fired i would assume, the ratingchangelistener is fired and changes the text Apr 17 00:18:48 briefchain: The TextWatcher is fired otherwise the value changed in the fourth fragment would remain the same completely, even if the RatingChangedListener did fire again. The TextWatcher firing is what increments the value which is displayed. Apr 17 00:20:21 For example, changing fragment1 would set the value to 1, then changing fragment2 would set it to 2, both of these would update the 4th fragment to say 1 and 2 respectively. If I then change fragment 3, the 4th fragment still says 2 until I change fragments 1 or 2 again. Apr 17 00:20:37 Both fragment 1 and 2 can only increment the value once, no matter how many times they are changed. Apr 17 00:20:40 and why is 4 changed? Apr 17 00:20:47 cause of what? Apr 17 00:20:57 onResume() being called on the 4th fragment. Apr 17 00:21:19 everytime you change on of the others? Apr 17 00:21:28 onResume contains a call like myTextView.setText(parent.getValue()); Apr 17 00:21:38 Only once. Apr 17 00:21:59 So if I change fragment 1 N-times, the updated value is always 1 Apr 17 00:22:14 if I then change fragment 2 N-times, the updated value is always 2 (1++) Apr 17 00:23:18 do you have an edittextlistener, which refreshs fragment 4? Apr 17 00:23:34 or why is it refreshed? Apr 17 00:24:03 No. The EditTextListener (TextWatcher) updates a value in the fragments parent activity. When onResume is called on the 4th fragment, it reads that value and updates its text accordingly. Apr 17 00:24:11 Fragments do not talk to other fragments directly. Apr 17 00:24:18 yeah ok Apr 17 00:24:45 ah ok, so you have only one fragment displayed at a time? Apr 17 00:24:50 Yes. Apr 17 00:24:54 Sorry, I should have said. Apr 17 00:24:59 ViewPager Apr 17 00:27:04 and you are sure, OnTextChanged is fired? Apr 17 00:27:26 perhaps you have declared a local variable in OnTextChanged Apr 17 00:27:39 It has to be otherwise when I change the other fragments the value of the 4th field wouldnt be updated. Apr 17 00:27:47 4th fragment* Apr 17 00:28:03 No local variables Apr 17 00:28:10 can you show me the code? Apr 17 00:28:55 Hmm, theres way too much to copy (even if I trim the irrelevant stuff out) Apr 17 00:29:04 i am stuck with this drive sdk which is driing me crazy, so let me look on code from someone else :) Apr 17 00:29:52 put a brakepoint in OnTextChanged Apr 17 00:29:58 on check, if its fired Apr 17 00:30:18 i can imagine, that is not fired because fragment is closed without firing it Apr 17 00:30:33 cause focus did not left edittext until finish of fragment Apr 17 00:30:38 doing so now Apr 17 00:31:31 or breakpoint :) Apr 17 00:31:58 Yep Apr 17 00:31:59 Its hit Apr 17 00:32:07 The correct function is called to update the value Apr 17 00:32:17 Yet the 4th fragment doesnt update. Apr 17 00:32:52 Why can't Google add 2FA support in the Google account wizard? Apr 17 00:33:01 put a breakpoint in onresume, perhaps its fired earlier Apr 17 00:33:50 Youve got it Apr 17 00:34:00 onResume is called when I load the 3rd fragment Apr 17 00:34:03 Thats annoying. Apr 17 00:34:19 Sorry, when I press the edittext on the 3rd fragment Apr 17 00:34:25 Thats when the onResume in the 4th is called. Apr 17 00:34:37 isnt it called 4 times in total? Apr 17 00:35:01 Nah, onResume() on the 4th fragment is first called when I press the edittext on the 3rd. Apr 17 00:35:07 Remember I have one fragment per screen. Apr 17 00:36:15 so its called 4 times and should be called on fragment 4 only? Apr 17 00:36:23 or its called 2 times? Apr 17 00:37:11 onResume() of Fragment 4 is only called once. Apr 17 00:37:20 That is when I press the EditText on Fragment 3. Apr 17 00:39:40 and breakpoint in onResume is after breakpoint in update? Apr 17 00:39:51 Yes Apr 17 00:39:51 No Apr 17 00:39:52 No Apr 17 00:40:07 The breakpoint in onResume is hit BEFORE the EditTextListener is hit. Apr 17 00:40:13 Which is the problem. Apr 17 00:40:29 so change the fragment in update? Apr 17 00:40:40 You cant Apr 17 00:40:45 Fragments cannot talk directly to Fragments Apr 17 00:40:57 They have to do so through the parent activity Apr 17 00:41:20 But I can't guarantee at all times that my 4th fragment is attached to the activity, so I cannot directly call an update on fragment 4 in the activity. Apr 17 00:41:50 so a function in the parent is called to change and one function in parent is called to update (or just update the variable)? Apr 17 00:42:20 cant you attach it after update? Apr 17 00:43:10 When Fragment 3 is changed, it calls a function in parent to change the value of a variable (a setter method), and in onResume() of fragment 4, it uses a getter method to read the value of that variable and set its textview to the content. Apr 17 01:02:56 Anthaas: what causes the fragments to be changed? Apr 17 01:04:38 User input. Apr 17 01:05:27 a button in fragment 3? Apr 17 01:05:33 No Apr 17 01:05:38 Right Apr 17 01:05:47 This is the scenario of how a user would use the app Apr 17 01:05:57 The Activity would load, fragment 1 would be displayed. Apr 17 01:06:14 They would select a radio button, this would change a value in the activity from 0 to 1. Apr 17 01:06:38 They would then swipe to Fragment 2, and change the rating. This would change the value in the activity from 1 to 2. Apr 17 01:06:57 They would then swipe to Fragment 3, they would change the text, this would change the value in the activity from 2 to 3 Apr 17 01:07:13 They would then swipe to fragment 4, this would display the value in the activity, which should be 3, but is 2. Apr 17 01:07:50 This is because, it would seem now, that the onResume() of fragment 4, which is where the value is loaded into the fragment, is called BEFORE the value in fragment 3 is changed from 2 to 3. Apr 17 01:07:51 ah ok, the swipe triggers the fragment change Apr 17 01:08:39 dont use ontextupdate listener Apr 17 01:09:01 update the variable in the main function on leaving fragment3 Apr 17 01:09:17 this should be called before onresume of fragment4 Apr 17 01:09:25 Its not though Apr 17 01:09:40 onResume of fragment 4 is called when I press the edit text on fragment 3. Apr 17 01:09:46 Which would be before leaving fragment 3 Apr 17 01:10:42 what do you mean with press the edittext? Apr 17 01:10:48 if you focus a text input field? Apr 17 01:10:56 Yes Apr 17 01:11:05 Text Input Fields are called EditTexts haha Apr 17 01:11:37 so what happens in ontextupdate listener? Apr 17 01:11:48 parent.incrementValue() Apr 17 01:11:54 well Apr 17 01:12:37 if (!booleanValue) { parent.incrementValue(); booleanValue = true; } else { ... } Apr 17 01:12:59 and onresume of fragment4 is called only once on focusing edittext but not on displaying it? Apr 17 01:13:08 yes Apr 17 01:13:21 on focus of edit text in fragment 3, not on displaying fragment 4 Apr 17 01:13:37 and what does parent.incrementvalue? Apr 17 01:13:48 in the parent instance, it just increments a value Apr 17 01:14:52 and all fragments are attached at the same time? Apr 17 01:15:04 I dont control the attaching of the fragments Apr 17 01:15:19 However Android handles that is what is implemented. Apr 17 01:15:22 Im using a ViewPager. Apr 17 01:19:00 call Fragment.update() in update function in main (which is clled from fragment 4)? Apr 17 01:19:20 fragment 3)? Apr 17 01:21:33 Im using the support v4 fragment Apr 17 01:21:38 there is no update() function Apr 17 01:22:55 hey guys you're all doing a great job, keep it up! Apr 17 01:25:03 Hahaha, thanks Nick. Doesn't seem to be going anywhere though haha Apr 17 01:25:50 Hi Guys, I have problem with the “Android Dependencies” (jar missing) after I edited “template.xml” in the adt-bundle/sdk/tools/templates… anyone know how to fix this? Apr 17 01:31:05 This is ridiculous. Apr 17 01:31:14 I've just tried a hack work around and even that doesnt work. Apr 17 01:31:36 Android want us to use Fragments, they could at least guarantee that their lifecycle is reliable. Apr 17 01:32:09 I've even tried manually calling a function in the fragment, which I forcibly find, and then requestLayout (also tried forceLayout) and that doesnt work either. Apr 17 01:32:14 The UI just does not want to update. Apr 17 01:32:25 Anthaas what is your problem Apr 17 01:32:29 Anthaas , have same problem here Apr 17 01:32:44 bc the life cycle is reliable lol, if you understand what is going on. Apr 17 01:33:03 Ive been sat here for ages typing it all out, with loads of input from other people. Apr 17 01:33:06 fragments arnt like activities, they arnt self-contained Apr 17 01:33:14 I realise this. Apr 17 01:33:24 Anthaas: have you tried using a different life cycle callback? Apr 17 01:33:34 Yep :/ Apr 17 01:33:35 Anthaas is out of breath from the marathon typing session Apr 17 01:33:42 yikes Apr 17 01:33:51 Hahaha, sorry for the wall of texts g00s. Apr 17 01:33:55 Still no luck though :/ Apr 17 01:34:49 Anthaas write the your question and put it on stack overflow Apr 17 01:35:36 jug6ernaut: I have 4 fragments in an activity. One fragment per screen using a ViewPager and SectionPagerAdapter. In the first 3 fragments, I have input methods. Once each fragment has had an input once, it increments a value in the activity. This value is displayed in the 4th fragment. When I edit frag1, the value becomes 1, when I edit frag2, it becomes 2, when I edit frag3, it is still 2 until Apr 17 01:35:45 I scroll back to frag 2 and then to frag 4 again. Apr 17 01:37:59 maybe you need to use FragmentStatePagerAdapter Apr 17 01:38:08 sounds like something is going away? Apr 17 01:39:30 Hmm, it seems as if the next fragments onResume is called when its previous fragment is loaded. Apr 17 01:40:30 Anthaas have you adding logging code? Apr 17 01:40:34 debugged through it? Apr 17 01:41:14 jug6ernaut: Yes, this is how I know that the onResume is being called what I consider to be prematurely. Apr 17 01:41:26 g00s: Having just read up, Im not sure how the FragmentStatePagerAdapter would help? Apr 17 01:41:42 on resume will be run any time the fragment is attached Apr 17 01:41:43 There is no large amount of data etc Apr 17 01:41:46 oh, nm. i thought state was going away Apr 17 01:41:53 fragments are attached when they are 1 outside of the current Apr 17 01:42:13 so if 1 is displayed, 2, is also loaded. if 2 is displayed 1 and 4 are also loaded Apr 17 01:42:22 this will not happen in any specific order afaik Apr 17 01:42:35 1 and 3* Apr 17 01:42:37 Is there a way to then be notified of when a fragment is actually visible? Apr 17 01:42:39 yes, this behavior is different with FragmentStatePagerAdapter. in that case, they are all attached i think Apr 17 01:43:01 Anthaas i add a on page change listener Apr 17 01:43:09 ital ping each time u switch Apr 17 01:43:17 to your adapter Apr 17 01:44:26 jug6ernaut: Thats fair enough, but I added some code into the activity saying when my function to increment the value is called, get the 4th fragment, if (fragment.isAdded) { updateText(); } and the function called updateText() sets the text and requestLayout() is called. Still no visual update. Apr 17 01:44:36 I've tried using forceLayout (not recommended, I know...) and that didn't work either. Apr 17 01:46:24 1 sec I'm gonna look up docs for isAdded, not sure what it signifies Apr 17 01:47:28 Anthaas what are you expecting from isAdded Apr 17 01:47:33 returns true if the fragment is added to the current activity. Apr 17 01:47:46 there is no isAttached. Apr 17 01:47:59 !isDetached() Apr 17 01:48:10 isnt the same as isAttached would be Apr 17 01:48:24 isDetached is if the fragment has been explicitly detached Apr 17 01:48:24 -_- Apr 17 01:48:30 What if it hasnt been attached in the first place? Apr 17 01:48:30 getActivity() would be null Apr 17 01:49:02 ahhh Apr 17 01:49:08 that could work in its place. Apr 17 01:49:27 i don't understand why your using UI state to control your application logic Apr 17 01:49:49 I can't make two fragments talk directly. Apr 17 01:49:57 sure you can Apr 17 01:50:07 not sure i would recommend it, but u can. Apr 17 01:50:10 Android docs says specifically not to do that? Apr 17 01:51:02 should have said shouldn't then :P. I would have some kind state object on your activity. When something happens in a fragment have it update the state. Apr 17 01:51:24 Is that not kind of what I have though? Apr 17 01:51:30 get to 4th fragment, if state matches what you want, do what u want. or hell, don't even allow switching to 4th fragment if its not the state u want Apr 17 01:51:54 Anthaas yes, but your state should be not be something that is inferred, you should have direct control over it. Apr 17 01:52:02 By having an int variable for example. Every time one fragment changes, it increments this value by 1. All the 4th fragment has to do is read it? Apr 17 01:52:14 and then if it = some calculated value, then display a button. Apr 17 01:52:31 so where does isAdded come in? Apr 17 01:52:42 it was my hacky work around to try and get the text to update haha Apr 17 01:52:44 (sry still trying to follow) Apr 17 01:52:54 oh Apr 17 01:52:55 hmm Apr 17 01:52:58 Beforehand the update of the UI on the 4th fragment was done using onResume() Apr 17 01:53:08 but I realised that it doesnt work how I would want it to haha Apr 17 01:53:31 I cannot get that text to update unless I scroll back and forth such that it is detached and reattached. Apr 17 01:53:41 i what i would do is since the UI need to change from fragment to fragment Apr 17 01:54:03 i would remove scrolling all to gather, add a "next" button of sorts, that can only be clicked once the requirements have been met Apr 17 01:54:23 then when that button is clicked, update your ui code, then trigger a page change. Apr 17 01:54:50 Hmm, a next button would force an input from the user, but then I risk the user just satisficing. Apr 17 01:55:04 Putting in the minimum amount in order to be able to scroll forward. Apr 17 01:55:18 The restriction for being able to move forward comes in the 4th fragment haha Apr 17 01:55:22 if u can't get the text to update your probably not updating it right, when u scroll back to the first fragment the 4th is destroyed, so when u swiped back to it its being recreated and thus updated Apr 17 01:55:24 Im going to have to change this a bit then I guess. Apr 17 01:55:39 Yes. That is exactly what is happening. Apr 17 01:55:40 ah ic Apr 17 01:55:53 Basically, it is a survey app. Apr 17 01:56:01 Fragments 1 2 and 3 are questions Apr 17 01:56:04 4th is a submit question Apr 17 01:56:14 the text says "You have answered X questions." Apr 17 01:56:29 Each time 1 2 or 3 is updated, the value of X is incremented as necessary Apr 17 01:56:50 only when X = 3 in this example can the user submit their results. Apr 17 01:57:08 Except X is 3, and the user can move forward, but in the text X is being displayed as 2. Apr 17 01:57:21 can u post the code for the 4th fragment Apr 17 01:57:27 and how you are initiating the update? Apr 17 01:57:42 sure Apr 17 01:59:26 do that lol Apr 17 01:59:41 code 10000000x > !code for debugging Apr 17 01:59:53 like doing IT work over the phone :| Apr 17 02:00:52 Haha Apr 17 02:01:11 Right here is Fragment4, excuse the poor naming convention in some places, a quick find and replace for anonymity :P Apr 17 02:01:12 http://pastebin.com/BSGbNCrU Apr 17 02:02:51 updateText() did have requestLayout() after the setText Apr 17 02:02:58 So, I've had that in onResume Apr 17 02:03:11 I've also had a call in parent where I increment that value to manually change the text too. Apr 17 02:03:18 Calling the updateText() function. Apr 17 02:05:59 yea on resume is not going to work Apr 17 02:06:40 I realise that now, but I can't get it to update in any other way either. Apr 17 02:07:11 do what i said earlier, hand updating and the logic in your adapter Apr 17 02:07:45 when i use do the children attributes have to be cound to a namespace? Apr 17 02:07:58 is your problem that the view is not visible when you expect or that its not displaying the correct text? Apr 17 02:08:18 if i say … can i just use as is, or so i need to have it in res-auto like "myapp:foo" Apr 17 02:08:32 g00s 100% guessing, but i would say they shouldn't. Apr 17 02:09:04 http://pastebin.com/Eurftxbq My adapter. Apr 17 02:09:11 docs suck for this Apr 17 02:09:28 g00s that they do :\ Apr 17 02:09:34 1/2 of android dev is just piecing together SO posts Apr 17 02:09:39 Ive always found creating styles to be the worst part, I've had very limited experience is the whole styleables thing. Apr 17 02:10:00 the whole res-auto thing was only announced in adt 17 release notes Apr 17 02:10:13 :| Apr 17 02:10:24 Anthaas that is a horrible getItem function Apr 17 02:10:39 well Apr 17 02:10:39 Im new to Fragments btw, so be gentle hehe. Apr 17 02:10:42 How could I make it better? Apr 17 02:10:46 maybe not horrible, idk, but its ugly lol Apr 17 02:14:40 Bearing in mind, I cannot statically set the Fragments in the Activity because each survey can be structured differently. Different types of questions, different number of questions, etc. Apr 17 02:17:11 Anthaas Apr 17 02:17:29 Yeah? Apr 17 02:17:56 have your adapter implement ViewPager.onPageChangeListener, pass your ViewPager into your adapter when you construct it, register your adapter as a listener. Apr 17 02:19:32 is anyone willing to help me out quickly? Apr 17 02:19:55 willing to try -_- Apr 17 02:20:21 Anthaas use it to monitor the progression, add your logic for checking the count there also. Apr 17 02:20:50 only thing i not sure of is getting the instance of your fragment from there, might need to grab it off the fragment manager Apr 17 02:21:40 so add tags to your fragments so you can grab them(or really just the submit fragment in this case) Apr 17 02:21:43 tag/id Apr 17 02:23:01 I need to make a pretty simple app but I'm not sure where to start, I have the developer tools Apr 17 02:23:17 How do I add a tag? Apr 17 02:23:27 does it require a pretty good understanding of java to even start? Apr 17 02:23:47 knar2 to do anything meaningful yeah Apr 17 02:23:49 knar2: I would say so. Apr 17 02:23:53 Anthaas fragment.setTag() Apr 17 02:24:09 Not a function that is available.. Apr 17 02:24:14 Im using the support v4 fragment Apr 17 02:24:16 If that matters? Apr 17 02:25:42 basically all I need to make is a 4x3 grid of countdown timer buttons, pressing one starts the timer, pressing it again resets Apr 17 02:26:17 I have a bit of programming experience but not with java Apr 17 02:26:36 Anthaas meh no, i believe they are set when they are added to the fragment manager Apr 17 02:27:01 However, I'm not adding them explicitly...am I? Apr 17 02:27:14 knar2: what answer are you looking for exactly? Apr 17 02:27:19 Just by having getItem return them Apr 17 02:28:20 I guess I'm trying to be pointed in the right direction, I tried looking up tutorials but I don't really know where to start Apr 17 02:28:22 jug6ernaut: Could I not do fragmentManager.getFragments().get(fragmentManager.getFragments().size() - 1); if I know that my submit fragment is always the last one? Apr 17 02:28:23 Anthaas i don't want it to recreate the fragment Apr 17 02:28:37 Anthaas try it Apr 17 02:28:57 knar2: no one here can help you if you don't understand tutorials, especially if it's because of the language Apr 17 02:30:14 jug6ernaut: Ok, so my adapter now looks like this - is this kind of what you meant? http://pastebin.com/TZ0HzpHf Apr 17 02:31:10 Anthaas yup exactly Apr 17 02:32:17 and in onPageSelected I can do mmFragmentManager.getFragments.get(arg0).updateText(); ? Apr 17 02:32:17 hmm I'll poke around and see if I can figure it out, if not I'll be back here :P Apr 17 02:33:01 if arg0 == .size()-1 obv. Apr 17 02:33:47 Anthaas yup Apr 17 02:34:25 i would also do a if( fragment isInstance SubmitFragment ), but if the fragment manager works like that...should work Apr 17 02:34:45 hopefully its linear like that Apr 17 02:35:35 I just casted it, knowing that it would be an instance of it. Apr 17 02:37:29 oh wait Apr 17 02:37:38 The FragmentManager only holds the 3 fragments Apr 17 02:37:45 so on the first fragment, the scrolling would fail. Apr 17 02:37:53 It would try and cast incorrectly. Apr 17 02:37:56 Ill have to use instanceof Apr 17 02:38:49 Anthaas http://stackoverflow.com/a/18611036/1293179 Apr 17 02:38:53 looks to be interesting Apr 17 02:38:56 Still doesnt work, Apr 17 02:39:50 the answer below it would also possibly work Apr 17 02:39:55 so the cast worked? Apr 17 02:40:31 The cast worked after I used instanceof in the if condition. Apr 17 02:41:30 and ur calling the updateText function Apr 17 02:41:32 ? Apr 17 02:41:34 Yeah Apr 17 02:41:55 i would also change how u doing ur text view update Apr 17 02:42:21 pass the string in? Apr 17 02:42:30 u could do that Apr 17 02:42:34 Even though the string will always be the same formatted string? Apr 17 02:42:42 but i was just referencing your setText call Apr 17 02:43:04 is that what that does? Formatting? Apr 17 02:43:14 Yes, hense the commas Apr 17 02:43:34 the 2nd and 3rd values in the getString() part are the integer values being put into the text Apr 17 02:43:53 ic Apr 17 02:44:09 for example the string might be "This is a string with %1$d numbers which include %2$d" Apr 17 02:44:15 have u debugged at that point to make sure that the values being returned are correct? Apr 17 02:44:20 and that its just the view thats not updating? Apr 17 02:44:56 It will be that if I can scroll back to detach and scroll in to reattach and have the correct value show without changing anything else Apr 17 02:45:33 right but i don't wanna know about then :P Apr 17 02:45:41 we need to know whats going wrong Apr 17 02:45:47 i think i i've got pizza-burn Apr 17 02:46:11 debugging now :D Apr 17 02:46:52 can anyone help me with my problem Apr 17 02:47:31 nope Apr 17 02:47:34 put ice on your pizza Apr 17 02:47:50 or freeze the pizza and apply it to your burn Apr 17 02:48:04 Anthaas: you are taking up alot of screen space. Seems if you are loading/unloading fragments&data that was in previous fragments affect display in other fragments, you are doing something wrong. You need a central access point. you are failing at that? Apr 17 02:49:07 canvs2321-: Not quite correct. The data is from the fragments getActivity() activity. Apr 17 02:49:25 then you are failing, so i am correct Apr 17 02:49:34 you are making it hard for some reason Apr 17 02:49:51 he wouldn't be here asking for help if there wasn't #fail involved lol Apr 17 02:49:53 canvs2321-: I am, I am trying to understand where I am going wrong, which is where jug6ernaut was helping me. Apr 17 02:49:57 Exactly haha Apr 17 02:50:16 k.i.s.s. Apr 17 02:51:03 just seems like alot of work, where google would help you faster if you have exact problems, instead of obstract Apr 17 02:51:09 abstract* Apr 17 02:51:40 You don't think I went to Google first? Apr 17 02:52:08 i won't deny that, i will deny that going to google first with direct information is where you failed Apr 17 02:52:31 -_- Apr 17 02:52:55 shit if you main activity has all the data, why is it so hard to pass to fragments Apr 17 02:53:11 jug6ernaut: So I've debugged, and the strangest thing is happening. If I go to Fragment3, and enter some text, and then go to Fragment4, the onPageSelected function of the adapter is not called. But if I go swipe back to detach the fragment, and then forward to reattach, it hits it.... Apr 17 02:53:12 canvs2321- at least read if your going to try & insult him Apr 17 02:53:35 canvs2321-: Can you go back to not talking for a little bit? Apr 17 02:53:37 read the 200+lines of this/that? no thanks Apr 17 02:53:49 have fun Apr 17 02:53:52 ty Apr 17 02:54:07 canvs2321- then stop making assumptions Apr 17 02:54:15 Java doesn't like my code. :( Apr 17 02:54:19 while (is_user_a_monkey()) {throw new Banana();} Apr 17 02:54:25 jug you'll fix this! doubt it Apr 17 02:54:40 Fenny need more banana's ofc Apr 17 02:54:47 canvs2321- cool story bro Apr 17 02:55:30 jug6ernaut: Do you think while should be if? Apr 17 02:55:40 Anthaas try onPageScrolled Apr 17 02:56:22 Fenny while() could lead to infinite loop without proper checks. Apr 17 02:56:26 thats a lot of banana's Apr 17 02:57:05 jug6ernaut: according to the docs, onPageSelected should be the one we implement Apr 17 02:57:08 well if we are throwing a banana something will catch it. Apr 17 02:57:19 breaking us out of the loop. Apr 17 02:57:54 haven't you played mario cart, banana's arnt caught they are run over. They ruin ppl's day. Apr 17 02:58:12 jug6ernaut: You know what. Thank you so much for your help. I think the easiest option here would be to just change the functionality somewhat. Apr 17 02:58:27 by doing what? Apr 17 02:58:57 jug6ernaut: Rather than inform the user of their status, I will use a ProgressBar and a simple boolean statement Apr 17 02:59:04 "You have not done X", "You have done X". Apr 17 02:59:10 you know I think plaid should be the past tense of play... it would be better that way. Apr 17 02:59:11 I can work that out without the integer being passed. Apr 17 02:59:16 You got plaid. Apr 17 02:59:20 HAHAHA Apr 17 02:59:48 i mean u could even do a shared preference to store the value, then read it when the fragment is loaded, and add a onChangeListener, just seems like a really inefficient way to go about it Apr 17 02:59:52 Fenny lol **** ENDING LOGGING AT Thu Apr 17 02:59:58 2014