**** BEGIN LOGGING AT Mon Aug 18 02:59:59 2014 Aug 18 03:00:44 all you can do is ask the system to install it for you - which will in turn ask the user to confirm they want to install it, and accept any permissions necessary Aug 18 03:03:05 how to start activity(3rd party or whatever) to view a pdf document? Aug 18 03:04:53 goodwin: conveniently, exactly the same answer as the last question - before you joined the channel :) "you can send a VIEW intent with a path to the [pdf] as the data component" Aug 18 03:05:48 L is finally getting native pdf support Aug 18 03:05:50 you should reference your quotes ;) Aug 18 03:06:24 bankai_au: nah, I believe strongly in taking credit for other people's work Aug 18 03:06:45 http://www.youtube.com/watch?v=UQHaGhC7C2E Aug 18 03:06:53 goodwin: you can use webView to open pdf's webView.loadUrl("http://docs.google.com/gview?embedded=true&url="+ pdfUrl); Aug 18 03:08:18 doh! he didn't see the answers Aug 18 03:08:21 i wonder how much memory that requires Aug 18 03:08:55 oh... just ask and leave, huh ? rude! Aug 18 03:09:40 well, he timed out, rather than leaving, so could have been a network thing... Aug 18 03:11:52 from now on, I'm not going to answer any questions unless they've been asked at least 3 times within a 5 minute period, just to prove the asker is active Aug 18 03:12:31 Leeds: I'll remember to ask 3 times when I have a question ;) Aug 18 03:15:29 lol Aug 18 03:18:45 i read somewhere, google was going to release some native help APIs - maybe a rumor, its been a while. anyone know anything about that ? Aug 18 03:19:55 kinda lame going to the browser Aug 18 03:26:49 I know they said they were going to move to native help screens for their own apps... Aug 18 04:57:34 Hi sarbs|away Aug 18 05:19:42 Hi sarbs Aug 18 05:19:49 you there now? Aug 18 05:25:24 Yesterday While trying to debug a small application in ADT it worked fine with breakpoints. I got a green color bar on the breakpoint selected and also the values were shown as per required Aug 18 05:26:03 but for another app while I am trying to do the same it does not show up any green color bar on the breakpoint line and neither values Aug 18 05:26:09 what could be the reason? Aug 18 05:27:02 are you executing the 'debug' and not 'run' configuration? will it hit that breakpoint in normal execution ? Aug 18 05:27:28 debug Aug 18 05:27:38 I am using debug as->android app Aug 18 05:27:40 niru hyello Aug 18 05:28:20 you are in eclipse or intellij/android studio? Aug 18 05:28:48 sarbs: on ADT Aug 18 05:29:30 adt standalone? Aug 18 05:29:36 yes Aug 18 05:29:44 I mean it has eclipse in it Aug 18 05:29:48 never tried to debug thru that with standalone Aug 18 05:30:06 so you set a bp and it just doesn't stop there Aug 18 05:30:13 Is google maps api source code somewhere visible? Aug 18 05:30:14 yes :( Aug 18 05:30:26 i assume you're attached to the correct process, and you have the correct source code loaded for the app? Aug 18 05:30:28 lasserix no Aug 18 05:30:39 google maps is closed-source Aug 18 05:36:43 What version of Google Play services should I be using? I have 5208000 by default but Playstore is asking me to use 5100000 Aug 18 05:41:53 donniezazen sounds like you're simply building with a newer version of the SDK than the play services that's installed on the device Aug 18 05:43:19 i am trying to import a jar file to my project and use its classes. 1. place the jar file xx-rc2.jar inside the app/libs/... 2. sync project ith gradle files 3. in my project file MainActivity.java i import the class within the jar file saying import xx-rc2.myClass; Aug 18 05:43:28 and this gives me error, what am i doing wrong here ? Aug 18 05:44:01 donniezazen: had the same exact problem yesterday Aug 18 05:44:13 5089000 Aug 18 05:44:15 use that one Aug 18 05:46:34 lasserix: that goes in. Android Studio - build.gradle(app) dependencies {compile 'com.google.android.gms:play-services:5.0.89'} and does that also go in android:value="@integer/google_play_services_version" /> in Manifest. Aug 18 05:47:45 lasserix: @ me ? Aug 18 05:52:44 lasserix: Manifest of google play services library of my system says android:versionCode="5089000". Aug 18 05:58:43 If I do not want to send emails using third party apps, is there any way that I can do the same from my application itself? Aug 18 06:05:01 Layout preview shows error "The following class could not be instantiated: com.google.android.gms.ads.AdView." Also banner ads show up in 60000 ms. How do I resolve this issue? Aug 18 06:08:50 http://pastebin.com/NTQ6Fa02 will this work? Aug 18 06:17:41 hi, what should I use to present to user some kind of popup-dialog with single selection list? Aug 18 06:21:46 sarbs: you there Aug 18 06:21:52 http://pastebin.com/NTQ6Fa02 will this work? Aug 18 06:22:34 last time I used a LinkedHashMap and it worked fine. But for JSONobjects I dont know how to get both the labels in a list view Aug 18 06:23:15 niru i'm not sure what the goal is, but it looks like it should compile Aug 18 06:23:41 i'm curious why you keep gravitating toward JSONObject, instead of something more strongly typed like a HashMap Aug 18 06:24:08 in all my life i've never used a JSONObject Aug 18 06:24:44 unless you're specifically consuming JSON data of course.. but if you're just looking for a container class, there are far, far better ones to use Aug 18 06:25:01 sarbs: sorry then I have pinged a wrong person assuming the person who knows very well about jsonobject name satarts with s... Aug 18 06:25:23 well i remember you trying to work out some adapter stuff Aug 18 06:26:07 but it seemed at the time like you were using JSONObject as just a generic dictionary, instead of loading data from a service via json Aug 18 06:33:01 sarbs: hmm no i was trying many ways and suddenly when it started working with LinkedHashMap it seemed everything was working but actually they were static :( Aug 18 06:33:30 what was static? Aug 18 06:33:48 I have jsonobjects in a service file and have to access those jsonobject in another UI file to get a list view Aug 18 06:34:24 I mean by mistake I made the function to be static Aug 18 06:34:49 and also my group does not want the linkedhash map they want the jsonobject only to be used Aug 18 06:38:56 compiled and launched the app with the emulator without any errors - when opening the application the system exists the application.. event log and logcat does not show any error... hwo to debug this ? Aug 18 06:39:10 am i looking in the wrong place ? Aug 18 06:39:49 solofight: doesnt breakpoint help?" Aug 18 06:40:07 halps. my app is basically just a BroadcastReceiver that gets triggered when the charger is connected/disonnected. however due to internal framework changes this doesn't work on kitkat. what are my options/alternatives to still be able to receive relevant broadcasts? Aug 18 06:40:14 set a breakpoint and try debugging to get if output are showing up in values Aug 18 06:41:06 niru: trying out now - thanks Aug 18 06:42:02 ahh, why do i need intnernet permission for monitoring accel values ! Aug 18 06:42:10 logcat shows me that as error Aug 18 06:42:38 i followed this http://webtutsdepot.com/2011/08/20/android-sdk-accelerometer-example-tutorial/ niru Aug 18 06:45:32 solofight: did u add those permissions in AndroidManifest file? Aug 18 06:45:57 niru: just did, but earlier omitted thinking that the blogger is misleading me Aug 18 06:46:24 solofight: no u need to add the services that you use in AndroidManifest file Aug 18 06:46:26 defies my commonsense - why would monitoring accel values need internet Aug 18 06:47:58 solofight: that is not for accel Aug 18 06:48:50 niru: ohh for the android schema in main.xml ? Aug 18 06:49:12 niru: i added the internet permission and executed the code and i get this Network error from logcat http://pastebin.com/9pyV5uhW Aug 18 06:50:56 you're getting NetworkOnMainThreadException, that should be pretty self-explanatory Aug 18 06:51:16 * solofight reads about the exception Aug 18 06:52:30 I would think the name says it all Aug 18 06:53:14 you are not allowed to do potentially blocking networking in main thread Aug 18 06:53:52 we discussed this already. In detail. Aug 18 06:54:36 wrong thread sorry. Aug 18 06:55:08 ravilov: got it, i was trying to establish a socket connection - i think thats why the error Aug 18 06:55:21 solofight: did u check everything like AndroidMainifest file should have your app name,Layout is that correct as seen from graphics view,and code? Aug 18 06:55:43 solofight: not thats not the error. Its where you're trying to do it. Aug 18 06:57:36 read this : http://www.androiddesignpatterns.com/2012/06/app-force-close-honeycomb-ics.html Aug 18 06:57:51 covers why you dont do stuff lik that on mainui thread. Aug 18 07:04:52 so... nothing on my issue? Aug 18 08:32:01 Is there a way I can use stuff defined in a layoutfile in another layout file? Aug 18 08:32:24 http://developer.android.com/training/improving-layouts/reusing-layouts.html Aug 18 08:32:37 thanks Aug 18 08:32:47 offical docs Aug 18 08:32:49 :) Aug 18 08:35:57 crap... not sure if i can use that :/ Aug 18 08:37:38 Syzygy, Aug 18 08:37:55 er, yeah, that link Aug 18 08:57:09 been having serious error since friday, all my effort to resolve it is not working.. please any one to help Aug 18 08:57:46 I want to capture the database ID for a particular product display on gridView Aug 18 08:57:48 hackable: have you tried turning it off and on again? Aug 18 08:59:06 ah... there was a question... seems a big of a mixture though Aug 18 08:59:13 hackable: you mean you want to get to the data that it was setup with ? but yeah, turn off and on Aug 18 08:59:14 onItemClick(AdapterView parent, View view, int position, long id), need to capture the product_id Aug 18 08:59:26 position <---- Aug 18 08:59:31 quick question guys, I'm running a high traffic web site which has an android app interface (basically just a webview with a few features added). The server seems to be sending a lot of HTTP status 304 (file not modified) responces for web fonts despide the caching directives being set correctly. Could the webview in Android not be honnoring caching properly? (I found the following in Androids SDK: "For obvious security reasons, your application Aug 18 08:59:48 myDataThatDrivesIt[position].getId() Aug 18 09:00:05 does this mean that the cache is destroyed when the activity is destroyed? Aug 18 09:00:08 hackable: myDataView.setTag(itemId) in getItem Aug 18 09:00:12 position give the Position on the gridview... i need product id Aug 18 09:00:16 then you can access it from everywhere Aug 18 09:00:37 hackable: yes, but it' the position index of the data that drives the grid Aug 18 09:00:43 you know, all the things you put in Aug 18 09:00:51 like id,image or whatever it is Aug 18 09:01:16 Thanks StingRay, can understand how to implement your solution Aug 18 09:01:45 it's not my solution, it's just the way it is, I would suggest looking over some tutorials onItemClick stuff cause most will mention it Aug 18 09:01:47 myDataThatDrivesIt[position].getId() and myDataView.setTag(itemId) in getItem Aug 18 09:02:36 myDataThatDrivesIt --> represent the parent or what? Aug 18 09:02:50 what data did you put into the adapter? Aug 18 09:03:03 that uses the gridview to show it's data Aug 18 09:03:12 list of products I assume ? Aug 18 09:03:19 array/list? Aug 18 09:03:40 hold on, let me copy the whole code into pastbin Aug 18 09:03:44 seconds please Aug 18 09:03:51 no, just say what data drives the adapter Aug 18 09:03:58 no need for a pastebin Aug 18 09:04:18 unless you dont understand what you have done, or how it all works, then we have probs :) Aug 18 09:05:28 what drives the adapter is SQLite Aug 18 09:05:41 so a cursor ? Aug 18 09:05:53 BaseAdapter Aug 18 09:06:01 yes... Aug 18 09:06:22 Cursor c = db.query(//statement) Aug 18 09:07:07 pass the data from the database into the adapter... Aug 18 09:07:16 so position relates to the row Aug 18 09:07:32 you sure? Aug 18 09:07:32 so if you have a method like returnRawData(int position) Aug 18 09:07:36 in the adapter Aug 18 09:07:59 then you can say, getRawItem(int position) and just return that row from the cursor Aug 18 09:08:33 so in the adapter the create a method, returnDataAtRow(int row) Aug 18 09:08:52 in that, mCursor.moveToPosition(row) Aug 18 09:09:01 then get the data and return as whatever Aug 18 09:09:11 make sense ? Aug 18 09:09:17 * StingRay_ goes for coffee Aug 18 09:10:08 Thanks but not really clear.. do you mean i can get the position from the parameters --> onItemClick(AdapterView parent, View view, int position, long id) Aug 18 09:10:45 ok pasteBin your adapter Aug 18 09:10:53 okay, thanks Aug 18 09:10:57 I'll do it as an example for you to look at Aug 18 09:10:59 tis easier Aug 18 09:12:26 is there any requirement for tracing threads of apps (not flagged as debugging) ? i can see them on my S4 but on other phone like LG it wouldnt show threads in the monitor tool of the sdk Aug 18 09:12:30 StingRay --> http://pastebin.com/s5dt58T7 Aug 18 09:12:55 http://pastebin.com/s5dt58T7 Aug 18 09:13:53 no the adapter Aug 18 09:13:59 BaseAdapter with cursor Aug 18 09:15:00 okay.. upload it now Aug 18 09:15:05 http://pastebin.com/QJbWA2dj Aug 18 09:15:09 that's the adapter Aug 18 09:15:34 ok this is not driven by a cursor Aug 18 09:15:46 tis ArrayList <--- Aug 18 09:16:17 Oh okay... Aug 18 09:16:35 so to get the item you simply yooBaoBank.get(position) Aug 18 09:16:48 and you are done Aug 18 09:17:36 return the product_id from database? Aug 18 09:17:59 no that gives you the entire object in the arrayList Aug 18 09:18:02 everything right ? Aug 18 09:18:06 i'm sorry, i'm new to android Aug 18 09:18:17 most of this is nothing to do with android Aug 18 09:18:32 You know the ArrayList data that drives the adapter Aug 18 09:18:51 i need to get the product_id and pass it to another activity to display the full information about the product.. that was my intension Aug 18 09:19:17 Yes.. Aug 18 09:19:18 ArrayList yooBaoPowerBank; Aug 18 09:19:23 yes well position in the onClick is the position in the array of the orional data Aug 18 09:19:35 has anybody used MediaCodec to extract audio from an mp4 file? I am doing it but it is VERY slow. Does anybody has suggestions on how to do this? Is MediaCodec what I really want to use? Aug 18 09:19:53 i've method get item in the adapter ---> getItem(int position) Aug 18 09:20:06 yes, now in the onclick Aug 18 09:20:19 the "position" it gives you is the position in that arrayList Aug 18 09:20:38 so you can reference it to get the object there …and I assume that has all the info you need Aug 18 09:21:01 android-valder: just use ffmpeg? Aug 18 09:21:38 you mean as an executable? Aug 18 09:22:31 I think as an NDK library Aug 18 09:23:27 hackable: I assume (not knowing what your data object structure is) that if you put this ; ymList.get(position).getProduct_id(); in the onItemClick it gets you what you want Aug 18 09:23:39 but you should really understand ArrayLists and such Aug 18 09:25:01 Estel: I have it compiled via the NDK, I'm just surprised Android's media capabilities is not as advanced as I had thought. on iOS this is done fairly easily with AVFoundation. I shouldn't have to go down to the NDK level to extract audio from an mp4 file in a quick manner. Don't you think? Aug 18 09:25:22 Estel: can you guide me in jsonobject? Aug 18 09:25:37 Estel: besides, I was hoping for a Java-only solution. Aug 18 09:28:02 hello StingRay Aug 18 09:28:06 still there..] Aug 18 09:28:20 http://pastebin.com/7YB7aMnp this code of mine works fine when jsonobject is in the same file Aug 18 09:28:48 hackable: I assume (not knowing what your data object structure is) that if you put this ; ymList.get(position).getProduct_id(); in the onItemClick it gets you what you want Aug 18 09:29:02 but you should really learn about arrays and lists and such Aug 18 09:30:07 Actually, i've use that once but not giving the right id --> ymList.get(position).getProduct_id(); Aug 18 09:30:25 niru: manifest has name of my package, layout as in design and text both match with each other Aug 18 09:30:31 well it gives you whatever you put into it, no exception Aug 18 09:30:34 actually, i used cursor.moveToNext() when looping through all the data in the database Aug 18 09:30:52 if at position 20 you set the id to 193 from the data in the database, thats what you get Aug 18 09:31:15 rgr: i am not trying to open a URl but connect the simulator using sensorManager.connectSimulator(); Aug 18 09:31:22 Estel: thanks though. :) Aug 18 09:31:25 Alright. Let me implement and see what it give. Thanks be right back Aug 18 09:31:31 does this also fall under the same error category ? Aug 18 09:39:14 ok il repeat the question.. i got an Network error from logcat http://pastebin.com/9pyV5uhW Aug 18 09:39:28 i am not trying to open a URl but connect the simulator using sensorManager.connectSimulator(); Aug 18 09:39:34 is this because of this reason ? Aug 18 09:39:50 do i need to use AsyncTask for this purpose ? Aug 18 09:40:57 StingRay--> you there! Aug 18 09:41:14 why, then I will tell you Aug 18 09:41:25 hey guys Aug 18 09:41:34 my source code is here http://pastebin.com/rLQRF77Y Aug 18 09:41:46 Not giving the right product_id, i've to minus 1 from the supply number Aug 18 09:41:48 i got a question about static fields in a class Aug 18 09:42:06 do they get initialized when the application gets initialized, or when you make your first call to that class? Aug 18 09:42:10 onItemClick return 2 for a product with id 1 Aug 18 09:42:36 after implementing ymList.get(position).getProduct_id() Aug 18 09:43:09 The first product is 1 but when i click on it, it give 2 Aug 18 09:43:50 hackable: thats not implementing, thats called pasting ;) this all means the way you are constructing the info is wrong, and you maybe need to track that down Aug 18 09:44:19 product_id is irrelevant, the click position is an array [0-n] Aug 18 09:44:26 you control the entries there Aug 18 09:45:11 you should learn about arrays + adapters + listviews in android, there are many good tutorials Aug 18 09:45:29 oh okay. Thanks! Aug 18 09:46:13 i'm grateful! Aug 18 09:46:31 cause onItemClick's position is the same position it used for getView(position) in the adapter, and you control the info that getView returned Aug 18 09:47:18 also debug that array/object/position to see if you are stroting the data wrong, like also return the name, image etc Aug 18 09:47:27 Now, i know where the problem is coming from Aug 18 09:47:32 good Aug 18 09:47:34 :) Aug 18 09:47:48 i added mGridView.addHeaderView(header); Aug 18 09:48:04 there ya go Aug 18 09:48:06 the GridView is counting the header as 1 Aug 18 09:48:15 then the next product will be 2 Aug 18 09:48:26 so removing it now, it gave me the right product_id Aug 18 09:48:50 as long as it is a known constant there is no bother in doing position-1 Aug 18 09:49:22 yes.. Thanks! Aug 18 10:15:00 Hi! I have an activity with a couple of fragments, switching between them with a viewpager. Switching the fragments (with swiping) works buttery smooth until I swipe to a fragment that holds datepicker. It gets choppy. Also the spinners on the datepicker dont work very smooth. I run it on an SGS3. Is that a bug/issue? Maybe I did something wrong? Aug 18 10:15:50 MapMan: is anything happening in your spinneradapter? Aug 18 10:16:17 no, nothing, it's just a layout file and the fragment code is pretty much empty, default constructor and stuff. Aug 18 10:21:40 is everybody busy or am i asking a stupid question ? Aug 18 10:22:13 if i am missing anything basic, please point me to the right direction to learn about it please Aug 18 10:23:15 Can i use any email to register google maps API key ? Aug 18 10:23:25 solofight: seems more like people are busy ;) chill Aug 18 10:23:35 also irc isnt instant help chat Aug 18 10:23:48 solofight: also questions like "do i need to use AsyncTask for this purpose ?" erm...yeah Aug 18 10:23:52 MapMan: oh ok, but i have been here since morning Aug 18 10:24:08 monday Aug 18 10:24:19 StingRay_: ok thank you Aug 18 10:24:21 and the other question the pastebin was invalid, AND its too specialised for many I think Aug 18 10:24:23 MapMan: :) Aug 18 10:24:39 Or email should be the same as in Developer-console ? Aug 18 10:24:40 no I dont mean "Yeah" is the answer Aug 18 10:24:50 I mean … it's a bit of a pointless one Aug 18 10:24:56 solofight: Aug 18 10:25:28 StingRay_: am just starting to learn development, a yes will mean that i am in the right direction of learning things :| Aug 18 10:25:35 thanks for the reply Aug 18 10:25:39 your question resolved is "do I need a mechainism to run some specialised part of my code off the ui thread" ? Aug 18 10:26:10 well how does anyone know that… it's 50% context and 49% design logic that tell you that Aug 18 10:26:25 unless you get exceptions for it, then no you dont "need" to do anything Aug 18 10:26:30 should you is another matter though Aug 18 10:27:33 but to speculate on if you should requires more understanding that many will be bothered with about your use case :) Aug 18 10:28:20 the shorter and more precise my questions (taking away speculative context) the more likely I am to get answers from some of the pros here Aug 18 10:28:24 or thats what I have found Aug 18 10:28:31 For String data the arrayadapter used is ArrayAdapter similary for getting an object what is the syntax.Can i get some example links? Aug 18 10:29:06 niru: erm Aug 18 10:29:33 solofight, this is not exactly a helpdesk channel, more like discussion Aug 18 10:30:34 also not the best place for noobs, for them there are plenty enough much more appropriate places out there, such as tutorials and guides Aug 18 10:30:45 niru: If I could go back I would not bother with anything other than learning to do anything and everything with BaseAdapter though Aug 18 10:30:56 thats my advice to me 2 years ago Aug 18 10:30:58 StingRay_: thanks for the time Aug 18 10:31:03 ravilov: thank you Aug 18 10:31:58 StingRay_: so I should be using BaseAdapter? Aug 18 10:32:35 I have no idea, but if I were you, talking to me, from 2 years in the future, then I would say yes 99% to past me Aug 18 10:32:36 :) Aug 18 10:32:53 StingRay_, good luck with that time machine :p Aug 18 10:33:02 StingRay_: thanks I am trying it now Aug 18 10:33:21 niru: tis not something you try, you implement your own baseAdapter Aug 18 10:33:24 to do what you want Aug 18 10:33:26 :) Aug 18 10:34:35 StingRay_: why dont you prefer arrayadapter? Aug 18 10:35:22 well I probably would for a list of strings Aug 18 10:35:29 but not for anything else Aug 18 10:35:40 baseAdapter is the base of adapters for android Aug 18 10:35:51 and nice starting point to do with what you want Aug 18 10:36:00 StingRay_: I was also using it for a list of Strings Aug 18 10:36:29 But now I have to display some data present in an object in a list view.Now can you suggest what can i do? Its a jsonobject Aug 18 10:36:43 baseAdapter Aug 18 10:36:44 :) Aug 18 10:37:07 thana: StingRay_ :) Aug 18 10:37:18 mySpecialJSONAdapter extends baseAdapter :) Aug 18 10:38:19 aargh. Forget the json adaptor. You just retrieve the data from the json object and display it like any other other data - you dont need to overcomplicate things by constantly worrying about "jsonobject" which you are struggling with. Retrieve the data from the json object and poopulate your list view. Aug 18 10:38:40 poopulate ... an apt word... Aug 18 10:40:41 a jsonobject could well hold fields which are then in turn objects with more key field pairs. Its not a one to one list mapping. But assuming its just one object with "flat" fields then its easy for you. Aug 18 10:43:12 rgr: Yes but my worry is this http://pastebin.com/srXdNLs5 Aug 18 10:44:19 rgr: I want to access the data present in one file in another file and display in a list Aug 18 10:44:23 Why is your "connector" extending an Activity? Aug 18 10:44:47 that makes no sense "access data in one file in another file" Aug 18 10:45:07 I want to "secure" my service via a custom permission, and I am doing it with enforceCallingOrSelfPermission(...) - but I don't want my service to crash if the calling app does not has the permission, but the app itself. What am I doing wrong? Aug 18 10:45:11 yes thats not required Aug 18 10:45:25 whats not required? Aug 18 10:45:41 Activity Aug 18 10:49:28 Right. And is SO horrific it suggests you're in trouble. Take a step back. Draw a picture. Model it. Use Log.d not system.out. Remove all your try/catches : this is REALLY bad practice if you're not bothering to use the debugger and step through and/or log exceptions. Aug 18 10:49:30 Hello friend... thinking of setting bottom shadow to ImageView in android layout.... Aug 18 10:49:33 Hello friend... thinking of setting bottom shadow to ImageView in android layout.... Aug 18 10:50:11 Also layout your code properly. Its nigh on unreadable. Use the format code facility in your IDE if you cant. Aug 18 10:52:00 Also why are you setting the adaptor for each and every "form". main_page.setAdapter(adapter); Its a mess and thats it from me : you need to step through your code and do some work yourself including take a step back and reading your own code. Aug 18 10:52:47 ok Aug 18 10:55:41 and stop wrapping everything in try/catch.... or you wont see your crashes unless you print the stacktrace or log properly ... even then the way you're using them is as defensive strategy against bugs caused by sloppy coding - not good or recommended. Aug 18 11:00:17 K.O. Aug 18 11:21:52 Can't immediately find it, what directories does G+ Autobackup automatically... backup? Aug 18 11:23:46 would not have thought that it did directories Aug 18 11:24:08 more content that is indexed/cat through media provider….but guessing Aug 18 11:24:12 view.getId() == R.id.same_view, I assume this will be true. but can I also do inflatedView.getId() == R.layout.layout_that_was_inflated ? Aug 18 11:25:01 no Aug 18 11:25:07 Syzygy: not sure if this is true, but I seem to remember any ROOT view is not id'd Aug 18 11:25:16 view id != layout id Aug 18 11:25:36 ravilov, can i get the layout id somehow? Aug 18 11:25:52 Syzygy, not from the view hierarchy Aug 18 11:26:04 oh layout id Aug 18 11:26:19 * StingRay_ needs more coffee Aug 18 11:26:28 and running out of milk :( Aug 18 11:26:28 ah, luckily my root layout doesn't have an ID yet, so I can simply set an id and be done with it Aug 18 11:26:54 tag_tag ... best id Aug 18 11:26:55 yes, roots of inflated view hierarchies usually don't have an id Aug 18 11:27:33 even if a view had an ID, you can always assign it a different ID Aug 18 11:28:17 yeah. Aug 18 11:29:08 well http://developer.android.com/reference/android/provider/CalendarContract.RemindersColumns.html#MINUTES_DEFAULT clearly didn't work... Aug 18 11:32:00 Any thoughts on openGL ES 2 vs openGL ES 3.0? I see the 3.0 requires specific HW support on devices in addition to 4.3+ Android API. Aug 18 11:32:08 (other than the obvious "smaller target audience" obviously) Aug 18 11:37:22 rgr: is it not more down to function/feature requirements ? Aug 18 11:39:07 I'm just fishing for anything you might know from experience of using them. Since my "app" wont be aimed at huge diverse ranges I'm thinking I may as well embrace the 3.0 spec from day one. But if the benefits are so tiny compared to 2.0 then maybe not. All pie in the sky high level thinking at the moment rather than a need for any specific advance. Aug 18 11:40:08 I have an alarming question, I'm getting all manner of crash reports from thigns that should not crash at all, and things/classes that are even disabled!!! The device has a fake id and is an emulator on 4.1 … this someone attempting to hack my app apart then ? Aug 18 11:41:31 probably just run it in an emulator or something Aug 18 11:41:47 rgr, OpenGL ES 3.0 is an incremental upadte Aug 18 11:41:59 rgr, so your code will not be different Aug 18 11:42:09 you will just have access to some more extensions and OGL calls Aug 18 11:42:38 is ES based on OGL 2.0 or 3.0+? Aug 18 11:42:39 remember, you could use OGL 3.0 stuff before it was even released using OGL 2.0 APIs and extensions :) Aug 18 11:42:47 Syzygy, it's a subset Aug 18 11:42:55 of 2.0 or 3.0? Aug 18 11:43:10 since it was pretty much reworked between those two versions Aug 18 11:43:20 Syzygy, no, I should be clearer: OpenGL ES is subset of OpenGL, but the versioning doesn't really match Aug 18 11:43:30 ok Aug 18 11:43:36 Syzygy, note that even within same platform you don't have clear differences Aug 18 11:43:52 since OpenGL is a standard and vendors can and DO add new externsions which are later adopted as part of standard Aug 18 11:43:57 Syzygy: ES1 is pretty much GL1.4, ES2 I think went for the core profile in 3.0?, ES3 is more of an incremental update Aug 18 11:44:11 alright, I understand Aug 18 11:44:19 rgr, so unless you exactly know which ES 3.0 extensions you need you should stick to ES 2.0 and switch later :) Aug 18 11:44:46 Mavrik: yeah, that's what I was coming around to. There's a lot to learn. Aug 18 11:44:56 Syzygy: the important thing to remember with GLES is that 1.x = fixed pipeline, >=2.x = shader only Aug 18 11:46:12 which is the main difference I noticed between OGL 3.0 and earlier versions Aug 18 11:46:22 So.. the usual Q ... what book/tutorial would you recommend over the others? There are a good few around. Nice to see the Android OGL guides are a lot fruitier than a short while back too. But the Dan Ginsburg one seems to the be the "bible". Aug 18 11:46:57 hmm Aug 18 11:47:07 most of the OpenGL books are rather shit because they're obsolete Aug 18 11:47:19 if anything tells you to use "glBegin()", throw it away and start again Aug 18 11:48:09 and OpenGL ES 2 for Android: A Quick-Start Guide is well received but I tend to prefer to stay clear of the "platform specific" ones as I find too much space taken up with basics of, in this case, Android, as opposed to the meat of the subject. Aug 18 11:48:34 The Ginsburg one I mentioned above is aimed at ES. Aug 18 11:50:01 (just as an aside as I move my coordinate system to floats : why TF doesnt java implicitly convert something like 0.0 to 0.0f?) Aug 18 11:50:47 So what is the best way to handle navigation in a modern app. I'm used to activities that has xml-layout and then you can switch te activity with an intent. Fragments, navigation drawers, seems quite a mess, with totally different app logic than before. In any languages has simple menus seemed so complex. Googles effective navigtion example crashed. Any real examples around with more than dummy content inside fragments? Aug 18 11:53:34 Mavrik, you seem like a knowledgeable person so you might know this - my app is a simple BroadcastReceiver for "power plugged in" and "power disconnected" broadcasts, and that works nicely except in kitkat where they decided android.permission.BATTERY_STATS is unsafe and no app should have that perm. what are my options now, is there any other way to get the plug/unplug events? Aug 18 11:55:02 (I asked this earlier but got zero responses) Aug 18 11:57:29 ravilov, what's wrong with ACTION_BATTERY_CHANGED? Aug 18 11:57:35 ravilov: I googled just of interest. I'm sure you did too : but just in case you missed this one - it seems you will need a priviliged app status from KitKat on: https://groups.google.com/forum/#!topic/android-platform/f-7Td9aeFKY Aug 18 11:58:40 yes, privileged status, which in my case is not an option Aug 18 11:59:54 Mavrik, isn't that triggered with *any* change in battery status, not just power plugged/power unplugged? also wouldn't it require the same perm that I still cannot obtain? Aug 18 12:00:25 Mavrik, also: "You can not receive this through components declared in manifests." Aug 18 12:00:35 which is precisely what I need Aug 18 12:00:55 yes it's triggered with any change. Aug 18 12:01:01 how can i completely disable any png crunching by android studio build? Aug 18 12:01:01 yes it has information you need Aug 18 12:01:04 my app is largely dormant and only gets activated specifically in case of one of those events Aug 18 12:01:31 no you do not need BATTERY_STATS permission. Aug 18 12:02:20 Mavrik, well it looks like it won't work for me, I can only use it dynamically and not through manifest, and it seems excessive to trigger my app with just /any/ battery change Aug 18 12:02:27 the former is by far the bigger issue Aug 18 12:02:45 well Aug 18 12:02:55 what do you want me to say :) Aug 18 12:03:04 that's the API that's meant to be used for your usecase Aug 18 12:03:14 hm Aug 18 12:03:17 well that's just dumb Aug 18 12:03:22 why in the world would they do that?! Aug 18 12:03:34 what is so unsafe about having access to battery/power stats? Aug 18 12:03:55 the perm used to be of level "dangerous" which I can't understand either Aug 18 12:04:06 now it's "signature|system" Aug 18 12:04:26 I mean seriously, that's just ridiculous Aug 18 12:04:36 and then people wonder why I feel android is going downhill Aug 18 12:05:27 xorgate: look up raw assets I think it is. Aug 18 12:05:58 Mavrik, so in the end, I can subscribe to a different broadcast that gives me far more information but is somehow NOT deemed unsafe, yet I can't subscribe to this simple one because it's unsafe? did I get that right? Aug 18 12:06:09 Dude. Aug 18 12:06:13 I didn't design the API. Aug 18 12:06:21 I'm just making sure I got it right Aug 18 12:06:38 also aapt can turn it off : http://stackoverflow.com/questions/12929884/disable-android-resource-image-png-optimization Aug 18 12:06:53 xorgate, anything in raw will not be processed Aug 18 12:07:06 yeah but i'm talking about res/ Aug 18 12:07:13 the concept seems just ridiculous and I need to make sure it really is NOT a nightmare Aug 18 12:07:31 https://www.youtube.com/watch?feature=player_embedded&v=3vI_7os2V_o Aug 18 12:07:35 xorgate, everything in res/ is to be considered "special" Aug 18 12:07:48 and can only be accessed in quite a specific way Aug 18 12:07:56 accessed/used* Aug 18 12:08:45 xorgate, res/raw. Aug 18 12:08:50 the closest you can get to is res/raw/ but that might be limited too Aug 18 12:08:51 look it up :) Aug 18 12:08:55 bah Aug 18 12:09:01 nevermind Aug 18 12:09:41 yeah that wont work for me.. i still want resource-dependent graphics Aug 18 12:09:56 what do you mean by that Aug 18 12:10:01 raw can also have suffixes Aug 18 12:10:28 i want to be able to say R.drawable.blah Aug 18 12:10:35 yeah no Aug 18 12:10:47 there is no way to do what you want Aug 18 12:11:36 xorgate, android "drawables" just happen to be stored as PNGs but you shouldn't really count on that Aug 18 12:12:04 to you as a dev, it should be more of a black box, an abstract "drawable" Aug 18 12:12:37 As a dev he also wants to be able to stop Android munging his stuff. Aug 18 12:13:14 not possible the way he wants Aug 18 12:15:09 you want the R.drawable.blah to be the actual Drawable? Aug 18 12:16:01 or did I misunderstand Aug 18 12:16:53 if I got it right, he just wants his PNGs to not be post-processed by the compiler/builder Aug 18 12:17:25 why though Aug 18 12:17:35 dunno Aug 18 12:18:13 android drawables are stored as png ? as in bitmaps ? thats false, or did I miss something :) Aug 18 12:18:34 bitmaps are stored as bitmaps , a drawable can be any number of things Aug 18 12:18:50 xorgate: can you get away from using static bitmaps ? Aug 18 12:19:20 use nice shapes and fills and shaders and gradients and strokes :) Aug 18 12:24:36 StingRay_: yeah, thats not gonna work :0 Aug 18 12:24:49 unless you make a png->drawable converter Aug 18 12:24:59 which might just make a drawable with x*y elements :0 Aug 18 12:25:22 so these assets are not definable as shapes? Aug 18 12:25:32 it's just bitmaps Aug 18 12:25:43 oh Aug 18 12:25:43 anyway my q is, how can i let gradle not touch them at all Aug 18 12:26:02 gradle touches them ? Aug 18 12:26:10 compresses or something ? Aug 18 12:26:25 I posted a link showing how to stop them being crunched. Aug 18 12:27:03 not sure if thats exactly what you mean. But it seems to be in the right direction. Aug 18 12:27:10 well i did look around, and there's 2 things apparently, a cruncher that does not recognize when a file is not smaller than the original, and one that does. I want it to not happen at all Aug 18 12:27:23 (at packaging time I assume) Aug 18 12:31:46 if all else fails, raw them :) Aug 18 12:36:37 hello friend.... Aug 18 12:36:52 how are you StingRay.. thanks for your previous assistance.... Aug 18 12:37:02 np Aug 18 12:37:05 please i'm having problem loading the url on page view Aug 18 12:37:11 link here ---> http://pastebin.com/Uuev2Ku1 Aug 18 12:37:31 i don't know what happen, it works before... but now, not working Aug 18 12:37:49 webview, dont use and never touched, sorry Aug 18 12:38:36 Oops! Aug 18 12:38:47 anyone out their to HELP Aug 18 12:39:11 I'm maintaining a map of "debug" key value pairs in my app. I want to update a view every second or so with the contents in a bunch of 2 column textview rows. Whats the best or simplest approach and view type and "attached data source" would you suggest I research and implement?) Aug 18 12:39:14 WebView Problem ----> Not loading, please help http://pastebin.com/Uuev2Ku1 Aug 18 12:39:35 hello , i have TextView , and my String is mostly Left-To-Right English Text. but in the middle i have some line's which is Rtl language . how can set Text View to show all String Ltl strictly ?? i hope i was clear . Aug 18 12:39:41 Is there a way for a gridlayout to automatically find wrap to the next line when I add elements? Aug 18 12:39:57 depending on the screensize Aug 18 12:42:00 actually, nevermind, I guess it's better to display the same number of elements regardless of screensize Aug 18 12:42:47 Syzygy: really ? I would want it changed on orientaion chage too Aug 18 12:42:57 and differet on my tablet Vs phone Aug 18 12:43:43 but that's different, you fix that in xml Aug 18 12:45:08 that view isn't supposed to react to orientation changes ... not sure how to handle tablets though ... i thought i might just scale it up accordingly, but i guess that's not ideal Aug 18 12:45:48 in that case... with a gridlayout that I didn't give a column or row count, how do i make it wrap once the elements I added hit the edge of the screen? Aug 18 12:47:58 any known issues with Genymotion and latest 0.8.6 beta of Android Studio? Now my virtual images won't start anymore... Aug 18 12:48:39 Genymotion has no connection to Android Studio. Aug 18 12:48:43 Your issue is somewhere else. Aug 18 12:52:55 Mavrik: well, there is the genymotion plugin that starts the images - that one might be borked somehow - otherwise you're right Aug 18 12:54:43 Hi! I have an activity with a couple of fragments, switching between them with a viewpager. Switching the fragments (with swiping) works buttery smooth until I swipe to a fragment that holds datepicker. It gets choppy. Also the spinners on the datepicker dont work very smooth. I run it on an SGS3. Is that a bug/issue? Maybe I did something wrong? Aug 18 12:54:49 snowpong: but I suspect we thought the 1st thing you would try is to not use the AS plugin and run manual :) Aug 18 12:55:46 StingRay_: the first thing I did was try another resetting the image, that didn't work, and then I tried another image, that DID work - I'm guessing removing the image completely and re-installing it will fix it for me Aug 18 12:56:18 s/another resetting/resetting/g Aug 18 13:08:25 I'm programatically adding a gridlayout to a horizontal scroll view with match_parent for both width and height, yet it seems to wrap_content instead Aug 18 13:09:11 the code I use to create it: grid = new GridLayout(this); Aug 18 13:09:11 grid.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); Aug 18 13:15:29 why cant R be found here? Can R only be used directly inside methods of an Activity subclass? ListView listview = (ListView) a.findViewById(R.id.debugview); Aug 18 13:16:33 R can be used anywhere within the same package, elsewhere it must be imported Aug 18 13:17:37 thanks. Aug 18 13:18:24 oh for goodness sake : the option was there too in IJ. Sorry. Aug 18 13:18:51 do you prefer to inject your fragments into a container, or use tags? Aug 18 13:24:10 Am I the only one who has the problem that disconnected devices still show up in the adb device list of android studio? Aug 18 13:26:02 Syzygy: ask google :) Aug 18 13:26:42 Is there any uniqueness restrictions for application names? (The name displayed in the market) Aug 18 13:27:48 StingRay_, google does this funny thing where it uses synonyms that aren't synonym in some contexts. so disconnect gets replaced with offline and i get a ton of different issues Aug 18 13:29:31 ldiamond: no, but don't infringe trademarks Aug 18 13:31:50 Syzygy: you need to go to an oriental retreat and hone your google-fu ..... Washing cars and balancing on logs with one foot in the air is the way to go! Aug 18 13:32:01 :) Aug 18 13:32:14 I guess Aug 18 13:32:40 I'm to tired for trying more than two searches when I can just restart android studio though Aug 18 13:34:25 What platform? Aug 18 13:34:45 windows Aug 18 13:35:01 So when you start AS it shows devices that arent connected or not? Aug 18 13:35:30 no, but after a while they tend to pile up (when I have devices connected they show up twice) Aug 18 13:36:00 and when I disconnect them only once (even though they're disconnected) Aug 18 13:37:14 I know its unhelpful to say but this sounds like a very localised issue ie you and maybe one or two others. I'd try another cable for a start, check the Windows equivalent of dmesg too (if there is one) and check the device unplugging is registering. Aug 18 13:37:17 somestimes I have even more ghost devices, but I think 2 ghosts + 1 real device was my maximum so far Aug 18 13:37:35 rgr, this happens with two cables Aug 18 13:37:40 even at the same time Aug 18 13:37:43 Should I use android support library (and which version if yes) if I know I'm targeting, for example only android 4.1_? Aug 18 13:37:46 I assume youve updated whatever drivers windows uses. Aug 18 13:37:47 4.1+? Aug 18 13:38:01 right now I have a nexus 7 and a galaxy s 2 connected and they ghosted out earlier Aug 18 13:38:06 has nothing to do with drivers Aug 18 13:38:40 android studio just has bugs in that area Aug 18 13:38:50 I assume the unplugging didn't register Aug 18 13:38:55 Intellij does the same to me Aug 18 13:39:08 there might be if there is a conflict causing the unplug event to go unnoticed. *shrug* I dont use Windows admittedly and there's no issue on Debian (for a change! :)) Aug 18 13:39:18 I just don't use logcat in intellij Aug 18 13:39:33 I use intellij CE and it works fine. (EAP) Aug 18 13:43:36 heh, found a grammatical error in the doc :D Aug 18 13:43:56 Return the width of the your view. Aug 18 13:44:02 in View.getWidth() Aug 18 13:44:21 how to implement onclicklistener for button in fragment? Aug 18 13:44:58 android-dev121, as you would usually do it. Aug 18 13:45:17 runtime crash Aug 18 13:45:28 how do you usually do it? Aug 18 13:46:37 good morning people! Aug 18 13:47:03 I have a feature that I really can't get to work... Aug 18 13:47:18 android-dev121, button.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { /* your stuff here */}}); Aug 18 13:47:32 where to find proper fragment tutorials google's are shait, routine things like button clicks are done differently Aug 18 13:47:53 they really aren't. Aug 18 13:47:58 but they aren't Aug 18 13:48:16 I want to put my app in immersive mode AND always have the status bar hidded... I can hide the status bar when the Activity starts, but it comes back when the user swipes down from the top. Any ideas of what I am missing? Aug 18 13:48:20 android-dev121: what crash log do you get? Aug 18 13:48:27 there are many (equally valid) ways to handle clicks, I'm guessing the docs just give you options Aug 18 13:48:47 I_Artist: not sure yo can, the user always need to get to the top ba Aug 18 13:48:49 bar Aug 18 13:48:59 I_Artist, as far as I recall, status bar swipe is a requirement of immersive mode Aug 18 13:49:54 yeah afaik that's handled by the OS Aug 18 13:49:55 Yeah, the status bar swipe was added so that malicious apps couldn't hide all of your system stuff against your will Aug 18 13:50:01 I don't mind the swipe, it's ok for the action bar and nav bar to come back, I just want the status bar to stay hidden. This is an old feature that we can do for a long time Aug 18 13:50:12 immersive sticky ? Aug 18 13:50:26 That's what I was thinknig GrecKo... Aug 18 13:50:32 but you couldn't do immersive mode before, so it's entirely plausible that with the introduction of immersive mode you've lost the ability to hide the status bar Aug 18 13:50:49 old feature was just full screen Aug 18 13:50:51 yes, sticky. but you lose immersive mode when selecting a menu option for example which is a bit messy. But it does revert. Aug 18 13:50:58 not immersive Aug 18 13:51:05 Actually , I was reading through the code and I'm thinking that setting BOTH immersive AND sticky might bypass the behaviror Aug 18 13:51:35 In KitKat, right? Aug 18 13:52:08 Estel, I have to make it work in previous versions too (but in different ways, and with different results) Aug 18 13:52:09 I_Artist: you cannot prevent user from hetting to notifications Aug 18 13:52:26 StingRay: sure you can. Just not in immersive mode Aug 18 13:52:46 StingRay : // use this call to hide the status bar. Aug 18 13:52:46 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); Aug 18 13:52:52 Estel, I won't, I just wanted to know if I needed to make sure my name was available and secure it if needed. Thanks for your answer. Aug 18 13:52:53 full screen without status bar sucks, anyway Aug 18 13:53:10 I_Artist: I thought your question was about Immersive mode Aug 18 13:53:12 immersive mode swipe is far superior Aug 18 13:53:20 touching the screen would make the statusbar come back I_Artist Aug 18 13:53:24 * ravilov has today bitterly given up on kitkat, they're just making android into s**t while covering it up with visual treats Aug 18 13:53:40 ravilov, oh stop being an idiot Aug 18 13:53:52 pfn, excuse me? Aug 18 13:53:54 oh come on... just because of one feature you used thats been blocked off for a reason. Aug 18 13:53:54 whats wrong with kit-kat? Aug 18 13:53:56 yes GrecKo, in JB and under, touching brings it back Aug 18 13:54:07 what feature has been blocked? Aug 18 13:54:28 I_Artist: why do you want to hide the status bar when the user has performed an action to try and bring it back? Aug 18 13:54:30 plug/unplug. Cant get it without root I think he said. Aug 18 13:54:30 oh well, to each their own Aug 18 13:54:35 pfn, I'm working on an app that needs to block the user from all interaction with your phone Aug 18 13:54:50 (I never said it's just this one recent feature) Aug 18 13:55:01 If you switch the phone off the user can't interact with it Aug 18 13:55:05 Estel : because in my case the user isn't the owner of the phone Aug 18 13:55:08 haha.. :) Aug 18 13:55:17 what's the problem with immersive sticky I_Artist ? Aug 18 13:55:25 Should I use android support library (and which version if yes) if I know I'm targeting, for example only android 4.1+? Aug 18 13:55:36 you can swipe (and rightly so) the notifications bar down. Aug 18 13:55:40 will immersive work in other versions of android? Aug 18 13:55:45 no Aug 18 13:55:50 I am the developer of Focus, an app that lets you give your phone to your friend so they can view photos, but not have access to your phone Aug 18 13:56:06 jvro no, it's only Kit Kat Aug 18 13:56:15 you can use the leanback mode or lightout ibefore kitkat Aug 18 13:56:30 respectively fullscreen and lowprofile Aug 18 13:56:33 I have to make a different implementation for different versions of Android Aug 18 13:56:43 I_Artist, tbh, the only reason why i dont want my friends to use my phone, is so they dont see my photos. Anything else doesnt really matter. Are you sure theres an opportunity there, from a business point of view? Aug 18 13:56:47 MapMan: that depends what you want to do, but there are some useful things in the v4 support library that many apps use (such as ViewPager) Aug 18 13:57:39 jvro : http://lifehacker.com/focus-stops-people-scrolling-through-photos-you-dont-w-1617580292/all Aug 18 13:59:19 IMHO, it's pretty dumb handing your phone to people you can't trust to begin with Aug 18 13:59:38 ravilov, dumb people make us money Aug 18 13:59:45 I_Artist, have you looked into android.permission.SYSTEM_ALERT_WINDOW? Aug 18 13:59:56 ravilov, you can hand you phone to your mom, doesn't mean you want her to see your porn Aug 18 14:00:00 you might be able to pull off a full screen window on top of the status bar Aug 18 14:00:27 I think its a good idea for an app. Aug 18 14:00:29 that way all interaction with the phone, except for locking it, would be denied Aug 18 14:00:58 jvro : hmm, I see what you mean. But then I would have two totally different implementations for KitKat and others Aug 18 14:01:02 easiest approach is to run the app on top of the lock screen Aug 18 14:01:22 Estel: there are things in support library that the "standard" api doesnt support? wut? Aug 18 14:01:48 pfn smart boy. Aug 18 14:01:58 didnt thought of that Aug 18 14:02:09 pfn, I will have to look into that. When the user tries to leave the app, I lock the phone. So being there the whole time might be the solution Aug 18 14:02:19 Please help, this line keep generating error.... -> mActionBar.setBackgroundDrawable(loadBitmapDrawable); Aug 18 14:02:49 :E Aug 18 14:02:50 hackable, youll have to be more specific. Aug 18 14:03:06 calendar reminders on nexus 4 aren't working but on s3 and htc one they do work -.- Aug 18 14:03:17 pfn, never worked with that before though, what should I search for to get started? Aug 18 14:03:27 I'm probably missing something... Aug 18 14:03:35 i could tell you that this line is giving an error -> boobs.setVisibility(View.VISIBLE) and no1 would ever know why Aug 18 14:03:42 alright jvrodrigues -> whenever i try to load the emulator, it will display error pointing to that line. Aug 18 14:03:55 hackable, that much i had figured out. Aug 18 14:03:56 lol Aug 18 14:03:58 yes.. that's true Aug 18 14:04:05 jvro boobs.setVisibility() always defaults to true... Aug 18 14:04:18 BitmapDrawable loadBitmapDrawable = new BitmapDrawable(BitmapFactory.decodeResource(getResources(), R.drawable.action_bar_bg)); Aug 18 14:04:18 loadBitmapDrawable.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT); Aug 18 14:04:18 mActionBar = getActionBar(); Aug 18 14:04:18 mActionBar.setBackgroundDrawable(loadBitmapDrawable); Aug 18 14:04:36 can you see it? Aug 18 14:04:41 use pastebin Aug 18 14:04:46 * StingRay_ finds of late that boobs.getVisibility() == View.HIDDEN Aug 18 14:04:52 but i see the error Aug 18 14:04:57 what's the error? null point on actionbar?? Aug 18 14:05:06 yes Aug 18 14:05:22 well tbh Aug 18 14:05:24 could be two things Aug 18 14:05:51 okay Aug 18 14:05:55 thanks for the help people, I think that I have a few options that I can try out! Aug 18 14:05:58 go ahead Aug 18 14:06:08 Going on an interview now, wish me luck! Aug 18 14:06:16 you could have a theme.notitlebar on the activity Aug 18 14:06:39 that would return null in the getActionBar method Aug 18 14:08:43 i don't have theme specification on the androidManifest Aug 18 14:08:53 do you think that's why Aug 18 14:09:05 the default would be holo with actionbar, so thats not why Aug 18 14:09:42 hackable put your code in pastebin so we can see it Aug 18 14:09:48 so basicaly the BitmapDrawable constructor is returning null Aug 18 14:09:58 Error --> 3146-3146/com.cbcmobileapp.emea E/AndroidRuntime﹕ FATAL EXCEPTION: main Aug 18 14:09:59 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cbcmobileapp.emea/com.cbcmobileapp.emea.ProductDetails}: java.lang.NullPointerException Aug 18 14:10:35 I need some hand holding : I have a HashMap mapping string index to string value. Which adaptor type do I need to use if I want to populate a ListView? HashMap cant be cast to a List. Aug 18 14:11:03 rgr: hashmaps don't have a predictable order Aug 18 14:11:16 rgr: what do you want to list? the keys? the values? Aug 18 14:11:22 --> android:theme="@android:style/Theme.Holo.Dialog" Aug 18 14:11:24 a combination of both? Aug 18 14:11:31 thats what i ised in the manifest Aug 18 14:11:44 hackable: dialogs don't have actionbars. Aug 18 14:12:09 defer: I know they dont. hence the Q. I just want to display the index, value pairs. Aug 18 14:12:12 hackable, change it to Theme.Holo Aug 18 14:12:19 thats your problem. Aug 18 14:12:26 trying to apply color on the bar Aug 18 14:12:48 Alright. Thanks Aug 18 14:13:32 rgr: you can create your own that extends BaseAdapter, takes that HM as a constructor argument and uses it to implement the required methods. Aug 18 14:13:45 rgr, might sound like a stupid question, but why not extend baseadapter, populate a list with pairs then sort it? Aug 18 14:14:06 ah, after defer sugestion no longer sounds stupid Aug 18 14:14:25 it work now. Thanks Aug 18 14:14:27 rgr: thing is, listview requires you to get by a position and you don't have that in a hashmap Aug 18 14:14:33 sorting isnt an issue. But thanks : I know where to start looking now. Aug 18 14:14:33 rgr: how large is your hashmap? Aug 18 14:14:54 small. Its just a debug util for me to monitor on screen some property value pairs. Aug 18 14:15:09 ah, then just save yourself the trouble and manually convert that to a list Aug 18 14:15:27 rgr, then definitly baseadapter will work just fine. Youll code it in 5 minutes Aug 18 14:15:29 so just an array list of preformatted single strings e.g "x:1" ? Aug 18 14:15:33 Anyone know if I can build and install a CLI program from source on android? Aug 18 14:15:53 rgr you can make a list of entries Aug 18 14:15:56 kind of wanted to do a tw column thing as a "leanring lists and adaptors" task in my project. Aug 18 14:16:01 s/tw/two Aug 18 14:16:04 List> Aug 18 14:16:10 ah ok. Aug 18 14:16:15 rgr: if you don't plan on changing the map while it is being displayed I'd just convert it and use one of the simpler adapters, it'd be a 30 sec job instead of a 5 min job Aug 18 14:16:19 but either is fine. Aug 18 14:16:30 thanks folks. Something to go on. I'll read up from there. Aug 18 14:16:35 defer is definitly right tho Aug 18 14:16:38 why error this evening... Aug 18 14:16:44 ---> HELP: 3280-3280/com.cbcmobileapp.emea E/AndroidRuntime﹕ FATAL EXCEPTION: main Aug 18 14:16:44 java.lang.RuntimeException: Unable to instantiate application com.cbcmobileapp.emea.application.EmeaController: java.lang.IllegalStateException: Unable to get package info for com.cbcmobileapp.emea; is package not installed? Aug 18 14:17:34 it sounds to me that you're maybe missing a package Aug 18 14:17:43 few. Almost pasted 300 lines here... mixing between emacs and IJ is risky.... Aug 18 14:18:12 hackable: are you using a custom Application? Aug 18 14:18:29 that can happen if you overload methods and forget to call super. Aug 18 14:19:00 _or_ if you mistyped the FQN to the application class. Aug 18 14:23:44 Estel: there are things in support library that the "standard" api doesnt support? wut? Aug 18 14:24:04 is there a simple way in android studio to convert between hex and decimal colors in colors.xml? Aug 18 14:24:17 MapMan: yeah, convenience stuff Aug 18 14:24:32 Can I install linux packages on to an android or build them from source? Aug 18 14:24:55 sigh, apparently they fucked up the timepicker on android L Aug 18 14:24:59 Glitches, as I've been told before, android IS NOT linux, and shouldn't be seen as such Aug 18 14:25:05 I'm moving to another platform when android L hits the stores Aug 18 14:25:07 Our designers use decimal, we programmers use hex Aug 18 14:25:25 hex is only a visual encoding... Aug 18 14:25:48 Zharf, they'll probably fix it until it's actually released (they broke drawables as well) Aug 18 14:25:53 ravilov: hmmm Aug 18 14:26:04 Syzygy, it's not *actually* broken, it's just unusable Aug 18 14:26:22 Glitches: you can definitely cross-compile and use them via jni on your app. If you want to cross-compile system stuff that is a platform question and is more suited to #android Aug 18 14:26:27 Glitches: but of course it is a linux - just not from the user perspective. Aug 18 14:26:48 it's the analog clock looking one Aug 18 14:27:03 I'm looking at it from a terminal perspective Aug 18 14:27:10 Syzygy: not automatically but you can click the little squares on the left of the editor and it shows a color picker Aug 18 14:27:13 rgr, sure, but our colors are defined in decimal rgb(255, 255, 255) while colors.xml requires #RRGGBB hex values as far as I know Aug 18 14:27:14 wrong perspective, Glitches Aug 18 14:27:39 Glitches, basically there is some core system that supports the framework and the VM, but you are not supposed to know or care about it Aug 18 14:27:52 on some systems onCreateOptionsMenu is called when isVisible would be true, but on other it does not. would an invalidateOptionsMenu in onResume be a way to deal with this? Aug 18 14:27:56 defer, ah, thanks, that can actually help me find the right color more quickly than converting the code Aug 18 14:27:57 or else you're in the wrong channel ;) Aug 18 14:28:37 Zharf: oh, is the default widget like the Google Calendar widget thing now? Aug 18 14:28:45 Ok maybe you can answer me this then... I'm trying to extract data from an app (It's a todo list app) and I want to get that data into my widget Aug 18 14:28:58 Estel, yes Aug 18 14:29:04 it's absolutely god damned fucking horrible Aug 18 14:29:07 I was thinking about using tasker to extract the info cuz I know it can send variables to the wigdet Aug 18 14:29:09 Glitches, dont you have a content provider in your app? Aug 18 14:29:29 jvrodrigues: I host my own server for that app Aug 18 14:30:03 Glitches: so why were you considering building a Linux thingy? Aug 18 14:30:46 http://eclipser.xmms2.org/time_picker_android_l.png Aug 18 14:30:54 Estel: It would make it a bit easier for me to extract the info I want Aug 18 14:31:19 Install the comandline program and make tasker fetch data from there Aug 18 14:31:39 Is it your app? Aug 18 14:32:03 Estel: These are none of my apps Aug 18 14:32:24 You said it's your widget? Aug 18 14:32:25 that seems like a horribly wrong approach Aug 18 14:32:37 Zharf: bloody L :D Aug 18 14:32:37 ravilov: ikr Aug 18 14:32:59 Estel: I'm using a custom widget tool wich is quite flexable Aug 18 14:33:25 It's currenty displaying output from a couple of python scripts Aug 18 14:33:26 I guess it's time to copy the old timepicker and embed it into all my apps instead Aug 18 14:33:58 Glitches, I believe some reasonably simple shell scripting is the most you should count on Aug 18 14:34:21 some would say even that is too much Aug 18 14:34:34 im not that experienced with widgets, but im fairly sure they are actually part ofthe application, through the appwidgetprovider or whatever, you can, through the app, control wahtever the widget displays Aug 18 14:34:44 I'd need the cli program to do that though Aug 18 14:35:02 so Aug 18 14:35:03 shell Aug 18 14:35:41 Glitches: you're using tasker to try and get arbitrary information from a random app and put that information into some super generic widget? Aug 18 14:35:55 Estel: Correct Aug 18 14:36:16 First I'd check if that arbitrary app exported a contentprovider Aug 18 14:36:38 I've already gotten tasker to run a shell script that runs a python program that then sends the info to the widget Aug 18 14:37:05 Estel: What do you mean by that? Aug 18 14:37:31 Glitches: many data-driven apps export their content to the Android system for consumers interested in receiving it Aug 18 14:37:37 welcome to not-so-quick & disgustingly-dirty :) Aug 18 14:38:02 ravilov: I'm looking for a hacky way to do this Aug 18 14:38:04 ravilov: there is nothing quick, though plenty dirty, about tasker -> bash -> python :P Aug 18 14:38:11 (tasker is a very nice utility) Aug 18 14:38:28 Estel: Isn't it a POSIX shell? Aug 18 14:38:54 Estel, that's why I said not-so-quick Aug 18 14:39:00 Glitches, it's just nothing you should count on Aug 18 14:39:07 Is there any good pattern for generating email adresses for integration testing? Aug 18 14:39:32 but yes the android shell is reasonably POSIX Aug 18 14:40:39 I'm gonna see if the app dumps the info on the sd, might make things a lot more simpler Aug 18 14:41:04 Glitches, just out of curiosity, why do you *insist* on a hackish solution? Aug 18 14:41:55 are you trying to be true to your nick? :p Aug 18 14:42:50 Yes defer, i'm using custom volley application Aug 18 14:43:09 ravilov: I'm looking for an adventure Aug 18 14:43:19 * Glitches puts on his adventure pants Aug 18 14:43:44 you must be really terribly bored Aug 18 14:43:49 I have a complicated question - how can I synchronize a few devices? for example, I want to initiate a skype call from device1, then answer the call from device2, and start a GSM call from device3 to device2. I thought about some kind of server with a queue, but I'm not sure... Aug 18 14:43:52 ravilov: You bet I am! Aug 18 14:44:13 I mean if it's not gonna be fun then I might as well not bother... Aug 18 14:44:15 doing it right is also an adventure, except there are much more benefits Aug 18 14:44:32 pfft... the right way is sissies Aug 18 14:44:57 is for* Aug 18 14:45:39 meital, I have no idea, but also I don't follow what you're saying Aug 18 14:46:12 meital, are these calls required to have the call Id from the phone that originates them? Aug 18 14:46:24 like device1 or device 3, in your example Aug 18 14:46:39 meital: initiate cal from device1, hangup, initiate call from device2... Aug 18 14:47:01 jvrodrigues: : I'm not sure what you mean by call id Aug 18 14:47:19 Glitches: no...I want it at the same time Aug 18 14:47:32 meital: do you actually want to answer calls automatically? Aug 18 14:47:39 Or do yo just want to synchronise devices? Aug 18 14:47:56 I actually want to make sure that the GSM call happens *while* the skype call is on Aug 18 14:48:07 Estel: answer as well Aug 18 14:48:12 ah Aug 18 14:48:15 YOu basically can't. Aug 18 14:48:34 Estel: please explain :) Aug 18 14:49:56 meital: If you know a way then it's possible if not... it's definently impossible Aug 18 14:50:34 Well your app doesn't have permission to do anything with the telephony stack such as pick up or make calls Aug 18 14:50:48 *pick up, it can make them Aug 18 14:50:57 Glitches: so I thought about creating a service that will run on all devices, and will query a queue on the server every second Aug 18 14:51:14 to see if it has some action to do Aug 18 14:51:21 meital: don't do that Aug 18 14:51:27 why? Aug 18 14:51:37 meital: because it eats all the battery and is horrible. Aug 18 14:51:39 btw, I'm running it on rooted phones Aug 18 14:51:41 meital, why not just a broadcastreceiver and gcm in the server? Aug 18 14:52:06 Yeah, just use GCM. Or there are cool services like Pusher if your app is going to be open Aug 18 14:52:11 http://developer.android.com/google/gcm/index.html Aug 18 14:53:04 thanks, I'll read about it! Aug 18 14:54:05 meital: well, as far as I know you couldn't touch the skype app and what that does? I guess on rooted devices you could answer calls using reflection or something. Aug 18 14:54:46 Estel: I can answer gsm calls with gsm, not sure about answering skype calls though Aug 18 14:55:07 *with adb Aug 18 14:55:50 you can always simulate a touch event at the right spot :p Aug 18 14:56:11 * ravilov feels people are just bursting with crazy ideas today Aug 18 14:56:29 ravilov: until someone decides to change the ui ;) Aug 18 15:04:23 Hi all! I have a problem related to raw mic data in android. Can anyone help me? http://stackoverflow.com/questions/25366093/capturing-raw-microphone-input-on-android Aug 18 15:07:51 im injecting fragments via the fragment manager. those fragments contribute to the options menu. if I switch to portrait, all of the fragments from the landscape layout still exist, so they contribute to the options menu. how do you think I should fix that Aug 18 15:08:21 by design :) Aug 18 15:08:25 theblang: are the fragments retained? Aug 18 15:09:34 Estel not explicitly. Aug 18 15:10:43 Thanks all my friend for their support today... Aug 18 15:10:56 expecially StingRay and others.. i appreciate Aug 18 15:11:04 Estel what I mean is, Im not calling setretaininstance. I am assuming it retains by default? Aug 18 15:11:19 right now, i need advice and assistance on how to create a card view Aug 18 15:11:48 whats a cardview? Aug 18 15:12:12 hackable: cardView is simply a row/cell/view that has stuff in it that resembles a card based on either border, shadow and contrast to background/container Aug 18 15:12:56 Okay... thanks for the intro, i can i create something like that? Aug 18 15:12:58 oh, thats designer work Aug 18 15:13:03 Hi all; I need some logical thinking help from fellow developers. I have 2 events. At night running from 22:00 to 6:00; At home which is all-day event. At home is based on cellid. What happens is, at night, cellid can change to the one, not saved in At home event. At home event gets disabled. When correct cellid gets received, at home gets enabled again. Here, i've developed priority system where Night > Home. But night is already running wh Aug 18 15:13:24 hackable: with time and knowledge you can create anything in android, it's pretty open Aug 18 15:13:25 hackable, gridview with custom fancy items? Aug 18 15:13:49 all these people that complain at UI stuff, I dont get it, dont use it then…do your own lol Aug 18 15:13:51 :) Aug 18 15:14:54 jvrodrigues, maybe something like that Aug 18 15:15:05 do you know about adapters? Aug 18 15:15:57 yes... little knowledge Aug 18 15:16:53 well then you should have no problem Aug 18 15:17:02 ok Aug 18 15:17:24 already have a list view but i'll like to make it look like a card view Aug 18 15:17:31 maybe add shadow effet Aug 18 15:17:31 change it to grid view Aug 18 15:17:49 oh okay... Aug 18 15:17:59 shadow effect you add it in whichever item you choose to inflate in getView Aug 18 15:18:00 but can i use baseAdapter or use another one Aug 18 15:18:09 depends Aug 18 15:18:21 how much cards will you have and where will these cards come from? Aug 18 15:18:24 add the shadow effect programmatically? how Aug 18 15:18:31 not programatically, in the xml Aug 18 15:18:42 6 cards to be display.. Aug 18 15:18:51 ah, then base adapter will be just fine Aug 18 15:19:04 kool then, how can i go about it\ Aug 18 15:19:05 create an xml for the cards Aug 18 15:19:14 ok Aug 18 15:19:19 with the shadows and all that fancy designer stuff Aug 18 15:19:24 then just inflate it in the getview Aug 18 15:19:42 StingRay_, Estel the situation is that yes, I would like the fragment to be retained. it is a listview, so I would love to save the selected item. but if it retains, it contributes to the action bar when it isn't on the screen, and I can't use isVisible because some versions of Androdi calls onCreateOptionsMenu before it is visible Aug 18 15:19:44 pretty much all the margins, borders and whatnot can be defined in that layout Aug 18 15:19:57 i understand that but how do you create a card layout Aug 18 15:20:30 theblang: why not just add options IF it's created and NOT IF it is resumed or re-attached Aug 18 15:20:31 i dont know, maybe a square linear layout? a card is a real thing, what youre creating is just a visual representation of the card Aug 18 15:20:31 ? Aug 18 15:21:03 StingRay_ how would I do that Aug 18 15:21:13 theblang, do you add the fragment to backstack? Aug 18 15:21:19 jvrodrigues nope Aug 18 15:21:28 jvrodrigues this is stricly a master - detail situation Aug 18 15:22:23 jvrodrigues if user flips back to portrait to just view the detail, the master fragment still contributes to action bar. i can't use isVisible in onCreateOptionsMenu because of when it is called on earlier Android versions Aug 18 15:23:20 i see Aug 18 15:24:07 why not invalidateoptionsmenu on configuration change? Aug 18 15:24:14 or even call isvisible on configuration change Aug 18 15:24:15 jvrodrigues maybe I should just use and then I can use isInLayout Aug 18 15:24:39 jvrodrigues nm, I need to inject for other reasons Aug 18 15:25:03 jvrodrigues well, if I call invalidate in configuration change, the options menu is still going to build after the configuration change. and the master that is still around will contribute Aug 18 15:25:48 hmm true Aug 18 15:26:27 jvrodrigues my only thought right now is to explicitly tell the fragment to not retain. but that sucks, becuase I do enjoy what I get from it retaining Aug 18 15:27:11 jvrodrigues really, the problem comes down to not being able to say if(isVisible()) inflate menu. I can't do that because on some Android versions onCreateOptionsMenu is called right after onCreate, but before onCreateView Aug 18 15:27:59 well there are some ways to go at this. Aug 18 15:28:22 you can tell if the fragment is visible in onCreate if you, for example, add it to a stack in the application singleton Aug 18 15:28:29 or add the tags to a list Aug 18 15:28:49 then just get the last tag and check if it is the same as the fragment you-re in Aug 18 15:28:55 if it is, then its visible, if not, hten its not Aug 18 15:29:56 theblang: so the problem is, in said condition you dont want the main fragment to contribute to options menu ? Aug 18 15:30:00 jvrodrigues yeah, there are a variety of ways I could imagine to handle this. guess I just thought it would be more fluid with the API. Aug 18 15:30:05 condition being landscape ? Aug 18 15:30:47 StingRay_ condition landscape = master-detail, so master and detail fragment are visible and contributing to options menu. condition portrait = only detail, but currently the master fragment still contributes to options menu Aug 18 15:31:10 so why not just not do that IF in portrait ? Aug 18 15:31:25 StingRay_ by do that you mean inflate options? Aug 18 15:31:33 no Aug 18 15:31:37 I mean in the fragment Aug 18 15:31:51 if I am portrait, fk adding menu options Aug 18 15:31:58 :) Aug 18 15:32:08 ok lads and lasses, this is my first attempt at an adaptor and view. I decided to stick with my HashMap to make it more challenging. The crash happens where I annotated the code with "crashes here". Its deep in the bowels of android and tells me little. R.id.debugview is a ListView on my main layout. debug_list_item is its own xml layout in res/layout containing a linearview which in turn contains two textviews. Whats my obvious Aug 18 15:32:08 mistake? https://gist.github.com/rileyrg/342a02d5b569bc8a6f5c Aug 18 15:32:22 StingRay_ I would love that, but how can I conditionally inflate if I can't use isVisible Aug 18 15:32:45 (search for "crash here" not "crashes here") Aug 18 15:32:49 inflate what ? Aug 18 15:32:56 StingRay_ the options menu Aug 18 15:33:34 rgr, instead of parent, add null. Aug 18 15:33:37 you dont inflate anything right ? if in portrait ? Aug 18 15:33:44 or that would be the solution ? Aug 18 15:33:45 View v = inflater.inflate(R.layout.debug_list_item, null); Aug 18 15:34:13 StingRay_ that would be the solution. in portrait the master fragment is still around from when I was in landscape. even though it isn't shown, it still contributes to options menuy Aug 18 15:34:20 jvrodrigues: can you explain why? Aug 18 15:34:23 rgr, and then disregard what jvrodrigues said and pass false as a third parameter Aug 18 15:34:25 or do I rtfm that? :) Aug 18 15:34:39 Is there any way to check how much cpu my app has been using? Aug 18 15:34:54 theblang: the fragment is code right ? Aug 18 15:35:06 in that code you infalte the options ? Aug 18 15:35:14 SimonVT, true :( Aug 18 15:36:02 false? erm.. hang on. Aug 18 15:36:02 dont inflate the options and add them IF in portrait ? why would that not work ? Aug 18 15:36:45 duh. right. Aug 18 15:36:57 third <> second.... skulks away.. Aug 18 15:38:30 Any ADB commands for seeing cpu temp or cpu utilization? Aug 18 15:40:22 eghdk: check http://stackoverflow.com/questions/11201659/whats-android-adb-shell-dumpsys-tool-and-its-benefits Aug 18 15:40:45 probabl adb shell dumpsys cpu Aug 18 15:40:52 probabl adb shell dumpsys cpuinfo Aug 18 15:40:55 get in! Woot. works. Thanks. Aug 18 15:41:28 eghdk: dont know about cpu usage, do you have top ? Aug 18 15:41:37 StingRay_ yeah, the fragment is code. im not doing any XML , only injecting to containers. Aug 18 15:42:04 theblang: and where do you inflate said options that you may or maynot want ? Aug 18 15:42:20 StingRay_ in onCreateOptionsMenu in the fragment Aug 18 15:42:42 and in that onCreateOptionMenu did you think about an orientation check ? Aug 18 15:42:49 IF statement ? Aug 18 15:43:08 yeah I got 'top' command so adb shell and then 'top' Aug 18 15:43:39 if(isThisDeviceInPortrait())return; Aug 18 15:43:47 so when I have a ListView with an adaptor when is it dedrawn causing a poll of the adaptor? Anytime I modify the underlying datasource? Aug 18 15:43:51 redrawn Aug 18 15:44:01 StingRay_ if I did that then the options wouldn't show if the user is on another screen that just has the master fragment Aug 18 15:44:21 then check that too Aug 18 15:45:00 StingRay_ yeah, I know I could do orientation checks, and instanceof X Activity checks, but that just starts to feel so hacky, like maybe im missing something Aug 18 15:46:09 StingRay_ the other option would be to setRetain to false, but then I lose a lot of stuff I do want to be saved across orientation changes Aug 18 15:46:14 gordon_: top? Aug 18 15:46:27 Can I run top on android? Aug 18 15:46:32 theblang: well save it then, onSaveInstanceState Aug 18 15:46:38 :) Aug 18 15:46:50 Hah. Nice. You can run top! Aug 18 15:48:19 gordon_: Shit. I'm a dumbass. I just ran top on my desktop not on the phone Aug 18 15:48:45 looks like you can run top in adb shell though! Aug 18 15:50:30 eghdk: you can also run 'vi' ;) Aug 18 15:51:16 gordon_: Sick. I'm in top, but how do I exit it!? Aug 18 15:51:27 I tried q or exit and nothing happens... lol Aug 18 15:52:01 q Aug 18 15:52:10 but htop is nicer.. Aug 18 15:52:18 oh in adb shell. sorry. Aug 18 15:52:20 rgr: I'm trying q Aug 18 15:52:25 Doesn't exit. Aug 18 15:52:40 it works for me Aug 18 15:53:01 q is the key to quit "top". Aug 18 15:53:02 if not, just close terminal window Aug 18 15:53:09 Interesting. Aug 18 15:53:16 sure youre not just at the cli beneath the old display? Aug 18 15:53:47 If I do "top" on osx and then press q I exit. Aug 18 15:53:52 If I do "adb shell" Aug 18 15:53:55 then "top" Aug 18 15:54:01 I can't press q to exit Aug 18 15:55:00 Is that what you guys are doing? adb shell and then top? rgr and gordon_ ? Aug 18 15:55:32 arr, I misunderstood your reply "Doesnt exist" when I asked if you were doing in adb shell. No. Standard shell. Aug 18 15:56:02 C-c works in adb shell tho Aug 18 15:56:08 rgr: Wait what? I'm confused. Aug 18 15:56:11 What's C-c? Aug 18 15:56:12 eghdk: ctrl-C Aug 18 15:56:15 it work for me Aug 18 15:56:23 *works Aug 18 15:56:26 okay ctrl c works for me Aug 18 15:57:20 If I do "top | grep "myApp" why does it refresh like every second and add a new line. Aug 18 15:57:23 ? Aug 18 15:57:32 because top updates. top --help Aug 18 15:57:54 I thought when I learned top on linux it updated... but updated in place? Aug 18 15:58:08 For a second I thought I had like 10 processes (and counting) Aug 18 15:58:10 youre in the adb shell. They can be different and obviously are. Aug 18 15:58:28 eghdk: if you use -c (I think) to limit the number of processes shown, it's more pleasant Aug 18 15:58:32 but youre piping the output through grp. Aug 18 15:58:38 use -n to only do one update Aug 18 15:59:25 Thank you all. Yes very helpful indeed. Appreciate it gordon_ Leeds and rgr ! Aug 18 16:07:58 So; I thought. I'll just align this ListView right in my FrameView and all will be done... yeah right.... Aug 18 16:09:55 hey Aug 18 16:13:41 Hi, does anyone know why mDate is not recognised ? Aug 18 16:13:49 I've imported the java.util.calendar Aug 18 16:14:09 what is mDate Aug 18 16:21:22 * StingRay_ guesses that it's some text that appeared when pressing cntrl+v Aug 18 16:21:26 my Listview is told to wrap_content. The item views I put inside it care of the adaptor also wrap content. I stuck the listview in a relativelayout too and set that to wrap_content. Its still expanding to the full screen width. Which finicky little xml aatribute have I forgotten? I even tried the parent relativelayout at fill_parent (so full screen) and then the ListView to align to the right margin of parent : but of course it doesnt Aug 18 16:21:26 because its elements are full width. Aug 18 16:21:46 rgr a list view is never wrapped Aug 18 16:22:17 I cant display a listview at anything other than full screen? Aug 18 16:22:26 not what I said Aug 18 16:22:37 contain it in another placement view Aug 18 16:22:40 thats a constant Aug 18 16:23:01 or give it a fixed size Aug 18 16:23:03 It is. Its in a relativelayout. I can paste the xml? Aug 18 16:23:26 why is it in a relativeLayout ? Aug 18 16:23:47 because I tried to give it a parent which would trigger the proper resizing and people in google suggested it. Aug 18 16:24:03 huh? Aug 18 16:24:17 maybe you should state or show what it is you are wanting Aug 18 16:24:40 I just did. ^^^ I want my list view to align right and only be wide enough to wrap the element views. Aug 18 16:25:06 and I said it cannot be constrained by contents Aug 18 16:25:12 so no wrap_content is possible Aug 18 16:25:35 you said it "its never wrapped" and I dont really understand the limitation. Possibly you could explain. Aug 18 16:26:04 on every dimension change of a listview, a full redraw is done Aug 18 16:26:22 so lets say you animated it from x size to x size + 10 pixels Aug 18 16:26:29 it will refresh itself 10 times Aug 18 16:26:37 not the best thing to have happen right ? Aug 18 16:26:55 so having contents that are variable and having them drive the size makes no sense Aug 18 16:27:01 It gets an update to redraw every few seconds. Aug 18 16:27:17 no, every pixel if you decide to size it Aug 18 16:27:29 so 60 times a second Aug 18 16:27:30 If I wanted to send a string of characters up to a server how much space would each character take up? Aug 18 16:27:37 times the number of pixels :) Aug 18 16:27:39 Huh? Getting an update and hving it redraw makes perfect sense. Otherwise whats the point of dynamic updates to a view. Aug 18 16:27:57 size changes Aug 18 16:28:00 This pixel thing 60 times a second is a bit of a strawman really :) But thanks. Aug 18 16:28:05 of course it changes. Aug 18 16:28:21 no you said whats the point of an update ? on size layout change Aug 18 16:28:38 not sure what your question is now Aug 18 16:29:00 Youve lost me. I didnt say anything of the kind. The Q is really simple still : I want to right align a content wrapping ListView... :) Aug 18 16:29:13 ah ok, not possible Aug 18 16:29:16 I'll google some more. Aug 18 16:29:17 :) Aug 18 16:29:17 Hi, I have an unrooted Galaxy Nexus, with unusable USB port (device not recognized). Is there any chance that I may use it for debugging while developing apps? Aug 18 16:29:26 and I told you why Aug 18 16:29:44 each item would cause the size to change what would refresh it and the children Aug 18 16:29:52 x pixels like I said Aug 18 16:29:55 Provided that every wi-fi debugging solution I found out there relies on either rooting or a one-time set up through USB. Aug 18 16:29:57 Correct. Thats what dynamic means. Aug 18 16:30:02 anyways... Aug 18 16:30:56 I will ammend my answer, yes it is possible, but based on how it all works would be completley insane to do! Aug 18 16:30:58 :) Aug 18 16:31:58 danijoo: so the mCalendar object should be provided with the java.util.Calendar Aug 18 16:32:36 depending on the last question you gave here, did you declare the variable this time? :) Aug 18 16:32:44 I dont see it myself. I dont see how updating a view source every few seconds causing a resize is in anyway resize. of course if its implemented stupidly and this "pixels millions of times" scenario you mentioned occurs one wouldnt want to do it obviously. Aug 18 16:32:50 Date mDate = ..... ; Aug 18 16:33:19 Yeah, sorry i forgot to initialise it Aug 18 16:33:27 Thank ya man !:D Aug 18 16:34:51 rgr ok maybe my explination is off, the parent view forces invalidation of child views causing new layout to occur, wrap content would trigger this on a listView on every item change (view swap/cycle/add) so add a view, causes listVIew to change, causes listView to invalidate anything it has on screen contained within, but then size change is incremental, while it's growing it's also still invalidating all the vi Aug 18 16:35:04 maybe that explains it…but neways have a google you will get the idea Aug 18 16:37:20 If a listview is wrap_content, it just gets the view for position 0 and uses its size Aug 18 16:38:22 what just for 1 item ? Aug 18 16:38:39 yes Aug 18 16:39:48 pretty sure I wanted a dynmaic sized listView before and it did what I said Aug 18 16:40:46 oh maybe I was putting a listView in a scrollView Aug 18 16:40:50 another great idea :) Aug 18 16:41:05 That's literally all it does.. Get view for position 0, measure it, set listview size to that + list padding Aug 18 16:41:52 hang on rgr the way you want it to work is just a linearLayout then ? lol Aug 18 16:48:06 think they said 3 items in a googledev vid. Anyway fixed. I just made it fixed width. It'll do. Aug 18 16:48:49 StingRay: no . nothing like a Linearlayout. Like a listview with an adaptor that takes care of updates etc and creates its own child views care of GetView. Aug 18 16:49:54 rgr can still do that with linearLayout, just wihtout the view recycler that listView has Aug 18 17:06:50 yes if I want to do it all myself and not use the documented ListView lifecycle. Anyway I wanted to create my firstlist view works nice and a call to notifyDataSetChanged when I add things to my underlying map of debug value pairs ensures its updated. a good fit. Aug 18 17:07:22 Hi guys, is it possible for my app to send sms and receive sms from certain number without user seeing anything in his message box Aug 18 17:09:36 meadhikari: that sounds malicious.. Aug 18 17:09:55 danijoo: or protective Aug 18 17:10:03 meadhikari: whats your app ? Aug 18 17:10:28 protective? whats protective at hiding sent sms from a user.. Aug 18 17:10:40 remote action triggers Aug 18 17:10:49 erm….location polling Aug 18 17:10:55 anything really Aug 18 17:11:08 what do i nee to compile apps for a 'htc one x plus' with nvidia tegra chip? original android-sdk-linux apps don't seem to work on a htc... Aug 18 17:11:08 doesn't have to be malicous Aug 18 17:11:23 any glass developers up in here? Aug 18 17:12:01 what is the preferred method of displaying a notification from gdk... should I just publish a live carD? Aug 18 17:14:35 danijoo, StingRay_ to use free sms provided by telecom provider and use to to display information Aug 18 17:15:01 us it to* Aug 18 17:15:25 meadhikari: yes it is possible, but on kitkat you have to be the primary sms app to be the receiver of mms/sms and be in control of content provider Aug 18 17:15:50 can i get debug info from a remote phone? i got an app that is running here, but on my friends htc one its just exiting after start, no more info Aug 18 17:16:04 bombo are you looking for ndk or just regular ol android apps Aug 18 17:16:14 StingRay_, I mean for a particular number only, is it possible? Aug 18 17:16:19 ron_frown: i compiled an app already Aug 18 17:16:23 see previous answer Aug 18 17:16:43 ok? Aug 18 17:16:47 ron_frown: apk is installed, but its not running on a htc Aug 18 17:16:50 so yes it is, but on kitkat you have to be the primary app Aug 18 17:16:52 oh! Aug 18 17:17:01 are you running anythign like acra Aug 18 17:17:09 or anythign like that at all? Aug 18 17:17:23 ron_frown: whats acra? Aug 18 17:17:36 acra is incident reporting Aug 18 17:17:44 you fire it up as a part of your app start Aug 18 17:18:00 and it can push exceptions and other errors along with all requisiite debugging info to a url you specify Aug 18 17:18:01 or google docs Aug 18 17:18:03 or whatever Aug 18 17:18:26 been invaluable for us Aug 18 17:18:38 no i just emailed him the apk Aug 18 17:18:47 well acra could be part of the apl Aug 18 17:18:49 apk Aug 18 17:19:22 if hes savvy, adb should get you there Aug 18 17:19:25 is that what you were trying? Aug 18 17:19:56 not sure if i can get him through adb Aug 18 17:20:02 understandable Aug 18 17:21:29 honestly I'd get something like acra going Aug 18 17:21:40 if you ever intend on publishing your app to the outside world Aug 18 17:21:50 having something like that is a life saver Aug 18 17:21:54 or at least saves a shitload of time Aug 18 17:23:23 right, reading about it right now, thx ron_frown Aug 18 17:24:55 np Aug 18 17:25:03 it sends up a lot of extra shit Aug 18 17:25:17 screensize/osversion/etc etc etc Aug 18 17:25:22 if you can get him running adb Aug 18 17:26:36 you can logcat/run that dumpstate stuff to get even more info Aug 18 17:27:57 Is there any way for me to the progress (as a % would be best) of an Android Annotations Rest interface request? Aug 18 17:32:51 Any way to tell my PopupWindow to show above its anchor view when there is no room below? Aug 18 17:33:07 jessie: I doubt it, unless it's a very large file transfer Aug 18 17:33:25 jessie: you can usually find the size of the http req and scale from that, but that's all you know Aug 18 17:33:42 if I do popupWindow.showAsDropDown(anchorView), and the anchorView is on the bottom of the screen, the popup is partially hidden instead of showing above or something like that Aug 18 17:33:46 yo ron_frown wazzup. good morning dragorn Aug 18 17:33:54 yo Aug 18 17:34:03 fucking bs glass dev today =( Aug 18 17:34:31 dragorn: Okay. I'll likely just fake it then. Do a fast increase at the beginning and slow it down as time goes on. Aug 18 17:36:04 jessie: or jsut present the infinite spinner Aug 18 17:36:24 jessie: infinite spin / inderminate progress bar Aug 18 17:36:35 indeterminate even Aug 18 17:38:32 dragorn: Designs call for a progress bar. I could do the indeterminate, but I think making it feel like it's actually representing the progress will make UX feel better. I'll look at average request time and base my ratios on that. Aug 18 17:39:30 except when it's not determinate and you get a dns retry because a udp packet drops Aug 18 17:39:45 obviously, i wouldn't fake it. not my problem tho :P Aug 18 17:41:11 Well, it won't hit 100% until it's done. Aug 18 17:41:20 It'll creep towards 100% slower and slower. Aug 18 17:41:30 Think 50% closer to 100% every 1 second. Aug 18 17:41:40 It'll never reach 100%, just get infintesimally close. :_P Aug 18 17:42:15 isn't the real solution here to use the unicorn orgasm animation under the actionbar - that will put your user in a trance and all space / time will go into standstill Aug 18 17:42:52 g00s: If you send me a link I'd love to implement that. :-P Aug 18 17:43:05 make sure its no taller than 4dp otherwise users may have seizure Aug 18 17:43:18 3.5dp, so we're good. Aug 18 17:46:37 when yall create a master-detail, do you define the fragment statically or inject dynamically Aug 18 17:47:42 it works so I "guess" its ok : but its legal to call "adapter.notifyDataSetChanged();" inside a secondary thread? (Im guessing it just tags the adaptor to then trigger the ListView it feeds to update on the mainUI thread). Aug 18 17:47:43 Aug 18 17:50:38 No, both touching the dataset and calling notifyDataSetChanged should happen on the main thread Aug 18 17:51:13 Hello! Aug 18 17:51:27 Damnit I keep switching channels :( Aug 18 17:51:46 uhm Aug 18 17:53:36 when one does a big refactor in AS / intellij (moving package dirs around, renaming classes) ... how does it interract with git? Aug 18 17:53:58 i'm a bit paranoid / nervous. if i wasn't using AS i'd just do a bunch of git mvs Aug 18 17:54:30 does AS issue git mv & such itself , like when i refactor a package name ? Aug 18 17:55:12 https://code.google.com/p/android/issues/detail?id=56158#c15 <- is there a way to get this "patch" to be automatically implemented for all new builds instead of having to manually edit them all through a terminal/console window with vim Aug 18 17:56:22 SimonVT: thanks. Yeah, a quick google told me that - sorry. Aug 18 17:58:09 g00s: yes Aug 18 17:58:48 (what git magic it invokes I dont know but its all properly "gitted"... ;) Aug 18 17:58:49 rgr ok thanks, so i should be able to do all my refactring in the IDE without issuing any further git commands to keep things 'in sync' Aug 18 17:58:51 g00s: afaik, git mv is the same as manually doing git rm + cp + git add Aug 18 17:59:04 correct. or "works for me" :) (IJ) Aug 18 17:59:14 great, thanks ! Aug 18 17:59:34 hit alt-9 Aug 18 18:00:26 hi all Aug 18 18:00:57 rgr but would it simply stage the change or commit it? i don't want it committed until its been tested for example Aug 18 18:01:03 looking at alt-9 Aug 18 18:01:12 im trying to do a 'plugin' thing for my app. i build a plugin APK which contains extra functionality (activities + layout + resources), and then i try to load it via DexClassLoader in the host app. Aug 18 18:01:26 pellis i think thats kinda against Play TOS Aug 18 18:01:41 but maybe you aren't using Play Aug 18 18:02:00 g00s: for now i guess i can call this effort academic. worst case scenario I won't do it that way Aug 18 18:02:36 g00s: problem is.. i can't get a hold on how Android assigns IDs to a view tree when it loads it from layout XMLs. seems that my generated R file makes id's that aren't compatible with what's actually being made Aug 18 18:03:20 wow Aug 18 18:03:28 android-studio is just a mess Aug 18 18:03:30 is there any like 'under the hood' book or article that goes into how android builds a view tree from XMLs? Aug 18 18:03:32 what a huge disappointment Aug 18 18:05:29 Hey guys, is there a recommended way to build a gallery for >=api 16 ? PageViewer seems to be pretty common, but I'd like it to look more like the traditional gallery, with thumbnails and a scrollview. Aug 18 18:05:36 pellis, yes, the source code ;) Aug 18 18:06:02 ravilov: i looked at inflateLayout. but all i see is reference to styles and setId Aug 18 18:06:16 ravilov: i'm wondering where to find this piece of functionality Aug 18 18:06:17 py0|slacktop: what in particular is a mess? I found it to be about 100x more consistent and intuitive than eclipse to be honest. Aug 18 18:06:44 pellis, in all the other parts of the source? you won't find all the functionality in one single place Aug 18 18:07:07 ravilov: i guess so. however im not sure where to start and whats responsible for this Aug 18 18:07:15 rgr, it's entirely broken out of the box Aug 18 18:07:34 hello guys, do you have some books on android development? Aug 18 18:07:36 gradle wouldn't work, adb does *nothing* and prevents me from running my stuff Aug 18 18:07:38 thanks Aug 18 18:08:04 hi all, I am very new to android and I am following a tutorial to make a simple drawing app, but unfortnately the drawing part does not work. Would someone have the time to look at my code and advise please? Aug 18 18:08:52 I know that it may be a bit off-topic Aug 18 18:09:09 but little chuckle won't hurt people who code for money Aug 18 18:09:14 https://www.freelancer.com/projects/Mobile-Phone-Android/Experienced-Android-App-Programmer.html Aug 18 18:10:16 pellis, the inflater itself isn't too complicated really, all it does is read xml tags and attributes, figures out the view class name (which is the tag name), then does some basic checking (eg. if a tag has child tags, the corresponding view must be a ViewGroup), and then simply constructs new views as objects, passing them all the relevant attributes and interconnecting views into the view hiera Aug 18 18:10:22 rchy Aug 18 18:10:43 ravilov: but how is the IDs assigned and generated? Aug 18 18:10:44 most of the work is done in views themselves Aug 18 18:10:56 that's not done by the inflater Aug 18 18:11:20 view IDs are assigned just like for any other resource Aug 18 18:11:23 by aapt Aug 18 18:11:44 which advises with R ? or ? Aug 18 18:11:51 ...no Aug 18 18:11:55 aapt *generates* R Aug 18 18:12:43 ravilov: so it generates R *and* packs views with their respective ids? Aug 18 18:12:46 pellis, did you ever actually look into R.java? Aug 18 18:12:53 if you did, you'd find this remark: Aug 18 18:12:53 ravilov: yes of course Aug 18 18:13:02 This class was automatically generated by the aapt tool from the resource data it found. Aug 18 18:13:27 pellis, view IDs are no more special than any other resource Aug 18 18:13:45 .. packs views? Aug 18 18:13:55 by the same token you could also wonder what puts actual text into textviews when you use "@string/foo" Aug 18 18:13:57 * StingRay_ thinks view IDs are not generated by aapt Aug 18 18:14:01 ravilov: so in what case could I be looking, in runtime, at views which have IDs different from the IDs recorded in R? Aug 18 18:14:36 i had that bug a few times with ADT Aug 18 18:14:37 pellis, you can at any time manually assign whatever ID you want to any view Aug 18 18:15:28 do you mean you got inconsistent view IDs even though you didn't mess with manual ID assignments? Aug 18 18:15:36 ravilov: yes! Aug 18 18:15:50 well I guess that would be a bug or a glitch Aug 18 18:16:00 Assuming a clean build, view id's are going to match that in R.java Aug 18 18:16:06 Incremental builds can break in certain cases Aug 18 18:16:06 I was going to say Aug 18 18:16:13 for example i have rootView.findById( R.id.foo_control ), the view is not found because R.id.foo_control actual value isn't matching the value inside the rootView hierarchy for some reason Aug 18 18:16:13 probably leftovers from an incremental build Aug 18 18:16:27 ravilov: i *am* doing something hacky Aug 18 18:16:28 I had such problems too, always solved by making a clean build Aug 18 18:17:04 If rootView is inflated form a layout resource from another apk, your foo_control isn't going to have the same integer value as foo_control in otherapk Aug 18 18:17:04 pellis, is a view with id="@+id/foo_control" actually present in said layout? Aug 18 18:17:14 ravilov: it is present. Aug 18 18:17:16 ravilov: what i'm doing is - loading activity that uses views from an external APK, by wiring a DexClassLoader into my classloader chain Aug 18 18:17:27 hmm Aug 18 18:17:29 SimonVT: aha! Aug 18 18:17:34 that sounds like an accident waiting to happen Aug 18 18:17:51 ravilov: i know. its the only way to avoid the stupid dex method limit (65k) Aug 18 18:17:56 and yeah resource IDs are only ever unique per app/apk Aug 18 18:18:17 I'm kinda thinking... Aug 18 18:18:24 if you're hitting that limit Aug 18 18:18:40 you're either doing something very wrong, or you have a ginormous project Aug 18 18:18:43 ravilov: sure but i'm not mixing - i'm asking the APK for an activity. Aug 18 18:18:59 yes but then you're querying the view hierarchy using YOUR OWN ids Aug 18 18:19:01 ravilov: i have a game, libGDX takes around 30k, not much for my own logic and 3rd party libs. Aug 18 18:19:02 that's not going to work Aug 18 18:19:30 ravilov: no i'm not.. the activity within the APK start working, and it tries to inflate stuff using *its own* R id file.. Aug 18 18:19:36 pellis: Use DexClassLoader for stuff not ui/resource related Aug 18 18:19:41 Save yourself a lot of hassle Aug 18 18:20:09 SimonVT: yea, i'm trying to understand why it *doesn't* work. the whole thing now is me trying to udnerstand how android works - more than really solving the problem Aug 18 18:20:48 I'm trying to test an IAP by following this guide: https://developer.android.com/google/play/billing/billing_integrate.html Aug 18 18:20:50 I don't know, all I can say is, R.id.foo_control in apk1 is most probably NOT the same as R.id.foo_control in apk2 Aug 18 18:21:05 ravilov: it is not present in apk2 ,being that apk2 is the host Aug 18 18:21:06 but I keep getting "The item that you were attempting to purchase could not be found" Aug 18 18:21:19 pellis, and since you're trying to work some magic here, I wouldn't be surprised if your resource IDs get mixed up somehow somewhere Aug 18 18:21:20 I've hard-coded the id/sku into the app, just to test it Aug 18 18:21:34 and i've authorized my email address in the dev console for testing Aug 18 18:21:37 I'm not sure what else to try Aug 18 18:21:54 ravilov: yea, that's what im trying to understand. i'm suspecting this has to do with application context or assetmanager Aug 18 18:22:25 but i have no clue with infrastructural level android code Aug 18 18:22:26 pellis, could be, I haven't looked into it that much, but the point is, you're doing something here that you're most likely not supposed to do Aug 18 18:22:41 hi, do you have some digital books or complete or good tutorials on android development? thanks Aug 18 18:22:45 ravilov: but have no choice to, according to android engineers Aug 18 18:23:03 pellis, then you might be SOA :p Aug 18 18:23:36 good lord, not only does android-studio come basically 100% broken.. the fixes don't actually fix things.. -_- Aug 18 18:23:39 i bumped into this along the way https://github.com/Rookery/AndroidDynamicLoader Aug 18 18:23:47 Resource id's are just integers.. R lets you reference those integers by the name you gave them. At compile time, all your @+id/blah is replaced with the integer value Aug 18 18:23:47 as far as I know, when big/heavy apps such as games go past a certain limit, many of them switch to jni Aug 18 18:24:17 SimonVT: wait.. all of them at compile time? meaning inside the APK i have integers inside the XMLs? Aug 18 18:25:05 pellis, it's... complicated Aug 18 18:25:10 Yes Aug 18 18:25:36 SimonVT: so i have integers inside the XMLs and i have an R files. inside the APK - they're supposed to match Aug 18 18:25:39 let's not forget about resources.arsc which surely plays a huge role here Aug 18 18:26:49 They do match Aug 18 18:27:17 at least after a clean build ;) Aug 18 18:28:16 SimonVT: so the only case where they *dont* match - given that i load a good APK (which contains its own R and binary xml) Aug 18 18:28:42 SimonVT: is when i mess with the class loader which may point the code to a different R ? Aug 18 18:30:52 SimonVT: do they still all match is a single id is changed ? Aug 18 18:31:06 or added Aug 18 18:32:14 Lets say you create two R classes.. some.package.R and other.package.R .. In some.package.R you create a foo_control variable with the value of value of 1. In other.package.R you create a foo_control variable with the value of 2. That's basically what appt is doing in your case. Then you try to use some.package.R.foo_control to find some View with the id Aug 18 18:32:14 other.package.R.foo_control.. See how that wouldn't work? Aug 18 18:32:17 StingRay_: What do you mean? Aug 18 18:33:24 hey guys when using android studio if i want to add my project to git do i have to add it via the GUI and through version control or can i add it via the terminal on my linux box via the project folder? Aug 18 18:34:27 Psil0Cybin should be able to do it from the terminal Aug 18 18:34:44 perfect, so id just go into the main project folder and git everything from there Aug 18 18:34:51 correct? Just want to learn how to do it manually via the terminal Aug 18 18:35:02 i know its pointless with the GUI feature, but still interested to do it all via the terminal Aug 18 18:35:23 SimonVT: in my case - apk1 contains the same some.package.R as apk2 some.package.R <> Aug 18 18:35:27 i do most from command line and just use the IDE for the changed/added coloring Aug 18 18:36:23 SimonVT: this is a way out of whack usecase. the class loader have 2 *identical* classes with different content and the behavior is not defined Aug 18 18:36:57 SimonVT: however when i dont generate the same R file in the host APK - then worse thing happen at the plugin apk - apk1 Aug 18 18:37:51 hi, do you have some digital books or complete or good tutorials on android development? thanks Aug 18 18:37:53 Yes. You can get the right integer value if you want with Context#createPackageContext and Resources#getIdentifier Aug 18 18:38:03 one last last silly question, when making the repo it makes a .git folder in the project that wont harm anything? right Aug 18 18:38:08 like the gui prob does the same thing correct? Aug 18 18:38:18 any ways, not much appreciation as a giggle Aug 18 18:38:25 I should get back to DoTA Aug 18 18:38:26 no harm, thats the VC project root in IDE also Aug 18 18:38:55 could someone please sanity check me here. I can think of ways to maybe fix this, but they all seem hacky as if I am doing something fundamentally wrong. http://stackoverflow.com/q/25369422/1747491 Aug 18 18:39:05 But I assume there's more magic needed to get it all to properly work, especially with complex layouts Aug 18 18:39:10 So, just don't :) Aug 18 18:39:58 http://jaxenter.com/java-9-features-announced-50896.html Aug 18 18:41:03 g00s: great so i guess we have around 4-5 years to read that article until it becomes important ? Aug 18 18:41:36 who knows what android will look like in 4-5 years Aug 18 18:41:41 theblang: you should use isVisible() and getUserVisibleHint() from within onPrepareOptionsMenu or remove the fragment from the FragmentManager Aug 18 18:42:04 theblang: thats onPrepareOptionsMenu() of the fragment Aug 18 18:42:10 looks like the big things are jigsaw, and jni2 Aug 18 18:43:06 Napalm yeah, so that is what I was doing. Unfortunately, on some earlier versions of Android onPrepareOptionsMenu is called after onCreate but before onCreateView, which makes isVisible return false Aug 18 18:43:33 and? Aug 18 18:43:39 Napalm which causes problems if I am using the fragment elsewhere Aug 18 18:44:03 Napalm because then I never inflate at all on those versions of Android Aug 18 18:44:42 theblang: Use Fragment#setMenuVisibility from your Activity to decide whether a Fragment should display its options menu or not Aug 18 18:45:06 doh Aug 18 18:45:10 You should know in onCreate of your Activity, after the content view is set up, if that's the case Aug 18 18:46:04 Napalm, SimonVT okay. so if not master-detail and if the fragment is still around, set the menu visibility to false Aug 18 18:46:17 but why is the fragment still around Aug 18 18:46:21 this doesnt make any sense Aug 18 18:46:38 Napalm yeah, it is really confusing me too. and I am really trying to figure out if I am fundamentally doing something wrong Aug 18 18:46:50 Napalm I thought maybe I read that if the orientation changes the fragment isn't necesarilly destroyed Aug 18 18:47:26 The FragmentManager re-creates fragments that are added when restoring state Aug 18 18:47:41 you are trying to switch between master and detail "views" using fragments? Aug 18 18:47:42 That's why you need an empty constructor, it uses reflection Aug 18 18:48:13 Napalm switch between master-detail, and just detail, using fragments Aug 18 18:49:12 and when you press back on the details fragment you get the master fragment? Aug 18 18:49:29 Napalm the Master Activity that has the master fragment, yeah Aug 18 18:49:54 ok wait, are there also multiple activities? Aug 18 18:50:33 hello, is it possible to download the ROM from an android device? is it possible not to upload the image to the device with fastboot, but rather download from it? i want to make a backup of factory ROM, just in case. Aug 18 18:50:33 Napalm yeah. I have a Master Activity and a Detail Activity. I wanted the user to enter the master-detail from the Detail Activity. Aug 18 18:50:54 Napalm essentially like the generated master-detail example, but reversed. which it seems is how the gmail app does it Aug 18 18:51:20 ok stop Aug 18 18:51:29 do you have multiple activities Aug 18 18:51:42 Napalm yes Aug 18 18:51:46 Hello, is it possible to debug a native library with android-studio or at least get a backtrace? Aug 18 18:52:08 theblang: and you are using one as a master and the other as detail and you also trying to use fragments? Aug 18 18:52:42 would adding a project to git manually via terminal when it creates a .git folder be harmful or is that fine,guys just want to clarify Aug 18 18:52:56 Napalm yeah. The Master Activity houses the master fragment. But if the user clicks an item in the list that is in the master fragment they are taken to the detail Activity, which has two layouts for portrait and landscape Aug 18 18:53:10 ok thats where your going wrong Aug 18 18:53:19 you are overcomplicating things Aug 18 18:53:24 just stick with one activity Aug 18 18:54:32 Napalm yeah, I see how I could do it with just one. I have actually meant to refactor, but it will have to wait until the next version because of my deadline Aug 18 18:55:14 Napalm the generated example and a lot of the tutorials I found did still use two activities. BUt I have been wanting to trim it down to one. Aug 18 18:55:55 theblang: so the user us in the master activity and goes to the detail activity rotates to landscape and they get presentent with the master and detail and when they press back the go back to the master activity Aug 18 18:56:19 Napalm yeah Aug 18 18:56:51 ok, one moment Aug 18 18:57:15 Napalm that behavior is pretty much modeled after the gmail app Aug 18 18:57:37 Napalm when you do master / detail, do you mainly stick to putting everything in the same activity? i can't believe i'm still asking this Aug 18 18:58:02 g00s: yes Aug 18 18:58:12 good to know, thanks Aug 18 18:59:04 see, what i think google should do is make FragmentManagerManager ... :) Aug 18 18:59:20 dear god, no Aug 18 18:59:32 and you draw your fragments in all the orientations / sizes and FragmentManagerManager takes that and does all the magical things Aug 18 18:59:33 hehe Aug 18 19:00:53 g00s, Napalm I'll be honest, master-detail has driven me nuts and consumed so much of my time. The concept is super simple, but I feel like ive been bogged down with edge case stuff. "Devil is in the details" is probably how I feel. The one activity approach is probably the way to go, but it is kind of frustrating that none of the exmaples or tutorials you find do it that way. Aug 18 19:01:08 How can I control the phone's wifi hotspot? I want to be able to turn it off and on and also change the AP name Aug 18 19:01:22 theblang yeah, you wind up with a ton of state in that one activity Aug 18 19:01:32 Would i upload the build folder in my project folder i think imay have to use the GUI because all the projects online are misising the build folder i think it will add Aug 18 19:01:42 g00s: i never seem to have that problem Aug 18 19:02:22 well, i'm not that bright for one Aug 18 19:03:05 this is cool http://blog.danlew.net/2014/08/18/fast-android-asset-theming-with-colorfilter/ Aug 18 19:03:30 old news Aug 18 19:03:31 colorPrimary, colorDark, colorAccent - this is basically WIndows Phone. they got this right early on. Aug 18 19:03:57 A loop counts a clock up which I am displaying, when I am leaving the app and re-enter it the clock did stop counting Aug 18 19:04:03 what's a good way to tackle this? Aug 18 19:04:50 platzhirsch well i guess you could try Chronometer http://developer.android.com/reference/android/widget/Chronometer.html Aug 18 19:04:54 platzhirsch: base your time on http://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime%28%29 and save it in your state Aug 18 19:05:08 Napalm: that sounds reasonable Aug 18 19:05:21 thanks Aug 18 19:05:34 g00s: interesting Aug 18 19:10:50 SimonVT yeah, using setMenuVisibility worked. I do hate that now I have an nested if statements. Just makes me wonder if I should be doing something different or if this is normal Aug 18 19:13:27 SimonVT nested if statements in my onCreate of the Activity that is Aug 18 19:18:37 As for doing something else.. Basically noone uses master-detail Aug 18 19:18:48 Not in the form described on d.android.com at least Aug 18 19:21:15 hey guys, i put a LocationListener in a seperate class-file (MyLocationListener). it works, but if i want to remove locationUpdates it doesnt stop to call onLocationChanged....any help on this? Aug 18 19:25:27 Hello Aug 18 19:26:01 hey guys. iv've got a gradle project with 2 dimensions: "client" and "subscription". how do i get an asset in subscription to override the one being overridden in "client"? Aug 18 19:26:10 hi, do you have some digital books or complete or good tutorials on android development? thanks Aug 18 19:26:13 or sorry, not an asset, an xml string resource Aug 18 19:29:19 When i try: make_ext4fs -s -a system system_modified.img system_mount/ then i become the error can't set android permissions - built without android support Aug 18 19:29:54 fire855: wrong channel Aug 18 19:30:09 Which then? Aug 18 19:30:18 read title/topic Aug 18 19:30:29 fire855: linux,debian, ubuntu.... Aug 18 19:30:44 but i will build a android image.. Aug 18 19:30:53 when i only use it without -a system it work Aug 18 19:31:00 wrong channel Aug 18 19:31:06 this is app development Aug 18 19:31:17 ah okay. Give it a rom development channel? Aug 18 19:31:30 read title Aug 18 19:31:33 topic Aug 18 19:34:04 oh, cool! I didn't realize that an official pull to refresh made it into the support library Aug 18 19:34:34 Guess I should read the update log more closely Aug 18 19:35:00 eh, I remember when it was discouraged... Aug 18 19:35:24 p_l haha, funny how things change I guess Aug 18 19:37:39 so... glass developers here? Having a MF of a time trying to publish a livecard from a service Aug 18 19:37:50 no errors, nothign in logcat to lead me to beleive anythign is wrong Aug 18 19:37:52 just doesnt work Aug 18 19:49:43 when was setIndoorLevelPickerEnabled? Aug 18 19:53:15 If I want to make sure, that something will be called when user leaves my application, is onDestroy in my Main Activity (on the bottom of Activities stack) a good place to write code? Aug 18 19:53:34 Of course, except the situtations when user kills my app with 9 signal or sth like that : ) Aug 18 19:54:21 I mean most of the usual situations, so for example, when user leaves my app and will go to some other, and later, this thing (some kind of GC) which cleanes up memory on Android will remove my activity Aug 18 19:57:29 There's no guarantee that onDestroy will be called Aug 18 19:58:34 swistak35: sounds like you want to handle onTrimMemory() Aug 18 19:58:56 can anyone help me with this? http://stackoverflow.com/questions/25371069/mylocationlistener-implements-locationlistener-removeupdates-doesnt-work Aug 18 20:00:46 adkins: is it the same instance ? how is that instance identified to the register ? I dont know much about locationListener, but I assume it works that way ? Aug 18 20:01:44 StingRay: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, mListener); Aug 18 20:02:14 yes and are you using the "smae" instance to unregister it ? Aug 18 20:02:33 *same Aug 18 20:05:43 StingRay i guess you mean the locationManager ....well i always did "LocationManager locationManager = ((LocationManager) this.getSystemService(Context.LOCATION_SERVICE));" in different methods, asuming that it is always the same - maybe thats the mistake.i`m gonna make an instance of that manager and try it. brb Aug 18 20:09:29 no i mean the same instance of your class Aug 18 20:09:59 does an executor service have it's own message queue? Aug 18 20:10:27 or would it block if it's all threads are being used? Aug 18 20:11:27 StingRay ok last one didnt solve it. MyLocationListener mListener=new MyLocationListener(); and as you see in the code i always used mListener Aug 18 20:12:02 yes and do you unregister the same "instance" you registerd ? Aug 18 20:12:33 or are you passing in a totally new instance that has never been registered ? Aug 18 20:12:50 just to clarify: locationManager.removeUpdates(mListener); is what you mean by unregistering right? Aug 18 20:13:06 do you know what an instance is ? Aug 18 20:13:12 of course Aug 18 20:13:29 is mListener the same instance all the time ? Aug 18 20:13:34 yes Aug 18 20:14:25 so you register and unregister in the same scope with the same listener without ever creating it again via new MyLocationListener ? Aug 18 20:14:36 yes Aug 18 20:15:08 very odd then, before reg and before unreg log the object name Aug 18 20:15:18 myListener.getString() Aug 18 20:17:02 ok. its pretty weird, i`m pretty sure that it worked when it was not in a seperate class ("this"-listener), but i`ll double check that again Aug 18 20:18:13 I'm using GCM to receive push notifications on my app. The problem is that if the user uninstall the app and install it again, the app will receive duplicated push notifications, because the app was not able to call unregister before the user uninstall it. There is a way to unregister the device before the unistall? Aug 18 20:18:34 * f2prateek found it I think file:///Users/prateek/Library/Application%20Support/Dash/DocSets/Android/Android.docset/Contents/Resources/Documents/docs/reference/java/util/concurrent/LinkedBlockingQueue.html Aug 18 20:18:52 ^^ http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/LinkedBlockingQueue.html Aug 18 20:19:27 Birk_: I hope your talking crap…cause I too have a design flaw if thats the case :) Aug 18 20:19:44 but when registering GCM the old id is not valid Aug 18 20:19:50 so sending to it will do nothing Aug 18 20:20:37 so every 2 days I register on GCM , I remove all records older than 3 days every day :) Aug 18 20:21:01 well, no older than a week maybe Aug 18 20:21:10 doing by hand so whenever i remember Aug 18 20:21:14 :) Aug 18 20:21:17 What's the best way to animate a determinate horizontal progress bar? Specifically, when I set a specific progress and the width of the progress section changes, I want a smooth animation. Is there any way to do this? Aug 18 20:21:21 Googling has resulted in nothing. Aug 18 20:22:24 I've just tested. I install the app and register on GCM and keep that id on server. The notifications works well. If I uninstall the app and install it again, the register will be called again. I send the new id to server and the app starts receiving two notifications Aug 18 20:22:35 jessie dont you just setProgress Aug 18 20:22:37 ? Aug 18 20:23:31 I thought the older would be invalidated Aug 18 20:23:47 Birk_: busy atm but will test myself when I have a sec… I thought the google register was app/device/user reliant Aug 18 20:24:32 so you would reguardless of the app install instance based of the app name, user and device, get the rame regId Aug 18 20:24:44 StingRay: that's what the docs says Aug 18 20:24:44 but you are now making me worry on that :) Aug 18 20:25:20 I think there are only google related event that can actually cause the regid to ever change Aug 18 20:25:32 as in it's very not likely Aug 18 20:25:34 :) Aug 18 20:25:45 StingRay_: I'm trying that and it just changes immediately, no animation at all. Aug 18 20:26:14 oh, well do it every percent then Aug 18 20:26:15 :) Aug 18 20:26:31 or add some delay, it's supposed to represent a realtime event Aug 18 20:26:44 not some random interpolated thing that you deem fit :) Aug 18 20:27:12 Well, sometimes I like te jump 10% at a time. :-P Aug 18 20:27:23 StingRay ok now it works, i overlooked something while testing, wasnt entering the part where i unregister because of some other conditions....at least not at the last few attempts. it worked and i noticed it when i did mListener.toString() as you suggested, so thank you ;) Aug 18 20:27:54 jessie: You can use an ObjectAnimator Aug 18 20:28:06 https://developer.android.com/guide/topics/graphics/prop-animation.html#object-animator Aug 18 20:28:48 StingRay_ : when installing from the same apk the key keeps the same :p. I think the problem is related to installing the app using eclipse run Aug 18 20:32:08 SimonVT: Perfect, you rock. Aug 18 20:35:17 StingRay just in case you are interested: the locationManager has to be exactly the same instance too. so doing "LocationManager lm=this.getSystemService(Context.LOCATION_SERVICE));" doesnt always give back the same instance and it doesnt work Aug 18 20:38:39 If anyone is using tavis-ci and your builds suddenly start failing, it's a change they made recently -- there's no build-tools preinstalled anymore. Aug 18 20:40:46 hi im trying to compile a source from github. running gradle gives me: Cannot invoke method split() on null object ; it seems related to this code: def parts = version.split('[\\.]') ; im not exactly a dev, but trying to modify the app a little bit... so what seems to be the problem here? Aug 18 20:42:10 How can I get a backtrace of a segfault happening in the JNI code that the app executes? Aug 18 20:55:58 are there any coders interesting in helping an NGO in India? Aug 18 20:59:43 supay, that falls under the "no advertising, jobs or otherwise" rule Aug 18 21:00:18 SimonVT: not advertising, i thought i could find interested devs.. this isn't really a job. Aug 18 21:00:21 But yes, sorry about that. Aug 18 21:10:04 if you set empty view on a list view, does that empty view have to be directly beside the list view? Aug 18 21:10:05 i'm not even sure why we have that rule; android devs have it hard enough - lets make it harder by not letting anyone talk about jobs Aug 18 21:10:39 g00s, because otherwise the channel changes into ad spam Aug 18 21:10:57 Because this channel is for developers to discuss developing android apps, not recruiting Aug 18 21:11:01 i guess i'd let it go that way until it became a problem Aug 18 21:11:02 and I guess the point is to talk about development, not see bots advertising jobs :) Aug 18 21:13:16 for example, the rule could be : if you are edvertising a job, put the tag @job in the text somewhere. then people could /ignore -regexp job if they didn't want to see those things Aug 18 21:15:08 There are plenty of other places to find developers, no need to include this channel Aug 18 21:15:21 SimonVT: any other chan? Aug 18 21:16:01 There's a whole LinkedIn there. Aug 18 21:16:22 Sure, LinkedIn. -." Aug 18 21:16:22 it also hasn't been an issue in iphonedev so i don't see why it would become an issue here, but whatever Aug 18 21:17:03 I don't know of any freenode channels for recruiting, no. There's the internet Aug 18 21:17:26 if using setEmptyView, does the empty view have to be right next to the ListView? Aug 18 21:17:26 How enlightening. Aug 18 21:17:42 supay lookat the rules for reddit/r/androiddev Aug 18 21:17:46 maybe they allow that Aug 18 21:17:53 also there's HN "We're hiring" Aug 18 21:17:54 cool, I'll check that out Aug 18 21:18:01 nice! Aug 18 21:18:12 theblang: no Aug 18 21:18:44 It just toggles visibility on the listview and emptyview.. They can be wherever Aug 18 21:18:59 mhm Aug 18 21:19:06 it just has to be inflated at the right position Aug 18 21:19:24 Mavrik inflated at the right position? Aug 18 21:19:36 see what SimonVT wrote :) Aug 18 21:20:17 SimonVT, Mavrik so weird. I implemented a SwipeRefreshLayout, which can only have one child. after moving the empty view it doesn't seem to show up anymore Aug 18 21:21:08 theblang, if you moved EmptyView in a way that wouldn't be visible if ListView wouldn't exist Aug 18 21:21:15 then of course you're not going to see it :) Aug 18 21:21:31 as you were told, setEmptyView just adds a reference so ListView can toggle visibility Aug 18 21:22:30 If SwipeRefreshLayout can only have one child, make that child some ViewGroup.. Then put however many you want in that ViewGroup Aug 18 21:22:44 SimonVT child must be an adapterView :( Aug 18 21:23:26 Mavrik hmm, Im assuming this is okay then http://pastebin.com/K8wyM2Ls Aug 18 21:25:56 yeah, no empty view with that XML Aug 18 21:27:10 is swiperefreshlayout covering your textview? Aug 18 21:28:16 hmm, ScrollView is 1700 lines of code Aug 18 21:28:23 annoying. Aug 18 21:29:19 Make sure the empty view is visible when you don't call setEmptyView Aug 18 21:31:13 SimonVT what exactly do you mean? explicity set its visibility? Aug 18 21:31:46 just don't call setEmptyView Aug 18 21:32:00 if you don't see your empty view then your layout doesn't work. Aug 18 21:33:44 Mavrik really sucks that they make an official pull to refresh layout but didn't think about the empty view Aug 18 21:33:49 Just make a FrameLayout that has your SwipeRefreshLayout and your empty view, then call setEmptyView() on your listview Aug 18 21:33:58 theblang, ugh Aug 18 21:34:16 theblang, empty view works perfectly fine with official pull to refresh layout Aug 18 21:34:18 fix your damn views. Aug 18 21:34:36 use Hiearchy Viewer to help you. Aug 18 21:34:46 remove your listview, make sure your empty view is visible Aug 18 21:34:58 add your listview, make sure your empty view is STILL visible Aug 18 21:35:08 THEN modify your code to use setEmptyView. Aug 18 21:37:37 birbeck yeah, that is what I am currently doing Aug 18 21:37:48 Mavrik I see what you mean now. yeah, it is visible Aug 18 21:39:48 Has anyone an idea how I can fix "dlopen failed: cannot locate symbol "signal" referenced by"? Happens if it tries to load the JNI library Aug 18 21:41:09 mlq, your library is linked to something else that's not loaded or present Aug 18 21:41:21 Android's native library loader doesn't work the same way as Linux loader, hence you get the message Aug 18 21:41:33 statically compile your dependency into your library, or load it manually before loading this one Aug 18 21:42:28 Mavrik: Yeah, but I am wondering what that is, but signal should be implemented in libc, right? Aug 18 21:42:45 I really can't tell you what you're calling in your code ;) Aug 18 21:44:13 The signal function, which it apparently can't locate, is used - I am trying to use coffeecatch (https://github.com/xroche/coffeecatch) Aug 18 21:46:14 you might be compiling towards wrong android API Aug 18 21:46:21 I haven't seen your issue yeat Aug 18 21:49:08 I didnt know about hierarchy viewer... ah well... but it doesnt seem to do much! Just shows my device. Docs say I need a "developer version of the OS".. ulp... Aug 18 21:49:49 I've set targetSdkVersion, compileSdkVersion to 19 and buildToolsVersion to 19.1 - I'm testing on 4.4.4 Aug 18 21:50:00 i find hierarchyviewer to be extremely buggy Aug 18 21:50:46 mlq may as well use buildTools 20 Aug 18 21:51:18 but whats this "developer version of the os" before I go cross eyed in goOOogle? Aug 18 21:51:35 Bitmap theStartFlagBitmap = BitmapFactory.decodeResource( getResources(), R.drawable.green_flag_42_42 ); Aug 18 21:51:40 rgr its a dev build Aug 18 21:51:53 I can do that in my MainActivity but not in my LevelView, what is the difference? Aug 18 21:52:08 my phone is rooted. according to SO that should be enough . I guess not. Aug 18 21:52:51 rgr is this your own app ? Aug 18 21:53:20 yeah. hang on. it said no debugger maybe that mean IJ too... I'll check. Aug 18 21:53:46 nope. still nowt. Aug 18 21:55:47 rgr https://github.com/romainguy/ViewServer Aug 18 21:56:47 Ah thanks. Aug 18 22:04:05 g00s: I should just need to add to the top level of my manifest? It builds but Im not prompted when I run the app from IJ. Aug 18 22:04:28 scratch that. wrong perm. Aug 18 22:05:23 SimonVT, Mavrik yeah, that works perfectly fine. sorry, I was doing something stupid Aug 18 22:05:29 man Aug 18 22:05:36 wow. thanks a lot . That was pretty painless. This Romain guy knows how to prove a utility class. Aug 18 22:07:36 romain is/was a google android platform engineer Aug 18 22:08:46 useful tool. Aug 18 22:10:34 yes, very. The layout hierarchy is very very nice indeed. Certainly better than the attempt in ddms I think it was. Aug 18 22:27:56 Test from new app on my tablet... Aug 18 22:28:21 Works :) Aug 18 22:31:04 Still trying to disable the user being able to swipe down from the top of the screen to show the status bar... I realized that the user can pull it down even when not in immersive mode. Aug 18 22:31:48 what's wrong with that ? Aug 18 22:33:56 I can get it to work in older versions, but not in kit kat Aug 18 22:34:40 Anyone familiar with the android shell that knows if it's possible to add aliases? Aug 18 22:34:51 Is it not a typical POSIX Shell? Aug 18 22:35:22 it's "very" limited Aug 18 22:35:42 bankai_au: That's directed at me, right? Aug 18 22:36:00 yes Aug 18 22:36:06 You can run scripts from the command line if that helps... Aug 18 22:36:13 never tried setting an alias, but i'd be surprised if it didn't work Aug 18 22:36:26 Welp... works apperantly... Aug 18 22:36:36 alias test="echo test" Aug 18 22:36:39 works great Aug 18 23:01:49 I added existing psyonspotify(https://github.com/spotify/psyonspotify) Android project into my Eclipse. I run the app and after I login using my premium Spotify account I see that the app just shows Loading the latest album and some icons. Nothing else is shown or played. Actually I want the app to play Spotify music so that I can look at music delivery callback and see what audio data is received. Can someone suggest me on how Aug 18 23:04:57 I finally decided to try Genymotion, wow Aug 18 23:09:07 If I use a ViewPager, how do I set a specific fragment to be chosen from the start? Aug 18 23:09:37 like if the user choose a level from fragment 2 then presses back then i want fragment 2 to be shown, not fragment 1 Aug 18 23:13:46 smitzer: use FragmentStatePagerAdapter and/or call setCurrentItem() Aug 18 23:15:55 birbeck, in which class do I set current item? Aug 18 23:20:49 smitzer: looks like it is setPrimaryItem() Aug 18 23:38:26 it is deprecated Aug 18 23:41:24 smitzer: there is a newer version of the method Aug 18 23:41:37 the one that takes a viewgroup instead of a view is not deprecated Aug 18 23:47:21 hello all Aug 18 23:47:59 for anyone who has done game dev on Android, what engine is a good way to start? If this isn't the appropriate channel, is there one more game-dev appropriate? THanks. Aug 18 23:48:52 what is the most lightweight way to create an app for android using mac and windows? Aug 18 23:49:18 eindoofus: most lightweight? Aug 18 23:49:31 as in the toolchain? Aug 18 23:50:38 i'm trying to avoid an IDE and a bloated language (ex. Java) Aug 18 23:51:13 don't know if i'll be able to avoid the ide but i was thinking that there might be a slimmer language available like python Aug 18 23:51:27 Java can be as bloated as you, the developer, makes it. As is the case with any language. Aug 18 23:51:33 well, you can develop android apps using a text editor, java and the android sdk, i won't give any feedback on using anything other than java Aug 18 23:51:50 scala? ;) Aug 18 23:51:58 fuck scala android apps Aug 18 23:52:16 birbeck: why? Aug 18 23:52:18 sounds like java is probably the best way to go Aug 18 23:52:28 if you write your native android apps in any language other than java with the standard android sdk, i guarantee your app will suck Aug 18 23:52:46 heh Aug 18 23:52:49 does that include html5/js? Aug 18 23:52:52 eindoofus: just get Android Studio and be done with it Aug 18 23:53:03 eindoofus: your best best is Java and using Android Studio (it is pretty lightweight IDE) imbo Aug 18 23:53:04 eindoofus: that is a mobile web app, not a native app Aug 18 23:53:06 imho Aug 18 23:53:16 i'd like to be able to use the app on the desktop too though Aug 18 23:54:02 then either write a desktop or web version, or do web only with a mobile web friendly view Aug 18 23:54:17 don't write your android apps in html Aug 18 23:54:31 take a look at jfx or libgdx Aug 18 23:55:23 if you use phonegap or some similar framework to build your apps, it will be bloated, it won't look good, and it will crash Aug 18 23:56:28 why is there an option to create an Android Gradle project but not a module in IntelliJ? Aug 18 23:56:34 is it possible to create a mobile web app that is stored on the phone so that the user doesn't have to access the net to use it? Aug 18 23:56:37 there should be a module of it too Aug 18 23:56:55 frankdoyle: you create the modules in your project Aug 18 23:58:43 http://www.zimagez.com/zimage/screenshot-08182014-095830am.php <- New Project Aug 18 23:59:09 http://www.zimagez.com/zimage/screenshot-08182014-095800am.php <- New Module Aug 19 00:00:01 so you already have a project Aug 19 00:00:08 you are adding a module to the project Aug 19 00:00:56 really i'd like to wrap gradle around my existing code Aug 19 00:00:57 the new project screen doesn't look right at all Aug 19 00:01:19 frankdrey: you can migrate existing projects Aug 19 00:01:23 and include it as a module in my existing project Aug 19 00:02:23 i try to add the facet "Android-Gradle" to the existing regular Android module Aug 19 00:02:24 it will create the gradle build files for you, if you want to drop existing source in a new module in your existing project, just create a new android module, and then move your source over to the correct location Aug 19 00:02:34 but the config screen for it is empty Aug 19 00:03:34 I just tried creating a new Android module Aug 19 00:03:38 and it's not Gradle :/ Aug 19 00:03:55 hmmm Aug 19 00:03:59 let me try this the other way Aug 19 00:04:09 I'll create an Android-Gradle project and add my other modules to it Aug 19 00:06:58 do I *have* to use the new folder structure? Aug 19 00:07:35 is there a qmake/cmake flag for specifying the ndk standard lib that is linked against? Aug 19 00:07:38 ah, found how i can define it manually Aug 19 00:07:53 I don't want my .so to have a dependency on gnustl_shared Aug 19 00:17:28 hopefully i'll be able to recreate this gradle crap around my existing module folder Aug 19 00:17:36 i'd rather not set up a new git repo Aug 19 00:20:58 should I include .gradle in git? Aug 19 00:21:41 .gradle, or gradle? Aug 19 00:22:19 the gradle dir should be in git, but not the .gradle Aug 19 00:22:32 iirc Aug 19 00:30:06 alright, thanks JesusFreke Aug 19 00:32:12 and look what I found :3 Aug 19 00:32:13 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure Aug 19 00:32:19 * frankdrey bookmarks Aug 19 00:32:25 gotta leave somewhere >: Aug 19 00:32:27 bbiab Aug 19 00:43:27 anyone know how to auto complete lambda's with intellij/as Aug 19 00:53:31 how can I link against stlport with qmake/cmake? Aug 19 01:31:44 what lambdas Aug 19 02:24:13 I'm trying to refresh a fragment after the user makes an in app purchase - any tips? Aug 19 02:24:44 I basically have an activity that contains a fragment which holds a viewpager Aug 19 02:24:50 the viewpager cycles through other fragments Aug 19 02:25:12 and I just want a button that says the price to change to "Play now!" instead of showing the price Aug 19 02:25:46 I've tried two things - doing "startActivity(getActivity.getIntent())" Aug 19 02:26:23 and the second thing is from the activity, getting the current fragment, then detaching and reattaching it Aug 19 02:27:05 I've tried putting both of those in my "onIabPurchasedFinished" and in the "onActivityResult" methods Aug 19 02:27:15 but it doesn't seem to work Aug 19 02:33:53 make an interface, implement it in your fragment, in the activity get a list of all fragments, check if it implements your interface, if it does call the method (which will update your button) Aug 19 02:38:27 Is there a way to determine the account added your application from the play store? Aug 19 02:39:01 or get the default play store email? Aug 19 02:42:30 Interesting Aug 19 02:42:50 I'll think about that bankai_au Aug 19 02:43:00 I'm looking for the primary email on the device. Aug 19 02:56:12 I'll just stick to using the first account on the phone... Aug 19 02:58:51 I have another question though **** ENDING LOGGING AT Tue Aug 19 02:59:59 2014