**** BEGIN LOGGING AT Sun Apr 19 02:59:59 2015 Apr 19 03:15:47 <_genuser_> man, the win10 demo is rocking Apr 19 03:15:49 <_genuser_> !! Apr 19 03:20:09 heh, did they pay you to say that? Apr 19 03:21:58 i like the direction MS is going in Apr 19 03:22:31 <_genuser_> Carbonflux: no, I just installedi t and it's looking nice. Apr 19 03:22:48 <_genuser_> anything new just looks nice. because of it's newness. but some features are better integrated now. Apr 19 03:23:26 :) Apr 19 03:23:35 <_genuser_> as long as it works, eh? Apr 19 03:23:51 I don't trust it, 7 is nice and stable. Apr 19 03:23:59 <_genuser_> we care about googling, developing. basically development work, music work, running chrome. Apr 19 03:25:06 i dont think i know how to develop on a non *nix system anymore Apr 19 03:25:21 I have been running Win10 for few months now for work Apr 19 03:26:28 win7 a lot more work these days drivers and all, just get win8 and make it look like win7 Apr 19 03:27:46 Hey if i have video and video ads, and there is a 30 second countdown before another video ad interrupts/plays the currently playing video, should the countdown include buffering time or should be independent (ie start as soon as ad video finishes?) Apr 19 03:29:44 The heck? If I add padding to a circular progress bar, the animation is ruined. Apr 19 03:29:52 It then looks like atoms. Apr 19 03:31:33 sounds even cooler Apr 19 03:45:03 Hi Apr 19 03:45:16 Can I ask an iOS questions that relates with android? Apr 19 03:47:32 Voyage sure .... Apr 19 03:51:35 In android, theres three ways to get geo location: by GPS, by AGPS (assisted GPS), by Wifi/network. Just wanted to confirm that does iOS also has the same three methods or any different? Apr 19 03:52:29 you just asked that in #iphonedev Apr 19 03:53:38 I'm guessing there's no way to centre a ListView child whose size is wrap_content x wrap_content? Apr 19 03:53:46 (Without wrapping it in a ViewGroup, of course.) Apr 19 03:54:02 Can anyone explain when one should use Fragments over Activites? Apr 19 03:54:44 lonewaft: the main reason i use fragments is for easy layouts on tablets vs phones Apr 19 03:54:51 especially for master detail Apr 19 03:58:33 Ugh. ProgressBars and padding seem broken. Apr 19 03:58:50 If my circular ProgressBar has a width of match_parent and I set padding, it shows up like an atom. Apr 19 03:59:00 Otherwise, if I set a lot of top-padding then it cuts off at the bottom. Apr 19 04:00:27 But if I set padding on the top and bottom then it appears to work. Apr 19 04:00:29 But who knows. Apr 19 04:01:23 It might fail when the moon is full. Apr 19 04:02:50 wow, publishing to bintray is always a pain Apr 19 04:02:57 (with gradle tasks) Apr 19 04:06:46 lonewaft: if you can, just make your own views instead of fragments Apr 19 04:06:54 they are much easier to manage and just as modular Apr 19 04:10:13 The number of times I've thought "I won't do it that way because (it's too complicated / the documentation doesn't offer any guarantee that it'll work in the future / it seems buggy)" is too damn high. ;| Apr 19 04:13:52 What do you guys do about ProgressBars and AppCompat? Apr 19 04:15:38 They have a Holo look on < 21. I don't mind the circular one so much (since it has a neutral colour), but the linear one has a particular blue that doesn't go with my "material" look. Apr 19 04:15:46 Not sure how good the libraries I'm seeing on GitHub are. Apr 19 04:21:40 i let my shit look holo Apr 19 04:30:43 Hey guys, my github repo for my app is public... someone could easily just download the entire repo and run it in AS to use the application right? Apr 19 04:30:52 Because the APK is not available on github Apr 19 04:31:15 drose379: Sure Apr 19 04:31:37 Interesting Apr 19 04:31:42 drose379 if its an app, no harm in putting a demo on play Apr 19 04:32:02 actually a few of the libraries i use have demos version on play, like snackbar Apr 19 04:32:02 Personally, I keep my private projects on bitbucket Apr 19 04:32:18 Right, yeha Apr 19 04:32:20 yeah* Apr 19 04:43:33 Whoa, subreddits can remove themselves from /r/all (unless the user viewing /r/all is subscribed to that subreddit). Apr 19 04:43:45 That's cheating or something. Apr 19 04:44:54 its probably good, that the underbelly of reddit doesn't make it to /r/all right ? Apr 19 04:46:28 Hmm, I wonder which subreddits do it. I hear that /r/gonewild did: http://www.reddit.com/r/OutOfTheLoop/comments/2amii2/did_gonewild_posts_stop_showing_up_in_everyones/ Apr 19 04:46:44 TacticalJoke is /r/all the same as the front page ? Apr 19 04:46:55 Nah. Apr 19 04:46:55 hm i guess not Apr 19 04:47:25 ./r/all is (or used to be) the top content from *every* subreddit. The front page is your subreddits (if you're logged in) or the default subreddits (if you're not). Apr 19 04:48:43 The list of default subreddits isn't exposed in the reddit API, so reddit-app makers have to manually add this to their apps. Apr 19 04:48:47 On a side note. Apr 19 04:49:05 The last time I checked, Sync for reddit's list was way out of date. Probably others too. Apr 19 05:01:17 What's best way to handle subclasses a videoviewgroup, where subclasses use different mediaplayers and have customized overlays. but there is standard set of things in overlays (like toggle playback button) Apr 19 05:01:54 basically everything is same except for the overlays are different, but the overlays contain certain necessary widgets Apr 19 05:02:09 sounds like Strategy maybe ? Apr 19 05:02:14 or Decorator ;) Apr 19 05:02:25 probably not decorator, if its not additive Apr 19 05:02:42 Hierarchy of overlays? Apr 19 05:02:44 lets ask one of these guys http://i.imgur.com/epUi06n.jpg Apr 19 05:03:37 hiearchy? so like there is the super class, which just takes a layout file, right now i have the layout files contain duplicate everything but the overlay (which contains some duplicate things) Apr 19 05:04:01 You say overlays are different but they have a few commonalities, which makes me think base class Apr 19 05:04:13 with an abstract method to get the overlay, then the superclass on construction calls an initialize function, which references all the common widgets, and the subclasses initialize complets the non-common Apr 19 05:04:27 ahh you mean abstract out the overlay? Apr 19 05:04:48 "abstract" Apr 19 05:05:50 then i can just merge the layout file defined by the subclass into the empty overlay framelayout in the super Apr 19 05:06:46 lasserix also , see 'Template method' Apr 19 05:07:29 but the requirements seem vague, so i'm not following well Apr 19 05:08:15 yeah template is exactly it Apr 19 05:11:07 how different are declarative and functional ? Apr 19 05:13:10 can i inflate a merge tag into a view that's not the class itself? Apr 19 05:13:36 lasserix: note that calling an init method from a superclass constructor can cause all sorts of problems, such as uninitialized fields. Apr 19 05:13:59 yeah you just gota remember order Apr 19 05:14:34 Well all fields in the subclass will be uninitialized when the init method is run. Apr 19 05:14:56 so your just wrap them in abstract calls if you need them initialized Apr 19 05:15:39 Well if you want to do that sure, just highlighting a pitfall. Apr 19 05:16:00 yawkat: calling private methods is perfectly fine Apr 19 05:16:03 from which i have gouged myself before :) thanks for the friendly reminder to Apr 19 05:17:21 goos my real knot is, each overlay has a toggle playback and fullscreen button, but each sub defines its own overlay so without turning overlay into a class, is there an easier way to gaurentee each subclass defines those two views Apr 19 05:18:13 *that the superclass can handle initialization and such Apr 19 05:24:02 ayyy Apr 19 05:58:40 lets see if this works Apr 19 06:04:16 assume that works Apr 19 06:04:34 just throw illegalstateexception if the toggle playback button / fullscreen button can't be found Apr 19 06:34:55 Hey, how do I check if the notification area bar (where you see the clock and all the notifications summaries) is visible? Apr 19 06:35:08 Not the drawer itself, the bar Apr 19 06:41:34 shouldn't you know that from your app already Apr 19 06:44:48 pfnQ: on android api 17+ it's always visible... on some tablets it located somewhere else Apr 19 06:49:00 huh Apr 19 06:49:27 it's always at the top Apr 19 06:53:41 for that matter, what would it matter to your app Apr 19 07:37:50 hello Apr 19 07:38:23 I would like to imitate the style of the ActionBar MenuItem in order to add an EditText, where is the style located ? Apr 19 07:38:47 basically I want to remote the menu item and replace it by one of my own that would look the same but include an EditText Apr 19 07:51:02 Is there a way to determine if a bitmap is all one color? Apr 19 07:51:53 you can iterate over the pixels Apr 19 07:52:01 and stop as soon as one color is different Apr 19 07:56:11 sounds inefficient Apr 19 07:57:29 but probably there is no other option Apr 19 08:19:17 <_genuser_> lasserix: http://stackoverflow.com/questions/23832699/fastest-way-to-check-if-an-image-is-all-white-or-all-transparent Apr 19 08:19:48 <_genuser_> lasserix: it checks for white only or transparent. but I suppose, you can resize down and then store the first pixel and quit when you encounter any pixel with a different color. Apr 19 08:24:25 thanks Apr 19 08:24:45 <_genuser_> :), I'm working with bitmaps atm and resize them down, really has sped up my app. Apr 19 08:25:27 Is there a way to catch openglerrors? Apr 19 08:25:29 err Apr 19 08:25:40 i have a textureview, want to grab last frame when pausing video playing through it, but Apr 19 08:25:51 it'll return "black" if the video hasn't painted to it yet Apr 19 08:26:13 <_genuser_> hmm, sorry no idea about opengl stuff. Apr 19 08:26:16 so to detect, i was just checking if position > 50ms + previouscurrent Apr 19 08:26:32 its not opengl per say, but i see in logcat it recognizes there's nothing in the buffer Apr 19 08:27:37 <_genuser_> i see. I think try/catch most of them. out of memory ones sometimes just don't get caught. or I'm doing something wrong. Apr 19 08:27:51 its in the native code doesn't throw Apr 19 08:27:56 at access level Apr 19 08:28:56 <_genuser_> so yo'ure just playing it and doing nothing opengl specific then? Apr 19 08:29:19 yeah Apr 19 08:29:32 but when i pause i need to grab latest frame (if its external pause event) because i lose the surface Apr 19 08:31:54 <_genuser_> gotta love these kind of odd situations, where you're left implementing twisted logic. Apr 19 08:44:10 lasserix, you want to grab the image data of the last rendered frame? Apr 19 08:44:26 yeah Apr 19 08:53:33 so... let's say I have a ListView... which contains rows, a RelativeLayout with a bunch of TextViews... I'm populating from a server with slightly variable-length strings... Apr 19 08:53:55 and I want all instances of TextView1 to be the same width as the longest TextView1 Apr 19 08:56:34 lasserix, doens't seem to be an easy job, unless you render the frames yourself Apr 19 08:58:31 do you use fixed-width font? Apr 19 08:58:42 Ashiren: nope Apr 19 08:58:55 since you have a list of string, you could measure the length of longest one Apr 19 08:59:23 http://stackoverflow.com/questions/6734301/get-the-size-of-a-text-in-textview Apr 19 09:00:14 right, was hoping there was some way to do it at the layout level, rather than manually measuring Apr 19 09:00:52 I don't care how long it is, I just want to align them Apr 19 09:09:55 Leeds, this may be a hack and have some overhead, but you could have an invisible textview to whose right all other textviews are aligned and set the longest string to it Apr 19 09:13:02 as long as the style of all TVs is the same Apr 19 09:15:21 (nc) well i have seen some anime http://myanimelist.net/animelist/ashiren Apr 19 09:15:26 ops not here Apr 19 09:17:11 Leeds, you could also wrap them in a LinearLayout whose widht=wrap_content, and the TVs width = match_parent, as long as that's what your layout is about Apr 19 09:30:20 iprime: its easy actually, just use a textureview or mediasourceextractor Apr 19 09:31:18 you mean easy to render it yourself? so you've solved your issue then? Apr 19 09:32:38 textureview allows getBitmap function Apr 19 09:32:54 mediaextractorencoder or whatever has a getFrameAt(milliseconds) Apr 19 09:33:35 the problem i was having is that even if the mediaplayer reports it has started (and currentposition > 100 +) the textureview still hasn't painted a frame Apr 19 09:37:12 lasserix, sure it has getBitmap but would you know when to call it? my idea was to cache the last rendered frame if your mem would allow it Apr 19 09:37:48 too much processing for this Apr 19 09:38:28 maybe they can add at as a feature to exoplayer Apr 19 10:15:01 <_genuser_> yo yo ppl. Apr 19 10:23:08 hey all Apr 19 10:23:56 i want to ask how can I process a registration from a fragment Apr 19 10:24:11 I have it done from an activity Apr 19 10:46:52 hi guys Apr 19 10:47:20 I'm using a qemu and a x84 image as my emulator Apr 19 10:47:51 wondering how can I ping an address from inside the emulador (either from adb shell or from the application I'm writing) Apr 19 10:48:11 xyz87: try callbacks or (MyActivity)getActivity() Apr 19 10:48:13 anyone can please sched some light into the mater? Apr 19 10:48:26 using Fedora 21 btw ;) Apr 19 10:52:35 anyone? (keepalive msg :P ) Apr 19 10:53:18 is it corect that onTouchListener returns coordinates relative to the view dimensions and not the entire screen? Apr 19 10:53:22 when you say you're using qemu, do you mean you're using the SDK emulator? Apr 19 10:53:33 yes Leeds Apr 19 10:53:40 (the view the touch listener is set on) Apr 19 10:53:41 and an SDK image? Apr 19 10:53:48 yes Apr 19 10:54:14 then it should just work, really - networking in general, although possibly not ICMP Apr 19 10:54:21 * Leeds afk Apr 19 10:54:47 as you said, network in general, works ok. it's just icmp not working... :/ Apr 19 11:03:39 i was wrong.. it does return coordinates from th whole screeen Apr 19 11:07:33 i get the feeling i should have made my whole game UI a canvas instead of using layout components for the menu parts Apr 19 11:14:17 i want to ask how can I process a registration from a fragment Apr 19 11:48:04 When using Intent.ACTION_SEND and Intent.createChooser it just opens a new text message intent, why is that? Apr 19 11:54:25 I'm working on a ContentProvider, and have got the query() part working :-) Next, I'm working on the update() function. I want the update() to set EXIF tags on a given JPEG: UserComment and Author tags. I'm thinking the URIs could be content://AUTH/photo/#/comment and content://AUTH/photo/#/author, where # is the internal IMAGE_ID from MediaStore. The actual text to set will be passed into query() in a ContentValues object. Does Apr 19 11:55:35 I mean, is it "correct" to pass the IMAGE_ID as part of the URI like this, or should the IMAGE_ID (which identifies the actual image file = the target to update) be passed in the ContentValues object, also? Apr 19 11:56:13 or is this simply a design issue -- up to me to decide? :) Apr 19 11:57:22 Kake_Fisk: are sure you have more then one text message app to answer that request? Apr 19 11:57:30 Kake_Fisk: https://play.google.com/store/apps/details?id=uk.co.ashtonbrsc.android.intentintercept try using this app to debug. it's great Apr 19 12:01:22 I guess, "normally" (i.e. in an SQL situation), the URI should only identify which *type* of update we're talking about (i.e, the target TABLE), whereas the selection/selectionArgs parameters actually identify the actual row(s) to update Apr 19 12:01:22 icedp: Ahh, that is probably the reason. Thanks, I didn't think of that. But do you know if I can force the chooser to open? Apr 19 12:04:04 Kake_Fisk: you can query how many apps match you intent, see https://gist.github.com/mlatu/b356474e3eb2624a08d5 Apr 19 12:06:33 Thanks, I'll take a look at that Apr 19 12:07:39 Kake_Fisk: so from there you either can make a decision what to launch or create your own dialog with custom adapter that displays list of apps from packagemanager Apr 19 12:07:59 yeah Apr 19 12:10:26 Kake_Fisk: or maybe have a loot at ShareActionProvider Apr 19 12:10:36 not sure Apr 19 12:24:33 <_genuser_> new people ... Apr 19 12:37:21 hey all I have a fragment with a button and activity extends actionbaractivity how to run action when a button presses in the fragment Apr 19 12:41:09 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/content/Intent.java?av=f#3925 parameter all is completely ignore here. Is it acceptable to use ignored parameter just to properly dispatch? ) Apr 19 12:59:28 Hi, is there now any option to download and browser sources of Maven dependencies in Android Studio? Apr 19 13:00:22 Gah, logcat decided not to display anything today... Apr 19 13:02:02 Kake_Fisk, everybody needs rest now and then Apr 19 13:02:32 hehe, but I feel the problem is that he rests to much. He's getting used to the lazy life Apr 19 13:02:33 Oh sorry, JARs are fine, we're talking AAR dependencies Apr 19 13:04:23 exit Apr 19 13:05:32 ALT+6 worked :D Apr 19 13:13:32 can an Interface serve multiple async tasks provided we use different callback methods in each task? Apr 19 13:19:32 doria: are you aware of what an Interface is? Apr 19 13:21:17 lol .. take it easy on me thepoosh ... still a noobie here ;) Apr 19 13:22:02 I'm trying to return a value from an AsyncTask to the calling activity Apr 19 13:22:09 and I have 2 tasks Apr 19 13:22:53 I thought I could reuse the same interface for returning values from those 2 task as long as I declared different methods for each .... Apr 19 13:23:22 can I? Apr 19 13:27:19 well, there must be a better way to do that Apr 19 13:27:42 you can set in the constructor of the AsyncTask class a reference to the calling activity Apr 19 13:29:27 ty thepoosh :) Apr 19 13:31:34 doria: https://gist.github.com/yishai-glide/1e8fe8021e679f8ca2ed Apr 19 13:31:37 something like this Apr 19 13:34:05 very useful! ty! :) Apr 19 13:34:13 <_genuser_> thepoosh is here? g00s must have gone home for the night. Apr 19 13:36:52 lol Apr 19 13:37:12 _genuser_: that's probably true, I see him only at night after work or in the first hour of my work day Apr 19 13:51:59 Does someone know how to convert a list of objects to json with Gson but make it so that that list is an array of integers (the ids of the objects)? Apr 19 13:52:51 so private List objectList; should be turned into: [objectList.id, objectList.id...] Apr 19 13:53:29 Well actually [objectList.get(0).id...] but you get what I meabn Apr 19 13:58:34 hey all Apr 19 13:58:56 how to call a button in a fragment from the activity that is creating this activity Apr 19 14:00:01 hi! I have a singleChoice ListView registered for contextMenu. When I press on an item in list - it is nicely highlightened. But when I long press on an item - it is not highlighten in any way, so I'm not sure whether something is happening or mot. Is it possiblt to highlight "touched" item in ListView? Apr 19 14:05:41 alximych: do you have setOnItemLongClickListener set? Apr 19 14:06:29 xyz87: you would need reference this button in fragment and do something like fragment.getButton Apr 19 14:07:05 from the activity ? Apr 19 14:07:25 i am getting this error Attempt to invoke virtual method 'void at.markushi.ui.CircleButton.setOnClickListener Apr 19 14:07:37 Muchoz: https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/JsonSerializer.html Apr 19 14:07:59 Is there any documentation ? Apr 19 14:08:17 Ashiren: no Apr 19 14:09:50 Ashiren: I actually kinda fixed it with setting android:drawSelectorOnTop="true" in layout file. But it's still hardly noticable. I'm looking for a way to set custom color for list item when it's touched. Any clues, anyone? :-) Apr 19 14:10:01 SimonVT, thanks! Apr 19 14:10:52 SimonVT, what if the field is in another object that is serialised? Apr 19 14:13:00 I don't follow Apr 19 14:13:32 Your JsonSerializer is passed an object.. You then return the serialized version of that object.. You don't have access to other objects Apr 19 14:14:30 SimonVT, if I need to serialise objectB: http://hastebin.com/igajemoduj.java Apr 19 14:16:25 Yes? Apr 19 14:17:36 Oh that code is wrong btw Apr 19 14:17:55 Ignore ObjectA in that code Apr 19 14:18:35 Gson gson = new GsonBuilder().registerTypeAdapter(ObjectA.class, new ObjectASerializer()).create(); Apr 19 14:19:05 And then use that Gson Object to serialise ObjectB? gson.toJson(ObjectB....)? Apr 19 14:19:37 Sure Apr 19 14:20:04 Alright, thanks Apr 19 14:42:00 Hey, what method do you guys use to remote control the device when debugging? i have wifi debugging enabled, and i'd prefer to put my tablet near charger and kind of forget about it Apr 19 14:46:14 hello guys! Apr 19 14:48:26 the setMinDate and setMaxDate functions from DatePicker they don't work with hour difference? Apr 19 14:50:00 I'm currently working on a project and I'm wanting to test it on my phone but it won't link to Android Studio. I'm running Windows 7, and my device manager shows me that XT1080 is not installed properly. I have tried a varioty of driveres. I then check with my wife's tablet and it worked fine. Can anyone help me with this issue? Apr 19 14:53:24 Talow: what's your phone model Apr 19 14:53:25 ? Apr 19 14:53:55 Model number: DROID MAXX Apr 19 14:55:11 Talow: whats the model of the tablet? Apr 19 14:55:38 Abara: Dragon Touch A1X+ Apr 19 14:57:27 did you installed the google drive? Apr 19 14:57:38 The Table is working fine Apr 19 14:57:43 tablet* Apr 19 14:57:58 it's the phone that I need to get going but I can't seem to get a driver working for it Apr 19 14:58:07 did you installed the google drive? Apr 19 14:58:24 google driver? Apr 19 14:58:41 yeah. it's available on the SDK manager Apr 19 14:58:46 sometimes it works Apr 19 14:58:46 yes Apr 19 14:58:51 I did, it didn't Apr 19 15:00:51 http://forums.androidcentral.com/motorola-droid-maxx/307267-does-pdanet-foxfi-work.html#post3010573 Apr 19 15:14:00 hey all im trying to open an activity from a fragment my app is force closing any help ? Apr 19 15:15:10 you could pastebin code and error log for starters Apr 19 15:15:31 pastebin.com ? Apr 19 15:16:02 yes, show your code and logs, otherwise how we could help? Apr 19 15:17:02 http://pastebin.com/z4ngty0v Apr 19 15:17:08 here is the error Apr 19 15:17:55 http://pastebin.com/WEvrLTeG Apr 19 15:18:04 here is the fragment Apr 19 15:18:09 well Apr 19 15:18:23 have you declared the additional activity in the manifest? Apr 19 15:18:28 "have you declared this activity in your AndroidManifest.xml?" Apr 19 15:18:34 Seriously, it's in the error itself Apr 19 15:18:48 http://pastebin.com/1hFKb8VD Apr 19 15:18:56 here is the manifest Apr 19 15:19:32 i have added it but getting this error make me crazy Apr 19 15:19:35 activities.LoggedInActivity, you forgot the beginning . Apr 19 15:19:55 android studio usually autocompletes missing activities for you Apr 19 15:19:56 it should be all link ? Apr 19 15:20:01 but to be safe write all package: com.ideaApps.Shopimart.activities.LoggedInActivity Apr 19 15:20:10 xyz87: ".activites.LoggedInActivity" Apr 19 15:20:13 ill try Apr 19 15:20:40 ohhhhh maybe it is the dot Apr 19 15:20:47 im compiling now Apr 19 15:20:53 How to use OpenCV with Java on Android Studio? I got some stackoverflow answers but they are old.. Apr 19 15:21:07 xyz87: And use a proper package name, all lowercase Apr 19 15:21:57 abara: I was able to get it working, I used the Android sooner ADB Testing Interface driver to get it connected. Apr 19 15:22:19 Talow: great! o/ Apr 19 15:22:26 hi. regarding the android sdk manager, how can I make use of a download manager like axel or aria2 to speed up the download of the SDK updates? Apr 19 15:22:37 the error has been solved thanks all but the fragment is still and not getting the new activity Apr 19 15:23:00 superlinux: need to discover the URL in use to make download. Apr 19 15:24:05 abara, that's what I am asking about, how to grab them like what (apt-get + apt-fast) does. Apr 19 15:25:06 superlinux: use a network management Apr 19 15:25:44 superlinux: or a sniffer, inspector. Dont know what's the name they use to it Apr 19 15:28:00 ok thanks Apr 19 15:29:07 abara, from command line , update can be done using : android update sdk -u -n . I am going to see where does it take me Apr 19 15:29:41 superlinux: o/ Apr 19 15:30:55 abara, this command will not actually update.. it will tell you what will be updated Apr 19 15:38:17 http://stackoverflow.com/questions/28357302/android-album-art-from-mediastore-and-picasso The solution doesn't work for me, any ideas? Apr 19 15:42:51 Does someone know how to make a List/RecyclerView where an item can contain a Checkbox/RadioButton based on the group it is in. Groups should be separated by headers. Anyone got any idea cause I'm totally stuck. Apr 19 15:44:06 The Checkboxes should also have a maximum amount checked. Apr 19 15:44:37 I just don't get how I uncheck a Checkbox and even check how many have been checked. Apr 19 15:44:41 looks like I found the problem. next question: How do I force android generate those thumbnails :P Apr 19 15:58:27 because don't PM someone you don't even know : http://uppix.com/f-screenshot_0145533d08b0018c5a4.png Apr 19 16:00:08 your friend, Jake? https://youtu.be/57P86oZXjXs Apr 19 16:00:18 he's like Rambo haha Apr 19 16:01:00 I have a spinner beside an ImageView in a linearLayout, I can't seem to understand how to open the spinner when clicking on the LinearLayout and not only on the spinner element, any ideas? Apr 19 16:01:46 hi. i've created a unit test for the database. i've added a row, but when i try to read the sqlite database, it is empty. can you help me to explain why it is empty? Apr 19 16:02:47 i've checked the return value of the insert method and it isn't equal to -1, it is > 0 Apr 19 16:08:32 I get Invalid double: "1 408.15" error, in my app. In db I have 1408.15 value, how I can remove the blank space and make the double valid ? Apr 19 16:11:24 Why do you have a space at all? Apr 19 16:11:42 I don't know Apr 19 16:12:05 I use three line method to round double to specified digit number Apr 19 16:12:49 Oh god, an empty OpenCV project is 40MB unless you want to force users to install OpenCV Manager :/ Apr 19 16:13:40 https://pastebin.com/FFTjEMTe (four line method*) Apr 19 16:14:19 Logcat shows error in last function line Apr 19 16:14:19 if I take a picture of a page in a book that I have and I put that online and say that this is from this book that was written by this author, would I be infringing on anything? Apr 19 16:15:48 is there any material design fanatic here that can tell me why inputs have font size 16db while all the rest of the body text is 14dp? Apr 19 16:16:06 why did they choose a bigger font size for inputs? Apr 19 16:16:30 to allow smaller labels to still readable? Apr 19 16:17:23 who knows man Apr 19 16:17:33 oh, that's what you're trying to find out Apr 19 16:17:43 :) Apr 19 16:18:42 and on the google apps that use forms, like contacts, i don't see a bigger font size at all Apr 19 16:19:01 does an android input field by defauls set a 16db font size? Apr 19 16:19:41 in the TextView class and its corresponding XML, someone out there must have set the default text size to be a dimen from the ?android:attr/ Apr 19 16:19:55 because if you see default padding, it's from there too, and it's 16dp for horizontal and vertical margins Apr 19 16:21:15 can you find out if font-size is 16? Apr 19 16:21:22 i don't have android installed Apr 19 16:21:45 hmm you can create a new textfield and not set the size of its font, in the code you can get what the font size is Apr 19 16:22:19 not sure about the 2nd part, I dont know if you can get the font size of an edittext from code Apr 19 16:22:46 why would you? you worried to get mixed up in all the font sizes for all the different edittexts in the app? Apr 19 16:25:10 because i'm creating my own css fw based on md, and i just found out this difference Apr 19 16:25:19 and was wondering why they did this Apr 19 16:25:36 Is it possible to use Google App Engine locally during development? I can't find anything on this at their site Apr 19 16:25:46 then i went checking all other material design css frameworks, and saw that nobody uses difefrent size for inputs Apr 19 16:28:11 Does anyone have experience with backend programming? Apr 19 16:30:50 phyzloc: yes? Apr 19 16:32:27 Narzew: Log.d every step; figure out what's going on. Apr 19 16:33:03 TacticalJoke: error is in last line of that round function Apr 19 16:34:39 Is quick way to convert "1 045.36" to "1045.36" for example and make it double ? Apr 19 16:35:25 gdrc: I'm looking for a backend framework for mobile apps. One that I can install locally on my server. Apr 19 16:35:57 sorry connection problem. I insert a row in my sqlite database, but when i try to read it, it results empty. I got this exception: android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 Apr 19 16:36:26 phyzloc: I don't know any framework for mobile app Apr 19 16:36:44 phyzloc: create a webservice from 0 Apr 19 16:37:15 Narzew: Try calling format() with different values, etc. Log the output. Apr 19 16:37:19 You need to figure out why it's adding a space. Apr 19 16:37:33 gdrc: I think it's better to have a standard framework than creating something myself Apr 19 16:38:28 it depends what you have to do, generally I say no Apr 19 16:39:27 gdrc: I looked at Google app engine which is good for deployment. But during development I would like something local so I don't have to pay for it Apr 19 16:52:51 the problem is that if i try to get the database in another method, rather than get it (with getReadableDatabase) in the same method that writes it i got that exception ( Index 0 requested, with a size of 0) Apr 19 16:53:20 LucaS05: use greendao. period. Apr 19 16:53:27 hello cbeust Apr 19 16:53:48 what's that? Apr 19 16:54:05 an orm Apr 19 16:55:13 My device doesn't show up in running devices under Android Studio. Any reasons you can think of? Apr 19 16:55:58 Kake_Fisk: adb devices shows it? Apr 19 16:56:07 nope Apr 19 16:56:21 But it says it's connected to my PC on my phone Apr 19 16:56:26 gdrc: but that is a very strange problem. getting the db in another unit test method results in having an empty db that i've just written Apr 19 16:56:35 And USB debugging is enabled Apr 19 16:56:58 Kake_Fisk: that's driver issue then. os? Apr 19 16:57:05 Windows 8 Apr 19 16:57:12 I'll check if the drivers are up to date Apr 19 16:57:30 try this http://pdanet.co/a/ Apr 19 16:58:16 What is that? Apr 19 16:59:02 it should install android drivers for every phone Apr 19 16:59:45 ah :) Apr 19 17:07:22 phyzloc, dev_appserver Apr 19 17:08:10 what Q stands for? Apr 19 17:08:59 phone Apr 19 17:11:14 Can someone give me a hand on how to make a RecyclerView that supports multiple headers? I've been failing for 2 hours straight and have no idea where to start now. Apr 19 17:14:49 What kind of headers? Apr 19 17:14:55 have you been able to make a recyclerview that supports 1 header? Apr 19 17:15:42 pfnQ: What's that? Apr 19 17:16:11 phyzloc, how you run appengine code locally Apr 19 17:16:37 pfnQ: Ahh.. nice. Does this have database support? Apr 19 17:16:49 SimonVT, just a ViewHolder like any other ViewHolder with a binder etc. But based on setItems() for example it creates sections and those sections each have a title which is displayed in the viewholderheader. Apr 19 17:17:05 I just wanna git reset --hard Apr 19 17:17:14 And it's done. Apr 19 17:17:20 Fuck it Apr 19 17:17:33 pfnQ: I was just reading about Django. Have you used it before? Apr 19 17:19:33 Muchoz: Just have different view types Apr 19 17:19:59 SimonVT, I was doing that. But how does it know what viewType it si? Apr 19 17:20:05 is* Apr 19 17:20:06 You tell it Apr 19 17:20:12 getItemViewType Apr 19 17:20:18 *sigh* fuck me Apr 19 17:20:35 Thanks Apr 19 17:20:58 I'm just gonna create an all new adapter then with even more functions for my needs. Apr 19 17:22:37 Hey guys, is this a valid uri to give an ImageView: //media/external/images/media/188 Apr 19 17:24:57 hey guys, the method getReadableDatabase calls my DatabaseHelper onCreate method, which create the tables again. When the onCreate gets called? Because this is causing my database to be recreated even after a call to getWritableDatabase. Apr 19 17:25:56 If the DB already exists, it will not be created again LucaS05 Apr 19 17:26:14 It checks, and if the DB is not created, one is created. But if it already exists, a new one is not created Apr 19 17:27:36 drose379: but i call getWritableDatabase before reading, so it's strange that the onCreate gets called again Apr 19 17:27:52 I know, I thought the same thing Apr 19 17:28:02 Why do you call getWritable before reading? Apr 19 17:28:03 i've to say that I'm unit testing my helper class Apr 19 17:28:18 Ok Apr 19 17:28:26 drose379: because my tables are empty :) Apr 19 17:28:41 What you making? Apr 19 17:29:11 i'm simpky trying to read all the rows from a table Apr 19 17:29:18 Oh okj Apr 19 17:29:26 i was thinking that the database it's removed after the method finish Apr 19 17:29:35 in this context of unit testing Apr 19 17:30:09 because i'm using RenamingDelegatingContext Apr 19 17:30:19 as the context for my helper Apr 19 17:33:19 drose379: i've found the problem http://stackoverflow.com/questions/9804917/android-testing-start-with-clean-database-for-every-test Apr 19 17:33:23 (maybe) Apr 19 17:37:18 hmm, is there a "Void" observable in RxJava? Apr 19 17:37:28 something that just returns "Ok" and "onError"? Apr 19 17:50:25 Do you know how I can properly center text in a TextView? http://i.imgur.com/OZSnOOC.png Apr 19 17:51:03 what have you tried Apr 19 17:51:53 I have tried fill_parent, layout_gravity:center and textAlignment:center Apr 19 17:52:00 at once Apr 19 17:52:02 hey... disclaimer: i'm a total noob; i have a project open in Studio, its target is android-21, and i want to backport it to android-17... what do i do exactly? Apr 19 17:52:13 i had tried this manually already from the command line, and i got it to build, but it wouldn't install Apr 19 17:52:19 change layout_gravity to just gravity Apr 19 17:52:33 or center_horizontal Apr 19 17:52:38 if you width is match_parent Apr 19 17:53:22 That worked, thanks Apr 19 17:53:47 layout_gravity is for placing of the textView, gravity is for the text inside Apr 19 17:54:05 yeah, okay Apr 19 17:54:24 verve find the build.gradle(s) and change compileSdkVersion / targetSdkVersion to what you want, sync gradle Apr 19 17:54:44 k, lemme try, sec Apr 19 17:54:51 what's sync gradle under? heh Apr 19 17:55:16 heh, its hidden - but if you change them, it will have a button there to sync Apr 19 17:55:23 alright Apr 19 17:55:51 oh, 'synchronize build.gradle'? Apr 19 17:55:54 when i right click Apr 19 17:56:00 i tried a few times changing things through the project structure dialogs - but that thing mangles the build files :D hahaha Apr 19 17:56:04 verve yeah Apr 19 17:56:18 what about minSdkVersion? Apr 19 17:56:27 and buildToolsVersion Apr 19 17:56:27 put whatever you want Apr 19 17:56:41 should the minSdk be the same as compile & target? Apr 19 17:56:47 right now it says 19 Apr 19 17:57:00 thats a bigger discussion, should be OK for now Apr 19 17:57:10 k Apr 19 17:57:38 then what do i do, generate ant? Apr 19 17:57:59 i had a guide for doing it via command line, this is my first time in Studio, heh Apr 19 18:12:56 Why does an app request permission to use the microphone but i could not find it in app ? Apr 19 18:19:53 I'm developing an app using Android Studio 1.1 Apr 19 18:20:02 I can run and test the app in my device Apr 19 18:20:11 but Id like to get an apk to test it later on other devices Apr 19 18:20:15 how and where can I find it? Apr 19 18:21:38 diegoaguilar: find -name "*.apk" ;) Apr 19 18:21:51 it should be in.. build? maybe out Apr 19 18:22:02 probably build, if you're using gradle Apr 19 18:23:41 JesusFreke, the problem is that find -name "*.apk" return nothing :O Apr 19 18:25:27 hello Apr 19 18:25:36 is there a unity channel in freenode? Apr 19 18:26:02 what happnes if you type in "/join #unity" Apr 19 18:26:10 paulo_ Apr 19 18:26:20 paulo_ Apr 19 18:26:23 almost empty channel Apr 19 18:26:38 and if u google "unity irc freenode" Apr 19 18:26:40 ??? Apr 19 18:26:43 & i don't think it's the unity i'm looking for Apr 19 18:27:03 diegoaguilar: it's definitely there somewhere. are you sure you're in the top-most project dir when you try to run find? Apr 19 18:27:18 yep, I did it at the top-most dir Apr 19 18:27:31 my app is named Expressa Apr 19 18:27:35 pwd shows Apr 19 18:27:44 /home/diegoaguilar/AndroidStudioProjects/Expressa Apr 19 18:27:52 there's where I'm running find Apr 19 18:27:58 paulo_: I googled for "is there a unity channel on freenode". first result -- #unity3d Apr 19 18:28:59 It's really not hard to find this sort of thing on the web :) Apr 19 18:29:27 non-dev question, sorry: this rom came with Busybox 1.19.2 installed to /system/bin, and when i open it and it wants to upgrade to 1.23.1 and the default is to /system/xbin Apr 19 18:29:45 should it be in both, or change it to /system/bin? Apr 19 18:29:46 thanks Apr 19 18:30:26 verve: either or both would be fine Apr 19 18:30:34 I always google in machine style :P Apr 19 18:30:41 "android irc freenode" Apr 19 18:30:52 always get results :o Apr 19 18:31:00 Im lazy and hate doing human like queries :P Apr 19 18:31:29 I typically do to. but if someone's asking a copy+pasteable question.. :) Apr 19 18:32:03 btw I really googled this apk issue Apr 19 18:32:07 but I cant understand whats going on Apr 19 18:32:21 diegoaguilar: try rebuilding the project? Apr 19 18:32:29 or if you're using gradle, build from the command line Apr 19 18:32:40 could u help me on gradle command Apr 19 18:32:42 :$ Apr 19 18:32:45 ./gradlew Apr 19 18:33:31 first output line: Downloading https://services.gradle.org/distributions/gradle-2.2.1-all.zip Apr 19 18:33:36 .. :I Apr 19 18:33:48 yeah, that's normal Apr 19 18:34:00 gradlew is a wrapper script that is typically checked in to the repository Apr 19 18:34:04 but it's not the full tool Apr 19 18:34:19 so the first time it runs, it'll grab all the necessary bits it needs to run Apr 19 18:40:18 anyone know why ndk-build.cmd (on windows) doesn't build properly if invoked via ADT? Apr 19 18:40:23 works fine in commmand line Apr 19 18:40:49 specifically, it skips compiling all the files that are specified via wildcard Apr 19 18:41:14 for example: LOCAL_SRC_FILES := $(wildcard ./LibMath/*.cpp) Apr 19 18:41:31 so i'm trying to build this app for android-17, it's made for android-21 Apr 19 18:41:41 throwing me this error after i change the compile/target to 17: Apr 19 18:41:45 Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'. Apr 19 18:41:48 and Apr 19 18:41:52 Error:(8, 21) No resource found that matches the given name: attr 'android:colorAccent'. Apr 19 18:41:56 what can i do? Apr 19 18:42:06 change target back to 21 Apr 19 18:42:18 or remove all api 21 features Apr 19 18:42:18 ...then it won't run on Jelly Bean, right? Apr 19 18:42:29 it won't run to begin wifh Apr 19 18:42:43 well, right, with the error, heh Apr 19 18:42:47 like Apr 19 18:42:59 is there an equivalent 17 feature for those two things that i can change it to? Apr 19 18:47:30 why do we use record_audio permission to record video from camera ? Apr 19 18:55:48 why do we must use RECORD_AUDIO permission to record video ?  Apr 19 18:55:59 because video uses audio? Apr 19 18:57:10 as i understand, even if you dont specify source, permission is still required Apr 19 18:57:24 <Ashiren> ok thats right Apr 19 18:57:34 i know thats sometimes its really pain in the ass Apr 19 18:57:42 to require big permission to do one small thing Apr 19 19:03:33 is there a way to temporarily 'suspend' an app from Play - but not permanently (to prevent firther downloads) Apr 19 19:05:40 can you unpublish? Apr 19 19:06:40 i'm wondering if there is a way to leave the store listing up but say 'we're closed for now :D Apr 19 19:06:54 Muchoz: g00s you can deactivate an apk and leave the another one Apr 19 19:07:16 Muchoz: sry Apr 19 19:07:32 Np Apr 19 19:08:55 Guys im trying to save an Img uri to a database Apr 19 19:09:26 But once I convert the URI to a string, I dont think I can convert it back to URI Apr 19 19:09:42 ah, uri.parse Apr 19 19:27:11 Hey Guys. I’m trying to extract an Int from a cursor doing something like this: Apr 19 19:27:21 public String getTotalNumberOfItems { return Integer.valueOf(db.rawQuery("SELECT sum(amount) FROM items", null).getInt()); } Apr 19 19:27:27 obviously its not working - what do I do? Apr 19 19:28:32 I have tried google :( Apr 19 19:29:47 ok - found a solution: http://stackoverflow.com/questions/19732341/how-to-sum-all-the-values-on-a-sql-database-column-and-show-the-total-as-a-textv Apr 19 19:30:11 where can i find a decent android tutorial? Apr 19 19:30:23 a decent update to date android tutorial Apr 19 19:30:45 https://www.youtube.com/watch?v=QAbQgLGKd3Y&list=PL6gx4Cwl9DGBsvRxJJOzG4r4k_zLKrnxl Apr 19 19:30:54 i’ve used this quite a lot Apr 19 19:31:01 think he’s pretty good Apr 19 19:31:18 aspire Apr 19 19:31:35 ah thenewboston Apr 19 19:33:03 old bucky’s never gonna let you down :) Apr 19 19:33:40 JohnR^^, read up on SqliteStatement Apr 19 19:34:51 iprime: will do :) Apr 19 19:35:02 ty Apr 19 19:39:25 welcome, it's better than using a Cursor, more concise Apr 19 19:41:43 Whats the best way to test for an active internet connection? Apr 19 19:49:15 As opposed to just connected to a network... Apr 19 19:50:00 is there anyone Android Programmer from IRAN ? Apr 19 19:50:05 ping some site Apr 19 19:50:11 is there any Android Programmer from IRAN ? Apr 19 19:50:17 LCSD: Why?> Apr 19 19:50:51 you can see if you have mobile data or wifi on easily. but if you have actual internet connection, you need to ping something and see response Apr 19 19:50:52 Anthaas : because i'm Iranian Apr 19 19:51:29 Ashiren: So, getRuntime().exec("ping ..."); ? Apr 19 19:51:32 and then get response? Apr 19 19:52:00 oh no, i was thinking higher level Apr 19 19:52:25 Which is quicker? That, or literally creating a http object, trying to connect to a website, and making sure I get a valid response? Apr 19 19:52:48 http://stackoverflow.com/questions/6493517/detect-if-android-device-has-internet-connection Apr 19 19:52:51 No, do not run ping, just try to contact your server Apr 19 19:52:55 probably the ping but looks hacky Apr 19 19:53:05 CedricBeust_: Any reason? Apr 19 19:53:12 do android apps written with the ndk require java? i have always read java is required but i have someone in another room insisting it isnt Apr 19 19:53:21 it’s a pretty bad hack, there are much more efficient ways and reliable ways to do that Apr 19 19:53:57 CedricBeust_: So just try and do whatever needs to be done, and handle if it can't? Apr 19 19:54:17 I usually have heartbeats running in the background that ping my server Apr 19 19:55:03 Seems a bit... Apr 19 19:55:03 njcomsec: well from the examples ive ever seen, the ndk app need at least some wrapper in java Apr 19 19:55:12 I dunno, unneccesary use of data I guess? Apr 19 19:55:45 technically you dont need java if you use i.e. qt for android, xamarin, or phonegap's like things Apr 19 19:56:11 Depends if you need heartbeats. If you don’t, just send a quick http query to your server. Or if you’re using a socket that has the ability, send a ping (e.g. web socket). This is an out of bound packet, much more efficient than straight http Apr 19 19:56:23 out of band* Apr 19 19:56:52 Im using OkHttp, Retrofit, and a number of other bits and bots that need to network, Im just thinking about how best to handle these tasks. Apr 19 19:58:16 If there is a widely used best method of doing this, it'd be nice to hear Apr 19 20:00:40 njcomsec: you can write a purely ndk app. It still technically uses java, but you don't have to actually have java code in your project Apr 19 20:01:21 njcomsec: you basically specify the framework-provided NativeActivity class as your main activity class in the AndroidManifest.xml Apr 19 20:02:17 CedricBeust_: The reason I ask, is I don't really want to have to connect to my server and wait for a http response before performing the actual task I want to perform, but at the same time I dont want to try and connect and have to wait for my connection to timeout before realising I cant connect. Apr 19 20:02:56 ahh cool. interesting thanks)) Apr 19 20:03:41 Anthaas: you'll want to take a look at the ConnectivityManager APIs as well. There's no point trying to contact the server if you know there's no connection Apr 19 20:03:54 Anthaas: Then send your query with a timeout on it Apr 19 20:05:11 JesusFreke: Only shows if there is an active network connection, not internet. You could be connected to a network that doesn't have internet access... Apr 19 20:05:30 Anthaas: read what I said again :) Apr 19 20:07:19 Also, as of api 21, you can specifically request a network with internet connectivity (http://developer.android.com/reference/android/net/NetworkCapabilities.html#NET_CAPABILITY_INTERNET) Apr 19 20:07:28 I'm not sure if there is anything similar for lower api levels Apr 19 20:07:44 JesusFreke: ahh, I have a method called hasInternetConnection() which fails fast if hasNetworkConnection() fails or returns false. Apr 19 20:07:52 hasNetowkrConnection uses the ConnectivityManager Apr 19 20:07:57 Anthaas: yeah, exactly :) Apr 19 20:10:56 JesusFreke: How would I use NET_CAPABILITY_INTERNET? Would I check the current connection for it was a NetworkCapability, or do something else? Apr 19 20:12:15 That didnt make sense, I can't talk to someone and type at the same time Apr 19 20:12:27 remove the "it was" Apr 19 20:17:46 When I try to share text/plain to the messenger app, it just say "loading". Any obvious reasons? Apr 19 20:23:53 3 days into Android development and I'm loving it :) Apr 19 20:24:44 ignorance is bliss Apr 19 20:26:00 heh Apr 19 20:26:40 happyowl for your first project, i recommend using the BLE, mediaplayer, and camera apis :) Apr 19 20:27:03 Will be using camera for sure :D Apr 19 20:27:08 oh boy Apr 19 20:27:08 #badass Apr 19 20:27:20 I am like you happyowl Apr 19 20:27:27 Oh yeah? Apr 19 20:27:29 Make it challening. Use the NDK and Renderscript for snappy camera image processing. Apr 19 20:27:35 I also like the Android equivalent of kicking myself in the balls Apr 19 20:27:38 ... Apr 19 20:27:39 hahya Apr 19 20:28:26 Have the camera APIs improved since pre-ICS, g00s? Apr 19 20:29:00 i think they did change in 5.0 Apr 19 20:29:07 oh good Apr 19 20:29:10 theres new, Camera2 API in 5.0 Apr 19 20:29:17 How's the emulator for you guys? It seems unusable to me Apr 19 20:29:24 well there were some changes between 2.3.x and 4.0 Apr 19 20:29:24 heh Apr 19 20:29:29 I dont use emulator. Use physical device. Apr 19 20:29:37 Ill stick to 5.x then Apr 19 20:29:38 emulator is very slow. use real device or genymotion Apr 19 20:29:54 Yeah definitely, can't wait until my phone gets here Apr 19 20:30:02 Anthaas: but to use it, you would make 5.0 your minimum api Apr 19 20:30:12 I want to make screenOrientation="portrait" on phones, and screenOrientation="landscape" on tablets. How I can do that ? Apr 19 20:30:32 Ashiren: Which it is Apr 19 20:30:51 :o Apr 19 20:31:07 Narzew, why Apr 19 20:31:10 Personal project ;-) Apr 19 20:31:25 and todo it, just create a bucket and put your layout in there Apr 19 20:31:26 * Anthaas never used his tablet in landscape mode. Apr 19 20:31:31 whatitis: or option to change screen orientation in settings if this is possible (app settings) Apr 19 20:31:51 Narzew: you can do it programmatically Apr 19 20:32:05 Ashiren: can you give me a clue which classes I should look ? Apr 19 20:32:08 if sw600dp have a landscape layout, otherwise in layout just have your portrait Apr 19 20:32:08 if tablet - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); Apr 19 20:32:54 Ashiren: can I leave screenOrientation parameter in AndroidManifest.xml ? Apr 19 20:33:24 i dont know. i think unlikely Apr 19 20:33:28 and thanks, I'll try this Apr 19 20:59:06 JesusFreke: http://pastebin.com/naZSaYVn You reckon this is OK? Apr 19 21:03:39 JesusFreke: My only issue is that I might be misunderstanding its use. The docs say "indicates that this network should be able to reach the internet". Should be able to reach, and can currently reach are two different things. Apr 19 21:06:39 you're telling the framework what you expect. In the same sense "this should be a wifi network" - doesn't mean that it might not be a wifi network Apr 19 21:07:06 but I don't actually know anything about that particular functionality, other than those same docs :) Apr 19 21:07:33 but in any case, regardless of whether the network can reach the internet, you're still not guaranteed that you'll be able to contact your server Apr 19 21:08:04 Oh of course, but I don't want to even bother trying if the device can't do it. Apr 19 21:08:27 I can handle the server being down by other means. Just damage limitation I guess. Apr 19 21:09:10 Are there any frameworks for android dev ? Apr 19 21:09:27 Nightwalkerkg: For what specifically? There are loads of libraries for things Apr 19 21:11:27 I am new to android dev. So i am kinda confused on how i should do things. I am trying to create an app that will have a register/login option on start with the remember me option. Apr 19 21:12:11 But when you register, it should use the info ( name, id, etc) and display it when you login. Apr 19 21:12:14 Nightwalkerkg: Oh ok, your best bet is to read a load of tutorials, look at some source code. iosched is an example of one open-sourced by Google. Apr 19 21:12:44 You should also consider delegating the authentication to someone like Google or Facebook if possible. Apr 19 21:13:35 Anthaas, i am trying to make a Student ID app for my UNI, a project i am working on. So i need to use the info that the users will input because my uni dosn't have an API. Apr 19 21:13:39 Is the way to center title in ActionBar ? Apr 19 21:14:23 Nightwalkerkg: UK? Also, how can you be certain that the information they provide is accurate then? If you need to integrate it with your Uni? Apr 19 21:14:51 Nope, Serbia. Also this is just a project, it will not be used by my UNI. Apr 19 21:15:41 Ahhh ok. Are you going to be networking? Apr 19 21:16:51 I am wondering about that. Apr 19 21:17:23 You will probably need to, in which case you also need to consider how you are doing that. How you are going to communicate is the most important part, I'd say, of what you have just asked about. Apr 19 21:19:11 For starters i was thinking of just making three activities. The first would be a simple listView with two layouts ( one with the icon and one without ) and it would hold the basic info ( the one you input when you open the app ) like name, student id, etc. Apr 19 21:19:26 The second whould hold the exams info, grades, etc. Apr 19 21:19:51 And the third would be a simple schedule list for lectures. Apr 19 21:20:43 So, since my uni dosen't have an api where it can take these from, i was thinking of just leting the user input these on the first app start. Apr 19 21:21:23 But i don't know if i should store this localy or on the server. Apr 19 21:39:45 I have completed my app. That feeling.. :) Apr 19 21:42:00 np app is ever completed :D Apr 19 21:42:02 *no Apr 19 21:42:12 With retrofit, should I wrap adapter.create() to allow networking? Apr 19 21:42:24 wat Apr 19 21:42:34 JacobSpace_ Apr 19 21:43:27 JacobSpacebak Apr 19 21:43:36 how do you even irc Apr 19 21:43:53 Narzew is your app awesome Apr 19 21:44:03 What app? Apr 19 21:44:12 the app he completed Apr 19 21:44:17 link? Apr 19 21:44:26 Bicycle climb map (mostly in Poland) Apr 19 21:44:38 Anthaas: I made Google Play graphics now Apr 19 21:44:49 Tommorow will be available Apr 19 21:57:12 does it make sense to use @StringRes for a field (public final int labelId) - and where does it go, before public ? Apr 19 21:57:35 i 've only used them for method params so far Apr 19 22:04:17 ok Apr 19 22:05:03 whats up JacobTabak Apr 19 22:05:43 Hmm. Apr 19 22:06:07 Just read something that helped me understand Retrofit a bit better. Apr 19 22:06:22 For each API call, I need all possible responses to be structurally similar, yes? Apr 19 22:07:05 what do you mean "all possible responses"? Apr 19 22:08:02 JakeWharton: So, in my scripts, if a user cannot be registered due to errors being posted, I could return details of the errors, success = false, and a number of other things, but if the registration was successful, I wouldn't post errors back, but I might post some user data back for the app to deal with. Apr 19 22:08:17 The two possible responses from the server, in terms of content, wouldn't be structurally similar. Apr 19 22:09:39 Due to only providing one callback object, they need to be similar. Or could I have values that could be checked, so my callback could be an object which has an errors list which could be empty, and I could check that? Apr 19 22:10:27 * Anthaas expects JakeWharton has just banged his head on the table due to my incompetance/stupidity Apr 19 22:14:23 our old JSON behavior was similar Apr 19 22:14:32 we had a BaseResponse type that all our model objects extended from Apr 19 22:14:42 it had a similar boolean success Apr 19 22:16:45 JakeWharton: So you'd recommend doing similar? Apr 19 22:16:57 yeah i mean it'll work Apr 19 22:17:15 your base response will have a boolean success and a List errors Apr 19 22:18:57 Does Retrofit support returning part of an Object? I'd imagine so. If I have a POJO that has 8 fields, but my response only sets 3 of them. Is that allowed? Because I could then have a UserResponse extends BaseResponse which has a User field. Apr 19 22:19:18 that's Gson Apr 19 22:19:23 and yes it behaves that way Apr 19 22:19:33 Ahh cool - thanks :D Apr 19 22:45:00 anyone use feature toggles instead of feature branches in their projects? Apr 19 22:51:43 <_genuser_> hello people!! Apr 19 22:58:19 hi guys. i'm developing an app that is a restaurant's menu. i've thought to save all the dishes in a db. What do you think about using a db for this? Apr 19 22:59:04 is it better to use a csv file? Apr 19 22:59:35 <_genuser_> whatever's easy for you to manage, read, parse... Apr 19 22:59:49 it is basically never better to use a csv file for anything Apr 19 22:59:54 <_genuser_> sqlite dbs are pretty easy to create, manage, maintain, and use. Apr 19 23:00:04 except maybe import and export Apr 19 23:00:26 <_genuser_> meh, a csv file is really just a records based db. Apr 19 23:00:35 all dbs are records based Apr 19 23:00:49 csv just has absolutely no performance features Apr 19 23:00:56 do you need multiple tablets connected to the same db? Apr 19 23:01:02 <_genuser_> except CSVs db engine provided indexing, high quality searches, etc. Apr 19 23:01:21 maybe if it reads the whole thing into ram Apr 19 23:01:31 the csv file itself has no indexing Apr 19 23:02:10 <_genuser_> that's what I said. Apr 19 23:02:21 if you say so Apr 19 23:02:54 <_genuser_> oh, I see. I missed a word there in my sentence. Apr 19 23:02:56 <_genuser_> you're right. Apr 19 23:03:06 ahh Apr 19 23:03:11 <_genuser_> I was saying except csvs lack indexing, etc... Apr 19 23:03:12 was the word "doesn't"? Apr 19 23:03:14 hnehe Apr 19 23:03:16 I see Apr 19 23:03:38 <_genuser_> typing in a sentence at a time while others are also typing... it's easy to get confused or misunderstood... Apr 19 23:03:55 no worries. sorry about that Apr 19 23:04:02 <_genuser_> I just meant, if it's a simple menu and you don't care about queries, joins, etc. csv is just fine. Apr 19 23:04:10 <_genuser_> altho, I'd probably still go for an sqlite db. Apr 19 23:04:18 anyways LucaS05 you should try to explain to us how this app will be used because it's unclear Apr 19 23:04:24 <_genuser_> since most of the leg work is already done by the android classes. Apr 19 23:04:39 in particular, is there just one tablet you edit and display the menu on, or is it networked? Apr 19 23:05:12 if the former... sqlite. if the latter, you probably want mysql or postgresql on a server Apr 19 23:05:33 <_genuser_> I think we scared him. Apr 19 23:05:42 hahah no! Apr 19 23:05:43 hehe Apr 19 23:06:18 i wasn't expecting all this good answers :) Apr 19 23:06:42 <_genuser_> AS 1.0.1 to 1.1.0 that sound like a big update. Apr 19 23:06:47 <_genuser_> I hope it speeds things up too. Apr 19 23:07:21 anyway there's no networking. so every tablet works all alone Apr 19 23:07:52 LucaS05: how do you plan to copy the menu? or is it one tabletr per restaurant Apr 19 23:08:12 <_genuser_> or are you pre-packing a copy of the db with the app that never really changes. Apr 19 23:08:39 _genuser_: yes, exactly Apr 19 23:08:53 weird Apr 19 23:09:27 then yeah put a sqlite db in the app's resources Apr 19 23:09:30 it's only a reference Apr 19 23:10:37 <_genuser_> is the app going to let the owners change the menu when they add or remote items? Apr 19 23:11:04 <_genuser_> is it one tablet per restaurant? Or each place has their menus on tablets all using the same copy of the meny? Apr 19 23:11:11 lizzie: i've read that is quite difficult to use a sqlite that way, so i've created my SQLiteOpenHelper Apr 19 23:12:17 _genuser_: there will be one tablet per table. and yes maybe in the future the owners could change the menu with a web application Apr 19 23:13:19 <_genuser_> probably will be highly benefitial for you if the app just looked online at startup to see if a newer db copy is available and just downloaded it. Apr 19 23:13:49 <_genuser_> then all you do is it put it on their website somewhere each time you have a new copy and the app will just refresh it. Apr 19 23:20:10 _genuser_: and which is the right location for that? Apr 19 23:20:36 i've seen that when you create a db it goes in /data/data... Apr 19 23:21:37 because what you have said is what i've thought about updating the db Apr 19 23:22:41 LucaS05: really? it'd be easy on a pc. I'm actually new to android development I'll admit... Apr 19 23:23:59 lizzie: yes. i've debugged (and read the docs) and i've seen that the db at that path after the onCreate method of my SQLiteOpenHelper subclass gets called Apr 19 23:25:25 LucaS05: If the app can have the menu changed by owners, then you will want to probably do as _genuser_ said and have the app check for a db version, if it differs then download, else ignore. Apr 19 23:25:49 There should be an example of how to do that online. Apr 19 23:26:02 The place to put the version of the app's db is up to you Apr 19 23:26:16 Anthaas: yes, i think the best thing to do. Apr 19 23:27:00 Anthaas: i'm having trouble about the place because i've read that is quite difficult to read or use the db from the res folder Apr 19 23:27:29 It is, it would reduce the amount of download the app needs to do each time it opens (unless there is a new db), also, it means that unlike lizzie's suggestion where they suggested to put it in the res folder, you won't need to install an update each time the app needs to be changed (which would also require you modifying the project itself and reuploading) Apr 19 23:27:43 If the db is held in the assets folder, it is not writeable, only readable/ Apr 19 23:30:50 Anthaas: thanks! Apr 19 23:32:10 how exactly do i change the symlink to /sdcard to /storage/sdcard1 (removable)? it's pointed at /storage/emulated/legacy Apr 19 23:32:26 tried remounting / as rw and changing the init files, and it just reverts back Apr 19 23:35:02 ask in #android-root Apr 19 23:38:42 k Apr 19 23:44:06 Ugh Apr 19 23:44:09 Gson is....argh Apr 19 23:46:10 one activity with four fragments, one service binding, plus three possible dialogfragments = eight or nine interfaces implementation. well it looks ugly Apr 19 23:49:51 I have a GridView - how can I see what the default listSelector is for holo_dark ? Apr 19 23:51:24 ah seems to be list_selector_holo_dark Apr 19 23:52:06 does removeCallbacks(null) remove all runnables in the queue? Apr 19 23:54:05 on what object? Apr 19 23:54:27 Trying to write a Gson UserResponseTypeAdapter which writes a boolean, a list of Error objects, and a User object. Ughk. Trying to find an example of such behaviour Apr 19 23:54:38 JakeWharton: null, but docs says all so Apr 19 23:54:47 i mean on what type Apr 19 23:54:59 what are you calling the method on? Apr 19 23:55:02 oh a handler Apr 19 23:55:54 passing null does nothing Apr 19 23:56:14 https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/MessageQueue.java Apr 19 23:56:16 line 450 Apr 19 23:56:25 called from https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/Handler.java Apr 19 23:56:31 line 483 Apr 19 23:58:35 public final void removeCallbacksAndMessages (Object token) Remove any pending posts of callbacks and sent messages whose obj is token. If token is null, all callbacks and messages will be removed. Apr 20 00:03:36 yeah doesn't work Apr 20 00:05:40 *that works (null, null) doesnt Apr 20 00:11:31 of course Apr 20 00:11:39 it says what it does Apr 20 00:11:50 removes all instances of r if t is null Apr 20 00:13:09 is a runnable a message or a callback? Apr 20 00:16:48 technically its just an object that contains a block of code to be run Apr 20 00:17:16 when used in a handler it's added to the "message queue" Apr 20 00:17:37 but it's not technically a Message object Apr 20 00:17:56 lasserix: it's all there in the names removeCallbacks(Runnable r) ; Apr 20 00:18:10 https://developer.android.com/reference/android/os/Handler.html Apr 20 00:18:20 messages and runnables are handled differently by the handler Apr 20 00:18:58 How does a runnable have a object token? Apr 20 00:19:05 public final void removeCallbacks (Runnable r, Object token) Apr 20 00:19:09 o' Apr 20 00:20:29 it hasn't Apr 20 00:20:36 you can add it with postAtTime Apr 20 00:20:52 ? Apr 20 00:21:08 what is the Object token that is associated with a callback/Runnable r? Apr 20 00:21:11 oh yeah burntcookie90 is right Apr 20 00:21:37 it allows you to pair a runnable with a token so that you can access it later Apr 20 00:21:49 ie. removeCallbacks(r, token) Apr 20 00:22:01 how do you pair it? Apr 20 00:22:16 postAtTime(runnable, ) Apr 20 00:23:16 burntcookie90: you can just removeCallbacks(r). so probably in case of Runnables it's useful for remoceCallbacksAndMessages(token) only Apr 20 00:23:37 ahh i see thanks Apr 20 00:23:42 didn;t notice that before Apr 20 00:26:54 running out of maple syrup is like one of the worst things ever Apr 20 00:29:16 lasserix, I have 4 cans on my kitchen table. Apr 20 00:29:23 Never run out, man. Never. Apr 20 00:29:30 yeah, i've never used this stuff before, just extrapolating on docs Apr 20 00:29:40 you probably have grade c too right? Apr 20 00:29:45 not the processed bs Apr 20 00:29:53 lasserix: i feel like running out of sriracha is worse Apr 20 00:29:59 Dude, I'm from Quebec ;) Apr 20 00:32:13 i had to stop using srir because of the massiv amount of preservatives, much better to diy Apr 20 00:39:51 what do you guys do to increase AS memory? writing in the vmoptions file often gets overwritten when upgrading... annoying. Apr 20 00:43:22 testing 1-2, is this thing on? Apr 20 00:44:08 I don't know of any options beyond the vmoptions file (annoying that it's inside the package... meh.) Apr 20 00:44:31 I just found an environment var, going to test it out now Apr 20 00:45:31 your talk up yet? Apr 20 00:46:49 burntcookie90: is it just a proper name for 25% chili sauce? love that stuff =) Apr 20 00:48:46 is there a pattern to get ride of causal sentinels? Apr 20 00:51:59 lasserix, nope, just Jake's.... But I got some feedback... I scored a 2.3/5 :-/ Apr 20 00:52:06 Told you that it didn't go well :D Apr 20 00:52:15 oh no MikeWallaceDev :( Apr 20 00:52:26 what was the main take-away ? Apr 20 00:52:36 I gave free donuts. Apr 20 00:52:38 :D Apr 20 00:52:46 sorry, what do you mean? Apr 20 00:53:40 feedback - what went wrong ? Apr 20 00:53:54 oh. No words. Just the marks Apr 20 00:54:31 one of my friends was in the audience... so the marks were like 1,2,2,1,5,1,2 :D Apr 20 00:55:54 I don't feel too bad about it, I was proud to do as much as I did Apr 20 00:57:45 hmmm, I don't think that it's picking up that env var Apr 20 00:59:05 <_genuser_> yo yo ppeps Apr 20 01:00:40 MikeWallaceDev: hmm Apr 20 01:00:42 i wonder why Apr 20 01:00:49 guess have to wait till they put yours up Apr 20 01:01:09 Maybe they just thought spannables are boring and a waste of time? Apr 20 01:01:25 actually, no. That part of the revue got good marks :D Apr 20 01:01:55 It was just a fail. But I'm cool with it. I'll get'em next time Apr 20 01:04:27 tried this : export _JAVA_OPTIONS="-Xms2048m -Xmx2048m" Apr 20 01:04:32 didn't seem to work Apr 20 01:09:40 i would have considered a talk on BT but not enough time to prepare Apr 20 01:10:04 i think people have to talk about, what they really care about Apr 20 01:10:24 the oter day on reddit, somebody asked for topics to talk about ... Apr 20 01:10:32 i'm thinking, that person shouldn't be talking about anything Apr 20 01:11:08 oh, I liked my topic. But things just didn't pan out. Too many tech problems. Apr 20 01:11:41 MikeWallaceDev i didn't mean to imply anything about your talk - just brought that up Apr 20 01:11:52 hahaha, sorry :) Apr 20 01:11:58 i'm quite perfectionistic, so i would be terrified to give a shitty talk Apr 20 01:12:09 which in my case means, lots and lots of prep .. Apr 20 01:12:20 and things that wouldn't necessarily be easily googleable i suppose Apr 20 01:12:25 I thought you were inferring about the fact that I didn't know about Spannables before the talk... I know them now! :D Apr 20 01:12:47 no , no - sorry Apr 20 01:13:09 it's ok! It would have been appropriate. No worries. Apr 20 01:13:23 i'm also not sure , how many people really use the BT apis Apr 20 01:13:38 kinda niche area maybe Apr 20 01:14:05 well, those are the best talks... Apr 20 01:26:10 * zcm lets out a loud fart into #android-dev stinking up the joint Apr 20 01:26:54 * g00s lights match Apr 20 01:27:01 * zcm goes up in flame Apr 20 01:34:16 mmm ... can't code in java 'cause he's got no class Apr 20 01:37:55 capella no actually, he's a perfect java coder ... being a factory Apr 20 01:38:04 FartFactory, specifically :) Apr 20 01:38:16 Ah, well we need those things Apr 20 01:50:15 man as is soo slow now Apr 20 01:56:37 how can i get width of viewpager item? Apr 20 01:58:15 i want to apply negative margin which is gap of previous item and its child to next item Apr 20 01:59:04 lasserix i'm doing dev in vim this weekend; so refreshing :) Apr 20 02:00:14 yay! Apr 20 02:00:53 what's the best way to delegate each method of an object except for 1? i tried doing something like this: http://pastie.org/10102265 Apr 20 02:03:23 this is such a strange constructor https://docs.oracle.com/javase/7/docs/api/java/util/EnumSet.html#of(E,%20E...) Apr 20 02:03:36 i wonder why its not just 'E... rest' Apr 20 02:03:57 at least 1 arg Apr 20 02:04:34 ?? Apr 20 02:04:52 nah, some of the other methods allow for the possibility of empty set Apr 20 02:06:54 wonder if it has to do with type inference in vararg Apr 20 02:07:04 if it does, thats so lame :D Apr 20 02:07:50 how can i get width of viewpager item? Apr 20 02:09:41 I'm trying to get one app to open another app via intents. I get that I need to add another to my manifest, but Apr 20 02:09:55 What's the android:name of the new activity? Apr 20 02:30:49 how to get width of viewpager item? Apr 20 02:31:15 i want to know gap between item and its child. Apr 20 02:39:28 Leeds it took a little getting used to ... but minus the autocomplete, its the same wrt edit / compile / debug cycles Apr 20 02:39:59 pretty much do the same thing in AS ... build, oops ... 1 error fix that, build ... oops, 1 error fix that, build ... oops Apr 20 02:40:31 pretty much Apr 20 02:40:46 but with 10GB of memory free :) Apr 20 02:40:54 heh **** ENDING LOGGING AT Mon Apr 20 02:59:58 2015