**** BEGIN LOGGING AT Sat Jan 24 02:59:59 2015 Jan 24 03:00:20 instead, call them "optional" or something? Jan 24 03:00:41 fakey: not sure. I would personally assume no and go hunting for solid answers. the rules are relatively clear though, iirc Jan 24 03:00:41 legal, or morally correct? Jan 24 03:01:48 yiati both I guess. Jan 24 03:01:52 "Devices running platforms older than Android 4.4 (API level 19) use a version of webkit that has a number of security issues. As a workaround, if your app is running on these devices, it should confirm that WebView objects display only trusted content." Jan 24 03:02:07 wait, is there no gradle compile command for picasso?? :'( Jan 24 03:02:36 So I should explicitly say "this feature requires in-app purchase"? Jan 24 03:02:50 t0astt: It's on the page. Jan 24 03:02:56 First Google result. Jan 24 03:03:06 yeah I just found it :P Jan 24 03:04:11 Yeah I will. Even if it's not required legally I'd like to be clear I guess. Jan 24 03:04:52 fakey: Yeah maybe a clear list with a title of "in app purchases" or "extra content" or something Jan 24 03:05:38 ..as long as the list is condensed enough to not be "spamming" according to Play rules Jan 24 03:09:15 Think I should add overlay text on the screenshots that feature paid options too, or is in the description good enough? I can foresee users not reading descriptions and giving bad reviews because the features in screenshots they wanted had to be bought. Jan 24 03:11:01 selling stuff is nervewracking lol Jan 24 03:11:28 here's a pretty good interview with some old school programmer giving inspirational advice to others ... http://twit.tv/show/coding-101/51 Jan 24 03:14:05 Can someone help me out with contexts? Picasso requires a context parameter. I declared "Context c" as a field, and then passed in c.getApplicationContext(), but I think it's crashing my app with a null pointer exception Jan 24 03:15:09 t0astt: You can just use getContext() if you are calling it from an Activity/Fragment/View Jan 24 03:15:53 c.getContext() or just getContext()? Because the latter says it cannot be resolved. Jan 24 03:16:01 t0astt: http://gradleplease.appspot.com/#picasso is handy for future reference Jan 24 03:16:29 Nice reference groxx, I'll save it! Jan 24 03:16:39 t0astt: getActivity() if you are in a fragment Jan 24 03:16:48 yiati: I am in an adapter Jan 24 03:17:00 t0astt: then you'll have to pass in a context somehow Jan 24 03:17:06 ^ Jan 24 03:17:23 I'll do that from my main activity then Jan 24 03:17:51 t0astt: Yeah just pass it in as a parameter to the constructor of the adapter, and make it an instance variable of the adapter Jan 24 03:18:25 Mhmm, that's what I'm going to do. It looks like I can only do getApplicationContext() or getBaseContext() from my MainActivity Jan 24 03:18:51 You can use getContext Jan 24 03:19:08 sorry :P Jan 24 03:19:11 just use this Jan 24 03:19:13 in the activity Jan 24 03:19:24 I have been working in views all day today which is getContext Jan 24 03:19:28 heh Jan 24 03:19:31 yeah :) Jan 24 03:19:35 No problem, I know that feeling lol Jan 24 03:20:35 Yep, 3 parents up the inheritance tree from Activity is Context so it is one :D Jan 24 03:20:51 which is why getActivity() works in Fragments Jan 24 03:21:02 Well, no crash, but nothing appeared in my imageView :( Jan 24 03:27:34 i wonder why the rxjava ExecutorScheduler uses trampolining instead of just put the Callables on the executor directly O.o Jan 24 03:27:52 optimization or for correctness ? Jan 24 03:30:56 hm, maybe its for subscription cancellation since you can't remove a runable from an Executor afaik Jan 24 03:31:27 Hi. I'm new to Android development and I'm trying to throw together a real quick hack. I need to make an app that I can trigger from an HTTP request, so I need to implement Google Cloud Messaging (CGM). I have Google's example project open, but I'm unsure if it's working right now as-is and if I can simply compile it into an APK to run on my phone. This is the file structure http://puu.sh/eWv6D/1f Jan 24 03:31:29 ce96eac3.png Jan 24 03:31:30 http://puu.sh/eWv6D/1fce96eac3.png Jan 24 03:33:39 Keavon: Do you have the Android sdk? Jan 24 03:33:52 yiati: Yes. Jan 24 03:36:40 Of the files in the screenshot of the file structure, which of them is the main program? Jan 24 03:37:11 The AndroidManifest.xml is where the main Activity is defined Jan 24 03:37:17 That's where your program starts Jan 24 03:37:48 Which is probably the one called MainActivity Jan 24 03:37:50 http://puu.sh/eWvTb/ab86c20911.png Jan 24 03:37:56 Is there some catch with using findViewById within an adapter? It's telling me it can't resolve it. Jan 24 03:38:29 Does it call a class named MainActivity as its name is mentioned under the part? Jan 24 03:38:46 Keavon: Yep the one that has the android.intent.action.MAIN is MainActivity so that is your starting point Jan 24 03:39:03 Why is it red in the IDE then? Jan 24 03:39:07 It's part of the file structure Jan 24 03:39:30 It says "Cannot resolve symbol 'MainActivity'" Jan 24 03:40:09 t0astt: No, there's no catch. Jan 24 03:40:54 t0astt: There are 2 objects that have that function. Activity and ViewGroup Jan 24 03:41:22 t0astt: If you are in an Activity you can call this.findViewById() i.e. findViewById Jan 24 03:41:29 But not in an adapter Jan 24 03:42:11 mActivity.findViewById() will work Jan 24 03:42:35 In the adapter? Jan 24 03:42:47 Wouldn't the adapter be inflating its own layout. Jan 24 03:43:58 Per row yeah, if that's what you want, then you can just call findViewById on the object you are inflating if it's contained in there Jan 24 03:44:07 per *item Jan 24 03:44:53 g00s, you can always remove from queue Jan 24 03:45:03 g00s, once it's executing, you can't really cancel... Jan 24 03:46:13 Noob question, how how do I set up the compiling in Android Studio? Jan 24 03:46:21 but how* Jan 24 03:46:25 set up what compiling Jan 24 03:46:29 just run build Jan 24 03:46:33 The APK compiling Jan 24 03:46:43 "build" Jan 24 03:46:44 ... Jan 24 03:46:47 "make" Jan 24 03:46:52 it's one of the menu items Jan 24 03:46:55 Build > Make Project? Jan 24 03:46:59 I am working on a project Jan 24 03:47:07 Keavon, that doesn't seem obvious to you? Jan 24 03:47:13 need some one who can helpme on this app Jan 24 03:47:25 this is a awesome idea Jan 24 03:47:38 There's an app for that Jan 24 03:47:41 Made a prototype but now need to interface it withapp Jan 24 03:47:41 pfn: It's the button I initially tried, but then it asked for me to set things up, so I asked to see if it was something else Jan 24 03:47:52 asked to set what things up Jan 24 03:47:56 Cannot start compilation: the output path is not specified for module "client". Jan 24 03:47:58 Specify the output path in Configure Project. Jan 24 03:48:04 then do that Jan 24 03:48:21 Then it pops up with this Project Structure window http://puu.sh/eWxad/093e3b8100.png Jan 24 03:48:33 any one can help me on this Jan 24 03:48:40 And that is way above my head, since it doesn't seem to be asking for just a directory to output to Jan 24 03:48:55 nice screenshot Jan 24 03:48:57 i strated with android studio but dont know how to implement my idea Jan 24 03:49:20 Err, looks like Puu.sh didn't locate the window coordinates correctly http://puu.sh/eWxff/210ecdc96b.png Jan 24 03:49:33 There's a manual capture Jan 24 03:49:49 Keavon, click android, click output, done Jan 24 03:50:11 and for that matter, any method of generating a project should have done this for you... Jan 24 03:50:16 https://www.youtube.com/watch?v=yd1CXYpUxHI&list=UUzhTWREKkrxTVWQFFn4-ZVg Jan 24 03:50:27 here the link for the hardware Jan 24 03:50:54 if you find it interested then you can guide me with app Jan 24 03:51:01 I don't see output under any of the tabs, or anything much related to where the compiled file goes Jan 24 03:51:18 Packaging > APK Path? Jan 24 03:51:26 yes Jan 24 03:51:30 and again, this should have been set for you automatically Jan 24 03:51:34 how did you create/import this project? Jan 24 03:51:52 If I pastebin some code could someone look at it? I don't know what I'm doing wrong, even after reading through some RecyclerView documentation... I just can't get this image to show up :P Jan 24 03:52:14 I really need to do that some day, mess around with recycler view Jan 24 03:53:19 It's not picasso, either. It just won't show anything (even iclauncher) Jan 24 03:53:25 oh, shows it now Jan 24 03:53:29 not the pic I want tho Jan 24 03:54:38 OBO Jan 24 03:54:45 pfn: I git cloned it from Google Code Jan 24 03:54:48 to my desktop Jan 24 03:54:54 then I opened the project file Jan 24 03:55:29 And setting the APK path didn't stop the error from appearing Jan 24 03:56:51 so did you find this interesting Jan 24 03:59:56 any developers from india here Jan 24 04:00:01 ? Jan 24 04:00:58 Has anyone worked with RFduino Jan 24 04:01:13 I am trying to send data from app toRFduino Jan 24 04:01:23 for that need small test app Jan 24 04:08:17 http://youtu.be/yd1CXYpUxHI Jan 24 04:08:33 this is my project Jan 24 04:08:48 want to interface it with app Jan 24 04:08:58 any one can help on this Jan 24 04:09:09 I have started it but kinda stuck Jan 24 04:09:16 on android studio Jan 24 04:12:21 any developers from india Jan 24 04:14:09 So I still can't get this to compile Jan 24 04:14:33 It still says Jan 24 04:14:35 Cannot start compilation: the output path is not specified for module "client". Specify the output path in Configure Project. Jan 24 04:15:47 why does google play make me create an apk for testing when i'm still testing/developing the apk! Jan 24 04:16:05 ...to create in-app purchase items that is Jan 24 04:17:08 some great comedy for the weekend http://www.androidpolice.com/2015/01/23/google-issues-official-response-concerns-jelly-bean-webview-security/ Jan 24 04:18:56 I think I'm gonna simply give users a choice. Jan 24 04:19:08 gonna^ Jan 24 04:21:04 i guess don't need crouton any more (but its running from usb) http://www.pcworld.com/article/2873561/google-just-made-it-easier-to-run-linux-on-your-chromebook.html Jan 24 04:23:10 Keavon: Is the project doing something with in a build.gradle file? Jan 24 04:23:15 s/with/weird/ Jan 24 04:23:47 TacticalJoke: I git cloned https://code.google.com/p/gcm/source/checkout Jan 24 04:23:54 Then I opened it in Android Studio Jan 24 04:26:33 Open an exist project > Browse to gcm/gcm-client/gradle > select Project from the default view of Android like so: http://puu.sh/eWBxL/6350687e80.png > Build > Make Project Jan 24 04:26:44 Hmm. I don't understand that: they have the Gradle wrapper but no build.gradle file. Jan 24 04:27:00 there is a build.gradle file in the root of gcm/gcm-client Jan 24 04:27:08 Oops, yeah. Jan 24 04:27:42 Did you read 'README'? Just checking. Jan 24 04:29:30 Err, I did not. Jan 24 04:31:32 Just read it and it wasn't relevant Jan 24 04:34:00 I give up trying to make it open the project. Jan 24 04:34:16 Never once have I had success making any source code compile on my computer. Jan 24 04:34:41 gradlew assembleDebug Jan 24 04:34:46 that's how you make it compile, guaranteed Jan 24 04:35:01 What's that? Jan 24 04:44:49 "Cannot resolve symbol 'google'" Jan 24 04:44:57 On line: Jan 24 04:44:59 import com.google.android.gms.gcm.GoogleCloudMessaging; Jan 24 04:54:26 Keavon: You've never compiled anything ever? Jan 24 04:54:42 Never compiled anything I didn't write. Jan 24 04:55:00 Meaning I've never successfully compiled any source code that I've downloaded Jan 24 05:10:32 hmm, do views get recycled when notifyDataSetChanged is called? or does it keep using convertView Jan 24 05:10:41 er, does the recycle cache get dropped Jan 24 05:11:32 * pfn gives it a whirl Jan 24 05:11:37 on recyclerview, i vaguely remember notifydatasetchanged nuking everything Jan 24 05:12:35 nope, it continues to use convertView Jan 24 05:12:36 bummer Jan 24 05:12:36 Hey guys, I was using an ArrayAdapter with my ListView and I was passing the adapter a simple List, with one row in it Jan 24 05:13:07 But now I have two values that I want in each listview, and in the List that Im passing there are two values for each location Jan 24 05:13:20 0 has 2 values, 1 has two values.. Jan 24 05:13:30 So my question is, can I still use ArrayAdapter? Jan 24 05:16:35 if make snod produces a system.img file, which command do I need to run to get an unofficial recovery zip from existing modules? Jan 24 05:17:24 pfn: "get recycled" and "keep using convertView" aren't quite orthogonal. fwiw, without stable IDs, I think ListView recycles everything and rebuilds it all with the recycled convertViews. with stable views, I can't remember if it gives you the same convertView, or if it doesn't call getView for those views at all. Jan 24 05:17:51 recyclerview is, I think, a bit smarter yet about what's reused and when Jan 24 05:18:08 Rescue9: try #android-root Jan 24 05:18:16 thanks Jan 24 05:19:37 drose379: Sure. You could just use a List instead of a List, for example. Jan 24 05:19:38 (ah. just realized. afaik the cache _never_ gets dropped, because that would be wasteful since it'll generally be displaying more of the same kind of data. you could probably build your own recycle bin though.) Jan 24 05:20:08 TacticalJoke but wouldnt my list child layout have to contain two textViews instead of one? Jan 24 05:20:44 I guess it depends on what you're wanting to display and how you're wanting to display it. Jan 24 05:20:46 drose379: depends. is that what you want? you could just concatenate the strings, or make a single textview with \n or Spannables Jan 24 05:21:16 well im not getting two values from a json array, name and date Jan 24 05:21:17 Yeah, my app is showing some complex data in a single TextView (for example). Jan 24 05:21:33 so im doing list.add(i,getString()) Jan 24 05:21:46 is using the i for location correct? i is the int inside a for loop Jan 24 05:22:33 since I'm guessing you're adding in the loop, it might not be doing what you're expecting. I'd have to think about it a bit more. if you just .add, and your for (int i = 0; etc; i++) loop is outside, just .add(string). it'll always add to the end. Jan 24 05:22:34 That version of 'add' is basically 'insert'. Is that what you want? Jan 24 05:22:55 (nvm, as long as it's empty to start, it's probably fine) Jan 24 05:22:59 Im inserting these values into a list, yeah Jan 24 05:23:06 But now I need to use those and show them in the view Jan 24 05:23:13 Are you just adding values to the end of the list? Jan 24 05:23:24 They are being given a location Jan 24 05:23:40 Their location is "i" Jan 24 05:24:58 drose379: Are you ever *not* placing the new item at the end? Jan 24 05:25:07 I guess not Jan 24 05:25:14 it goes 0 1 2 3 Jan 24 05:25:19 Correct? Jan 24 05:25:33 If it's always at the end, you should use the non-"insert" add(). Jan 24 05:25:46 I guess both will work, but it's a readability thing. Jan 24 05:26:17 With the ArrayAdapter, for the view resource I pass it, can it only be a single TextView Jan 24 05:26:27 or can i make it a linear layout with two textViews and pass that in Jan 24 05:26:49 Basically can a linear layout be a child of a listview Jan 24 05:28:00 I think ArrayAdapter expects a single TextView. Jan 24 05:28:21 Ok, so I cant make it show two items Jan 24 05:28:23 I think you should use BaseAdapter at this point, regardless of how many TextViews you're gonna use. Jan 24 05:28:41 fwiw ArrayAdapter is a bit excessively special-cased. once you outgrow it, you probably want something more generic, like TacticalJoke just mentioned as I was typing this ಠ_ಠ Jan 24 05:28:50 :D Jan 24 05:28:57 Ok, I will look at baseadapter Jan 24 05:30:09 Ok, im out for a bit guys, thanks for the help Jan 24 05:30:10 Having said that, you could probably do whatever you want with a single TextView. Jan 24 05:30:17 How? Jan 24 05:30:30 For example what groxx said: spans and stuff. Jan 24 05:30:31 Newlines. Jan 24 05:30:36 You can even do custom drawing. Jan 24 05:30:52 so instead of two list.adds Jan 24 05:31:23 I should do list.add(getString() + /n + getString()) Jan 24 05:31:33 is that a thing? Jan 24 05:32:18 It might be better to have a type (maybe "Entry" or something) that has a 'name' property and a 'date' property. Jan 24 05:32:22 Then use a List. Jan 24 05:32:30 A type? Jan 24 05:32:32 :) Jan 24 05:32:40 someList.add(new Entry("Steven", "2015/01/24")); Jan 24 05:32:52 wat. how'd u know my birthday. Jan 24 05:32:52 ohh ok, and Entry is a class? Jan 24 05:33:01 Yeah, a class you'd create. Jan 24 05:33:16 Right, cool Jan 24 05:33:18 Is it your birthday today, groxx? Jan 24 05:33:27 it's Java, you'll be making a LOT of objects. embrace it. Jan 24 05:33:40 TacticalJoke: alas no. also I'm older than 0. Jan 24 05:33:42 I wish we could choose to create them on the stack. Jan 24 05:33:52 Ah, yeah. Thought you were. Jan 24 05:34:13 either that or I have a time machine I forgot about. Jan 24 05:34:18 Just to see if im getting the strings properly Im gonna try the concationation Jan 24 05:34:47 if I want to add a linebreak I tried +\n but thats givinig me an error, will + "\n" work Jan 24 05:34:56 Mhmm. Jan 24 05:35:09 Cool, thanks guys Jan 24 05:37:06 Worked, cool. Jan 24 05:37:12 Thanks for the help Jan 24 05:37:50 :) Jan 24 05:52:40 groxx, not quite, all I was asking was whether the convert view cache got cleared Jan 24 05:52:44 the answer is no Jan 24 06:08:12 I'm trying to test out GCM by cURLing to it, but it keeps giving me this Jan 24 06:08:15 {"multicast_id":8193858904310895424,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MismatchSenderId"}]} Jan 24 06:09:16 I'm using the ID generated on the Android app and the API key on my Google Dev Console (API KEY in the table here http://puu.sh/eWMYV/7edb63e781.png ) Jan 24 06:10:38 If I break the ID given on the client, it says InvalidRegistration rather than InvalidSenderId Jan 24 06:11:38 If I break my API key, it gives a 401 error Jan 24 06:14:47 hey there Jan 24 06:15:06 Does anyone know of an example of efficiently implementing Filterable on a custom CursorAdapter? Jan 24 06:16:36 i have an autocompletetextview that's working fine using a CursorAdapter - but I'm not sure how to translate the idea behind the ArrayAdapter filterable to CursorAdapter. Do I have to iterate through the whole Cursor for each performFiltering? Jan 24 06:19:26 I figured mine out Jan 24 06:33:03 in terms of the play dev console, what's the difference between alpha and beta testing? Jan 24 07:05:54 heh so according to this, there's no real point in obfuscating strings http://stackoverflow.com/questions/22949801/simple-hiding-obfuscation-of-strings-in-apk Jan 24 07:12:39 Hello. Is there a way to set an integer with a hex value ? something like: int i = #FFFFFF; ? Jan 24 07:13:18 0xFFFFFFFF Jan 24 07:13:56 cool :D Jan 24 07:14:08 thnks Phlow Jan 24 07:14:51 np Jan 24 07:21:12 i so badly want to finish this app tonight and publish it but... probably not a good idea when i won't be able to make emergency changes until Sunday. Jan 24 07:21:16 anyone using android studio with openJDK? I get a warning "OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK." Jan 24 07:35:28 Does using the drag api to reposition a view, that is adjust the margins of the view (it only has one parent that takes the "entire" screen) make sense? Jan 24 08:59:13 api 21 got a lot of the newer Java 7 concurrency stuff Jan 24 09:03:50 "LinkedTransferQueue outperforms SynchronousQueue by a factor of 3x in unfair mode and 14x in fair mode." :O Jan 24 09:34:40 Hello Jan 24 09:34:47 Any one from India here Jan 24 09:35:47 hmmmm Jan 24 09:38:39 in my apps heap dump, im seeing a lot of retained heap by FinalizerReference. Is there a way to find out whats not being finalized ? Jan 24 09:38:49 If i expand it, the next/prev nodes infinitely expand Jan 24 09:46:04 hello people Jan 24 09:46:15 need one help on android studio Jan 24 09:48:11 gaganchd2000: Ask your question and wait for an answer. If noone answers, try again later Jan 24 10:44:19 When a user updates my app, things in sharedPreferences should be kept, right? Jan 24 10:45:39 yes Jan 24 10:46:24 hello Jan 24 10:46:59 happy Caturday Jan 24 10:47:31 saturday Jan 24 10:47:59 s/s/c Jan 24 10:48:02 cool, thank you Jan 24 10:58:20 hello Jan 24 10:58:52 do you guys yous any applications to prototype your mobile app designs ? Jan 24 12:13:53 Hi, i'm trying to add an icon to a menu using the following statement: infoMenu.setIcon(R.drawable.ic_python); However the icon doesn't show up. I'm working on an emulator Jan 24 12:16:33 Any idea how can i solve this problem? Jan 24 12:19:31 soulisson: menus cannot have icons Jan 24 12:19:48 The icon is shown only when the item is shown in the action Jan 24 12:19:54 action bar* Jan 24 12:21:01 vedu: I meant submenu Jan 24 12:21:27 vedu: so submenus cant have icons? Jan 24 12:21:48 soulisson: neither of them can have icons Jan 24 12:22:07 soulisson: no. You can google this. It is a design decision Jan 24 12:22:49 vedu: ok, but why there is a "setIcon" method, maybe it was available on previous versions of Android? Jan 24 12:23:14 soulisson: I told you, The icon is shown only when the item is shown in the action bar Jan 24 12:27:14 Well, i don't understand, the item shows in the action bar but the icon is not, here is my code: http://pastebin.com/v9Y81EQk Jan 24 12:35:59 If I recolour a drawable with drawable.setColorFilter will it apply it to all drawable everywhere it is already used? Jan 24 12:36:40 if it's the same instance of the drawable Jan 24 12:37:14 For all my other views I set it in the xml, so if I create a new drawable it shouldnt' affect the others then? Jan 24 12:37:30 I'll just try it Jan 24 12:51:18 could someone please help me with this question: http://stackoverflow.com/questions/28125560/how-do-i-get-back-to-the-viewfinder-of-the-camera-after-taking-a-picture Jan 24 12:55:42 tommy the commie Jan 24 13:41:27 Hello. I have the following simple activity: http://pastie.org/9856813#12,18 Jan 24 13:41:44 I am trying to center the whole thing vertically. Jan 24 13:42:20 android:layout_gravity="center" on the inner layout centers everything horizontally but not vertically. Jan 24 13:43:05 is xprivacy still the best ? Jan 24 13:46:56 OK I have solved it! Jan 24 13:52:14 I filed a bug which has been marked as spam. Guys have become too cautious after the recent spam frenzy. I am not sure how to get it reversed. https://code.google.com/p/android/issues/detail?id=106727 Jan 24 13:57:44 just make a new one Jan 24 14:00:10 osxorgate: will it get deleted automatically after some time Jan 24 14:00:23 who nkows Jan 24 14:00:27 who cares :) Jan 24 14:00:43 i bet they just flagged a fuckton of spam and will ignore them Jan 24 14:01:19 Hello. I am trying to follow this: https://developers.facebook.com/docs/android/login-with-facebook/v2.2 but under 1: Implement authentication it is asking me to "Create a new class named MainFragment that's a subclass of the Fragment class." I don't know how to do this. Jan 24 14:03:55 Rashad: well Jan 24 14:04:23 create class named MainFragment Jan 24 14:04:33 this is java basic Jan 24 14:04:45 In which file should I do this? Jan 24 14:05:06 create MainFragment.java Jan 24 14:05:10 what IDE do you use Jan 24 14:05:23 Android Studio Jan 24 14:05:38 there should be something like create new class Jan 24 14:05:48 (i hope :o) Jan 24 14:06:07 what are your experience with java? or programming overall Jan 24 14:06:43 I know some programming but I am a complete newbie to java. Jan 24 14:06:53 I know how to make classes in C# Jan 24 14:07:13 I just don't know where I should put the new code. Jan 24 14:07:48 in the package Jan 24 14:07:52 file -> new -> java class Jan 24 14:08:21 OK. Jan 24 14:08:21 or better https://stackoverflow.com/questions/16641643/how-to-add-new-activity-to-existing-project-in-android-studio Jan 24 14:08:55 How do I make it a subclass of the Fragment class? Using "extends"? Jan 24 14:09:02 yes Jan 24 14:09:09 OK. Jan 24 14:09:40 Rashad: if you're new to java, you might be trying too much at once. Try working on something a little simpler in your app until you have the grasp of Java a bit better, then come back to the Facebook login. You'll find you understand the walkthrough a lot better once you ahve abit more experience :) Jan 24 14:10:18 OK. Jan 24 14:25:49 I have noob question, does touchscreen drivers from stock JB 4.1.1 will be compatible with CM10.3? Jan 24 14:27:02 I am getting the following error when trying to build my project: Jan 24 14:27:04 Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 10 declared in library C:\Users\Rashad\AndroidStudioProjects\Dardeshni2\app\build\intermediates\exploded-aar\com.facebook.android\facebook\3.22.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.facebook.android" to force usage Jan 24 14:27:18 How do I solve this? Jan 24 14:30:23 Rashad: increase the minSdkVersion in your manifest to at least 10 Jan 24 14:31:18 I did but I got the same error. Jan 24 14:32:09 you may have changed it in the wrong place. pastebin your manifest and i'll take a look Jan 24 14:32:22 With gradle you set it in build.gradle Jan 24 14:33:18 add Jan 24 14:33:33 to AndroidManifest.xml Jan 24 14:34:02 and xmlns:tools="http://schemas.android.com/tools Jan 24 14:34:10 I will try that Blaydee. Jan 24 14:36:19 hi what is a best practice to manage user session Jan 24 14:42:23 Blaydee: go to #android-root Jan 24 14:44:18 Hey Jan 24 14:45:51 Blaydee: It's telling me that "Namespace 'tools' is not bound" Jan 24 14:46:13 hey guys could you check my post out It's a MediaCodec Related question: http://stackoverflow.com/questions/28121216/decoding-audio-on-the-fly-doesnt-work-when-bouncing-it-off-server Jan 24 14:46:13 and xmlns:tools="http://schemas.android.com/tools" Jan 24 14:46:26 as i said Jan 24 14:47:07 Oh ok. Jan 24 14:50:25 hay anyone there, how do you guys manage session in android for api call Jan 24 14:50:50 in api calls Jan 24 14:52:01 I am still getting the same error. Here is how my AndroidManifest.xml looks like: http://pastie.org/9856940 Jan 24 14:58:31 Rashad: try moving the tools namespace declaration from uses-sdk to manifest Jan 24 15:00:18 Same error. Jan 24 15:05:01 When I hover over android:minSdkVersion I get the following in a tooltip: "This minSdkVersion value (10) is not used; it is always overridden by the value specified in the Gradle build script (10)" Jan 24 15:08:39 Rashad http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-tools:overrideLibrary-marker Jan 24 15:09:24 I think I have solved it by changing one of the build.gradle files Jan 24 15:13:31 anyone know where I can get some android version usage statistics per country? Jan 24 15:13:50 want to see if I can get away with supporting only v11+ in the netherlands Jan 24 15:36:31 any one use valley here Jan 24 15:41:03 Darkwater: just use 15, below is hardly used. dutch is no exception Jan 24 15:41:18 dus bespaar je de moeite ;0 Jan 24 15:46:35 aight thanks Jan 24 16:14:57 hi Jan 24 16:15:40 when you use "android.test.purchased" are you limited by one item ? Or can you buy several itemes wihtout consume them ? Jan 24 16:26:08 good morning everyone Jan 24 16:26:38 man, that .nomedia file trick doesn't work! Jan 24 16:27:01 I've created the file inside the directory where I save my pictures, I scan again, the pictures still appear in the gallery Jan 24 16:27:44 Im gonna try to prefix the files with . Jan 24 16:30:21 Hello. I have this code for creating UDP socket: http://pastebin.com/Tuqc0VKE - this code throws java.net.BindException: bind failed: EINVAL (Invalid argument) - why? I tried to pass port and IP at constructor but the result is almost the same - cant bind Jan 24 16:30:57 afl_ext, firewall? Jan 24 16:31:01 TCP works Jan 24 16:31:09 oh. Jan 24 16:33:19 when you use "android.test.purchased" are you limited by one item ? Or can you buy several itemes wihtout consume them ? Jan 24 16:36:27 this didn't work either Jan 24 16:36:27 http://stackoverflow.com/questions/17800491/how-to-hide-images-from-android-gallery Jan 24 16:37:35 Odaym, are you talking about the stock gallery? if so, .nomedia should work, but might require a rescan. If not, then .media is a voluntary flag, it's not enforced by the system. Jan 24 16:37:54 I am testing with a rescan, they still appear Jan 24 16:38:22 I store in Environment.getExternalStorageDirectory().getPath() + "/myDir" and the rescan scans /storage/emulated/ Jan 24 16:38:25 how the fuck Jan 24 16:41:47 nah I save to storage/emulated as well Jan 24 16:42:39 you get permission denied when you try to create a folder starting with "." Jan 24 16:43:09 no, sorry, FileNotFound Jan 24 16:44:28 meh, later\ Jan 24 16:57:00 hi Jan 24 16:57:11 anyone know where I can find terms and conditions of use for android app inventor 2? Jan 24 17:04:19 Hey, I'm trying to parse "01/24/201509:02:04 AM PST" using SimpleDateFormat("MM/dd/yyyyhh:mm:ss a z") but It's giving me a ParseException saying that there is a problem at offset 22. Jan 24 17:05:18 Can anyone tell me what I'm doing wrong? I'm following the javadoc: http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html Jan 24 17:07:28 how can i put volley request on a timer?? Jan 24 17:09:10 anyone know what is going on here? http://pastebin.com/hNck5qDk Jan 24 17:09:17 activity here: https://github.com/drinfernoo/Cuber/blob/newui/app/src/main/java/com/blango/cuber/HomeActivity.java Jan 24 17:09:35 adapter here: https://github.com/drinfernoo/Cuber/blob/newui/app/src/main/java/com/blango/cuber/adapter/GridViewAdapter.java Jan 24 17:09:50 it crashes when I try to click one of the grid rows Jan 24 17:16:51 Hello. I am trying to test my app in the emulator, but when the app tries to launch I get the message "unfortunately APPNAME has stopped." I get no errors in the Android Studio so I don't know how to debug this problem. Here is my full code: http://pastie.org/9857195 Jan 24 17:21:36 Rashad, need to see the stack tracr Jan 24 17:21:39 truce* Jan 24 17:21:44 trace* Jan 24 17:21:49 Where do I find that? Jan 24 17:21:58 logcat Jan 24 17:24:03 also, APPNAME isn't a very creative name Jan 24 17:24:31 That's not the real name. Jan 24 17:24:43 I just put that so the real name won't confuse anyone. Jan 24 17:25:52 So this is what logcat looks like: http://pastie.org/9857215 Jan 24 17:29:20 well, it tells you what's wrong Jan 24 17:31:52 It's the AppEventsLogger.activateApp(this); statement, isn't it? Jan 24 17:34:23 i have php api and i want to maintain session for the user in the application Jan 24 17:46:17 Is Android Studio 1 slow or is it just my computer? Jan 24 17:51:53 your computer, Rashad Jan 24 18:00:47 anyone knwo how to make volley requests wiht a timer like very 5s Jan 24 18:00:50 or eevery 10s Jan 24 18:06:54 postDelayed? Jan 24 18:07:00 it has little to do with Volley Jan 24 18:14:31 when I use object animator to fade a view background colour, it doesn't work on ICS Jan 24 18:14:53 Any ideas why? API15 is supported with ObjectAnimator Jan 24 18:15:02 I even tried using nineoldandroids one Jan 24 18:21:30 i am puzzled Jan 24 18:21:31 https://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#close() Jan 24 18:21:36 should i call this? Jan 24 18:21:40 if so, when? Jan 24 18:22:55 are there any open source browser Jan 24 18:22:58 browsers Jan 24 18:23:05 i dont like google tracking me Jan 24 18:23:18 i watch too much weird porn Jan 24 18:23:28 DragonPunch: firefox is opensource Jan 24 18:23:32 so is chromium Jan 24 18:23:41 yeah what about for search Jan 24 18:23:42 g00s: here? Jan 24 18:26:15 hey thepoosh Jan 24 18:26:28 have you dealt with GCM? Jan 24 18:26:30 ever? Jan 24 18:26:55 g00s: btw, not released yet since there is a SO exception in one of the toStinrg methods Jan 24 18:26:59 *toString Jan 24 18:27:31 thepoosh no, haven't used GCM yet :D Jan 24 18:27:43 that is so strange to me Jan 24 18:28:01 i did see a good blog that covered a bunch of gcm gotchas in nov, dec lemme see if i can inf dit Jan 24 18:28:34 thepoosh https://blog.pushbullet.com/2014/02/12/keeping-google-cloud-messaging-for-android-working-reliably-techincal-post/ Jan 24 18:28:54 but no, haven't used it (sorry) Jan 24 18:29:16 thanks Jan 24 18:29:24 stack overflow in .toString() = sounds like the call stack was too deep ? Jan 24 18:29:30 yeah Jan 24 18:29:41 id the fix obvious ? Jan 24 18:29:42 A has a list of B objects Jan 24 18:29:54 and B has a pointer back to A Jan 24 18:30:05 ok Jan 24 18:30:15 and the tostring iterates on all B objects and calls toString on them Jan 24 18:30:18 by default Jan 24 18:35:46 Is it worth supporting API15? Jan 24 18:35:51 ICS and lower? Jan 24 18:36:06 >15 Jan 24 18:36:28 I tried to use Retrofit with AndroidActive and used the same model class for both deserialization and as a database model for AA. I got a stackoverflowerror as a result of this. What's the solution for this? Jan 24 18:39:35 amcsi: code? Jan 24 18:48:51 they still show up in the gallery, sue Google Jan 24 18:49:08 the directory is called .Images and there's a ".nomedia" file inside it! haha this is insane Jan 24 18:49:27 Hi. Jan 24 18:49:30 I'm trying to use this code http://stackoverflow.com/a/23155853/775283 Jan 24 18:49:36 you cannot hide them from gallery, you can't! Jan 24 18:49:54 see #android-root, Keavon Jan 24 18:49:56 But I'm getting this from my IDE: Cannot resolve symbol 'iConnectivityManagerClass' Jan 24 18:50:19 Okay, I'll try asking there too Jan 24 18:51:42 They sent me back here :) Jan 24 18:52:29 It seems more appropriate here because I'm trying to develop an app and I'm getting an IDE error Jan 24 18:52:46 don't worry buddy, I'm policing them Jan 24 18:53:16 Odaym: come again? That's pretty clearly a -dev question :) Jan 24 18:53:25 but I saw CyanogenMod Jan 24 18:53:28 that's how my brain works man! Jan 24 18:53:32 filters...filters! Jan 24 18:53:45 It's about CyanogenMod and about root, but it's still about app development. Jan 24 18:54:02 rather than the process of rooting my phone or something, which it already is Jan 24 18:55:34 AHA! Jan 24 18:55:39 http://stackoverflow.com/a/10931869/764897 Jan 24 18:55:41 it's a BUG Jan 24 18:56:48 see I take many images with my app, images that sort of look like one another; they would only clutter the gallery if they were to be saved there Jan 24 18:56:48 That's not related to my thing, right? Jan 24 18:56:52 no Jan 24 18:57:36 thepoosh: here is the code --> https://sazbak@bitbucket.org/sazbak/test.git Jan 24 18:58:11 amcsi: where is the SO? Jan 24 19:04:45 amcsi: what's SO? Jan 24 19:04:50 been a while since I was stuck on something for so long Jan 24 19:04:57 still feels bad. Jan 24 19:04:59 :D Jan 24 19:05:59 amcsi: stackoverflow Jan 24 19:06:14 thepoosh: there is no SO Jan 24 19:06:16 https://bitbucket.org/sazbak/test/src/c694cdea1b08db3e5594cd29725b371f19669754/src/com/babylontestapp/android/model/Person.java?at=master Jan 24 19:06:20 later Jan 24 19:06:36 20:36 amcsi: I tried to use Retrofit with AndroidActive and used the same model class for both deserialization and as a database model for AA. I got a stackoverflowerror as a result of this. What's the solution for this? Jan 24 19:08:14 yeah it got fixed after I annotated the fields with Expose and called exposeFieldWithoutExposeAnnotation but now it gets a NPE in save() Jan 24 19:08:50 I was trying to solve it somehow but I'm not sure if it's the right way Jan 24 19:09:43 Keavon: I'm guessing you just used the code in the answer you linked to? tbh, at this point, I'll recommend you take some Java tutorials. the cause is obvious, and it's the kind of thing that'll keep happening until you learn the language better Jan 24 19:10:29 groxx: I have about half a year of experience programming more simple stuff in Java, but I don't have any familiarity with the Android framework Jan 24 19:10:52 "Cannot resolve symbol 'iConnectivityManagerClass'" is coming from the java compiler, because you haven't declared that variable Jan 24 19:12:14 Ooohh, it's in the original question's code Jan 24 19:13:25 yep Jan 24 19:14:07 I'm getting a ton of issues with the original code in the IDE though Jan 24 19:14:29 eh, less than hour from visiting insane^w silicon valley Jan 24 19:15:22 groxx: http://puu.sh/eY6I1/d02ed97e37.png Jan 24 19:15:28 the original code is a bit weird, but it seems like it _probably_ compiles Jan 24 19:16:04 p_l: giving up on weather? Jan 24 19:16:47 groxx: I don't see any packages I can import for "context" on the first line Jan 24 19:16:50 the turbulenfe meant no coffee nor tea with last meal, dammit Jan 24 19:16:59 *turbulence Jan 24 19:17:48 thepoosh: you think I should just duplicate the Person class --- 1 for json parsing and 1 for database? if I don't make Person extend Model then no SO happens Jan 24 19:18:14 groxx: Do I need to download another part of the SDK perhaps? Jan 24 19:19:16 Keavon: "context" is part of Android, probably the one you'll interact with the most. Jan 24 19:20:03 groxx: Sorry, I haven't dealt with Android code at all before. How do I access that context variable? Jan 24 19:22:22 Keavon: you're given a context instance at all the "entry" points to your app, you just need to pass it along. Activity and Service _are_ contexts, very likely you need to pass one of those along to that point in your code. Jan 24 19:25:52 thanks, I'll try doing that Jan 24 19:28:21 "the exclusive story of how the United States intelligence community funded, nurtured and incubated Google as part of a drive to dominate the world through control of information. Seed-funded by the NSA and CIA, Google was merely the first among a plethora of private sector start-ups " Jan 24 19:28:23 oh boy Jan 24 19:29:47 groxx: The point in my code where context is being called doesn't seem to be called from any of my own code. See line 57 of the middle script https://gist.github.com/anonymous/f0304fe901e59f3a0fbd Jan 24 19:31:13 Keavon: first, that's in GcmMessageHandler, which extends IntentService, which extends Service, so it _is_ a context. you can get a reference to your service and use that. Jan 24 19:31:42 Keavon: second, you have a line right above it that calls 'getApplicationContext()', which is a pretty strong hint that it's getting a Context instance - you can just use that. Jan 24 19:32:44 Oh, I see. Thank you. Jan 24 19:33:03 well, that only got rid of one of the errors :/ Jan 24 19:33:30 http://puu.sh/eY9tx/6e4fc7fa16.png Jan 24 19:33:51 if you mouse over them, you should be able to see the error Jan 24 19:34:22 Unhandled exception: java.lang.ClassNotFoundException Jan 24 19:34:41 Which I take as meaning that the code inside that is invalid, like in the first one, "conman.getClass().getName()" is wrong Jan 24 19:35:35 it means that it can throw an exception, and you're required to handle it before it'll compile Jan 24 19:35:43 that's what try {} catch {} is for Jan 24 19:36:45 http://docs.oracle.com/javase/tutorial/essential/exceptions/ Jan 24 19:37:40 (unfortunately, you can't really use the try-with-resources on android. not yet anyway.) Jan 24 19:39:45 Okay, I totally just blew up this code by nesting about 5 try-catch blocks Jan 24 19:40:04 Get ready to facepalm: https://gist.github.com/anonymous/01ab386659c81b0ea77a Jan 24 19:40:40 that'll probably work, yeah :) fwiw you could wrap the whole thing in a single try {} block, and have multiple catches: http://docs.oracle.com/javase/tutorial/essential/exceptions/catch.html Jan 24 19:41:12 Yeah, I saw that as a secondary option Jan 24 19:41:41 part of the reason it looks so bad though is that it _is_. there's a _lot_ that can go wrong with reflection like that, and it's reasonable to expect problems. there's not really any better option, it's just how things are. Jan 24 19:42:16 what's a better pattern to use to interact with layout elements? for example the typical way to get user edited text is String userinput = ((EditText)(findViewById(R.id.editText))).getText().toString(); which is pretty lame. i already have the view's subtype info in my layout xml...isn't there a way to generate something that lets me interact with my layouts in a less horrible way? Jan 24 19:43:09 myke: somewhat. generally you'll be better off if you store the edittext somewhere on e.g. the fragment/activity, and just refer to it by name. fewer findViewById searches, and it's just easier to read. Jan 24 19:43:32 myke: if you want to make that a bit simpler yet, you can use something like https://github.com/JakeWharton/butterknife Jan 24 19:43:53 This is a bit cleaner https://gist.github.com/anonymous/5b0e2a19a820f1f53900 Jan 24 19:44:34 yeah i think butterknife is what i wanted...that's what i meant, there's into in the layout xml tht should pregenerate appropriate objects for me to interact with them...which it looks like butterknife is Jan 24 19:45:23 myke: afaik there isn't anything that will literally look at xml files and generate e.g. variables in your activity. it should be possible (and would be kinda cool), but I haven't heard of anyone doing that. Jan 24 19:45:50 myke: so you'll still have to define the variables and types and use R.id.etc to label them, but it's at least a bit less painful. Jan 24 19:46:26 Is there a trick to taking screenshots in AVD? I need 10" tablet screenshots for my app, and the aDDMS screenshots turn out completely black. Jan 24 19:46:49 ah yeah butterknife doesn't do that Jan 24 19:47:02 myke: part of it is probably that actually generating from the xml files is likely impossible in all cases, so it'll only work on simple ones. something like butterknife though will just do what you tell it, so it can always be made to work. Jan 24 19:48:13 qkzoo1978: hm. could it just be a ddms problem? if you try the first example here, does it work? http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html Jan 24 19:48:42 or I suppose you could just dive into the final one-liner. Jan 24 19:49:00 probably better to do it "correctly" first though, in case something else hides a problem Jan 24 19:49:13 Groxx: I tried that a min ago, turns out black as well :/ Jan 24 19:49:41 qkzoo1978: odd. I've gotta resort to guesses though - hopefully someone else has ideas. Jan 24 19:50:43 Thats ok thanks. Whenx I googled I saw I wasnt the only person running into this, but didnt see any solutions Jan 24 19:50:45 qkzoo1978: I'd probably try: 1) reboot the emulator, 2) turn off GPU acceleration, 3) cmd-shift-4 and just screenshot it on your computer screen :| Jan 24 19:51:25 #3 may be sloppy but the ultimate fix here. Jan 24 19:51:36 yeah. not ideal, but it'll at least work :) Jan 24 19:51:43 whats a good way to uniquely identify your users Jan 24 19:51:51 im using their usernames Jan 24 19:52:07 DragonPunch: if usernames are unique then what more do you need? Jan 24 19:52:12 W/o gpu accell the vd wont load on my machine unfortunately Jan 24 19:52:47 qkzoo1978: at all? weird. could just be crazy slow (bigger screens DEFINITELY run slower for me. a 240x320 arm-no-gpu emulator is almost fast though.) Jan 24 19:52:58 Dragon ask them for their credit card num :D Jan 24 19:53:38 DragonPunch: I think the answer to that is "it depends" :) why, and what kind of uniqueness do you need? Jan 24 19:54:03 well im creating a complex user based application for users and stuff Jan 24 19:54:12 i was debating should i label peopel wtih numbers.. Jan 24 19:54:15 or by their username Jan 24 19:54:18 like an ID Jan 24 19:54:19 or a username Jan 24 19:54:42 Use both? Jan 24 19:55:06 A number for you to use, and a pretty username for them Jan 24 19:55:15 DragonPunch: if i have an app that has users, I always identify them internally with a numeric id. But they will also have some unique way of logging in - either username or email Jan 24 19:55:58 not sure if it's quite what you're asking, but in most cases the user will have a row in the database, and that row will have a unique ID. use the ID exclusively in code, display the name, find the row by name for logging in. Jan 24 19:56:01 Both would obviously have to be unique Jan 24 20:01:41 im using nosql Jan 24 20:01:57 its kinda weird giving people numbers in a unstructured db Jan 24 20:03:04 not really Jan 24 20:03:26 groxx: Do I need to set a permission for this code to work? Jan 24 20:03:46 The SO question and answer doesn't mention it Jan 24 20:05:54 Keavon: dunno. _usually_ you'll get a message in your logcat with the name of the permission, when you try to do something that needs one. Jan 24 20:06:20 Keavon: I would guess you may need ACCESS_NETWORK_STATE and CHANGE_NETWORK_STATE though, if you do have permission problems and no log message: http://developer.android.com/reference/android/Manifest.permission.html Jan 24 20:06:45 or something entirely different ¯\_(ツ)_/¯ Jan 24 20:10:52 DragonPunch: odds are still pretty good that there's some kind of rowid or uuid or something on the user row/record/object. otherwise it's more difficult to tell if {"username":"abc","data":[1]} and {"username":"abc","data":[2]} refer to the same "thing" or not. Jan 24 20:11:51 groxx: https://gist.github.com/anonymous/e704fe8c508516d49814 is my code and I'm getting these errors in logcat: https://gist.github.com/anonymous/0e87fa0d35ad420d2f18 Jan 24 20:12:06 Most importantly is this: Jan 24 20:12:09 01-24 11:55:21.025 12263-12263/com.keavon.newip E/﹕ Device driver API match Jan 24 20:12:10 Device driver API version: 23 Jan 24 20:12:12 User space API version: 23 Jan 24 20:12:13 01-24 11:55:21.025 12263-12263/com.keavon.newip E/﹕ mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Fri Mar 21 13:52:50 KST 2014 Jan 24 20:12:40 Keavon: see line 18 on the logcat, that's your actual problem. Jan 24 20:13:03 Keavon: the other stuff is just noise from other parts of Android. Jan 24 20:18:04 groxx: Thanks. However, I can't figure out why it's giving that error. Jan 24 20:18:37 I think the source is line 82 Jan 24 20:20:40 Keavon: it says GcmMessageHandler.java:72. I think you're running the code that's commented out in the gist. Jan 24 20:21:14 if that's the case, it's probably because the method isn't `setMobileDataEnabled(boolean)`, it's `setMobileDataEnabled(String, boolean)`, if the stackoverflow code is correct. Jan 24 20:21:38 It is indeed commented out Jan 24 20:21:50 I just recompiled it after ensuring it's commented out Jan 24 20:24:09 but this is one of the dangers with reflection to access internals. if it changes, you're not likely to be told (because it's not public), but things will break. you may end up needing multiple branches to handle different versions. Jan 24 20:24:49 I'll have to change my code when I upgrade to Lolipop when CyanogenMod releases that Jan 24 20:40:59 anyone know what is going on here? http://pastebin.com/hNck5qDk Jan 24 20:41:11 it crashes when I try to click one of the grid rows Jan 24 20:41:20 activity here: https://github.com/drinfernoo/Cuber/blob/newui/app/src/main/java/com/blango/cuber/HomeActivity.java Jan 24 20:41:29 adapter here: https://github.com/drinfernoo/Cuber/blob/newui/app/src/main/java/com/blango/cuber/adapter/GridViewAdapter.java Jan 24 20:49:26 drinfernoo: bad onCreate Jan 24 20:49:49 drinfernoo: in HomeActivity see onCreate() you have the V21 only version! Jan 24 20:50:08 drinfernoo: remove the PersistableBundle persistentState parameter and change the super call also Jan 24 20:50:26 and/or override all of 'em :| Jan 24 20:50:27 drinfernoo: basically drawerContentRes was 0 because that method was never called Jan 24 20:56:27 groxx: I'm trying this now http://stackoverflow.com/a/26481886/775283 Jan 24 20:56:42 http://puu.sh/eYnjr/b37569b917.png Jan 24 20:56:47 Weird. I'm seeing a case where code like [ String foo = "first"; [...] foo += "second"; ] is faster and less memory-intensive than [ StringBuilder foo = new StringBuilder("first"); [...] foo.append("second"); ]. Jan 24 20:57:26 why is that weird? Jan 24 20:58:42 Actually, it's more complex than that. It's more like [ String foo = "first"; foo += "second" + "third"; ] compared with [ StringBuilder foo = new StringBuilder("first"); foo.append("second"); foo.append("third"); ]. Jan 24 20:59:14 TacticalJoke: are "second" + "third" literal / static strings? Jan 24 20:59:24 Even if I optimize the start size (e.g., "new StringBuilder(20);"), the String version is faster and lighter. Jan 24 20:59:28 No, groxx. Jan 24 21:00:23 groxx: The first line says "Annotations are not allowed here" Jan 24 21:00:29 dunno. maybe there's some fancier compile-transform than just stringbuilder-izing. Jan 24 21:00:48 oh, my bad Jan 24 21:00:49 Ya. I should just look at the bytecode. :) Jan 24 21:01:06 does jd-gui show the stringbuilder-ification? Jan 24 21:01:11 I've never checked :| Jan 24 21:01:22 I had it inside another method Jan 24 21:01:24 http://puu.sh/eYoan/98477bf5b2.png Jan 24 21:02:17 I'm gonna have to open Eclipse. Hope it forgives me for basically abandoning it. Jan 24 21:02:44 Now it says "Cannot resolve symbol 'TAG'" and "Cannot resolve method 'getActivity()'" Jan 24 21:02:55 eclipse. just say no/ Jan 24 21:03:09 Napalm, thank you :) I hadn't realized I had the wrong one from autocomplete lol Jan 24 21:03:53 can someone help me decide what kind of list view I should use? here is approximately what I want: http://novaember.com/s/243330187.png Jan 24 21:04:35 the cards are school lessons, each card would have some navigation options to go to that lesson's {class,classroom,teacher}'s schedule Jan 24 21:04:52 groxx: I commented out the TAG parts but getActivity() is still undefined Jan 24 21:05:04 Guys im extending ArrayAdapter and in my constructor I have ClassName(Context context,Layout layout,List items) Jan 24 21:05:09 would a regular cardview be fine? or should I change it? Jan 24 21:05:09 I'll have to try JD-GUI; Eclipse is complaining about this class file. Jan 24 21:05:17 then im doing super(context,...,...) Jan 24 21:05:25 but the context is giving me a hassle Jan 24 21:05:49 As I understand from http://stackoverflow.com/questions/14480129/getactivity-where-it-is-defined it seems I can just reference the class but I don't know which one to Jan 24 21:06:27 And its not letting me use getApplicationContext() Jan 24 21:07:24 drose379: We're gonna need more context. Jan 24 21:07:39 Im extending ArrayAdapter Jan 24 21:07:49 And the constructor of ArrayAdapter needs context Jan 24 21:07:59 and the context will be wherever I am calling the class from Jan 24 21:08:10 Were you not using this constructor before? Jan 24 21:08:22 so in the constructor of the class that extends ArrayAdapter I have it accept a context Jan 24 21:08:25 And I wasent extending it before Jan 24 21:08:30 Just using the default Jan 24 21:08:33 I see. Jan 24 21:08:54 So the context would be the activity I am calling it from right? Jan 24 21:08:55 You can use the Activity as the context. Jan 24 21:09:13 I tried SubjectList.class Jan 24 21:09:15 But that didnt work Jan 24 21:09:20 Just pass "this" from the Activity. Jan 24 21:09:55 Right, and then the CustomAdapter would pass that to super() in the constructor Jan 24 21:10:10 This is kind of hard to explain, let me paste a bit of code, one sec Jan 24 21:10:26 http://pastie.org/9857655 Jan 24 21:10:39 getting an error in the super() part Jan 24 21:11:03 That constructor doesn't exist in ArrayAdapter. Jan 24 21:11:15 I guess you want the "(Context context, int resource, List objects)" one. Jan 24 21:11:31 Where T is whatever you choose. Jan 24 21:11:34 e.g., String. Jan 24 21:11:50 Well, I guess it could remain T in your code. Jan 24 21:11:51 so int resource is the layout Jan 24 21:12:10 Yeah. It inflates the layout itself. You just have to give it the resId thing. Jan 24 21:12:26 so this should work? http://pastie.org/9857659 Jan 24 21:12:49 That should be List or List. Jan 24 21:13:25 ah ok Jan 24 21:13:35 got it, now I just need to override getView() Jan 24 21:14:06 Since you're overriding getView, you have basically no reason to continue to use ArrayAdapter. :) Jan 24 21:14:29 Gonna start with extending ArrayAdapter Jan 24 21:14:37 Then once I get the hang of it Ill use BaseAdapter Jan 24 21:14:39 Okay, but change after (which will be very easy). Jan 24 21:14:57 Cause you have to override a few more methods with BaseAdapter correct? Jan 24 21:15:31 Just getCount, getItem, and getItemId, I think. (Alongside getView.) Jan 24 21:15:42 But they're easy. Jan 24 21:16:26 So ViewGroup parent is the parent layout for the List children? Jan 24 21:16:30 Keavon: check the method signature for Log.v, give it what it wants. and a) what do you think `getActivity().finish()` does, and b) do you want it? Jan 24 21:17:52 Keavon: ah. and there are other getActivity() calls. check the method signatures, give them what they want. 'tis programming. Jan 24 21:18:04 It's the ListView. Jan 24 21:19:08 drose379: what TacticalJoke said, and yes. it's because you want to provide the parent view when you're inflating views, because the parent view interprets the layout rules (otherwise they're dropped, which is usually bad). Jan 24 21:19:30 So the parent view is basically the context being passed in? Jan 24 21:19:43 kinda sorta a view-context, yes. Jan 24 21:19:49 but not a Context Jan 24 21:20:01 Right, yeah Jan 24 21:20:11 But getView is called and passed everything it needs automatically Jan 24 21:20:24 yeah, the listview does that for you Jan 24 21:20:27 so im trying to make sure I understand competley whats going on there Jan 24 21:23:24 Whats the boolean attachToRoot? Jan 24 21:24:31 Whether to add the view to the ViewGroup (which you don't want to do with ListView, since you're already a child, basically). Jan 24 21:24:50 I wouldn't recommend actually trying to understand _everything_ in it, but browsing the sources might help understanding the basic flow: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/android/widget/ListView.java#ListView (it's a crap-ton of code, but e.g. find getView calls, and read comments. might be useful Jan 24 21:24:50 enough.) Jan 24 21:25:07 Thanks groxx Jan 24 21:25:29 TacticalJoke so the viewgroup is the Parent listView Jan 24 21:25:38 also, ListView will throw exceptions if you change its views, which includes adding children. so for getView, you _need_ to .inflate(R.layout, parent, false) Jan 24 21:25:40 I dont want to attach to the listview? Jan 24 21:26:56 Aernt I attaching views to the listview? Jan 24 21:27:02 Or just putting them inside the listView? Jan 24 21:27:03 nope. among other reasons, when it calls getView, it's not actually guaranteed to be displayed. e.g. the first one will sometimes be duplicated and measured, for estimating the list's overall height. Jan 24 21:27:14 you're returning the view so listview can do what it wants, not attaching it. Jan 24 21:27:26 ahh ok, so i need false Jan 24 21:27:52 Maybe I should go with another approach. Is there any way to reset the device's data connection so that it obtains a new IP address, similar to how airplane mode or disabling data works? Jan 24 21:27:53 Yeah. The reason you tell LayoutInflater.inflate about 'parent' is, as groxx said, to get the right LayoutParams. But you don't actually want to attach. Jan 24 21:28:40 Got it, so im returning each child and giving it to the ListView Jan 24 21:28:48 drose379: listview is one of the few places where you don't want to attach. normally you would. Jan 24 21:28:56 Goti t Jan 24 21:28:58 Got it* Jan 24 21:29:48 Keavon: your IP address isn't something you control (usually). turning airplane mode on and off won't guarantee a new one. Jan 24 21:30:15 groxx: I've never received the same IP address after reconnecting to the network. Jan 24 21:30:40 you have weird networks :) generally you'll get the same one you had previously. Jan 24 21:31:15 drose379: Yes, the ListView (I think it's in AbsListView.java) calls getView and adds the result its children. Jan 24 21:31:23 to its children* Jan 24 21:31:28 Resetting the connection makes the network provide you with a new IP address (I suppose it's *possible* you may get your old one back, but very unlikely) Jan 24 21:31:28 beautiful Jan 24 21:31:51 Wait, findViewById is not found in my class Jan 24 21:31:55 I do this by manually toggling airplane mode, but since that seems very difficult to access, I'm wondering if there's some other way to reset the connection. Jan 24 21:31:57 sometimes not true for big networks, since it's not as useful to "reserve" your IP address, but e.g. most home routers will keep giving [mac address X] the same IP address so e.g. scripts using IP addresses will be easier to maintain. Jan 24 21:32:06 Cause I dont extend Activity Jan 24 21:32:20 I need to give a context dont I Jan 24 21:32:30 no, you need to apply it on a view Jan 24 21:32:48 Yeah, use the View returned from LayoutInflater.inflate. Jan 24 21:33:02 Keavon: I think DHCP has a way to request a new IP address...? or maybe it's just for "renewing the lease". but your network's DHCP server is choosing your IP address, so I'd probably look at DHCP first. Jan 24 21:33:10 I just inflated R.layout.subject_list_child Jan 24 21:33:12 will that work Jan 24 21:33:50 Keavon: groxx: the first thing a device does on reconnecting to a network is request the last IP address it was issued - as long as it's free the DHCP server will accept and issue again Jan 24 21:34:19 drose379: views have findViewById on them, that's probably what you want to use. findViewById on the activity will only find things already part of its layout (your getView's newly-inflated view will not be) Jan 24 21:34:22 gsteinert: Then why do I never get the same IP address when coming out of airplane mode? Jan 24 21:34:45 Ok, want to check out what ive got, I think its correct Jan 24 21:34:52 Keavon: not sure, depends on your dhcp server - are you connecting to a standard home router or something else? Jan 24 21:35:24 Not complete, just grabbing the Elements, but: http://pastie.org/9857706 Jan 24 21:35:45 gsteinert: I'm connecting to Verizon's 4G LTE network Jan 24 21:35:59 inflater.inflate(R.layout.subject_list_child, parent, **false**); Jan 24 21:36:01 drose379: pass false as the third argument to inflate, but otherwise it's good Jan 24 21:36:12 oops, forgot to add that Jan 24 21:36:17 Thanks for looking Jan 24 21:36:52 Keavon: with a network that size it's likely that in the time you are in airplane mode another device has taken your ip address. your device will request the last ip address, the server will refuse as it's already leased to someone else and will offer an alternative Jan 24 21:38:26 gsteinert: Would this network's size just be the size of the cell tower I'm connected to, or would it mean the entire country's use of the network? Jan 24 21:39:19 so If I have two items at the same location in my list Jan 24 21:39:20 Keavon: out of curiosity, why do you want a new IP address? Jan 24 21:39:24 Can I grab them by name Jan 24 21:39:30 like 0,namehere Jan 24 21:39:33 0,othername Jan 24 21:39:48 groxx: I'm working on a system that automatically switches my IP for use on bing-pong.com Jan 24 21:39:52 "Two items at the same location in a List" doesn't really make sense. Jan 24 21:39:56 Each location has one item. Jan 24 21:40:26 Ok, I gotta fix my method a bit then Jan 24 21:40:27 Ill brb Jan 24 21:40:57 Keavon: depends on how verizon portion up the ip addresses they've got. I think it's most likely somewhere in between - one subnet to cover a small(ish) number of cell towers. The users within this subnet are the ones who could take your IP address Jan 24 21:41:11 The most natural thing to do is what I said yesterday: something like "List list = new ArrayList<>(); list.add(new DiaryEntry(name, date));". Jan 24 21:41:16 is probably( Jan 24 21:41:44 Yeah Im gonna do that Jan 24 21:42:00 But the items are loaded from a DB Jan 24 21:42:05 so it might be a little different Jan 24 21:42:07 gsteinert: Okay. Do you know if it's possible to make a request without asking for my last IP? Jan 24 21:42:52 hi Jan 24 21:43:02 Is this a local database or are you getting them from a JSON parser? Jan 24 21:43:13 JSON from a MYSQL DB on a web server Jan 24 21:43:14 I'm getting a ton of errors regarding MediaPlayer, anybody know of this one? "QCMediaPlayer mediaplayer NOT present" Jan 24 21:43:15 the straight forward way would be changing the config of your dhcp client (if that's possible - i'm not sure) but if you're trying to this within an app that's probably out of the question Jan 24 21:43:19 Keavon: Jan 24 21:43:57 Keavon: another way might be to make your device 'forget' about the previous lease. this will be stored somewhere, but you'll certainly need root access to get at it Jan 24 21:44:22 TacticalJoke I need to make a custom class that stores each item and then can return them for this listadapter Jan 24 21:44:47 gsteinert: I have root access. Jan 24 21:45:13 (if I can manage to figure out how to make an app that requests root access) Jan 24 21:45:28 Is a list the best option for this stuff? Jan 24 21:45:30 The adapter will say something like "DiaryEntry entry = entryList.get(position); display(entry.getName()); alsoDisplay(entry.getDate());". Jan 24 21:45:54 getName and getDate will have to return specific items though Jan 24 21:46:06 wait, I just noticed that my IP address is naturally changing without even toggling airplane mode Jan 24 21:46:11 Keavon: then check the docs for the dhcp client android uses - it will have a config file somewhere that contains the last lease - you just need to delete the contents... in theory, ive never tried it myself Jan 24 21:46:32 what is the most appropriate channel for asking a question relating to android + chrome? Jan 24 21:46:42 It seems to be toggling between the last digit of 175 and 169 Jan 24 21:47:06 Keavon: this might be a good start http://askubuntu.com/questions/151958/how-to-make-dhclient-forget-its-last-dhcp-lease Jan 24 21:47:16 drose379: e.g. https://gist.github.com/Groxx/dd46e6f7a4e347770077 <- you can make a List of those, and then you can use textView.setText(data.name); and .setText(data.date);. making little container classes is pretty common in Java. Jan 24 21:47:18 Keavon: you might just be switching between cell towers Jan 24 21:47:42 I don't see the status icon changing. It just says LTE solidly Jan 24 21:47:54 lizzin: not sure. what's the question? Jan 24 21:48:01 I also saw one ending in 163 but only once Jan 24 21:48:14 groxx I would have to pass the int position to the data class first right? Jan 24 21:48:48 It's the list that has positions, no the list items. Jan 24 21:48:58 not* Jan 24 21:49:04 drose379: only if you need to keep it. getView passes you the position, usually you'd just do `list.get(position)` and you'll get the right object. Jan 24 21:49:26 as long as you're not changing the list after it's made, that'll always be safe, and you don't need to do anything more. Jan 24 21:50:35 so I need to make a class that has the getters? Jan 24 21:50:52 Java 101. Jan 24 21:51:08 I know how to do it :) Jan 24 21:51:11 So, what is the purpose of OnFragmentInteractionListener? What am I losing by not using it? Jan 24 21:51:21 Yes, use getters. Good practice. Jan 24 21:51:45 Ok, so in that class I have a list off all the stuff Jan 24 21:52:05 then I have lets say getSubject(int position) Jan 24 21:52:18 inside that method I would return Jan 24 21:52:31 You have a list inside that class? Jan 24 21:52:42 Havent made the class yet Jan 24 21:52:46 drose379: It's the other way around. Jan 24 21:52:51 Your list contains instances of that class. Jan 24 21:53:08 Let's say that you have five name/date pairs. You have a List with five DiaryEntry (or whatever) objects. Jan 24 21:53:12 groxx: it seems as if chrome on android has an issue playing audio where the source is a blob url. the following site works on android w/ firefox and firefox beta, but fails with chrome and chrome beta: http://thestrain-env.elasticbeanstalk.com/ Jan 24 21:53:15 At list positions 0, 1, 2, 3, and 4. Jan 24 21:53:25 The DiaryEntry doesn't know (or care) about what position it happens to hold in the list. Jan 24 21:53:57 Ohhhh, so list .get(1) would return a Data object that holds two values Jan 24 21:54:03 ah-hah Jan 24 21:54:03 Exactly. Jan 24 21:54:42 lizzin: hm. that's pretty chrome-specific. maybe there's a mobile-chrome irc channel? otherwise, you might be able to get more information by attaching a chrome debugger: https://developer.chrome.com/devtools/docs/remote-debugging Jan 24 21:55:05 Thank you TacticalJoke Jan 24 21:55:55 lizzin: also the web audio API thing here mentions a limitation of chrome-android: http://caniuse.com/#search=audio Jan 24 21:56:14 not sure if that's related though Jan 24 21:58:23 lizzin: possibly #chromium-support ? not sure if that covers mobile as well, but they may have somewhere more specific to look http://www.chromium.org/developers/irc Jan 24 21:59:09 groxx: so on chrome, the recording works and i am able to click the to download the mp3, which does play. so do you know of a way to work around this possible blob playback issue? can i convert the blob in browser somehow to something that will play? Jan 24 21:59:27 ill look into that channel Jan 24 21:59:29 lizzin: no clue, sorry :\ Jan 24 21:59:32 ok Jan 24 22:00:16 groxx: thanks for the links Jan 24 22:00:33 np. good luck :) Jan 24 22:05:06 Okay, turns out I didn't have three alternating IP addresses Jan 24 22:05:26 I was using Chrome's proxy server that compresses your web pages Jan 24 22:06:02 Toggling airplane mode does in fact provide a new IP each time Jan 24 22:08:16 Toggling mobile data also does Jan 24 22:08:35 Is is there a way to reset the connection? Jan 24 22:15:05 I just downloaded this app https://play.google.com/store/apps/details?id=com.atejapps.networksignalrefresher Jan 24 22:15:13 It works to reset the mobile data connection Jan 24 22:15:25 and I get a new IP, just like when toggling mobile data or airplane mode Jan 24 22:15:54 Weird how "javap -c" doesn't show private members by default. Jan 24 22:17:58 Could I decompile it to see how that app resets the connection, or do any of you know what I could search for? Initial googling wasn't successful Jan 24 22:25:59 Keavon: baksmali.com ;) Jan 24 22:29:49 JesusFreke: How about http://www.decompileandroid.com/ ? Jan 24 22:30:03 nifty Jan 24 22:31:05 Keavon: looks like a wrapper around some other available tools Jan 24 22:31:06 I've mostly used https://github.com/lxdvs/apk2gold Jan 24 22:31:28 most decompilers I've looked at only produce something that resembles java code Jan 24 22:32:05 I really just need to see what part of the API it uses Jan 24 22:32:47 once I know what to google, I can implement it more nicely Jan 24 22:33:52 "Show Java" is pretty good. Jan 24 22:34:13 "show java"? Jan 24 22:34:37 https://play.google.com/store/apps/details?id=com.njlabs.showjava&hl=en Jan 24 22:35:05 also nifty Jan 24 22:35:29 "NOTE: DOES NOT DISPLAY CODE ON ANDROID 4.0 (ICECREAM SANDWICH)." <- is that ICS+, or just 4.0? Jan 24 22:35:48 Works here on 4.4. Jan 24 22:39:38 I don't suppose google releases numbers on the number of devices in use with e.g. dpads, or using screen readers? or if there's any source of numbers like that? Jan 24 22:40:27 You mean for accessiblity? Jan 24 22:41:21 yeah. also just wondering how useful it is to define alternate focus behavior. Jan 24 22:41:48 the answer is of course always "you should", but numbers might help convince that it's important. Jan 24 22:42:40 Ah. Jan 24 22:43:56 I had done some looking up about accessibilty in the past for web-based applications, but I don't think I bookmarked anything with useful metrics for you Jan 24 22:44:22 Suffice to say, that if you can find stats for web based users who use assistance methods, the numbers would -likely- be about the same for Android users Jan 24 22:44:54 as far as I've seen, web is probably the worst at supporting it :) iOS makes it remarkably easy to support (even by accident), android seems mediumish. Jan 24 22:45:27 Standards based HTML5 was where I was seeing a push towards it innately doingi t Jan 24 22:45:30 it * Jan 24 22:45:49 innately, or finally standardizing on aria attributes? Jan 24 22:46:43 Um I was given to believe that it was innately. Looking at more and more .html files recently has made me question whether or not it's been even useful Jan 24 22:47:32 Anyways, maybe iOS has something? Jan 24 22:47:41 I only very rarely see aria attributes, afaik that's all there is. browsers are however getting more and more clever about how they interpret the page for semantic purposes, so random websites are at least mostly functional Jan 24 22:48:24 yeah, iOS's overall view system (first responders, accessibility attributes are used for automated testing, etc) generally pushes you to having at least half-baked support, rather than none. Jan 24 22:50:13 I can't imagine it's a number that's going to push a lazy dev to actively support it. Jan 24 22:50:24 Since lazy devs are lazy, and want to scrape by doing minimum Jan 24 22:51:47 also lazy companies are lazy, and don't want to pay to do more than the minimum :) but yeah. that's usually the problem. Jan 24 22:52:12 It is, and unfortunately that minority of users really suffers from lack of options Jan 24 22:53:18 I'm gonna check the video on developer.android on the matter, maybe they have metrics Jan 24 22:53:26 Need background noise, if nothing else :) Jan 24 22:53:37 How easy is it to add wear support to an existing app? Jan 24 22:54:26 Halfwit: cool, let me know if you catch anything :) Jan 24 22:55:43 Halfwit: I guess the other part of the problem is crappy support from OSes. e.g. Lollipop only _just_ got color-blindness aids for the OS as a whole, and that affects what, 8% of men globally? Jan 24 22:56:13 groxx: Yeah, I don't have the exact number, but it is -not- trivial. Jan 24 22:58:48 groxx: They've had Talkback since Donut, apparently. Jan 24 22:59:05 Better question, is it a good practice/idea to add wear support to an existing app, or create an app with wear support from beginning? Sorry if this is a stupid question. Jan 24 22:59:42 yep. there's some stuff in android. it's just that supporting it seems more difficult than on e.g. iOS, especially when it comes to custom views. there's a lot to add to support other forms of input and accessibility events. Jan 24 23:00:05 it's hard to even find what's expected :| Jan 24 23:01:16 what's so much easier on iOS when it comes to custom views? Jan 24 23:01:24 Accessibilty Jan 24 23:01:28 I found it to be pain in the ass well Jan 24 23:01:36 at least when I was poking at it, fewer view states, and clearer documentation. Jan 24 23:01:38 since OS just cannot know what exactly your view is doing. Jan 24 23:02:11 also no dpads or trackballs or external mice Jan 24 23:03:24 uh. Jan 24 23:04:11 That explains why most of apps work like crap on iPad with keyboard attached I guess :P Jan 24 23:04:46 heh, haven't tried external keyboards on ios :) though keyboards are a bit simpler to support at a framework level (if you ignore the arrow keys) Jan 24 23:06:24 most apps ignore keyboard support just like they ignore accessibility Jan 24 23:06:41 on Android it's significantly better for keyboards, but accessibility is still abysmal Jan 24 23:07:42 I imagine iOS8's custom keyboards break most apps' layout? the vast majority of code I saw assumed fixed keyboard size (which is wrong as soon as you go to another language, but that doesn't seem to stop people) Jan 24 23:07:56 fixed US-keyboard size, that is Jan 24 23:08:17 nah, Apple just forced everyone to have same sized keyboard Jan 24 23:08:22 lol Jan 24 23:08:28 well, I guess that's a "solution" Jan 24 23:08:30 so now everyone just hardcodes sizes for US and korean keyboards and that's it Jan 24 23:08:34 way better than not allowing custom keyboards at all Jan 24 23:08:43 there is a reason why half of App Store stops working on each new iOS :P Jan 24 23:08:59 iOS apps are just such a pile of shitty coding practices you wouldn't believe Jan 24 23:09:08 well, also because the 2-versions-old apps generally can't be compiled any more. Jan 24 23:09:13 (not that Android stuff is any better, bunch of hacks out there -_-) Jan 24 23:09:52 groxx was looking for compelling metrics to use to persuade people to focus on accessiblity in one's program, I didn't find any numbers or anything yet though Jan 24 23:10:06 ios definitely pushes an "update or die" approach. in some ways it's nice... they can make breaking API changes. Android has lots of cruft because it still runs pretty much everything. Jan 24 23:11:43 groxx, depends how you look at it Jan 24 23:11:50 thats why i didn't believe andy rubin say open source lets android evolve faster Jan 24 23:11:57 I find the fact that your software stops working after 18 months utterly moronic Jan 24 23:12:07 i can evolve my code pretty quick too when i don't distribute it :D Jan 24 23:12:11 Mavrik: hence "some ways" :) there are big downsides, yeah. Jan 24 23:12:55 hrmf, I need to try out this kotlin stuff Jan 24 23:13:57 I just went ahead and posted it on StackOverflow http://stackoverflow.com/questions/28131335/reset-android-mobile-network-signal Jan 24 23:15:02 Watching this guy powerread braille is crazy Jan 24 23:21:45 Mavrik if you give kotlin a go let us know how it works out :) Jan 24 23:22:19 i should try some groovy / kotlin to get a better idea how they compare (on android) Jan 24 23:33:07 groxx: I'm gonna afk a while, but I'll watch the rest of the video later, I'll let you know if something comes of it. Jan 24 23:33:21 cool, thanks :) happy afking Jan 24 23:36:15 I'm using websockets to request data from a server. The server will send back a response later saying it was successful, and I would like to invoke a callback at that time. The problem is that the request and response happen on different channels, so I need a way to keep track of the callback so I can invoke the correct one upon receieving the response. Anyone know a way to do this easily in Android? Jan 24 23:38:56 So I am looking at the nav drawer guidelines and the specify all the spacing, but do they not mention the size of the icons? Afaik there is no absolute margins so I have to set the text's margin to whatever is left from the 16dp on the left + the width of the icon. It's hard to get looking right. Jan 24 23:38:58 http://www.google.com/design/spec/patterns/navigation-drawer.html Jan 24 23:41:37 Smasher816: hm. kinda odd it's not specified, yeah. Jan 24 23:41:51 Maybe I'll just store a List of objects with the given callbacks, and then give each one an ID. On each response I can recieve the correct ID and invoke the callback from the list. Jan 24 23:43:28 Smasher816: fwiw it looks to me like the image is a 1dp=1px sample. given that, the big avatar is 64dp, small is ~40dp (weird), icons ~24dp Jan 24 23:44:30 groxx, yup Jan 24 23:44:34 I ended up with 24dp icons too through some testing and comparing to the google apps. Draw little ticks on a paper and resize till there the same :P Jan 24 23:44:54 Then I was in the settings and I'm like "hey, here is the same icon style, let's look at the source" Jan 24 23:45:05 https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/res/layout/item_row.xml#L13 Jan 24 23:45:09 25dp ??? Jan 24 23:48:25 Thanks for the other sizes groxx, it will be very helpful when I work on the header part Jan 24 23:49:43 Smasher816: it might be easier to turn on 'show view bounds' in the developer options, then screenshot & measure Jan 24 23:50:07 I did that and was measuring with a piece of paper and pencil, lol. Jan 24 23:50:20 What is strange is that there were no boxes around the icon or text, just one big box per row. How does that work? Jan 24 23:50:33 (For the google app, not mine) Jan 24 23:51:18 Smasher816: probably it's a textview with a "compound drawable" http://developer.android.com/reference/android/widget/TextView.html Jan 24 23:51:58 I do see bounds on the settings on my phone though (lollipop), so it's possible there's some other reason Jan 24 23:52:27 fwiw, I'm working on a music app so I was looking at the Play Music App Jan 24 23:53:10 ah. yeah, I see it too Jan 24 23:53:40 could be a custom view, could be a textview + compound. I don't know how compound appears in the layout debugger, but it wouldn't surprise me if it looks like that. Jan 24 23:54:10 Made it hard to figure out the bounds of the actual icon, the settings one makes much more sense and looks like my implementation Jan 24 23:55:16 Smasher816: try turning on 'debug overdraw' :) I can see the icon's bounding box that way. Jan 24 23:55:32 Strange how every place has to do it differently and it can't actually be officially documented. lol Jan 24 23:55:43 it's a bit rough on the play app itself, but you can see it easily on the play store app Jan 24 23:55:46 If you go to hangouts it looks like one box for the text and then the icon is just inset in the middle Jan 24 23:56:20 google apps aren't exactly ideal examples of consistency, yeah Jan 24 23:56:44 I'm starting to see that :P Jan 24 23:56:51 There is this - https://github.com/CyanogenMod/android_packages_apps_Settings/blob/cm-12.0/res/layout/item_row.xml#L13 Jan 24 23:57:07 but to be fair they have now officially stated the under status bar is correct and have changed most apps to work that way Jan 24 23:57:11 http://www.androidpolice.com/2014/10/30/google-turns-design-inconsistency-ten-latest-round-navigation-drawers/ Jan 24 23:57:17 Sorry, didn't copy the new link Jan 24 23:57:57 lol, that's a nice gallery of small variations :) Jan 24 23:58:43 I bet they do have a custom view for the drawer icons since it's used so much. Would be nice if they could share it with us :) Jan 24 23:58:58 to be fair, 2 is _probably_ on the "google now launcher" google-now-screen, which has a transparent navbar already. it wouldn't really make sense for it to avoid the navbar. Jan 24 23:59:07 Smasher816: the spinny arrow? Jan 24 23:59:21 The icon+text thing I have been fiddling with Jan 24 23:59:24 ah Jan 24 23:59:42 The spinny thing is built into the toolbar view Jan 25 00:00:04 er, the new nav drawer v7 api that takes a toolbar parameter Jan 25 00:00:15 yeah. or a consistent set of style attributes or something. Jan 25 00:00:51 ¯\_(ツ)_/¯ it's hardly new that they're inconsistent and don't reveal their techniques. Jan 25 00:01:08 you might be able to decompile the apks and figure it out from there? Jan 25 00:01:30 I tried opening the apk and looking in the layout folder, but it had binary in the xml, could only see the ids Jan 25 00:02:14 yeah. there's a trick to expanding those. maybe apktool does it? I typically just use apk2gold https://github.com/lxdvs/apk2gold Jan 25 00:03:07 Looks cool. Thanks Jan 25 00:03:20 I'll probably pull it out next time I get stumped with something and google isn't much help Jan 25 00:04:16 it's a little bit of a hassle to set it up, but having a magical "gimme everything" command is a bit addictive. Jan 25 00:04:44 I got arch, I'm used to having to set stuff up Jan 25 00:04:50 it's not actually that hard to mimic it if you already have apktool and e.g. jd-gui, the script is really simple. Jan 25 00:05:09 Stupid emulator has an error with haxm where it will freeze and not launch if you don't set some qemu audio environment variable Jan 25 00:05:18 sounds like fun :| Jan 25 00:05:57 OSX users had a fun one where the OS would freeze if you had the first version of haxm installed. took a while for them to fix too :| Jan 25 00:07:19 I thought there's no haxm on linux Jan 25 00:07:46 sorry, not haxm. But it can use kvm Jan 25 00:08:22 And this was the audio gem. https://code.google.com/p/android/issues/detail?id=40001 Jan 25 00:08:28 huh. there's instructions for kvm on the haxm page. Jan 25 00:08:32 nice of htem Jan 25 00:08:57 While searching for that I found another report that it makes 1 core if its set to alsa, and only like 11% with no audio backend. lol Jan 25 00:11:19 If I said there is a line going down over my device screen, would you say it is a hardware problem, right? Jan 25 00:11:43 groxx: Most likely, I doub't that was put in your firmware :P Jan 25 00:11:53 sorry meant to ping peacehope Jan 25 00:12:05 peacehope: a decent chance of it at least. though fwiw I've seen Lollipop glitch out and move the right half of my screen up like 100dp. Jan 25 00:12:17 But when I press power button to turn off and turn on the screen, the line disappear. Jan 25 00:12:56 It started to happen when I've bricked my phone. Jan 25 00:13:00 Then maybe it's a graphics bug in the kernel. I'v also seen some strange stuff Jan 25 00:13:12 Smasher816: do you have any idea to solve this? Jan 25 00:13:21 flash a stock rom? Jan 25 00:13:33 Smasher816: I've tried to flash CM12, Stock ROM, etc. Jan 25 00:13:35 I'm running CM and they just fixed the garbled text in the volume changing panel since it wouldn't set the blending mode or something Jan 25 00:13:48 Still get issues with the right half of the desktop being black on the lockscreen Jan 25 00:14:05 peacehope: and it comes back on all the roms? Jan 25 00:14:37 Smasher816: yes, all ROMs, and it starts to appear on the boot logo. Only stops when I turn off and on the screen. Jan 25 00:15:43 Smasher816: I suspect it's a software problem, because it just started when I've made too many things and bricked, because of the Lollipop stock soak test version (Moto G). Jan 25 00:16:20 idk. Maybe some strange firmware issues that has never been fixed, which seems doubtful w/ all the different roms you have tried. Or it could be hardware like you said, but the off/on thing kind of makes me think it's not a physical damage Jan 25 00:16:54 Guys, does anyone do any Python/gTk that could PM with me to help me out? Jan 25 00:17:27 Smasher816: What isn't flashed with a ZIP ROM file? Bootloader or something like this? Because I think it's a possibility. Jan 25 00:17:56 Depends on the zip, but usually a full stock one will have all the partitions. Jan 25 00:21:05 I suspect most/all roms will be sharing the same graphics drivers too, fwiw, since they're typically just opaque blobs. and I'm not sure if you ever actually _see_ the bootloader unless you explicitly boot to it - afaik the booting logos are part of the system. Jan 25 00:22:33 The first splash used to be built into the kernel on my old phone, but now it's in a seperate "param" parition that I am not sure how it is accessed Jan 25 00:22:55 but I have seen fun stuff like wifi and proximity sensor blobs only working with the newer bootloader they were released with Jan 25 00:23:15 On bootloader the line doesn't appear, but on recovery and first boot logo it does. Jan 25 00:25:21 groxx: I really want to find this out myself, now. Jan 25 00:25:37 Halfwit: accessibility numbers? Jan 25 00:25:42 groxx: Yes Jan 25 00:26:29 I'm not even sure how to detect it :| I just realized I can check flurry for the app I work on, but we aren't doing anything special there. Jan 25 00:27:30 groxx and Smasher816, do you have any idea to share, please? Try to imagine, I'm getting crazy with this situation here. Jan 25 00:27:47 I feel you, but I really don't know what to say Jan 25 00:28:00 peacehope: nope. it does sound more software than hardware to me, but no idea how to fix it. Jan 25 00:28:08 If no one else has complained about it then maybe you can try getting a replacement if you still have your warranty Jan 25 00:28:59 Halfwit: fwiw flurry doesn't seem to have anything that fits. Jan 25 00:29:38 I imagine most apps' data will be pretty skewed though, since people who need it simply won't use the app. Jan 25 00:29:42 Smasher816: no warranty. I agree with you, it seems to be software. Jan 25 00:30:03 If it is software you would think there would be lots complaining... Jan 25 00:30:11 I really don't know what to say. Sorry :( Jan 25 00:30:12 Is there something on root folders about graphs or something, do someone know? Jan 25 00:30:13 That I understand. I've gotten nothing from this video for actual numbers, but oh man. Jan 25 00:31:16 groxx: I got apktool installed, since I don't care about the source as much right now. Jan 25 00:31:29 peacehope: odds are the #android-root room has people with more experience/interest, though afaik it's not as active as here :) Jan 25 00:31:58 What's the best way to find the file resource file I am looking for? Just find something with an interesting looking name? Jan 25 00:32:19 groxx: yes, thank you and Smasher816. =] Jan 25 00:33:12 Smasher816: heh. probably grep / find the main activity and see what it references. Jan 25 00:34:06 fair eno Jan 25 00:34:09 enough* Jan 25 00:35:37 Hmm. Eclipse's compiler turned "String result = string1 + string2 + string3;" into "new StringBuilder(string1).append(string2).append(string3);". javac seems to turn it into "new StringBuilder().append(string1).append(string2).append(string3);". Jan 25 00:37:01 The latter could be less performant (but, to be fair, it could do better in some cases). Jan 25 00:37:37 funky Jan 25 00:38:29 groxx: I looked at the bytecode for that thing earlier. I found out that javac actually converts "String foo = whatever(); foo += whateverElse();" into code that uses a single StringBuilder. Jan 25 00:38:50 Even, I think, in cases where there is a gap between that first statement and that second statement. Jan 25 00:39:26 So you are saying I can shut up those android studio warnings to use string builders? :P Jan 25 00:39:46 Well, if you add another "foo += ;" statement then it uses another StringBuilder, so possibly not. :D Jan 25 00:40:12 It seems to draw the line at a single '+=' use. Jan 25 00:40:45 I wonder if proguard can optimize some of that? Jan 25 00:41:05 string concatenation seems common enough that it's probably worth some special-cased optimizing Jan 25 00:50:29 Actually, now that I think of it, it's just a simple String.concat thing for every '+=' use. It's what I would've expected all along. Jan 25 00:50:37 I think I was confusing myself with complex code earlier. Jan 25 00:51:05 So it's just one StringBuilder for every statement such as "foo += something;" or "foo = a + b + c;". Jan 25 00:51:23 Guys, I just went on the #Python channel. They're topic is "Topic for #python is: Don't paste, use https://bpaste.net/+python | http://bit.ly/psf-coc | NO LOL | Tutorial: http://bit.ly/MCAhYx | New programmer? http://goo.gl/c170V | Specify 2.x or 3.x in your question | Find your local User Group: http://goo.gl/S1Zsq | #python-fr #python.de #python-es #python.tw #python.pl #python-br #python-nl #python-ir #python-fi #python.it #pyt Jan 25 00:51:23 hon-ro #python-india #python-dev" We could use something like that here... Jan 25 00:51:41 The 'no LOL' rule is kinda harsh, though. :) Jan 25 00:51:55 Every time you type 'lol' a bot PMs you and tells you off. Jan 25 00:52:06 No. Programming is not a laughing matter. Get serious. Damn it. Jan 25 00:52:10 lol Jan 25 00:52:11 :D Jan 25 00:52:24 /bans ac_slater Jan 25 00:52:29 rofl... There i'm clear Jan 25 00:52:34 I just joined the room, but are you guys talking about #python? Jan 25 00:52:34 Unleash the bots! Jan 25 00:52:39 Yar. Jan 25 00:52:42 yea, it's lame Jan 25 00:52:44 NO!! Jan 25 00:53:11 Sorry, that's my fault. I'm writing a plug-in for Gimp so I'm in Python mode. My bad. Jan 25 00:53:42 we could probably use a "New programmer? http://goo.gl/IioT" though. Jan 25 00:53:51 yeppers Jan 25 00:54:10 I was thinking of writing my own DOM parser thingy for JSON (using either Gson's streaming mode or Jackson's streaming mode). That wouldn't be hard, would it? Jan 25 00:54:12 or maybe http://goo.gl/SsAhv Jan 25 00:54:21 so far I didn't even ask a question in the channel, their topic gave me enough info to search more for myself Jan 25 00:54:34 The reason is that then I could do cool stuff such as implementing the null-object pattern for lookups (and maybe optimizing certain stuff for my use-case). Jan 25 00:54:49 groxx, I hate you. Jan 25 00:54:52 LOL Jan 25 00:54:56 You're welcome :) Jan 25 00:54:57 :D Jan 25 00:55:02 NO LOL Jan 25 00:55:22 My neighbours hate groxx after that first link. Jan 25 00:55:27 And they hate my volume level. Jan 25 00:55:34 notoriety++ Jan 25 00:56:03 <-- Rebel Jan 25 00:56:06 LOL Jan 25 00:56:12 I've developed rickrolling reflexes, so the second link was just a momentary drum beat. Jan 25 00:56:12 Deal with LOL Jan 25 00:56:42 TacticalJoke: survival of the fittest 👍 Jan 25 00:57:05 Do you folks remember that "You are an idiot; ha-ha-ha-ha-ha-ha-haa" thing? :D Jan 25 00:57:12 With endless popups. Jan 25 00:57:21 Probably 10 years ago. Jan 25 00:57:23 Hahaha The link goes to : Learn Python the hard way. Jan 25 00:57:35 lol, no, but that sounds joyous. probably wouldn't work now, with all the popup-blocking in modern browsers :) Jan 25 00:57:36 10 years ago I was 4. Jan 25 00:57:50 Yeah, it was mainly Internet Explorer, I think. Jan 25 00:57:57 (Fine. I was 37.) Jan 25 00:58:24 I was somewhere between those two Jan 25 00:59:28 Anyoneone seen ix.io? Jan 25 00:59:43 I can't find a YouTube video of the original. Hmm. Jan 25 00:59:54 I'ts a paste service I found from the arch guys. Bound the cli command to a key combo so I can paste anything by selecting it and pressing Super+P Jan 25 01:00:00 It was kinda funny. It was just endless popups until the computer scrolled to a crawl. Jan 25 01:00:04 However, look at the fav icon Jan 25 01:00:08 With "You are an idiot" playing over and over. Jan 25 01:00:13 slowed* Jan 25 01:00:32 Smasher816: xD Jan 25 01:00:43 hopefully they'll animate that eventually Jan 25 01:03:30 d'oh. favris.info is down, and it doesn't work in archive.org :'( Jan 25 01:06:36 What is 'favris.info'? Never been there and Google doesn't say much about it. Jan 25 01:09:08 hello. i have an autocompletetextview that's working fine using a CursorAdapter - but I'm not sure how to translate the idea behind the ArrayAdapter getFilter() I've seen online to CursorAdapter. I've tried to iterate the cursor and either add or not add the results to the FilterResults object, but I'm not sure what to do in publishResults() Jan 25 01:09:33 TacticalJoke: when it worked: http://churchm.ag/favris/ Jan 25 01:10:31 :'( I can't find anything with the source, otherwise I'd stick it up somewhere. Jan 25 01:12:38 Ah. Looks kinda fun. Jan 25 01:19:37 Please, what does gpt.bin and motoboot.img do? Jan 25 01:21:40 it gpt's Jan 25 01:24:20 JesusFreke: I ask because only this 2 files aren't being flashed when flashing a ROM, getting this error: "(bootloader) Preflash validation failed" ; "FAILED (remote failure)" ; "version downgraded for primary_gpt" Jan 25 01:24:43 peacehope, that's more a question for #android-root Jan 25 01:25:10 It's a good question for XDA forums, as well if you have no luck there. Jan 25 01:25:16 I'd suggest doing a search on that site. Jan 25 01:27:00 hesperaux: sorry to ask here. No one is writing there. I'll try to post this question on XDA like Halfwit told. I've not found this answer there. Jan 25 01:28:23 To mee, though, it does sound like gpt.bin is a bootloader Jan 25 01:30:26 I would guess that gpt.bin is a partition table (possibly with a bootloader installed as well) and motoboot.img is the /boot partition Jan 25 01:30:34 but I have no idea really Jan 25 01:31:48 groxx: Nothing in that entire video. All they claim is that in a properly formed application, it should be innately implemented. Jan 25 01:32:10 *.bin is most probably a bootloader Jan 25 01:32:21 and *.img is the partition images Jan 25 01:32:49 You can have multiple *.img that can be loaded to different partitions Jan 25 01:35:18 Hi. Does anyone know how I can make my app reset the device's network mobile network connection like in various network refresher apps such as https://play.google.com/store/apps/details?id=com.atejapps.networksignalrefresher ? Jan 25 01:35:55 (oops, ignore my extra out-of-place use of the word network) Jan 25 01:36:03 Halfwit: well, that's undeniably false. imageview contentdescription isn't useful except for screen readers. "properly formed" aside, that's a purely-accessibility-driven thing to do, and yet more text to translate (== $$$) Jan 25 01:36:57 ("content description" <- as far as I'm aware, anyway) Jan 25 01:37:18 groxx: I really hope they are working on improving on that front. I'm fairly certain most people give zero thought to how someone with disabilities would use their app Jan 25 01:38:05 Halfwit, I give thought to it Jan 25 01:38:14 image / view-object descriptions are kinda sorta accessibility-only, though it would be nice if they adopted the long-press-on-button-for-tooltip pattern. that would at least make it a bit less accessibility-only. Jan 25 01:38:15 hesperaux: Thank you :D Jan 25 01:38:42 my g/f is disabled, so it's important to me Jan 25 01:38:54 long press -> description is a bit odd, but handy, when everything keeps going more and more towards icons. Jan 25 01:39:09 groxx, yeah I often try that when I have no idea what an icon means Jan 25 01:39:34 hesperaux: maybe you can help us figure this out then: are there numbers anywhere for "# of androids used with accessibility tools"? or dpads / alternate input systems? Jan 25 01:39:36 works when I hover with an s-pen too, but most people don'thave that Jan 25 01:39:52 yeah. hover I'm not sold on. neat trick, but a PITA to adopt Jan 25 01:40:07 I have no idea. I'm a pretty new developer and have yet to even finish my app, much less make it more accessible. It's the plan though Jan 25 01:40:09 maybe if we get more USB/bluetooth mouse support Jan 25 01:40:58 How is that support right now? Jan 25 01:41:07 I spent some time a few years back looking at accessibility stuff, primarily different input systems. the overwhelming feeling i got was that it's quite possibly the single-most-hostile environment to release products in. _massive_ patent-based suing happening. Jan 25 01:41:19 wat Jan 25 01:41:36 that's really bad for the disabled consumer Jan 25 01:41:47 I'm glad that we have standardization for it on the web at least, then Jan 25 01:41:56 I should clarify that this is primarily for _creating devices_ or general-use software, not e.g. adding accessibility hints to apps. Jan 25 01:42:01 If that extended to implementations, that could be a nightmare Jan 25 01:42:14 ah, fair enough Jan 25 01:42:48 e.g. custom keyboards for hands / tongues (some are kinda nifty) and/or the UI to drive them Jan 25 01:42:59 TacticalJoke http://pcottle.github.io/MSOutlookit// :) Jan 25 01:43:15 That explains the cost Jan 25 01:44:18 I feel quite disgusted right now, to be honest. Jan 25 01:44:29 one of my favorite totally-different-ui things: https://www.youtube.com/watch?v=0d6yIquOKQ0 (and that one is abnormal, since it's free) Jan 25 01:45:41 woah that is cool Jan 25 01:45:46 Halfwit: yeah. same. maybe I was looking at a subset, but the area I saw was full of cheap / free systems getting sued out of existence (successfully!) for millions of dollars on only barely relevant patents. Jan 25 01:45:57 That looks like it would give you that weird inertia you get while playing guitar hero for too long, or driving Jan 25 01:46:06 haha Jan 25 01:46:22 yeah, but it's one of the few keyboards I've seen that you can "navigate" relatively quickly with e.g. only a tongue input Jan 25 01:46:26 g00s: haha Jan 25 01:47:19 It's such a niche area that it doesn't even get outted on a massive scale, too. Jan 25 01:48:14 exactly. but it's part of why software / hardware tends to cost hundreds to tens of thousands of dollars. there's a lot of insurance money in the game, and very little oversight. Jan 25 01:51:31 So, where do I find something cool to use as a drawer header without being very artistically inclined? Jan 25 01:52:13 stock photography probably :| Jan 25 01:52:31 was wondering if there was a fancy site or something like the material pallete one. lol :D Jan 25 01:53:00 I've seen some material styled art pass on the G+ dev page Jan 25 01:53:01 Iirc Jan 25 01:53:32 does anyone know how getFilter() works? Jan 25 01:55:19 hesperaux: on e.g. listviews? Jan 25 01:56:25 I'm trying to implement it in a custom CursorAdapter for a AutoCompleteTextView Jan 25 01:56:29 hesperaux: if so, this looks awfully similar to what I've used: http://www.survivingwithandroid.com/2012/10/android-listview-custom-filter-and.html Jan 25 01:57:15 I can see that performFiltering() and publishResults() are being called, and the constraint is correct - but nothing shows up in the box =S Jan 25 01:57:28 urg. cursoradapter. since afaik you don't have access to the full dataset, you may have to iterate through it, and return just the not-removed entries. Jan 25 01:57:58 hesperaux: two likely problems: 1) you have to notifyDataSetChanged, and 2) you have to _replace_ your "working" data in the adapter. Jan 25 01:58:02 groxx, yeah that's what I did - I iteraded through it and created an ArrayList of the appropriate entires and added them to the FilterResults object Jan 25 01:58:26 groxx, replacing the data is the part I don't know how to do here, since that all happens behind the scenes and it just uses the Cursor, not an Array of any kind Jan 25 01:58:48 the adapter doesn't store the data set - just the cursor (hence it being a cursoradapter) Jan 25 01:58:53 hm. I think...? cursor adapter has a way to swap cursors? Jan 25 01:59:06 I dont' like the idea of requerying the cursor with the constraint for every letter the user types. it'd be faster to do it in memory Jan 25 01:59:14 yep. Jan 25 01:59:20 which is why I dislike cursoradapter :) Jan 25 01:59:22 groxx, yeah, I could swap the cursor, but only if I could remove entries from it. Otherwise I have to requery Jan 25 01:59:25 hard to adapt Jan 25 01:59:28 meh... Jan 25 01:59:56 requerying is probably not that bad, really. as long as you have an index on it, and fewer than a few million items, you probably won't notice. Jan 25 02:00:02 So maybe I should use an ArrayAdapter type, and have it just do a background query (it's doing that to get the cursor already anyway) Jan 25 02:00:11 hmm Jan 25 02:00:29 * hesperaux is an embedded C programmer that dislikes excessive disk access Jan 25 02:01:01 if you're doing something where you want to find if the filter-text is _anywhere_ in the table, you probably want a full-text index. all androids can do FTS3 virtual-tables. Jan 25 02:01:20 and yeah, but you need to hit disk eventually anyway, and sqlite is probably better at it than you :) Jan 25 02:01:38 hmm Jan 25 02:02:24 requerying just doesn't make sense unless the data store changes Jan 25 02:02:34 in the general case, that is. I suppose if you've been doing embedded C, you may be capable of writing something faster for your purpose. Jan 25 02:03:04 hesperaux: cursors have a limited 'window' size, I think about 1mb. so they'll let you dump stuff out of memory and not load the full results if you don't view it all. Jan 25 02:03:10 afaik that's the main benefit Jan 25 02:03:21 aside from ease of implementation Jan 25 02:03:44 yeah, that's true Jan 25 02:04:12 for that reason, it's probably better to query over and over :( Jan 25 02:04:19 it's a bit fuzzier on sqlite, since counting all the rows requires enumerating all the rows... but at least that happens in a much more constrained environment (in sqlite's code) Jan 25 02:04:51 fwiw we do a fuzzy text search on in-memory stuff. you can fit a lot of text in a few megabytes of data, and most devices will have a few mb to spare, easily. Jan 25 02:05:40 switching to an arrayadapter style and handing the adapter an arraylist would probably be easier for me Jan 25 02:07:16 Sorry, I had a problem with Chrome. I think Halfwit and hesperaux answered me about gpt.bin and motoboot.img. Could you please paste these lines here? Jan 25 02:08:17 I had mentioned your best bet would be to go to XDA developers with your question, and that gpt.bin is likely your bootloader binary Jan 25 02:08:49 afk, and best of luck peacehope Jan 25 02:09:16 Halfwit: good to know. I think my device's problem has something about bootloader version. Jan 25 02:09:19 Halfwit: Thank you a lot. Jan 25 02:12:51 Hmm, it seems that Android Studio still doesn't do incremental compiling. If I change a single file in my project, the timestamp of every .class file is updated. Jan 25 02:13:14 I thought that was happening too Jan 25 02:13:16 bleh Jan 25 02:13:49 That's really lame. It's 2015, and we don't have incremental compiling. Jan 25 02:14:19 Unless I'm mistaken (though I don't see why else the .class files would have their timestamps updated). Jan 25 02:16:58 it may just touch them, it seems to do incremental compilation speed-wise Jan 25 02:20:19 could be Jan 25 02:22:38 Does anyone have a big project? What are build times like in Android Studio? Jan 25 02:23:10 My project is pretty small, and building is pretty fast (it usually takes less than 10 seconds). Jan 25 02:24:07 groxx: I hope so, although I wonder why it would just touch them. Hmm. Jan 25 02:24:14 I have a smallish, and what probably qualifies as "large". Jan 25 02:24:44 if you clean and hit run, vs change a line and just hit run, you'll probably be seeing the results of incremental compilation Jan 25 02:25:34 from what I've read though, I gather they had to semi-hack incremental into gradle. doing that via always touching files (so anything not == last build needs redone) seems like a pretty simple approach, though not as nice as e.g. make Jan 25 02:25:35 Ah, true. Jan 25 02:26:06 Okay, my rebuild was 11 seconds and my change-one-line-and-then-build was 2 seconds. Jan 25 02:26:31 lol http://www.gizmag.com/mouse-box-pc-inside-mouse/35703/ Jan 25 02:27:09 Actually, if I clean and then separately make, I get similar make times. Jan 25 02:27:21 TacticalJoke: I think I've also read that part of the slow build problem is due to dexing, and that's not fully incremental-ized Jan 25 02:27:28 "matching mousepad that can double as a charger while you're using the Mouse-Box." genius Jan 25 02:28:04 g00s, that is neat Jan 25 02:28:55 mousebox - that's pretty awesome :D I suppose it's not hard to cram a raspberry pi into a mouse case tho? Jan 25 02:29:54 imagibe something like a snapdragon 820 Jan 25 02:31:43 and if the 820 runs warm, it can be like a hand-warmer too : Jan 25 02:33:26 Can someone check out why I'm getting this error? Jan 25 02:33:28 http://pastebin.com/wmGJ016H Jan 25 02:33:30 TacticalJoke: fwiw my "smallish" takes ~4-5 seconds to build, and ~30 to build after a clean Jan 25 02:33:47 Ah, interesting. Jan 25 02:34:48 t0astt: Why are you using 'container.findViewById(...);'? Jan 25 02:35:27 t0astt: you probably want to `View v = inflate(...); picHolder = v.findViewById(...);` because you may not have put anything in the container yet Jan 25 02:35:49 Anyone have any input on Volley requests and if they should be made directly from the Fragment or through a Loader? How does orientation change effect the request if called directly from the fragment Jan 25 02:36:25 groxx I tried that earlier I think... I'll try it again and let you know what happens Jan 25 02:37:34 siegs: I'd probably recommend that on the fragment you `setRetainInstance(true)`, which will give you ~ the same benefits as a loader. unless that doesn't work for you for reasons. Jan 25 02:38:22 siegs: personally, I despise Loaders. the API is too limited to do much of use, and you can't keep them running when you leave an activity, even if it could be useful. if they fit exactly what you need, they're fine, but they're easy to outgrow and then you're back at square 1. Jan 25 02:39:46 TacticalJoke: interestingly, the larger project takes ~10 to build, and also ~30 to build after clean. Jan 25 02:40:21 though if I proguard it, it's about 3 minutes :D Jan 25 02:42:02 groxx: I am stil early on in development and have been experimenting with different options, so it will not take much for me to change Jan 25 02:44:14 http://novaember.com/s/112888361.png I currently have this custom view which is just a bunch of draw operations on a canvas, but I want to add a ripple effect (a la material) to the white objects. what would be the best way to do this? Jan 25 02:44:25 can I draw a ripple myself somehow? Jan 25 02:44:38 or should I make a proper viewgroup or something like that? Jan 25 02:46:52 siegs: Is Volley better than Retrofit for that? Jan 25 02:47:00 I don't know much about either, but I keep seeing them mentioned together. Jan 25 02:49:20 TacticalJoke: I have not looked into Retrofit much. I do like the simplicity of Volley Jan 25 02:50:27 TacticalJoke: Your question scared everyone away :P Jan 25 02:50:55 I tend to have that effect. :) Jan 25 02:53:17 lol Jan 25 02:53:51 I am going to try doing setRetainedInstance(true) and just make the Volley requests from the fragment Jan 25 02:54:03 I will let you know if I have any issues with that Jan 25 02:55:08 i'm back Jan 25 02:59:28 groxx: turned out I needed to change the facebook url from http to https :P **** ENDING LOGGING AT Sun Jan 25 02:59:59 2015