**** BEGIN LOGGING AT Fri Jan 24 02:59:59 2014 Jan 24 03:00:10 is it possible to give an action bar a background color and not a background image? Jan 24 03:00:29 ir7466, I think the checkboxes handle it all as in they store the boolean preferences based on whether it's checked or not Jan 24 03:01:01 but it sounds like you are leaving the activity to go to your main screen, then returning to the (preferences) activity? Jan 24 03:01:04 is that right? Jan 24 03:01:09 yes Jan 24 03:01:12 ir7466, that's right Jan 24 03:01:26 i've found with so many activities i've worked on that if you return to it, it loses its state Jan 24 03:01:43 i've put in some funky logic in onResume() to stop that from happening on occasion Jan 24 03:02:30 but it's a sharedpreference surely it would keep it? Jan 24 03:03:00 Like I said, I'm not sure about preferences as I haven't touched that before Jan 24 03:03:18 What I'm saying might be a load of rubbish, it's just my guess based on what you've said Jan 24 03:03:37 But it sounds like some problems I was having with regular activities, of states not saving Jan 24 03:04:09 Maybe try creating a class with a series of boolean properties to represent your preferences, and then construct an object when you load the preferences screen - store the values in the object Jan 24 03:04:19 and then if you return to that screen, load from the object Jan 24 03:04:20 just a guess Jan 24 03:05:28 I could try Jan 24 03:05:33 but yeh I mean Jan 24 03:05:59 it deals with unchecking fine, the boolean changes to false, but it can't change back to true Jan 24 03:06:02 that is the problem Jan 24 03:06:08 so in a way it is keeping it state Jan 24 03:06:42 because I could go back and fourth from the preferences activity to the main activity without unchecking the box and the boolean will remain true until i uncheck it Jan 24 03:06:47 so something is working somewhere Jan 24 03:06:57 but once I uncheck it, then that's done Jan 24 03:07:07 it won't listen to my changes anymore Jan 24 03:07:11 is it true by default? Jan 24 03:07:23 ir7466, yes Jan 24 03:07:36 well Jan 24 03:07:40 so you uncheck it, leave the activity, then return and it is true again? Jan 24 03:07:46 nono Jan 24 03:07:50 it's not true by default sorry Jan 24 03:08:07 so it's false by default, you check it and it becomes true Jan 24 03:08:11 you go back and forth and it's ok Jan 24 03:08:22 but you change it to false, go back and forth and it's true again? Jan 24 03:08:54 no, It's supposed to be true by default but I've already got the preference saved so, when I build the app it is checked/unchecked depending on how I left it before Jan 24 03:09:21 so if I had left it checked I can go back and fourth between the activities and it will remain checked until i uncheck it Jan 24 03:09:30 which turns the boolean to false Jan 24 03:09:49 but it will remain false even if I check the box again Jan 24 03:09:57 the only way I can get it back to true is if I rebuild the app Jan 24 03:10:04 (leaving it checked of course) Jan 24 03:10:26 you seem like you're doing everything right, can't see why it's not working as it supposed to Jan 24 03:10:33 sorry, just had to say that haha Jan 24 03:10:51 but if I build the app having left it unchecked, it will stay false Jan 24 03:10:53 no matter what Jan 24 03:10:58 ir7466, I see what you did there Jan 24 03:10:58 lol Jan 24 03:11:16 unfortunately i'm not really sure Jan 24 03:11:21 that's alright Jan 24 03:11:54 bankai_: the crash is at the line were copy of file from asset to datbase is. i think copystream method is making problem Jan 24 03:11:55 I really appreciate the effort Jan 24 03:12:18 I'm just surprised nobody else has figured out yet Jan 24 03:14:53 "but it will remain false even if I check the box again" <-- how are you testing this ? Jan 24 03:16:12 bankai_, I am logging takePicturePrefs boolean in the main activity both before and after loadPrefs() method Jan 24 03:16:54 and so if I go to the preference activity and check the box Jan 24 03:17:09 and return to the main activity Jan 24 03:17:17 the logs still say that takePicturePrefs is false Jan 24 03:17:37 are you getting a new reference to the shared prefs? Jan 24 03:19:18 bankai_, this is my loadPrefs() method which gets called from the onCreate() in MainActivity https://gist.github.com/anonymous/791bf342d72520749b00 Jan 24 03:19:51 the other prefs are done in the exact same way, and they work perfectly so I don't see why the takePicturePrefs is not working] Jan 24 03:20:02 I roll my own fragments to set/modify preferences ... using SharedPreferences to persist the values while navigating Jan 24 03:22:26 i assume at some point you set it to true, coz with this example takePicturePref will always be false Jan 24 03:23:26 wouldn't it be set to true when i check the box Jan 24 03:23:36 why would it ? Jan 24 03:23:46 it works with the rest? Jan 24 03:23:47 you only ever set it to false, the default value of a bool is false Jan 24 03:24:06 well it's initialized to true Jan 24 03:24:24 in MainActivity Jan 24 03:24:46 but like the rest checking the checkboxpreference should surely set it to true? Jan 24 03:25:08 cos that's what it's doing to the other prefs Jan 24 03:26:19 there's a lot of needless code here, is there a reason you have all these if statements ? Jan 24 03:27:05 bankai_, not really Jan 24 03:28:22 "code obfuscation" - source protection? ;) Jan 24 03:30:05 https://gist.github.com/anonymous/ff8caa49f7c9041633b5 Jan 24 03:30:18 that's my preference activity bankai_ ^^ Jan 24 03:33:06 bankai_, it should work right? Jan 24 03:33:27 onSharedPreferenceChanged <-- is this being called the way you think it is? Jan 24 03:34:09 bankai_, I've put a log in there and each time i check/uncheck the box, the log appears Jan 24 03:35:31 OnActivityResult in mainactivity never seems to get called but i'm not sure if thats relevant Jan 24 03:36:09 don't you need to write/commit SharePreference changes in your listener? or... somewhere? Jan 24 03:37:39 I thought checking a box does it for you Jan 24 03:43:13 bankai_, have u given up? Jan 24 03:44:01 I think this is a simple question, I'd really appreciate it if someone could take a peek as it's probably something obvious. I've got a relative layout with two linear layouts, the second linear layout is bottom aligned (this is correct) but I want the first to be centred in the remaining space at the top Jan 24 03:44:12 The code I am using is at http://pastebin.ca/2580989 - any thoughts appreciated Jan 24 03:44:46 Instead of being centred in the remaining space, it's top aligned for some reason Jan 24 03:49:06 will anyone develop a custom rom for the htc one vx Jan 24 03:49:10 ill give you money or thignsi n trade Jan 24 03:49:14 CocoStorm: not sure, to be honest, set some break points and step through your code. also keep an eye on the XML file Jan 24 03:49:23 raspberrypifan: not the right channel for that kinda thing Jan 24 03:49:44 oh which one should i go too then Jan 24 03:49:51 topic Jan 24 03:50:21 well its about android development though Jan 24 03:50:39 just go to #android-root or something Jan 24 03:53:14 app development vs OS Jan 24 03:53:16 bankai_, this is the xml file https://gist.github.com/anonymous/88b4fde29f5c58220996 Jan 24 03:53:53 ah Jan 24 03:54:42 bankai_, btw, preferenceChange is always true Jan 24 03:55:05 bankai_, it is only false when the preference activity is first created, which is might be why this is all happening Jan 24 03:55:22 after that, it is always, always true Jan 24 03:55:24 of course it's always true... Jan 24 03:55:43 you change anything in that pref activity and it's going to be true Jan 24 03:55:50 oh ya Jan 24 03:55:51 lol Jan 24 03:55:54 it's 4am Jan 24 03:56:00 no no it's 2pm Jan 24 03:56:03 i'm runnin on empty Jan 24 03:56:06 i'm in the uk Jan 24 03:56:07 :) Jan 24 03:56:16 i don't acknowledge other timezones :P Jan 24 03:56:20 lol Jan 24 03:56:29 but yeh I can't believe I haven't sorted this small thing out yet Jan 24 03:56:32 it's unbelievable Jan 24 03:56:33 but how lucky are you being in GMT Jan 24 03:57:10 well ... close enough anyway :P Jan 24 03:57:34 step through debug - you'll work it out Jan 24 03:58:00 Log.d(... is my friend :D Jan 24 03:59:16 I've never really done step through debugging Jan 24 04:00:07 great time to learn then - you can set some breakpoints and do var evaluations Jan 24 04:00:23 _bankai / capella / anyone: does anyone know what could be stopping that top linearlayout from being centred in the pastebin code I put about 30 lines above? Jan 24 04:00:30 any thoughts appreciated Jan 24 04:09:41 argh Jan 24 04:09:45 i fucking hate this Jan 24 04:17:04 sadfsalrkpf Jan 24 04:17:35 androids a fucking cunt Jan 24 04:18:02 With all due respect cocostorm... I've been in here for longer and had far less time devoted to my question. How do you think I feel :) Jan 24 04:21:11 yeah, fucking volunteers not solving people's fucking problems on fucking demand! Jan 24 04:21:13 its 4.21am im fucking tired and i hate to not get things done Jan 24 04:26:17 Say you have a linear layout, if one view in it has height=wrap content and the other is height=fill parent, the second one will take up all available space right? If the second view is Visibility.GONE, is it possible to make the first one take all the available space? Or would it be required to programatically change the first one to be height=fill parent? Jan 24 04:27:55 :p dad gum unpaid contributors Jan 24 05:02:20 ir7466: that's what weights are for Jan 24 05:02:35 ir7466: the second should be height="0dp" weight="1" Jan 24 05:16:42 JakeWharton: so the first one needs to stay android:layout_height="wrap_content" but the second one should be 0dp/1? Jan 24 05:16:53 Thanks for your answer by the way :) Jan 24 05:17:13 well i'm not sure what you are trying to do exactly Jan 24 05:17:15 but i think that's what you want Jan 24 05:18:10 Basically, I have some buttons I need down the bottom of the screen always. So I have everything in a relative layout ,and those buttons all inside a linear layout which is aligned to the bottom. This is fine Jan 24 05:18:41 Above that is another linear layout which is where I have the problems. It has a text view and an image view. Sometimes there may be an image, sometimes there may not be (it might be Visibility.GONE) Jan 24 05:19:09 given the buttons are aligned to the bottom, I want my textview/imageview to be centred in any of the remaining space at the top Jan 24 05:19:29 I've currently got it working if there is a TextView and an ImageView Jan 24 05:19:33 So that is okay Jan 24 05:19:56 But if there is only a textview (so the image is visibility.gone) then the textview is top aligned instead of vertically centred Jan 24 05:27:57 Released my second app this week...like the good old days Jan 24 05:28:22 Time to look for app #3 Jan 24 06:13:33 When working with RealtiveLayout params. Are height/width integers setting themselves in pixels? Jan 24 06:14:16 I am trying to set the size of a RealtiveLayout but when I set the height to 20 (assuming its pixels) it seems really small Jan 24 06:19:12 when sizing native elements next to a webview, why are the pixel densities different? Jan 24 06:19:28 example a 200px wide native button looks a lot smaller than 200px button inside webview Jan 24 06:22:18 any gradle+maven power users here? i am quite annoyed at maven and i can't tell if it's a legitimate gripe, or i'm just not using it right in my build scripts. if i attempt a build when i'm completely disconnected from the internet, it fails because it can't load up deps (even though it supposedly has them cached). https://gist.github.com/tophyr/8592172 Jan 24 06:22:34 is this expected? seems kinda shitty to not be able to build without internet. Jan 24 07:03:42 Does overriding the LayoutParams also override gravity for some reason? Jan 24 07:10:10 I have a text view and an image view Jan 24 07:10:35 sometimes the image view is hidden (visibility gone), in which case I set the text view to fill paretn Jan 24 07:10:56 this is to take up all the available space... I put android:gravity="center_horizontal|center_vertical" and it works well Jan 24 07:11:17 HOWEVER, if the image is visible, the gravity doesn't work. instead of center vertically, it is left aligned vertically Jan 24 07:11:29 Does overriding the layout params somehow impact the gravity? Jan 24 07:12:35 Yes I believe gravity is part of layoutparams Jan 24 07:12:56 Leeds do you use Twisted ? Jan 24 07:12:58 Are there some cordova/kendoui coders here? Jan 24 07:13:16 What I want to know is what you prefer as forum, please dont say telerik Jan 24 07:14:16 question: is there a way to stop a thread that was initiated by a viewpager's child when said child is no longer visible? Jan 24 07:14:32 if so, whats the cleanest way of doing it Jan 24 07:14:38 JuiceSSH, ah okay that could explain it. To overcome it, how do you set "center_horizontal|center_vertical" programatically? Jan 24 07:14:51 i know that you can detect pageselect for the pager, but then the previous view has no refernce i can address Jan 24 07:15:52 actually... the pager only holds 3 views at a time right? would it be bad if I looped through those 3 views every time a page is selected to remove all instances of the thread each child spawns after 300 ms? Jan 24 07:16:32 ir7466: layoutparams.gravity I think from memory Jan 24 07:17:43 ah ok Jan 24 07:17:45 so like this? parameters.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL; Jan 24 07:17:55 how do you specify both at the same time? Jan 24 07:19:39 Just like that Jan 24 07:22:37 cheers Jan 24 07:26:10 g00s: nope Jan 24 07:26:54 JuiceSSH: What about layout_gravity vs gravity? Jan 24 07:29:13 is layoutparams.gravity for gravity or layout_gravity? Jan 24 07:32:19 "Samsung announced earnings on Thursday well below analyst expectations" Jan 24 07:32:36 interesting, they say samsung needs to step up its tablet game Jan 24 07:32:38 haha Jan 24 07:32:40 good luck :) Jan 24 07:33:21 but i'm perplexed they are getting eaten on the low end by lenovo and huwei Jan 24 07:33:34 i thought all these little android oems consolidated Jan 24 07:33:43 not that lenovo is little, but Jan 24 07:33:51 HTC, etc Jan 24 07:34:08 not that HTC is little either Jan 24 07:35:24 is layout_marginTop/marginBottom also affected by setLayoutParams? do they get overridden? Jan 24 07:35:45 all layout gets overridden Jan 24 07:35:59 ah okay Jan 24 07:36:16 the call says setLayoutParams :) not changeSomeLayoutParams Jan 24 07:36:17 hehe Jan 24 07:36:50 what constitutes a layout param though? Jan 24 07:37:01 padding margin alignment Jan 24 07:37:03 for example, it doesn't seem like textStyle and textSize get overriden Jan 24 07:37:07 ah Jan 24 07:37:29 textStyle has got nothing to do with layout Jan 24 07:37:31 its content Jan 24 07:37:42 where it is on the screen is layout Jan 24 07:37:46 makes sence? Jan 24 07:37:53 yeah, that does make sense Jan 24 07:37:53 thanks Jan 24 07:37:59 no worries Jan 24 07:38:04 morning g00s Jan 24 07:38:06 long time Jan 24 07:38:48 Hey all Jan 24 07:39:27 hi Willams Jan 24 07:39:46 Can we set application that run in different language in particular country. Jan 24 07:40:06 Willams: no, there's nothing in the developer docs at all about that Jan 24 07:40:21 For ex : In India, One State where people speak in Tamil and In some states where people speak in Hindi Jan 24 07:40:32 Willams, you can localize it Jan 24 07:40:33 hey lemonxah Jan 24 07:41:01 if you have the language in your resources and the phone is set to that language Jan 24 07:41:05 then it will be in that language Jan 24 07:41:47 so its all up to the user and what langauge his phone is set too Jan 24 07:42:06 But This is code of hindi hi_IN Jan 24 07:42:25 But not for Tamil which people speak in different states in India Jan 24 07:44:10 In Docs, It is written there this "For international users, you can manage your app on three main dimensions: country, locale, and language". I could not understand exact mean of this #lemonxah Jan 24 07:44:47 http://developer.android.com/training/basics/supporting-devices/languages.html Jan 24 07:45:59 Well Jan 24 07:46:00 so as long as all the string in your app comes from resources Jan 24 07:46:03 then its easy to do that Jan 24 07:46:39 res/values-hi/strings.xml, which includes text_a in Hindi. Jan 24 07:46:58 hmm Jan 24 07:46:58 that is an extract from there Jan 24 07:47:38 http://developer.android.com/guide/topics/resources/localization.html Jan 24 07:47:43 there is more about localization Jan 24 07:48:08 Leeds, there are plenty about that in the docs :) Jan 24 07:48:17 hmm Jan 24 07:48:42 For the french : values-fr Jan 24 07:49:27 Then what it mean when to use this Belgium (fr_BE) Jan 24 07:49:28 French, Canada (fr_CA) (fr_FR) Jan 24 07:49:57 i want call data in the android, how can i do? Jan 24 07:50:09 french is french :) Jan 24 07:50:24 fly2web, call data in android? Jan 24 07:50:28 that is very broad Jan 24 07:50:43 yes. i want use json or database. Jan 24 07:50:59 lemonxah: how can i do? Jan 24 07:51:05 how much data is it? and what are you using the data for? Jan 24 07:51:19 is the data being displayed to the user via your app? Jan 24 07:51:35 or is it just a store of info for the app that the user never sees? Jan 24 07:51:47 cause there are multiple approaches Jan 24 07:52:04 data is 10 page of A4 Jan 24 07:52:17 iamges or text? Jan 24 07:52:18 of text or images? Jan 24 07:52:26 and is it being displayed to the user? Jan 24 07:52:39 yes i want data dyeing displayed to screen. Jan 24 07:52:48 is it text? Jan 24 07:52:49 if you display the data to the user the best thing to do is use ContentProvider with a sqlite backend Jan 24 07:52:51 yes it is displayed to user. Jan 24 07:53:05 yes main is text, and some image. Jan 24 07:53:06 contentproviders and contentresolvers Jan 24 07:53:23 images you store on sd card or as blobs in the db Jan 24 07:53:37 check out ContentProvider/ContentResolver Jan 24 07:54:00 In "LinearLayout.LayoutParams(int width, int height, float weight)" - what exactly is the weight referring to? I've been using 1.0f as the weight, but I'm thinking if I apply that do both an image view and a text view - would I be left with both taking an equal amount of space? Jan 24 07:54:04 its got a decent binding mechanism with ContentObservers Jan 24 07:54:09 what if I want one to take up as much space as possible? Jan 24 07:54:29 ir7466, if you have 2 items in the linear layout Jan 24 07:54:36 and the screen is say 500dp wide Jan 24 07:54:45 and both those items only make up 300dp Jan 24 07:55:00 the item in the linear layout with a weight of 1 will fill the extra sapce Jan 24 07:55:02 space even Jan 24 07:55:10 fantastic, i'll give that a go Jan 24 07:55:10 thanks Jan 24 07:55:13 so it will stretch to fill as much of the space that is left Jan 24 07:55:31 without filling the space the other items use Jan 24 07:56:58 what is contentproviders and contentresolvers? lemonxah Jan 24 07:57:16 http://developer.android.com/guide/topics/providers/content-providers.html Jan 24 07:57:24 should I provide a weight of "0" to the other one lemonxah? Jan 24 07:57:45 ir7466, just ommit it if it is done in layout and 0 if its in code Jan 24 07:57:56 thanks lemonxah Jan 24 07:58:00 no worries Jan 24 07:58:00 yep it's in code, i'll add the 0. thanks Jan 24 07:58:51 lemonxah: how about json? Jan 24 07:59:35 fly2web, you can save json in the db but if you dont want to use the contentproviders then you can save it in json if you want on the sd Jan 24 07:59:44 but the preferred way is contentproviders Jan 24 07:59:50 its best by far Jan 24 08:00:10 it also allows you to make API for your app data if you want Jan 24 08:01:46 content providers. ok i see. i make app to display to screen taking text data and image data. Jan 24 08:02:13 the content provider provides the data Jan 24 08:02:14 it don't save data, only call data. Jan 24 08:02:24 it saves it too Jan 24 08:02:30 it can save and provide data Jan 24 08:02:30 ok thanks. Jan 24 08:02:40 and the content resolver gets data from content provider Jan 24 08:03:02 what is content redolver? Jan 24 08:03:08 resolver? Jan 24 08:03:39 http://developer.android.com/reference/android/content/ContentResolver.html Jan 24 08:04:03 its the mechanism to get the data from a content provider Jan 24 08:04:31 thanks i will back soon lemonxah Jan 24 08:04:34 ok i see. Jan 24 08:04:35 thanks Jan 24 08:04:44 i will back lemonxah Jan 24 08:05:21 just hope he reads Jan 24 08:05:33 i am over reading for others Jan 24 08:05:42 I'm upload images to imageshack using apache library. I can upload all of the images exclude images that directly shoted from whatsapp (for being sent). Do you have any idea why? Jan 24 08:05:59 lemonxah: people ? read ? lol. Jan 24 08:06:05 yeah i know Jan 24 08:06:17 that is why i give links rather than explain the entire process Jan 24 08:06:32 lemonxah: problem is then they come back and ask the same question lol Jan 24 08:06:33 i will answer direct questions though but to a point Jan 24 08:07:03 On that note lemonxah, would you mind answering one more thing for me? :) Jan 24 08:07:13 I did as you suggested, setting the weights to 1 and 0 Jan 24 08:07:14 no worries Jan 24 08:07:28 but I'm finding that whichever one I set to 0 takes up all of the space Jan 24 08:07:32 even overlapping the other one Jan 24 08:07:38 rather than just all available space Jan 24 08:07:43 hmm Jan 24 08:07:48 let me check that quick Jan 24 08:07:59 i normally never do layout in code Jan 24 08:08:10 i found that if i have to do that then i have designed something wrong Jan 24 08:08:40 I'm not sure if I have an alternative unfortunately, I need a way to dynamically hide and display an image Jan 24 08:08:49 and in layout ommiting it solved that .. let me just find out what the default value should be Jan 24 08:09:07 oh dynamically hide and show is easy Jan 24 08:09:15 use an image view Jan 24 08:09:18 I am Jan 24 08:09:25 and lay it out in layout xml Jan 24 08:09:31 then just change its visibility Jan 24 08:09:40 with .visibility(View.GONE) Jan 24 08:09:42 and Jan 24 08:09:45 Yeah, I'm changing the visibility in code just like that Jan 24 08:09:50 .visibility(View.VISIBLE) Jan 24 08:09:54 lemonxah: does changing visibility change the height of another element ? Jan 24 08:09:59 But I need to dynamically change the layout params when I hide one or the other Jan 24 08:10:06 SirLagz, if you use View.GONE yes Jan 24 08:10:07 lemonxah: i tried doing that with my app but it would leave a gap where the thing that i hid was Jan 24 08:10:09 I've been battling this for hours :( Jan 24 08:10:17 lemonxah: maybe i should try with view.gone then. thanks Jan 24 08:10:33 Someone? Jan 24 08:10:33 ir7466, just pastebin me your layout i will fix it Jan 24 08:10:43 Either way lemonxah, I'm very close, based on the advice you have given me. It's just this bit about taking the available space.... sure, I'll paste bin it now Jan 24 08:11:17 ir7466, i am sure i will be able to fix in a few minutes if you tell me what you want to resize and it will be in layout so no code required :) Jan 24 08:11:43 Let me paste the code first Jan 24 08:11:56 If it's easy to do in layout, I'm happy to go that path... but I think it will be tough Jan 24 08:12:28 we develop the biggest mobile social network in the world and we dont do any layout in code :) Jan 24 08:12:39 took some time to learn the tricks Jan 24 08:12:46 http://pastebin.ca/2583038 Jan 24 08:13:23 I can paste the layout if that's easier for you though? Jan 24 08:13:55 just want to see what it looks like if you dont mind Jan 24 08:14:03 yeah sure, one second Jan 24 08:15:19 http://pastebin.ca/2583060 Jan 24 08:19:42 ir7466 .. what is the problem with your code? Jan 24 08:21:20 Sirolf, I'm just chatting to lemonxah about it right now. I think he's on thge verge of solving it ;) Jan 24 08:21:41 ah okay ;-) Jan 24 08:22:30 can you maybe let me know how you solved it ? Jan 24 08:22:36 sure thing Jan 24 08:22:41 great Jan 24 08:30:34 How can two sounds be played exactly at the same time? Having the very first samples aligned? Jan 24 08:34:22 Are there any code designs that describe how to run something *in the original UI thread* after an async task has completed? Jan 24 08:35:37 ^^ im searching for ways to solve this "android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views." Jan 24 08:35:39 zzxx use onPostExecute() ? Jan 24 08:35:41 zzxx: put it on onPostExecute Jan 24 08:35:59 that is still in the branched thread no? Jan 24 08:36:07 zzxx: no Jan 24 08:36:15 zzxx: onPreExecute and onPostExecute are on the original thread Jan 24 08:36:25 it's in the thread where the asynctask was started from Jan 24 08:36:43 ah ok perfect. thanks Jan 24 08:36:55 Sirolf: no, I think it is explicitly in the UI thread. You also have to start an asynctask from a UI thread Jan 24 08:37:07 seriously? Jan 24 08:37:19 Sirolf: yeah Jan 24 08:37:27 what about from a service? Jan 24 08:37:49 Sirolf: that's fine too, since your service runs on the 'main' thread as well Jan 24 08:38:34 a service doesnt have an UI right? Jan 24 08:39:21 Sirolf: see 'The AsyncTask class must be loaded on the UI thread. This is done automatically as of JELLY_BEAN. ' Jan 24 08:39:29 ah okay Jan 24 08:39:31 Sirolf: UI thread is the same as the 'main' thread Jan 24 08:39:41 I've never done anything else ... I was just assuming Jan 24 08:39:47 Sirolf: also 'The task instance must be created on the UI thread. ' and 'execute(Params...) must be invoked on the UI thread. ' Jan 24 08:39:51 on http://developer.android.com/reference/android/os/AsyncTask.html Jan 24 08:39:56 yeah fcourse Jan 24 08:40:05 makes sense when you think about it ;) Jan 24 08:40:11 :) Jan 24 08:41:05 hmm just curious ... what if you have alot of little processes you'll run in seperate threads Jan 24 08:41:16 like loading bitmap tiles ... Jan 24 08:41:27 on some mapView Jan 24 08:41:42 wouldn't it be faster to NOT do that in alot of asynctasks ? Jan 24 08:42:04 as it will always return to the UI thread Jan 24 08:42:11 and could freeze it Jan 24 08:42:19 Sirolf: shouldn't make too much of a difference, I think. And you would want to return to the UI thread eventually anyway Jan 24 08:42:20 hmm just thinking out loud :P Jan 24 08:42:27 and if you don't, just don't override onPostExecute and onPre Jan 24 08:42:32 and they won't return to the UI thread Jan 24 08:43:05 yeah Jan 24 08:43:20 Sirolf: so should be fine Jan 24 08:43:33 yes I guess so then .. Jan 24 08:43:48 I'm thinking about ways to increase our mapView app's performance Jan 24 08:44:01 memory handling is a bigger problem though Jan 24 08:45:31 yuvipanda do you by any chance know if Android automaticly uses multiple cpu cores for one app? Jan 24 08:45:47 Sirolf: depends on how many threads you have Jan 24 08:46:01 and often having multiple IO threads improves performance even with only one CPU Jan 24 08:46:22 yeah Jan 24 08:46:29 JakeWharton: Gradle Plugin 0.8 should enable using dagger without the apt-plugin, using the 'provided' scope, right? Jan 24 08:47:02 having alot of IO threads ... works well ... but I want even better performance ... I think the CPU is the bottleneck now ... Jan 24 08:47:05 yuvipanda: how multiple io threads can improve performance if there is only 1 cpu with 1 core? Jan 24 08:47:20 rendar: because a lot of times you have a thread 'waiting' on IO Jan 24 08:47:35 rendar: you start a HTTP request, and then the thread that started it has nothing to do on the CPU anymore. Jan 24 08:47:38 so CPU is idling now Jan 24 08:47:49 if there's another thread t hat wants to run it can just as well run Jan 24 08:49:09 k Jan 24 08:51:06 but yuvipanda .. an app is not limited to one of the cores? Jan 24 08:51:16 app/process Jan 24 08:51:17 Sirolf: don't think so, no Jan 24 08:51:20 Sirolf: no Jan 24 08:51:27 a *thread* usually is Jan 24 08:51:27 okay Jan 24 08:51:34 but multiple threads can run on a core one after the other Jan 24 08:51:35 where should I put an xml (.plist) containing a list of values that belong in a drop down selector? Jan 24 08:51:36 yes Jan 24 08:51:56 this is how multitasking worked on older machines with only one processor :) Jan 24 08:52:10 I put it in res/values but that gave me an error somehow Jan 24 08:52:27 kakazza: Yes. Jan 24 08:52:35 It works fine Jan 24 08:52:36 hehe yeah okay ... I thought maybe android only used the multiple cores for multitasking between different apps/processes Jan 24 08:52:39 Syzygy: if they aren't a xml tag that android recognizes there will be errors Jan 24 08:52:52 Syzygy: if you want to just load a raw xml file, I think there exists res/raw Jan 24 08:52:58 (haven't used it myself) Jan 24 08:52:59 I upload images to imageshack using apache library (using external jars). I can upload all the images except for image that shoted directly from whatsapp to being sent. Jan 24 08:53:07 Syzygy: or you can convert the plist into a and use that instead Jan 24 08:53:09 Do you have any idea why? Jan 24 08:53:09 in res/values Jan 24 08:53:24 well, the filetype is .plist, but the first line has standard xml tags () Jan 24 08:53:47 guess I'll go for res/raw Jan 24 08:54:01 I got an IOException, and after looking on network trace, it seem that it doesn't even sent thםse images Jan 24 08:54:37 although now I don't see an error in res/values... I'll try that for now Jan 24 08:55:31 has anyone used 2 drawlerlayouts 1 inside the other? Jan 24 08:55:43 to get the slide in meny from both sides? Jan 24 08:55:47 menu even Jan 24 08:56:53 lemonxah so when you slide one open you can slide the second from the other side? Jan 24 08:57:03 no Jan 24 08:57:06 like Jan 24 08:57:12 have a menu on the left Jan 24 08:57:19 and a notification area on the right Jan 24 08:58:07 I upload images to imageshack using apache library (using external jars). I can upload all the images except for image that shoted directly from whatsapp to being sent. I got an IOException, and after looking on network trace, it seem that it doesn't even sent those images. Jan 24 08:58:17 Sirolf actually, last i heard was that android screw up thread affinity; when your thread moved between cores your caches get clobbered Jan 24 08:58:41 hmm Jan 24 08:58:43 i think with ndk you can pin your thread to a core; but not sure in java Jan 24 08:59:21 yeah, but if you are writing primarily Java code cpu core caches isn't much you can depend on anyway Jan 24 08:59:37 going to use ndk anyway because memory without it is so very limited Jan 24 09:00:05 exactly ;) Jan 24 09:00:14 Sirolf: just curious, what exactly are you building? Jan 24 09:00:32 a navigational chart app Jan 24 09:00:50 with a raster tile system Jan 24 09:00:56 ah Jan 24 09:01:01 Sirolf: are you using OpenGL to draw things? Jan 24 09:01:10 I guess that'll give you way more perf boost than switcing to NDK Jan 24 09:01:30 now at first using the OSMDroid libs Jan 24 09:01:44 and alot of extending to it Jan 24 09:01:47 ah Jan 24 09:01:53 I might be using those in the near future Jan 24 09:01:53 yuvipanda, can you tell me if it's possible to do stuff like res/raw-en-rUS, res/raw-en-rGB and so on? Jan 24 09:02:20 but I'm already looking into desiging something in OpenGL indeed Jan 24 09:02:23 or more specifically other languages Jan 24 09:02:45 yuvipanda you mean OSMDroid? Jan 24 09:02:58 Syzygy: not too sure, sorry. try it and see? Jan 24 09:03:06 Sirolf: yeah, OSMDroid. Jan 24 09:03:23 Sirolf: I am rebuilding the wikipedia app from PhoneGap to native, and we will have to replace leaflet with something native Jan 24 09:03:41 aah nice Jan 24 09:04:12 Sirolf: obviously first preference would be GMaps, but the app is GPL'd and there's also the fact that the editing community doesn't like Google too much Jan 24 09:04:24 well I kinda know osmdroid through and through by know ;-) Jan 24 09:04:48 i hope osm goes to vector maps soon Jan 24 09:04:56 aren't they still tiled bitmaps ? Jan 24 09:05:00 yeah ... I tried GMaps at first ... Jan 24 09:05:10 yeah tiled bitmaps Jan 24 09:05:32 which is exactly what we need since our data is raster ... Jan 24 09:05:47 but more a combination of raster and vector though Jan 24 09:06:13 anyway ... got a meeting ;-) later! Jan 24 09:06:47 Sirolf: ceeya Jan 24 09:08:56 is there any way to get ndk-build output to a file: i tried ndk-build 2>&1 1>sample.output did notwork. Jan 24 09:17:22 wow, this sucks ass http://blog.testfairy.com/google-play-store-ratings-drop/ Jan 24 09:19:08 "Combining the rating of a suggestion with the rating of a specific app’s performance creates a gauge that is more difficult to use and implement in the development process." Jan 24 09:20:45 Hi all, How can you get the Numberpicker for the minutes from a timepicker? Jan 24 09:26:53 what was the rational behind calling a drop down box a spinner? Jan 24 09:28:04 probably because it's called that in most UI toolkits Jan 24 09:30:21 Mavrik: like what exactly? ios? Jan 24 09:31:13 qt, windows, gtk, jQuery, etc. Jan 24 09:33:48 Mavrik, in Qt a spinner is not a dropdown box as far as I know.. :P Jan 24 09:34:17 GNUton, http://qt-project.org/doc/qt-4.8/declarative-ui-components-spinner.html Jan 24 09:34:18 oh oh http://en.wikipedia.org/wiki/Spinner_(computing) Jan 24 09:34:28 but yeah Jan 24 09:34:31 it's dumb Jan 24 09:34:47 Mavrik, that's not a dropdown box! :P Jan 24 09:34:57 Mavrik, that's a spinner! :D Jan 24 09:35:42 a Dropdown box is a list which is displayed when a button is clicked Jan 24 09:38:10 well, now that you've proven that you know what a dropdown is Jan 24 09:38:27 you might have noticed that mobile platforms render the linked view in some cases Jan 24 09:38:37 e.g. iOS and some mobile Qt implementations Jan 24 09:39:02 Mavrik, BTW it's not my intention to argue on this silly topic! :D Jan 24 09:39:12 Mavrik, do you have experience with Qt on Android? Jan 24 09:40:04 I tried it a little awhile ago Jan 24 09:40:10 was kinda pointless Jan 24 09:41:55 #lemonxah Thanks :) Jan 24 09:42:07 ? Jan 24 09:42:17 pleasure but i cant remember what i did Jan 24 09:42:24 For the your help related to localization Jan 24 09:42:48 oh ok :) pleasure Jan 24 09:42:50 when I went away a couple of weeks ago, I grabbed a hat from my drawer-of-hats, ended up with a trolltech one :) Jan 24 09:43:08 :)) Jan 24 09:43:20 I still remember a Nokia conference in Munich explaining us that Qt is the future Jan 24 09:43:39 even though they didn't have Qt deployed on their (then) flagships of N95 Jan 24 09:43:44 and iPhone 3G was just out Jan 24 09:44:21 well, iPhone 3G was not really anything new Jan 24 09:44:50 the bigger change was iOS 2.0 with its impossible achievement of showing Jobs back down from something Jan 24 09:45:28 p_l, it was new in respect that it was actually possible to buy it outside of a single telco in US Jan 24 09:45:33 so it was actually a competitor to Nokia Jan 24 09:45:40 there is no backing down... there is only going forward in a different direction than originally planned Jan 24 09:45:55 and they just revealed their own dev tools and toolkit Jan 24 09:46:47 "we have always been at war with Eurasia and planning to release a native SDK" Jan 24 09:48:16 Mavrik: it was still hilariously broken in the "buy" aspect (saying as someone who was on the inside of telco deploying it) Jan 24 09:48:29 yeah no kidding Jan 24 09:48:34 had to drive to italy to get one Jan 24 09:48:44 and then wrestle with ton of issues due to "unsupported" telco Jan 24 09:48:58 it's still broken as hell though, noone in country can use LTE on iPhones right now Jan 24 09:49:05 Mavrik: Apple required a portion of money from each iPhone contract Jan 24 09:49:10 since Apple didn't give their blessing to the talco :P Jan 24 09:49:29 Mavrik: it wasn't blessing, it was above mentioned payment Jan 24 09:49:41 this is the real reason iPhones had "special contracts" :> Jan 24 09:49:58 hmm, I just bought it off-contract always so I wouldn't know Jan 24 09:50:09 but that's something Apple would do yea :) Jan 24 09:51:23 hello Jan 24 09:51:25 Mavrik: when delivered, iphone 3g also could not work with voice mail :> Jan 24 09:52:02 I want to change WindowManagerPolicy in my app, anybody did that before? Jan 24 09:52:06 ah, we don't really have that service here Jan 24 09:52:16 noone uses voicemail :) Jan 24 09:54:26 Mavrik: well, that too, but it didn't support any basic kind, not just some funky thing with application on phone Jan 24 09:55:22 when I was leaving (shortly after introduction of iphone 3g) the roadmap still said something about 3 months before "special snowflake" iphone was to receive voicemail support on the network (special server, special software, etc.) Jan 24 10:01:13 i can't get AS 0.4.3 to work at all Jan 24 10:01:31 'gradle project sync failed' Jan 24 10:01:51 'could not create Plugin of type AppPlugin' Jan 24 10:02:13 g00s: I'm a bit surprised you haven't given up on those IDEs a looong time ago. ;-) Jan 24 10:02:46 kjeldahl i actually liked eclipse, but started using gradle so i went with AS Jan 24 10:03:02 its a pile of shit, i'd go back to eclipse Jan 24 10:03:42 Keeping the build process out of the IDE (using gradle, or anything else) allow devs to choose whatever damn editor they like. Jan 24 10:04:02 Eclipse's "build process" is "magic" and totally incomprehensible. Jan 24 10:04:47 and breaks all the time Jan 24 10:04:52 'R not found' Jan 24 10:04:56 and hogs memory Jan 24 10:04:57 kjeldahl did you see this on hn today :) http://bzg.fr/emacs-strip-tease.html Jan 24 10:05:02 But anyway, I understand your pain. Just sayin gradle has been pretty rock solid for builds since AS was released. Jan 24 10:05:03 and crashes Jan 24 10:05:18 I've also found AS a bit unstable. Still sticking to Maven + IntelliJ Jan 24 10:05:24 g00s: Yeah, yesterday. I'm not that hardcore though. Jan 24 10:05:25 i used eclipse 3.8.2 last, and it used far less memory than AS, never crashed Jan 24 10:05:28 g00s: my Vim setup looks similar :) Jan 24 10:05:40 although doesn't have the borders thing Jan 24 10:05:48 * yuvipanda hugs his horizontal screen-real-estate Jan 24 10:06:11 i have had the R not found with AS also. Jan 24 10:06:28 haven't had that happen even once with IntelliJ :) Jan 24 10:06:33 often with AS, it doesn't show me errors until I go to build the thing with gradle Jan 24 10:06:43 indeed. I don't think gradle is mature enough yet Jan 24 10:06:45 THEN it shows me errors Jan 24 10:07:01 I'm going to stick with IntelliJ until they stop calling AS 'canary builds' Jan 24 10:07:09 write your code right first them then Jan 24 10:07:11 yuvipanda 0.4.2 was dev Jan 24 10:07:17 ah Jan 24 10:07:18 0.4.3 is canary Jan 24 10:07:19 I think the gradle integration thing is the culprit though, not gradle itself. Jan 24 10:07:21 well, until 1.0 then :P Jan 24 10:07:31 yeah, gradle seems to work OK itself Jan 24 10:07:46 yuvipanda thats probably going to be I/o 2015 Jan 24 10:07:56 kjeldahl, nah, gradle is terrible even when not in IDEA Jan 24 10:08:04 AS works awesomely with anything else tho Jan 24 10:08:07 FWIW, cross platform builds of libgdx using gradle now support desktops, gwt/html5, android and robovm/iOS. Jan 24 10:08:07 g00s: yeah, probably. IntelliJ is quite nice until then Jan 24 10:08:42 As people who know me knows, I'm by no means a big fan of gradle, and blame google. I would have been happy with maven also, just keep the damn build logic out of the ide. Jan 24 10:09:00 +1 to kjeldahl Jan 24 10:09:13 idk why they went to start the gradle plugin from scratch when the maven one is relatively mature Jan 24 10:09:14 kjeldahl yeah Jan 24 10:09:25 they can't even claim a 'we do not like XML!' excuse Jan 24 10:10:03 How to correctly save and restore fragment state? Using preferences now, it's slowly and unreliable Jan 24 10:10:18 kjeldahl, mhm Jan 24 10:10:28 We've pretty much reverted to Maven on all our projects Jan 24 10:10:34 yuvipanda: well, one always had better control over build logic in IntelliJ, IMO. As for maven... it's byzantine to me Jan 24 10:10:34 Mavrik curios, what does mhm mean :D Jan 24 10:10:34 gradle was a colossal waste of time at this point Jan 24 10:10:41 Flank_Y320-U30, you should start it up with a bundle and then use onsaveisntance for instance state Jan 24 10:10:49 The whole gradle movement is overrated. Personally, I think java/groovy is the wrong language for build logic, but it seems java is somewhat contagious; if needs to be everywhere. Could be a cross platform thingy though. Jan 24 10:11:15 p_l: true, but I use Maven because of the dependency management. Jan 24 10:11:20 don't want to chug around JARs Jan 24 10:11:28 kjeldahl, I think having a programming language as a build system is a wrong idea as a start Jan 24 10:11:30 or do the 'dependent projhects' thing Jan 24 10:11:35 yuvipanda: well, dependencies I got from Maven through gradle Jan 24 10:11:49 lemonxah, thank you, but I checked that onsaveisntance don't called from fragments on some devices Jan 24 10:11:49 kjeldahl, or maybe I'm just way too annoyed I had to write packaging code just to get a damn native .so into an APK Jan 24 10:11:55 p_l: sure, but we were just all saying how much gradle sucks at this point :P Jan 24 10:12:01 its always called Jan 24 10:12:02 yuvipanda: however, the moment I'd step outside of someones idea I'd have to write a complete maven plugin Jan 24 10:12:21 p_l: heh. yeah. but that hasn't happened to me... yet Jan 24 10:12:22 and that bundle is the instancestatebunlde in the oncreate Jan 24 10:12:27 I'm not saying Maven is wonderful. Jan 24 10:12:27 anyway, as soon as they stabilize .aar support in Maven I can forget all about this dumb Gradle fiasco Jan 24 10:12:34 Mavrik: Build tools needs to be programmable, but more at the script/shell level than java/groovy level. Of course script/shell works like shit on Windows, which is probably why gradle/maven gets a shot at it. Jan 24 10:12:36 just that atm, seems way more stabile than gradle Jan 24 10:12:50 Mavrik are they working on aar for maven ? Jan 24 10:12:52 lemonxah, do you know something about saveFragmentInstanceState and setInitialSavedState? Jan 24 10:13:09 g00s, AAR dependency support was mostly working in 3.8.2 of maven android plugin Jan 24 10:13:26 didn't test AAR generation since I don't want to push that crap on anyone :P Jan 24 10:13:27 i think the android build process is overly complicated also, with regular projects, library projects, manifest merging, etc Jan 24 10:13:40 merging resources R, etc Jan 24 10:13:53 kjeldahl, well, I wanna stab anyone who writes build scripts in shell anyway Jan 24 10:14:03 I really hate being locked into a single OS due to bash crap Jan 24 10:14:34 g00s: Agree. One would have thought that Google would be able to document the Android build process at a level where writing support for it in any build tool would be simple. Now it's like "figure it out from the gradle Android plugin". Jan 24 10:14:43 i dont mind gradle its not excessively bad but the fact taht the ide uses the build tools now i like Jan 24 10:14:50 I'm happy nobody is mentioning 'we should totally use BUCK!11!' Jan 24 10:14:53 cause when it build on my machine it will build on my build server Jan 24 10:15:13 yuvipanda one of the buck devs is here sometimes :) Jan 24 10:15:20 shuhssh :P Jan 24 10:15:34 and easily changing flavours is awesome but not inherently gradle Jan 24 10:15:40 other build tools do the same Jan 24 10:15:57 kjeldahl, also having scripting stuff like that means I have to force any new developer I hire to use the same OS Jan 24 10:16:03 which... is suboptimal :) Jan 24 10:16:17 Mavrik: Yeah, bash is not my favorite either, but something at the level of perl/python/ruby would probably make more sense than java. At least gradle carries the same abstraction sickness as most java projects do, making it a pita to do anything out of the box (which doesn't have a plugin already). Jan 24 10:16:35 Flank_Y320-U30, have not used those, did not need to as it was working with normal onSaveInstanceState and initializing fragments with argumentbundles Jan 24 10:16:59 kjeldahl, mhm, I think they chose that just because you don't have to install another dependency for the build system - you already have a JVM present for the SDK Jan 24 10:17:06 Mavrik: The learning curve for doing simple things in script languages is a LOT less than trying to write gradle plugins (and maven ones as well I suspect). Jan 24 10:17:15 lemonxah, thanks. I'll try it again Jan 24 10:17:23 the issue I think is just the fact that they didn't even make the Gradle Android plugin have basic functionality Jan 24 10:17:30 Mavrik: Regarding JVM, yes, that's my conclusion as well. Sad but true. Jan 24 10:17:50 not having renderscript, native libs and bunch of other things supported is just... fail Jan 24 10:18:01 and its too damn slow Jan 24 10:18:05 even Maven plugins do all that out-of-the-box without nay configuration Jan 24 10:18:17 well, slow from AS dunno why Jan 24 10:18:24 the fact that it takes ages to build anything on a quad-core machine with 16G of RAM and a fast SSD is criminal as well Jan 24 10:18:45 the emulator boots faster than gradle builds a helloworld app :P Jan 24 10:19:00 Mavrik: Yeah, maven sounds awesome, but as long as Google keeps pushing gradle it's kind of hard to learn yet another system for most people I guess. Jan 24 10:19:41 (fwiw, I've used maven with great success on java projects before, and the best thing like dependencies from repos etc has gradle already stolen) Jan 24 10:20:06 kjeldahl, I just hope they finish up Gradle plugin in maven and vice-versa so people can use anything they want Jan 24 10:20:28 Mavrik: Yeah, sounds nice. Jan 24 10:20:33 right now I keep falling into situations where half of my libs are available as apklib only and other half of people have switched to AAR libs and have totally dropped apklib support Jan 24 10:20:59 Anyways, gotta run off. Enough gradle bitching for today from me. See you later. Jan 24 10:22:06 seeya kjeldahl Jan 24 10:22:24 * g00s files another AS bug Jan 24 10:22:29 Hi. My OS professor asked my class to write a small document explaining how android does process management. Any cluees on where I can find out about that? I've looked up a bit yesterday on google, but only found superficial stuff. Jan 24 10:22:36 man, Tor is going to go to work tomorrow and be fucking slammed Jan 24 10:24:15 phao, the processes themselves are linux processes and are managed like that Jan 24 10:24:22 phao, as for mapping of Android apps to processes see http://developer.android.com/guide/components/processes-and-threads.html Jan 24 10:24:32 thanks Jan 24 10:25:03 gotta go Jan 24 10:31:15 Hey guys, are there any changes in newer versions of Android that make that Intent.ACTION_GET_CONTENT doesn't work when the type is set to "file/*"? Jan 24 10:31:38 CasW, there was a rework of file picking in Kitkat Jan 24 10:31:47 there's also a compatiblity API for that I think Jan 24 10:32:05 Ah, okay, thanks! Jan 24 10:38:28 the google drive api looks pretty neat Jan 24 10:38:40 Maverick and Goose. Top Gun here Jan 24 10:39:18 Reboot Receiver is not working in the ICS but working in GingerBread Jan 24 10:39:31 and also not working in Jelly Bean Jan 24 10:39:37 Why any reason for this? Jan 24 10:39:56 I have this Jan 24 10:40:21 reboot reciever? Jan 24 10:40:36 yeah Jan 24 10:40:44 yeah what is it Jan 24 10:40:50 Jan 24 10:41:42 pretty sure they removed that in android 3.0+ Jan 24 10:41:45 not sure tho Jan 24 10:42:04 Then Any alternative for this Jan 24 10:42:23 rymate1234: of course they didn't Jan 24 10:42:33 ? Jan 24 10:43:05 #Leeds But in my case it is not working in ICS, Jelly Bean Jan 24 10:43:07 oh wait Jan 24 10:43:27 Willams: maybe look at this http://stackoverflow.com/questions/10428510/how-to-start-launch-application-at-boot-time-android Jan 24 10:45:06 Hmm Worked but in 2.2 this is not required Jan 24 10:45:10 Anyway thanks :) Jan 24 10:45:27 welcome :) Jan 24 10:46:11 is it valid to programmatically create ImageView with applicationContext? Jan 24 10:47:33 [A3G1S]: ? Jan 24 10:47:58 http://stackoverflow.com/a/987503/1056359 VS. http://android-developers.blogspot.co.il/2009/01/avoiding-memory-leaks.html Jan 24 10:47:58 thepoosh: dont ping random people Jan 24 10:48:18 rymate1234: I know him and am kinda friends with him Jan 24 10:48:41 thanks for the etiquette lesson Jan 24 10:48:50 <[A3G1S]> hey thepoosh Jan 24 10:48:55 sup Jan 24 10:49:01 <[A3G1S]> m good :-) Jan 24 10:49:07 rymate1234: ping Jan 24 10:49:08 <[A3G1S]> rymate1234 I know him Jan 24 10:49:12 <[A3G1S]> we are friends Jan 24 10:49:17 :D Jan 24 10:49:30 who would you trust more? Romain Guy or that SO guy with 50K reputation? Jan 24 10:49:41 oh ok Jan 24 10:49:42 lol Jan 24 10:49:47 rymate1234: ping? Jan 24 10:50:02 pls ignore me Jan 24 10:50:05 LOL Jan 24 10:50:15 oh great i should've kept my mouth shut Jan 24 10:50:18 ._. Jan 24 10:50:20 thepoosh: when you say "that SO guy", do you mean Reto? Jan 24 10:50:24 rymate1234: it's very important not to ping people you don't know Jan 24 10:50:32 thepoosh: ping Jan 24 10:50:33 oh Jan 24 10:50:35 yeah Jan 24 10:50:42 Leeds: didn't read the name Jan 24 10:50:51 who would you trust more?! Jan 24 10:51:00 I dod a code review to someone in my group Jan 24 10:51:14 created ImageViews with application context Jan 24 10:51:29 idk if to regect or not Jan 24 10:51:30 <[A3G1S]> well thepoosh for imageview i will prefer activity context Jan 24 10:51:41 I'd be pretty surprised to find them disagreeing with each other - but I also wouldn't necessarily trust an answer from 2009 Jan 24 10:51:44 [A3G1S]: the issue is with memory leaks Jan 24 10:52:10 Leeds: well, I read the code in grepcode, it there just to load res Jan 24 10:52:13 and stuff Jan 24 10:52:15 someone should create a petitition that makes _all_ android ides and ide-like things never ever startup an android emulator automatically ever Jan 24 10:52:26 dunno what to do Jan 24 10:52:43 I mean Romain kinda wrote the UI for android Jan 24 10:53:02 ohcibi, yes. yes. Jan 24 10:53:31 I always want to kick IDEA when I try to start an app... it gives me chooser dialog without a phone in it... I plug in a phone... and it starts an emulator Jan 24 10:53:32 wtf. Jan 24 10:53:44 oO Jan 24 10:54:49 thepoosh: while Reto just wrote the book on how to write apps... Jan 24 10:55:18 Leeds: so, any insightful ideas for me on how to approach this? Jan 24 10:55:21 hey ppl anyone familar with google play services and can help? Jan 24 10:55:26 hi Leeds Jan 24 10:55:35 thepoosh: none whatsoever Jan 24 10:55:41 BulleTTime: hey! Jan 24 10:55:42 BulleTTime: d.android.com has awesome docs on this Jan 24 10:55:46 or maybe its not google play services related :P Jan 24 10:56:10 what do you need BulleTTime ? Jan 24 10:56:45 well i have a project in eclipse using google play services, that works Jan 24 10:57:27 but im building the apk inside visual studio because i have to (using 3d engine) Jan 24 10:57:43 maybe its just a very easy question ill show something Jan 24 10:58:28 signing problems? ;) Jan 24 11:00:00 well, maybe Jan 24 11:00:27 but i dont know., i tought i did same as in eclipse (that works) Jan 24 11:00:31 http://pastebin.com/R8NqJxsG Jan 24 11:00:41 thats the error i get ^ Jan 24 11:01:19 I see a nullpointer exception ;) Jan 24 11:01:19 maybe its because of dependencies setup wrong? Jan 24 11:01:49 hmm Jan 24 11:02:03 Quick question; if I call invalidate() on a view, then eventually the onDraw of all it's children will be called, right? Jan 24 11:02:22 i think its basicaly because of the first line? Jan 24 11:02:55 BulleTTime: GameActivity line 92 ? what is there? Jan 24 11:03:01 i remember i had similar stuff when the google id was not set correctly in eclipse Jan 24 11:03:14 but the id is set correctly Jan 24 11:04:42 oooh crap Jan 24 11:04:46 ?:P Jan 24 11:04:51 i did not noticed that in log Jan 24 11:04:59 well its a findViewById Jan 24 11:05:07 so that must be missing resources Jan 24 11:05:29 thanks for watching hehe :) Jan 24 11:05:34 :) Jan 24 11:09:16 CasW: I believe only when the child needs redrawing Jan 24 11:09:37 so not nessisarily Jan 24 11:10:02 Hmm, okay. I'll have to rethink, then. Jan 24 11:21:05 Maybe you guys know a good method to do this; I have a view that has to load some data every time it's drawn, so I call in my public void onDraw a method loadData(). This doesn't work when I'm resuming an activity, though, then it doesn't load the data. How can I fix that? Jan 24 11:21:59 CasW show some code? Jan 24 11:22:12 Yeah, sure, wait a minute Jan 24 11:22:34 http://pastebin.com/Zv4ichHi Jan 24 11:23:47 The setup: I have a tabbed layout, one tab has this DownloadItemList in it. The app is shown when I share something with easyshare in it, but the problem is loadDownloadedFiles isn't called then... Jan 24 11:24:41 so the view is not drawn? Jan 24 11:25:04 It certainly looks that way Jan 24 11:25:20 can you show the activity? Jan 24 11:26:08 Er, let me ask ;-) Jan 24 11:26:18 or part of it ;) Jan 24 11:27:10 Yeah, wait a minute, I'll strip it of everything unrelated Jan 24 11:31:37 (The activity has grown a bit out of hand... Nearly done, though) Jan 24 11:31:54 no problem ;) Jan 24 11:32:38 http://pastebin.com/f8rq9iTR Jan 24 11:32:41 There it is Jan 24 11:33:12 I know for sure that Activity.onCreate is called Jan 24 11:34:27 Hello, anyone familiar with android account manager? I managed to set up everything, and get that account is created from addAccountExplicitly, but I don't see any account in account manager Jan 24 11:34:53 When I click to add new account it starts my activity and everything goes well Jan 24 11:35:00 but no account ever gets created Jan 24 11:35:37 CasW ... where exactly do you create the downloadItemList then? Jan 24 11:36:08 It's in the layout file of a fragment that Jan 24 11:36:13 's one of the tabs Jan 24 11:36:17 pluss there is no label under my apps account in account manager, althou I set up android:label="xx" in authenticator.xml Jan 24 11:36:55 I can see the tabs, but nothing in it Jan 24 11:39:58 hmmmzz Jan 24 11:40:15 Hmm, managed to fix it by manually calling Fragment.getView().invalidate() in the tabspageradapter Jan 24 11:40:57 okay Jan 24 11:41:23 weird looking structure though ;) Jan 24 11:42:05 Hm, isn't that how it's usually done? A FragmentPagerAdapter that delivers the tabs, and the tabs that have their own layout file? Jan 24 11:48:40 just got my nexus 5 - it's awesome Jan 24 11:49:09 tagrudev except for android, yeah! Jan 24 11:49:58 i'm a bit feisty since AS ruined my day ;) Jan 24 11:50:35 be so much better running Tizen, right? Jan 24 11:50:37 hhm sirolf, i tought it was easy to fix but it aint Jan 24 11:51:36 Leeds whats tizen :) Jan 24 11:51:44 actualy i need to know. why would it not fire a nullpointerexeption with setContentView ? because the id is within that layout,.. Jan 24 11:51:54 I'd suggest asking Samsung that question, but I don't think even they know anymore Jan 24 11:52:31 would setContentView with a not present layout pull errors? Jan 24 11:52:48 or would findViewById below only do that? Jan 24 12:02:21 anyone knows>? Jan 24 12:03:53 if you dont put the setContentview or pass a invalid layout the result will be a error Jan 24 12:04:21 in case of you are starting one activity Jan 24 12:05:28 okay so, why would a findViewById have a null pointer while the setContentview works and points to xml that has the id ? Jan 24 12:05:42 i was thinking how should i define R ? Jan 24 12:06:12 What is the full name of the item you are referencing Jan 24 12:06:25 If it's something like R.id.text1, it's possible that you accidentally imported Android.R Jan 24 12:06:25 R.id.sign_in_button Jan 24 12:06:32 That seems unlikely Jan 24 12:06:43 What ide are you using? Jan 24 12:07:02 findviewbyid is throwing a null pointer or it's returning null? Jan 24 12:07:16 null pointer Jan 24 12:07:28 this is the error: Jan 24 12:07:28 http://pastebin.com/R8NqJxsG Jan 24 12:07:47 wait ill also show the activity Jan 24 12:08:04 Just show me like 92 please of GameActivity Jan 24 12:08:14 so Jan 24 12:08:17 Or the entire thing is fine Jan 24 12:08:23 http://pastebin.com/0asJShBv Jan 24 12:08:40 maybe you try to get a id from a view that isn't in your current layout Jan 24 12:09:09 the result will be the null pointer Jan 24 12:09:22 well when i run the project in eclipse it works, so im sure i dont have to edit the layout Jan 24 12:09:40 it should be good Jan 24 12:09:59 Hello, I want to use a ProgressDialog with a custom loading image that turn on himself. I know how to make a RotateAnimation on an ImageView, but i cant find how to set this animated ImageView inside my ProgressDialog. I also tried with a Drawable (myProgressDialog.setIndeterminateDrawable(myDrawable) and its working fine, but I also cant find how i can animate this drawable... Jan 24 12:10:07 any idea ? :) Jan 24 12:12:36 is it in any way possible for an app not installed through google paly to receive updates? i was told it is though havent managed to find any source for the claims Jan 24 12:12:45 BulleTTime: it's most likely that findviewbyid is returning null and the setonclicklistener is throwing the null pointer Jan 24 12:12:55 With eclipse this sometimes happens if you need to clean the project Jan 24 12:13:02 So I would try a clean then rebuild Jan 24 12:13:26 Sometimes the R file isn't correctly generated so findviewbyid can't find something with that ID or it finds the wrong view and any casting fails Jan 24 12:14:08 should i include the R file inside visual studio (i build with that) Jan 24 12:14:14 or only the xml files Jan 24 12:14:40 when i look into the apk file i see folder res with in there i see the compiled resources Jan 24 12:15:07 so these are present Jan 24 12:15:21 Oh I haven't used visual studio Jan 24 12:15:36 but when i look inside the apk from eclipse i wont notice any more files than i have in my VS apk Jan 24 12:15:36 mOk_ http://stackoverflow.com/questions/2819778/custom-drawable-for-progressbar-progressdialog Jan 24 12:15:49 The R file should be generated Jan 24 12:15:59 I'd try deleting it and seeing if it regenerates Jan 24 12:17:39 ok thats in eclipse Jan 24 12:17:40 but Jan 24 12:18:36 the r class file i use is from the bin directory (from eclipse project) and i just copy all .class files to my visual studio project Jan 24 12:19:00 How are you building from visual studio Jan 24 12:19:50 Are you using this https://code.google.com/p/vs-android/ Jan 24 12:20:15 Oh that's just c/c++ Jan 24 12:21:10 no Jan 24 12:21:36 i use a custom deploy tool from game engine (project anarchy / havok) Jan 24 12:22:14 but in visual studio i use c++ yes Jan 24 12:22:25 but, those are just the game engine things Jan 24 12:22:42 My App Removed BroadCast Receiver not working Jan 24 12:22:49 This is my code here http://pastebin.com/T1v3Dn6f Jan 24 12:22:50 Aaaah project anarchy Jan 24 12:22:53 basicaly i am trying to use my eclipse project as base startup app that includes the whole game code aswell Jan 24 12:23:03 Please see and help me why it so Jan 24 12:23:54 ahh Jan 24 12:24:25 but mostly everything works, except finding the resources Jan 24 12:24:56 so when i look into apk files, i see a res directory that contains compiles resources Jan 24 12:24:59 I think you might have to use AAPT to force a regeneration of the R file Jan 24 12:25:51 hhm Jan 24 12:26:30 I could be wrong though, might be worth asking again in a few hour'rs Jan 24 12:26:34 When more people get in here Jan 24 12:27:08 yeah :P Jan 24 12:27:15 well i think u might be right Jan 24 12:27:45 because the deploy tool might do something with the resources and just create a blank R file dont know Jan 24 12:28:56 Does anyone have idea of my issue? Jan 24 12:32:10 so would R files be included inside classes.dex while apk creation? Jan 24 12:34:10 It worked but not seems which I want Jan 24 12:34:51 I want any receiver of my application execute when my application is about to uninstall. Is it possible? Jan 24 12:35:10 Williams: I'm 85% sure that's not possible Jan 24 12:35:36 http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED Jan 24 12:36:06 This is called when other application removed from the device but not in which I registered this Jan 24 12:36:26 Correct Jan 24 12:36:29 When I uninstall my application where I register the receiver then it is not executing Jan 24 12:50:55 is it possible to upload an app to the alpha testing with a suffix on the package name such as com.example.app.alpha Jan 24 12:51:06 or will it complain that the package name isn't the same as the live app Jan 24 12:54:19 i have txt files, and i want it to call in app, so where i save txt files? Jan 24 12:54:31 res/raw or assets Jan 24 12:54:44 CallumTaylor: thanks very much Jan 24 12:58:59 can third party apps somehow register themselves for legit updates from google play? Jan 24 13:01:10 i want study res/raw and res/asset, what document can i see? Jan 24 13:02:42 its just res/raw or asset, not rest/asset Jan 24 13:02:46 res/asset* Jan 24 13:03:04 http://stackoverflow.com/questions/9544737/read-file-from-assets and http://stackoverflow.com/questions/4087674/android-read-text-raw-resource-file Jan 24 13:03:15 thanks CallumTaylor Jan 24 13:05:00 nice, i can do it. thanks CallumTaylor Jan 24 13:10:01 "UPDATE: Android Studio is another great option but currently has its quirks. If youre an Android Studio user be sure to check out this thread on Stack Overflow." :) Jan 24 13:10:12 CallumTaylor: it can be called by id in res/raw, and i can be called by file names in asset? right? Jan 24 13:10:23 yeah Jan 24 13:10:29 you reference raw files like R.raw.xxx Jan 24 13:10:40 ok thanks CallumTaylor Jan 24 13:10:41 assets by opening the assets manager from a context Jan 24 13:10:57 ok i will use assets Jan 24 13:11:00 thanks Jan 24 13:11:42 BulleTTime ... did you fix your problem already? Jan 24 13:11:56 no :( Jan 24 13:12:14 still trowing nullpointer on findViewById Jan 24 13:12:36 however it can find the layout with setContentView above it Jan 24 13:13:18 weird Jan 24 13:13:42 I don't know how VS imports the resources ? Jan 24 13:14:03 well Jan 24 13:14:46 i use a deployment tool, i can show u the code that alters the aapt Jan 24 13:15:04 hm okay Jan 24 13:15:27 but as i said, i dont see any difference between the eclipse and vs apk (when looking at resources) Jan 24 13:15:51 http://pastebin.com/DpNMwSYN Jan 24 13:16:10 anyone know of a tutorial that concentrates on android dev with intellij that hilites shortcuts from resource definition in the layout to code generation for listeners etc? Jan 24 13:17:26 BulleTTime .. do you have more packages? Jan 24 13:17:38 or a main package declared in manifest file? Jan 24 13:17:51 Flank_Y320-U30: I tried AS and can see little if any reason to use it over intellij community edition. Now I'm no an expert by any means but I like that little more flexibility IiJ gives e.g create and debug "real" java apps. Jan 24 13:17:51 yeah i have Jan 24 13:18:35 is this activity in a different package then the main package ? Jan 24 13:18:39 this is my manifest: Jan 24 13:18:39 http://pastebin.com/dJkZwd6B Jan 24 13:18:49 so no :) Jan 24 13:19:55 u know what resources.arsc does (its in apk base) Jan 24 13:20:06 maybe its about that file.. Jan 24 13:20:27 that contains values/string or? Jan 24 13:21:51 hmm Jan 24 13:22:11 that one differs ? Jan 24 13:22:57 yeah Jan 24 13:23:17 well its compressed but file size is defferent Jan 24 13:23:26 but i dont know what it does actualy Jan 24 13:25:36 http://en.wikipedia.org/wiki/APK_(file_format) Jan 24 13:26:20 resources.arsc : a file containing precompiled resources, such as binary XML for example. Jan 24 13:26:48 ok.. Jan 24 13:27:16 so thats why values and strings wont go inside res folder, but in that file indeed Jan 24 13:27:37 yeah I guess Jan 24 13:27:49 but I don't know how VS handles that whole structure Jan 24 13:27:54 but looking at filesizes i think that wont be the issue, my visual studio file is larger Jan 24 13:28:17 well visual studio dont handle that, the deployment tool does Jan 24 13:28:57 deploytool just alters aapt Jan 24 13:29:18 (with stuff defined in vs) Jan 24 13:31:12 i can show you the whole python file that does the apk thing but i dont think i would have to change anything in that Jan 24 13:32:14 its just Jan 24 13:32:48 its wierd how setContentView can find the layout, and then findView aint work. Jan 24 13:33:12 inside the layout there's just a id defined it should be found Jan 24 13:33:13 @+id/sign_in_button Jan 24 13:38:59 hmmmmm Jan 24 13:39:39 I know what you mean Jan 24 13:39:44 but not how to solve that Jan 24 13:39:48 :S Jan 24 13:39:58 or even how that could go wrong Jan 24 13:40:45 what if you write out the package infront of it? Jan 24 13:41:10 findViewById(packagename.R.id.sign_in_button); or smth Jan 24 13:44:38 ill give that a try Sirolf Jan 24 13:47:53 Hey guys. Every time I deploy my application, it removes all accounts associated with that application. How can I prevent this ? Jan 24 13:50:38 Sirolf : no luck with that.. Jan 24 13:52:42 hey so I am trying to store info on a user's device so they do not need to make any server calls after downloading the app Jan 24 13:52:56 would I be using sqlite for the storage system? Jan 24 13:54:34 yes Jan 24 13:54:41 LoneSoldier728 yes Jan 24 13:56:40 ok and is there a get call or is it just a normal query straight from the activity screen? Jan 24 13:58:54 http://stackoverflow.com/questions/21334546/how-to-store-this-into-sqlite-android Jan 24 13:58:59 trying to do this ultimately Jan 24 14:08:14 How can I convert an Uri obtained by EasyShare with mime type file/* to a file Uri? Jan 24 14:10:40 can objects be stored in sqlite? Jan 24 14:10:51 or even arrays? Jan 24 14:10:57 yep! Jan 24 14:11:15 yes Jan 24 14:12:45 LoneSoldier728 you can use this for example Jan 24 14:12:45 http://www.db4o.com/android/ Jan 24 14:12:50 http://www.sohailaziz.com/2012/09/using-database-for-objects-db4o-in.html Jan 24 14:15:58 Mavrik, hey, sorry I had to leave earlier. Jan 24 14:21:53 Morning Jan 24 14:23:16 morning Jan 24 14:23:27 oh @fBirD is that a lib that is just added? Jan 24 14:24:03 and it allows for nested objects within arrays Jan 24 14:27:27 my nexus 4 (4.4.2) just decided that it doesn't want to share anything to adb :E Jan 24 14:28:29 shortcut to delete an entire function/class "under cursor" definition in intellij? Jan 24 14:28:38 Ugh got 2.5 hours on my ducking surface pro today :( Jan 24 14:28:45 (inner class or method) Jan 24 14:29:22 mikedg: doing what? You've got something running amok. Jan 24 14:30:13 its been pretty hosed since that botched firmare update :/ Jan 24 14:30:33 battery statistics has it at like half of it's design capactity Jan 24 14:31:09 i gotta warranty it when i get some free time, but today was the first day i actually checked how terrible it really was Jan 24 14:32:00 hello Jan 24 14:32:10 what is the best way to store this into sqlite and be able to query the individual words in the objects - words: [{english: hello, spanish: hola}, {english: thanks, spanish: gracias}, ...], Jan 24 14:32:30 I can send via socket some data to a text only printer Jan 24 14:32:45 but how can I create a queue in android ? Jan 24 14:32:48 if someone searches for the word hello I want to grab this out {english: hello, spanish: hola} Jan 24 14:34:03 rgr, ctrl+alt+shift+t, safe delete ( you can type delete, or the number it might be behind) Jan 24 14:34:28 LoneSoldier728 dunno i just found that library for you :) Jan 24 14:35:53 rgr, generally ctrl+alt+shift+t is your friend :) Jan 24 14:36:23 rgr, alt+delete might also work Jan 24 14:37:22 Has anyone else run into BLE issues with android 4.3 and 4.4? Jan 24 14:38:11 thanks Jan 24 14:38:34 The fog of "too much" is starting to clear with intellij.. and thats me coming from emacs... Jan 24 14:38:35 I am reading that their is a bug with the support v4 Fragment for XML defined fragments that causes the duplicate id error I am getting when inflating. Has anyone else run into this? Jan 24 14:39:44 I never really learnt too many of the shortcuts since ctrl+alt+shift+t has so many of them Jan 24 14:40:19 rgr, also alt+insert is nice... and the fact that you can just start typing parts of words of the items you want in a list and it'll filter them out Jan 24 14:40:29 Zharf: cant see it there. C-M-S-t? Lots of refactring but no delete option Jan 24 14:40:43 safe delete? Jan 24 14:40:53 yeah I am trying to figure out the best way to go about this Jan 24 14:40:54 yeah live list search is nice and I just found M-Ins Jan 24 14:40:54 : / Jan 24 14:41:10 has anyone ever dealt with something like this Jan 24 14:41:11 http://stackoverflow.com/questions/21335332/how-to-store-an-object-nested-in-an-array-in-sqlite-android Jan 24 14:41:42 c-m-s-t is "refactor this". tgeres not delete option, Jan 24 14:41:53 Zharf, one of my favorites is Ctrl-D Jan 24 14:42:18 jonc, I don't know what that does in default config... I use ideavim so my keymaps are different Jan 24 14:42:20 thats handy at start of class- Jan 24 14:42:33 Ctrl-D is duplicate line Jan 24 14:42:42 or duplicate selection Jan 24 14:42:43 so yyp Jan 24 14:42:46 :) Jan 24 14:42:48 so, delete function or class? Jan 24 14:42:56 LoneSoldier728 the idea is to have a dicionary ? Jan 24 14:43:03 ya Jan 24 14:43:14 rgr, having the cursor on top of the name and c-m-s-t works for me Jan 24 14:43:16 but more than one Jan 24 14:43:17 or alt+delete Jan 24 14:43:40 so this http://pastebin.com/sdA3PPax Jan 24 14:43:47 ah ok. need cursor on name. no worries. Jan 24 14:43:47 would be the storage of one dictionary Jan 24 14:44:00 but then within that dictionary I want to be able to query a specific word Jan 24 14:44:03 LoneSoldier728 if the case is a big big dicionary you need to have a specific search method Jan 24 14:44:08 There should be a populated intellij IRC channel. Would help peole so much. Jan 24 14:44:23 or will take severeal time to search if you have like 1000 words Jan 24 14:44:23 this channel is pretty much one of those :p Jan 24 14:44:29 or 5000 Jan 24 14:44:49 what do you mean by a search method Jan 24 14:44:54 LoneSoldier728 i got the main idea Jan 24 14:45:11 other than querying for a word? Jan 24 14:45:16 oh brilliant. I love the intellij guys. They do things that I would have done (no ego intended). e.g Alt-del on a private var offers to clean up getters and setters too. nice. Jan 24 14:46:02 that's one of those things that I rarely use though Jan 24 14:46:09 LoneSoldier728 i mean more complex search method than just make a cicle and search, like Dijkstra's algorithm Jan 24 14:46:16 for some reason I rarely have a need to delete variables or classes Jan 24 14:46:40 Zharf: yeah, but there are still a few jobsworth channel "topicality" patrollers (normally those that offer no help in anything) who start snapping at your heels for asking about an editor in a dev channel. Using an IDE is so intrinsic in Android development (and Java in general) that its totally on topic IMO. Jan 24 14:46:49 well for example for the contacts in a phonebook how is a contact searched by either first name last name etc... it cannot be done with a simple query? Jan 24 14:47:14 rgr, I just find intellij to write around 80% of the code for me Jan 24 14:47:18 which is so awesome Jan 24 14:47:30 Zharf: me neither but I like to know. Also if I have to reach for the mouse it makes the baby jesus cry. Jan 24 14:47:41 LoneSoldier728 you will only have English and spanish? Jan 24 14:47:48 (of course being an emacs diehard has beaten that into me) Jan 24 14:47:48 I'm a vim user myself, I feel you Jan 24 14:47:53 well the goal is to have any combination of languages Jan 24 14:48:00 and to allow for multiple languages Jan 24 14:48:10 like english, german, spanish, french Jan 24 14:48:18 or just 2 out of the 4 Jan 24 14:48:58 I think people know what multiple languages means ;) Jan 24 14:49:10 yeah but 2 is multiple : ) Jan 24 14:49:26 so wanted to show that I meant it can be more than 2 even Jan 24 14:49:47 It sounds like you need to look up algorithms and CS in general. The search mechanism would or might vary bnased on back end. e.g with a server based RDBMS using ajax or soemthing you could use SOUNDEX. Jan 24 14:49:50 so Jan 24 14:50:07 well rgr, it will all be stored locally on the device Jan 24 14:50:09 LoneSoldier728 you already think about the database struct for that? Jan 24 14:50:11 so no server calls Jan 24 14:50:27 on device? Jan 24 14:50:38 so use sqllite and learn about sql. its a start. there is no hard and fast answer. Jan 24 14:50:38 you will have a application with 400 mb xD Jan 24 14:50:46 yep, sqlite Jan 24 14:50:52 In your case the dict would have a language code which all words back key on. Jan 24 14:51:33 it wont get that large Jan 24 14:51:45 because the way I am having it work is that it will be manually inputted Jan 24 14:52:11 you will need Jan 24 14:52:20 a table for dictionary Jan 24 14:52:23 dont worry about size for now. worry about architecture and using the platform tools where possibly. Jan 24 14:52:23 another for words Jan 24 14:52:30 and another for the relationship Jan 24 14:52:42 and in that table you put the related word Jan 24 14:52:42 well this was the plan for the architecture without array or object restrictions Jan 24 14:52:49 dictionaries are a very well researched model and there are loads of examples. Jan 24 14:52:49 like hello holla , ola Jan 24 14:52:52 http://pastebin.com/sdA3PPax Jan 24 14:53:25 So I was following the Google example on fragments. I noticed that on orientation change my action bar menu items would duplicate. I realized that was happening because my fragment XML that I was inflating had no fragment tag with an ID. I added a fragment tag and ID, but now I get inflate exception duplicate id. Jan 24 14:53:28 ya but the problem rgr is that I am not building a pre-defined dictionary Jan 24 14:53:39 thats not a problem. Why would it be? Jan 24 14:53:49 its still not rocket scienec and its all been worked out before. Jan 24 14:53:52 Mornin'! Jan 24 14:53:54 I am saying the examples online are all about pre-defined Jan 24 14:54:02 yes. dictionaries. Jan 24 14:54:16 mine is a create your own dictionary :P Jan 24 14:54:27 so what? Its still the same relational models. Jan 24 14:54:51 see in mongodb/nosql Jan 24 14:54:51 All dictionaries I use on my pc or devices allow me to add things. Jan 24 14:54:54 this is not a problem Jan 24 14:54:56 http://pastebin.com/sdA3PPax Jan 24 14:55:33 anyway, its too off topic even for me now. You need to decide how you want to model the dictionary and then see what android facilitates. I would use sqllite but then I like databases. Jan 24 14:56:21 well regardless dictionary or not, like i said ten times my architecture for the way something needs to be stored is like so - and imagine the column names to be the left side and the right be the information Jan 24 14:56:49 and back to the issue at hand - http://stackoverflow.com/questions/21335332/how-to-store-an-object-nested-in-an-array-in-sqlite-android Jan 24 14:59:02 you cant have an "architecture" if you dont understand the basis of relational modelling. That's all I'm saying : and then you'll have a better idea how to implement it. storing "left or right" of the information is not a model. anyways. Jan 24 15:01:31 there sorry i updated the actual question Jan 24 15:02:03 so the columns are (id, name, words) - the rows will include string for id and name, then I just need to include an object into words Jan 24 15:16:25 How to set shadow to a widget's textview programatically Jan 24 15:16:27 ? Jan 24 15:26:04 so if I inflate a layout file for a fragment with no fragment tag, it won't save configuration change state. but if I put it in a fragment tag with an id, I get duplicate ID errors. I feel like I've been reading about fragments for several days now and still don't have a freakin clue how to do them right, lol Jan 24 15:34:14 weltio, you can't... unless it's remoteviews allowed Jan 24 15:44:05 has anyone used the /raw folder to house json config files? Jan 24 15:44:30 shit, it won't work for what I want anyways, nevermind Jan 24 15:48:22 hi... i'd like develop a system of 3-4 apps. every app can comunicate with other apps send message, string, int or other. Jan 24 15:48:58 what do i use ? broadcastrecevier, a remote service? Jan 24 15:49:02 androidev using internet communication? Jan 24 15:49:09 androidev: you can use both, it depends on your requirements Jan 24 15:49:10 no fBirD Jan 24 15:49:20 all is offline Jan 24 15:49:24 ohhh Jan 24 15:50:09 i can't say now.. but i have one app for gps, 1 for accelometer etc Jan 24 15:50:50 you can use services Jan 24 15:51:02 broadcastrecevier Jan 24 15:52:20 i need a speed connection Jan 24 15:52:38 i send between apps a lot data Jan 24 15:53:01 every 100milleseconds sometime Jan 24 15:54:14 androidev http://developer.android.com/training/sharing/receive.html Jan 24 15:55:26 fBirD, ok.. i have doubt.. such as.. memory, performance.. Jan 24 15:56:29 no matter what you do you'll have to serialize your data and re-parse it on the other side if you're crossing apps Jan 24 15:56:48 BroadCastReceiver.. , i know.. i use them ofter but i don't know how Jan 24 15:57:06 so either figure out a way to not have to do share high-bandwidth data, or figure out how to optimize your serialization methods Jan 24 15:57:41 so.. how can they be from the point of view of performance Jan 24 15:58:31 dragorn, i receive data from external hardware Jan 24 15:58:34 also figure out if your definition of high bandwidth is actually high bandwidth as far as the phone is concerned Jan 24 15:58:36 via USB Jan 24 15:58:57 as far as power goes, constantly waking up for a 2 byte transfer is much more disruptive than waking up once a second for a 10 byte transfer, or whatever Jan 24 16:01:56 so step one, figure out how to batch things to a reasonable rate in terms of whatever you're refreshing, step two, figure out if it's more expensive to serialized parsed data or to send raw data and parse it in multiple places Jan 24 16:02:22 s/serialized/serialize/ Jan 24 16:02:57 step three, figure out what your actual bandwidth off the USB device is Jan 24 16:04:45 ok dragorn ... i understand.. but what does Android offer to send and receive data between apps? Jan 24 16:04:53 services Jan 24 16:05:02 service with adl? Jan 24 16:05:13 remote service? Jan 24 16:05:14 or, in theory, network sockets. both require you to serialize your data so there's no major upside Jan 24 16:05:23 or service wirh handler message Jan 24 16:05:36 if you're sharing services between processes, follow the instructions for that - yes, it will require aidl Jan 24 16:05:43 you can't do simple message passing inter-app Jan 24 16:06:29 mmm Jan 24 16:08:09 ok.. ok I'll evaluate each alternative: 1) broadcast 2) services 3) socket Jan 24 16:09:17 I wouldn't broadcast. Use a service. Jan 24 16:09:38 Your cost is still going to be in serdes, so figure that out before you spend time optimizing the wrong things. Jan 24 16:14:42 hello Jan 24 16:14:45 ok.. i'll use services... and for simple data.. i can use broadcasdt Jan 24 16:16:05 I have two activities (Rss feed, Rss messages) and I want to search feed and messages. Is there any ooportunity to create two search widgets (one for one activity) and perfrom search action in the same activities ? Jan 24 16:18:11 I don't want to create additional activity that perform search action for me it would me sensless... Jan 24 16:19:07 is it possible to have a "provided" dependency with gradle I have tried the following but looks like its being compiled in http://pastebin.com/3Dj7KSTS Jan 24 16:20:19 xastey: update to 0.8 of the plugin and just use 'provided' scope Jan 24 16:20:40 o really.. let me try that Jan 24 16:22:33 umm getting Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult'. with android studio Jan 24 16:22:45 using classpath 'com.android.tools.build:gradle:0.8.+' Jan 24 16:24:00 You need to use gradle 1.10 Jan 24 16:24:24 ok Jan 24 16:25:58 How to perform multiple SEARCH in multiple activities that result of the search is in the same activity ?? Jan 24 16:26:54 thanks JakeWharton and SimonVT looks to be working Jan 24 16:27:34 pfn: so what can i do? :D Jan 24 16:33:55 JakeWharton: Will that make it into u2020 instead of the plugin? Jan 24 16:34:05 will what? Jan 24 16:34:08 oh Jan 24 16:34:09 provided Jan 24 16:34:11 yeah Jan 24 16:34:38 Btw, Butterknife doesn't work with library projects, correct? Should that be mentioned on the website as known limitations? Jan 24 16:35:09 I saw the issue and that it probably won't be fixed because of how Android does R.java for library projects, correct? Jan 24 16:35:09 it could be mentioned, yes Jan 24 16:35:15 correct Jan 24 16:35:19 and all the "solutions" are really gross Jan 24 16:35:23 Heh Jan 24 16:35:30 what kind of a name is butterknife? Jan 24 16:36:03 This app I'm working on is currently heading into a weird direction. 90% of the code is in the "library" project. Guess I could go with gradle build types, soon. Jan 24 16:36:17 pragma-: it's a corollary to dagger Jan 24 16:36:17 The two resulting apps are each 5% of rest of the code base. Jan 24 16:36:36 pragma-: from the docs: "A butter knife is like a dagger only infinitely less sharp." Jan 24 16:36:52 The name comes from a time when Jake was mocking people for wanting "View Injection". Jan 24 16:36:53 it's a reference to how stupid it is to think of view "injection" as dependency injection Jan 24 16:37:04 heh Jan 24 16:37:34 boilerplate reduction: absolutely, but it has nothing to do with DI Jan 24 16:37:56 What the easiest way to compare two unix timestamps to see if the date has changed in Android? Jan 24 16:38:27 unix timestamps are longs. just compare them with !=, no? Jan 24 16:39:31 JakeWharton: Yeah, that would be to compare them, but I'm just looking to see if the day has changed, and I'm kinda lost on how to do that. I hate working with times and dates. I always somehow mess it up Jan 24 16:41:00 ah, yes. and it's quite gross Jan 24 16:41:22 basically new Date(unixTimestamp * 1000) to convert it to a Date object Jan 24 16:41:40 Gotcha. Thanks Jan 24 16:41:49 then Calendar foo = Calendar.getInstance(); foo.setTime(date); Jan 24 16:42:03 eghdk: Is this just about today vs yesterday? Jan 24 16:42:04 and then you have to call foo.get() three times to get the day, month, and year Jan 24 16:42:34 Because you can do DateUtils.isToday(unixTimestamp) iirc. If that's enough for you. Jan 24 16:42:51 kakazza: No, I am given two random timestamps, and I have to be able to get the date MM/DD/YYYY of both, and then compare them. Jan 24 16:43:30 http://stackoverflow.com/a/10356278/132047 Jan 24 16:43:50 almost verbatim what i wrote above but a bit smarter by using the day in the year Jan 24 16:44:36 you can actually skip creating the Date object and just call setTimeMillis on the calendar Jan 24 16:45:43 Aren't fragments supposed to be destroyed on configuration change? If I change to landscape, then back to portrait, my supportFragmentManager is still finding one of the fragments loaded in landscape, which is screwing my logic all up and resulting in a NPE. Jan 24 16:46:22 If they're added they will be re-created along with the activity Jan 24 16:47:47 SimonVT it won't load the layout file from layout-port and see that the fragment shouldn't exist anymore? Jan 24 16:53:15 There's some strange behavior around that Jan 24 16:53:31 I think it will instantiate it but not actually call lifecycle methods Jan 24 16:53:56 Not sure tho, I don't really use fragments in layouts Jan 24 16:54:36 SimonVT you load them dynamically? or just don;t use them at all? Jan 24 16:55:25 I create when I need them Jan 24 16:55:41 But I also don't have fragments that only exist in certain configurations Jan 24 16:55:59 I think the reasoning is that if they destroyed it you'd lose state.. You don't want to lose state Jan 24 16:57:53 I'm sending image file using Apache Httpclient. I can send all the images exclude images that directly shot from Whatsapp. I got an IOException, and nothing being sent. Someone have idea why? Jan 24 16:58:10 Hi , My XML Layout has 1900 line of code , and when i open this page the first time the page load very slowly , how can i make it fast ? Jan 24 16:58:20 is it bad to have sucha long XML layout file ? Jan 24 16:59:04 1990 lines? Jan 24 16:59:05 holy shit Jan 24 16:59:24 that's a lit Jan 24 16:59:25 lot Jan 24 16:59:35 can you post it out of curiosity Jan 24 17:00:48 a total of 1900 lines of xml may be reasonable for a large app... but 1900 for a single activity :/ Jan 24 17:01:39 hi , pfn : http://pastebin.com/312JG8Zi Jan 24 17:01:48 That must be a huge app Jan 24 17:01:50 CallumTaylor : http://pastebin.com/312JG8Zi Jan 24 17:02:19 chinu Jan 24 17:02:36 try includs Jan 24 17:02:44 instead of all in same file Jan 24 17:02:45 fBirD includes ? Jan 24 17:02:48 what's up with all the useless relativelayouts Jan 24 17:02:55 Jan 24 17:03:08 those i have used for lines , borders and all Jan 24 17:03:09 and you can separate layout in several parts Jan 24 17:03:13 tip: you don't have to close the full tag, you can just do /> Jan 24 17:03:17 chinu, use a background drawable... Jan 24 17:03:44 your layout is unusable Jan 24 17:03:46 pfn : background drawable instead of ImageView ? Jan 24 17:03:55 instead of useless view objects Jan 24 17:04:06 what is android minimum screen size in dpi? Jan 24 17:04:18 *dp Jan 24 17:04:31 calculate hvga ldpi yourself Jan 24 17:04:37 or qvga even, I suppose Jan 24 17:04:54 some 2.5" thing Jan 24 17:05:06 chinu this layout in small screen you will need like 5 times scrolling to reach the end of it Jan 24 17:05:06 xD Jan 24 17:05:16 maybe more Jan 24 17:05:24 small screens are at least 426dp x 320dp Jan 24 17:05:28 is this the minimum? Jan 24 17:05:53 yoavst wait Jan 24 17:05:58 isn't it 320x240 ? Jan 24 17:06:03 I am developing an app that should be able to add an account to the AccountManager (and get the values back). Could someone provide an example? Jan 24 17:06:07 all about android layout here Jan 24 17:06:07 http://petrnohejl.github.io/Android-Cheatsheet-For-Graphic-Designers/ Jan 24 17:06:35 I want to create a linear layout for listview that should hold somehow 2 urls Jan 24 17:06:59 pfn : this layout create this --> http://imgur.com/XtMXvJN Jan 24 17:07:24 if you took 2000 lines to create that.... Jan 24 17:07:27 You needed 1900 lines for _that_? Jan 24 17:08:09 chinu that layout take that lot of lines? Jan 24 17:08:13 oO Jan 24 17:09:06 That's gonna crash on a couple of phones Jan 24 17:09:16 maybe it is slowing down because that huge bar code Jan 24 17:09:56 but is a realy basic layout there is nothing relevant to get slow Jan 24 17:10:27 fBirD : whats the best possible way ? is there a graphical tool to design in Android ? does the new Android Studio any help ? Jan 24 17:10:46 chinu Jan 24 17:11:11 you are getting this slow where ? in editor in eclipse? Jan 24 17:12:00 the Android Studio have a nice grapgical tool to design Jan 24 17:12:20 but you always get the best aproach by typing all the code manualy Jan 24 17:14:58 fBirD: why not use the gui tool and then do a quick review of the xml? Jan 24 17:15:24 pull everything in and then just check whether the xml looks clean. Jan 24 17:15:53 SimonVT ahh, there is also an isInLayout() function. so fragment won't be null, but isInLayout will return false after the configuration change Jan 24 17:16:57 anyone experienced with NDK + libusb ? Jan 24 17:17:13 sigv yes you can do that , but for example i'm usualy work with linnearlayout and when i try more complex layout its more dificult using the gui tool Jan 24 17:18:23 fBirD: ah, point taken. Jan 24 17:20:05 Can anyone explain why the query does not sort the date ? http://pastebin.com/TnZ2Ysa5 I think I will convert to millisec, but before I do that, I just need to understand why Jan 24 17:21:10 bubuzzz, how is your date stored? Jan 24 17:21:30 it is a string taken from (new Date()).toString() Jan 24 17:21:49 that is probably your issue then Jan 24 17:21:53 I'm sending image file using Apache Httpclient. I can send all the images exclude images that directly shot from Whatsapp. I got an IOException, and nothing being sent. Someone have idea why? Jan 24 17:22:15 @jonc: why is that ? I am using sqlite and it does not have the date type Jan 24 17:22:26 then why not store it as a long? Jan 24 17:22:53 yes sqlite dont have date type Jan 24 17:23:05 bookmarked_date is a string, not sure how sqlite will like the datetime() Jan 24 17:23:13 yes, that is what I gonna do: store the millisecond Jan 24 17:23:30 strftime(format, timestring, modifier, modifier, ...) Jan 24 17:23:33 http://www.sqlite.org/lang_datefunc.html Jan 24 17:24:05 you can store the date in miliseconds Jan 24 17:24:06 or in string format and parse the date Jan 24 17:24:46 Ok, got it, thx Jan 24 17:25:50 @fBirD: yes, I am storing it as the string format, but the query order by does not sort the record probably Jan 24 17:26:16 from the link http://www.sqlite.org/lang_datefunc.html I think it is because the format of the string is not correct Jan 24 17:26:37 yes you can't sort like that Jan 24 17:26:38 :S Jan 24 17:26:40 bubuzzz, what I just posted is why, the format you are using is not a valid date string for sqlite Jan 24 17:26:54 yep, it should not contain EST 2014 Jan 24 17:26:54 YYYY-MM-DD HH:MM:SS is what it can handle Jan 24 17:26:57 I got it Jan 24 17:26:59 but if you store like a number you maybe can Jan 24 17:27:26 thank jonc and fBird :) Jan 24 17:27:35 you want for example: 2014-01-24 10:16:38 Jan 24 17:27:39 it could handle that Jan 24 17:28:00 which in java you can use a SimpleDateFormatter to get a string to look like that Jan 24 17:28:58 @jonc yep, definitely Jan 24 17:30:57 i added a new java file to my app, and then rebuilt the app and then installed it on my device Jan 24 17:31:04 however the new java file is not in my apk Jan 24 17:31:07 ....why? Jan 24 17:31:19 using android studio Jan 24 17:31:21 it is possible that it doesn't like you. Jan 24 17:31:44 01-24 17:29:50.232 30331-30331/net.rymate.notes E/AndroidRuntime﹕ FATAL EXCEPTION: main Jan 24 17:31:44 Process: net.rymate.notes, PID: 30331 Jan 24 17:31:44 java.lang.NoClassDefFoundError: net.rymate.notes.storage.GoogleDriveStorage Jan 24 17:31:44 at net.rymate.notes.activities.NotesListActivity.onCreate(NotesListActivity.java:122) Jan 24 17:32:21 I added the new source file via right clicking package > new > java class Jan 24 17:33:13 Why isn't it inside the src? Jan 24 17:34:23 We had punched the glass/screen out of the door, but left the door itself intact so it would still close and detect that it was "Closed" Jan 24 17:35:33 razor-: what do you mean Jan 24 17:35:34 it is Jan 24 17:35:50 it's in src/main/java/net/rymate/notes/storage Jan 24 17:36:00 Look further up in logcat and see if it's being evicted for some reason Jan 24 17:36:23 anyone used "java-universal-tween-engine" with a non-game android app? Jan 24 17:37:31 01-24 17:34:17.952 31395-31395/net.rymate.notes I/dalvikvm﹕ Failed resolving Lnet/rymate/notes/storage/GoogleDriveStorage; interface 1582 'Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;' Jan 24 17:37:31 01-24 17:34:17.952 31395-31395/net.rymate.notes W/dalvikvm﹕ Link of class 'Lnet/rymate/notes/storage/GoogleDriveStorage;' failed Jan 24 17:37:31 01-24 17:34:17.952 31395-31395/net.rymate.notes E/dalvikvm﹕ Could not find class 'net.rymate.notes.storage.GoogleDriveStorage', referenced from method net.rymate.notes.activities.NotesListActivity.onCreate Jan 24 17:37:40 paste more lines Jan 24 17:37:48 i can't tell the problem Jan 24 17:37:51 k Jan 24 17:37:54 And please use pastebin Jan 24 17:37:57 * rymate1234 cranks up a pastebin Jan 24 17:38:26 https://www.irccloud.com/pastebin/hCxqwfyW Jan 24 17:40:33 Looks like it can't find com/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks so it's evicting your class Jan 24 17:41:23 D: Jan 24 17:42:22 how do i fix then? Jan 24 17:43:28 Maybe you messed up adding it as a dependency Jan 24 17:44:00 hi. can findViewById not work, while above setContentView works? Jan 24 17:45:26 lol simple question but a wierd result.... Jan 24 17:45:31 findViewById returning null means that the ID you are looking for is not inside the view you are looking at Jan 24 17:45:48 its so wierd. there must be something wrong with id's Jan 24 17:45:57 anyone knows? Jan 24 17:46:10 it means the id isn't inside, go look at the view to make sure it is Jan 24 17:46:17 Clean project and try again Jan 24 17:46:24 If that doesn't work, the issue is at your end Jan 24 17:54:44 "java-universal-tween-engine" for pure android is crap Jan 24 17:54:46 FYI Jan 24 17:56:39 O.o Jan 24 17:58:02 explodes: justify your remarks Jan 24 17:58:21 Do you recommend the Android cursea course ? Jan 24 18:00:34 is there a way to make listview with 2 textview which both are clickable? Jan 24 18:03:12 Sure, just set click listeners Jan 24 18:03:44 in the adapter? Jan 24 18:04:06 yes Jan 24 18:04:12 JakeWharton: With the use of a Activity/Fragment/View, having to access the "TweenManager" from the view that is created in the Activity is just ridiculous. It makes the code a tangled weave. Jan 24 18:05:01 ITT: JakeWharton complaining about fragments being ridiculous Jan 24 18:06:14 JakeWharton: Also, the code that they provide to run the tween update on the UI thread is making so many allocation it brings my app to its knees, millions of allocations of "android.os.Message" are being created inside a thread that is being run 60Hz Jan 24 18:06:31 er, 60 times per second, JSYK Jan 24 18:07:11 yeah the allocations thing doesn't surprise, i'm not sure I understand your first statement. do they have sample code to look at? Jan 24 18:07:15 i'm just curious what it looks like Jan 24 18:07:38 let me paste the one that has even less allocations, the one i'm improving Jan 24 18:07:44 side by side with their original Jan 24 18:08:57 [mine] http://pastie.org/8664324 [theirs] http://pastie.org/8664325 Jan 24 18:12:48 Hi SimonVT Jan 24 18:13:21 JakeWharton: Maybe I spoke too soon, my code is bug addled Jan 24 18:13:32 Which soft can root huawei? Need to edit files in /data/myapp Jan 24 18:13:41 Thread.sleep(1000 / 60) will sleep for 0 Jan 24 18:14:07 i don't understand why another thread is needed Jan 24 18:14:08 heh Jan 24 18:15:01 why not just constantly invalidate and then update when the next frame is drawing? Jan 24 18:16:31 Or use androids animation framework Jan 24 18:16:51 or that :) Jan 24 18:16:53 Does the animation framework allow tweens on misc. properties, like colors? Jan 24 18:16:58 yep Jan 24 18:17:01 oh shi- Jan 24 18:17:03 Any property Jan 24 18:17:07 I'd never seen that Jan 24 18:17:07 As long as there's a setter Jan 24 18:17:13 Do you have a link to the docs? Jan 24 18:17:22 for my lazy ass :P Jan 24 18:17:24 d.android.com Jan 24 18:17:26 https://developer.android.com/guide/topics/graphics/prop-animation.html#object-animator Jan 24 18:17:27 search ValueAnimator Jan 24 18:17:28 SimonVT its more complicated Jan 24 18:17:44 i build the actual apk in visual studio Jan 24 18:17:45 it's much simpler than this tween framework, that's for sure Jan 24 18:17:51 not in eclipse Jan 24 18:17:56 ObjectAnimator anim = ObjectAnimator.ofFloat(foo, "alpha", 0f, 1f); would call setAlpha between the values Jan 24 18:17:58 Cool. Thanks JakeWharton Jan 24 18:18:01 Quite simple Jan 24 18:18:12 Oh. Does that use reflection? Jan 24 18:18:31 Reflectively looks up the method, yes Jan 24 18:18:32 kind of. it uses jni to get the method from dalvik and invoke it Jan 24 18:18:40 Yeah, that Jan 24 18:18:43 This is going to be a very animation intense app, using Pure Android. Will that be slow? Jan 24 18:18:55 you can also use the View.ALPHA property to avoid reflection Jan 24 18:19:01 For views, use ViewPropertyAnimator Jan 24 18:19:08 Ok cool Jan 24 18:19:13 view.animate().alpha(0f) Jan 24 18:19:20 (Only some properties supported) Jan 24 18:19:43 hi there Sirolf Me again Jan 24 18:19:52 Sirolf around? Jan 24 18:20:20 JakeWharton: would it be a pain in the ass for you to field an ABS question? Jan 24 18:20:28 only one way to find out Jan 24 18:20:32 hah Jan 24 18:21:11 anyone can tell me where list with resource id's are stored? Jan 24 18:21:27 we've got a sherlock fragment whose theme inherits from either Theme.Sherlock or android:Theme.Dialog depending on the device size Jan 24 18:21:29 In R Jan 24 18:21:31 what permission i need to delete sqlite database file? Jan 24 18:22:22 on OS < 3.2, we get a nice crash because (i think) certain attributes aren't defined in the device's Dialog theme Jan 24 18:23:05 Awesome, thanks SimonVT, JakeWharton Jan 24 18:23:07 JakeWharton: but i'm wondering why ABS views are getting instantiated/inflated if the theme dictates that they not show up anyway Jan 24 18:23:28 btw, ObjectAnimator.setInterpolator doesn't return itself, it breaks the chain D: Jan 24 18:23:40 explodes: blame Chet Haase Jan 24 18:24:11 jjnye: so you're saying windowActionBar is set to false but you are still seeing the action bar inflated? Jan 24 18:24:27 JakeWharton: How do you know who is responsible? Jan 24 18:24:50 JakeWharton: yep that appears to be the case Jan 24 18:24:55 Because I spent many nights and weekends inside the animation code trying to backport it Jan 24 18:25:40 any gradle+maven power users here? i am quite annoyed at maven and i can't tell if it's a legitimate gripe, or i'm just not using it right in my build scripts. if i attempt a build when i'm completely disconnected from the internet, it fails because it can't load up deps (even though it supposedly has them cached). https://gist.github.com/tophyr/8592172 Jan 24 18:25:45 What activity will let me call up the list of installed apps (downloaded or all)? Jan 24 18:25:46 is this expected? seems kinda shitty to not be able to build without internet. Jan 24 18:26:19 add the --offline flag? Jan 24 18:26:41 if you specify a wildcard version it's going to query for updates once every 24 hours Jan 24 18:26:47 that's the point of the wildcard Jan 24 18:26:50 JakeWharton: it's ABS 4.3 if that makes a difference. new-to-me codebase, new job here in SF o_o; Jan 24 18:27:15 jjnye: when windowActionBar is set to false a different layout is used that doesn't include the action bar at all Jan 24 18:27:21 JakeWharton: interesting, ok. thanks! Jan 24 18:27:35 jjnye: it does, however, include a stub for the action mode which can still potentially be shown Jan 24 18:29:59 Hmm, JakeWharton, besides the invalid chain why isn't this working? ObjectAnimator anim = ObjectAnimator.ofFloat(button, "textColor", startColor, endColor).setDuration(ANIM_DURATION).setInterpolator(ANIM_INTERP).start() Jan 24 18:30:21 ofInt Jan 24 18:30:25 ah duh Jan 24 18:30:27 thanks. Jan 24 18:30:45 would it matter if ANIM_INTERP is a static final instance, and being used multiple times at once? Jan 24 18:30:51 no, it's thread safe Jan 24 18:31:11 Awesome. Thank you for the help. Jan 24 18:32:20 lmao Jan 24 18:32:27 you cannot tween between colors like i thought. Jan 24 18:32:32 i'm getting rainbows Jan 24 18:32:45 you need an argb evaluator Jan 24 18:32:54 https://developer.android.com/reference/android/animation/ArgbEvaluator.html Jan 24 18:32:55 JakeWharton: i step-debugged it, it appears to be doing the whole shebang. in particular, it hits trouble when inflating a HomeView Jan 24 18:34:41 JakeWharton: Oh wow you are amazing Jan 24 18:34:51 sweet, android studio keeps locking up Jan 24 18:35:41 just had to kill adb Jan 24 18:40:11 I'm wondering if its a good idea or not to allocate my TypeEvaluators and Interpolators as static final or to instantiate them when they're used, because once they're instantiated as static final they stay in memory. Even though its probably a small allocation, what is a better pattern? Jan 24 18:40:43 I'm wondering what is best when this is applied to any re-used non-specialized instances... Jan 24 18:42:48 I'm getting an error in gradle builds: "MissingRegistered: Missing registered class" Jan 24 18:42:56 what's really really frustrating is that the class is in my project Jan 24 18:43:08 and the *.class file is in the build directory Jan 24 18:43:16 but the class "isn't there" Jan 24 18:43:25 this is after clean/build/clean/build Jan 24 18:43:34 am I missing something? Jan 24 18:43:51 explodes: I usually make my interpolators static final Jan 24 18:44:03 http://pastie.org/8664425 basically this is the question Jan 24 18:44:09 SimonVT: Ok cool Jan 24 18:44:20 They have no state Jan 24 18:45:03 same Jan 24 18:45:20 jjnye: hard to reason about what's happening without knowing more Jan 24 18:45:43 is there a specific problem or do you think it's just being wasteful? also what version of Android is this happening on? Jan 24 18:45:53 JakeWharton: yeah i'm stepping through ActionBarSherlockCompat to figure out exactly how it's choosing which layout to use Jan 24 18:47:15 JakeWharton: 3.2 and under. the specific problem is that it's crashing because theme attributes are missing but it shouldn't look for them since it's a dialog and windowActionBar is false Jan 24 18:48:02 using android studio, can I add different libraries/modules for different build environments? currently I only see production in out/, I dont even know where I can configure the environments.... Jan 24 18:49:56 you can specify libraries and modules for flavors and build types Jan 24 18:50:05 e.g., debugCompile 'com.foo:foo:1.2.3' Jan 24 18:50:41 but only with gradle, right? Jan 24 18:51:57 never mind... I'm just terrible at spelling Jan 24 18:52:02 JakeWharton: think i got it, need to set Window.FEATURE_NO_TITLE. which is odd, because it still seems to show the old-school title bar Jan 24 18:52:35 ah, yeah. you probably need both (and both with and without the android: prefix on the attribute) Jan 24 18:53:39 JakeWharton: for windowNoTitle xor windowActionBar or both? Jan 24 18:54:27 Why is android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS crashing? http://pastebin.com/tMsz1DDt <-- Logcat Jan 24 18:55:39 In case it matters, this is Google Glass running XE12 Jan 24 19:01:20 jjnye: i think just windowNoTitle is enough Jan 24 19:03:26 list selectors for custom listview items is terrible Jan 24 19:04:48 Not really Jan 24 19:05:09 android:drawSelectorOnTop Jan 24 19:05:12 I am trying to override the back button's default behavior (which is to kill my app) Jan 24 19:05:54 I already overrode onKeyDown in my activity, and I overrode onBackPressed Jan 24 19:06:24 SimonVT, unless I use a semi transparent color, won't that not show the actual content though? Jan 24 19:06:49 but my app is still being killed. I return true when I get KeyEvent.KEYCODE_BACK in OnKeyDown to designate that I have "handled" the key. Jan 24 19:06:55 Yep Jan 24 19:07:00 see that is a problem Jan 24 19:07:02 The framework selector is transparent Jan 24 19:07:29 why can't I just set the selector as the background of the custom item view? Jan 24 19:07:36 You can Jan 24 19:07:50 Or well, no Jan 24 19:08:04 You can if you set your own click listeners Jan 24 19:08:13 Instead of letting the listview handle it for you Jan 24 19:08:34 What is the issue anyway Jan 24 19:08:56 trying to get the selector as the background for my custom listview items Jan 24 19:09:31 The selector isn't your views background tho Jan 24 19:09:35 It's just drawn behind the view Jan 24 19:09:46 (or on top of) Jan 24 19:12:46 So, one of the techniques to round corners of a Drawable is to use a BitmapShader... I'm curious to know what a bitmap shader is (not specific to the BitmapShader class) and how is it able to produce an effect such as rounded corners Jan 24 19:13:57 alexfu, are you wanting to round the corners of a bitmap? Jan 24 19:14:03 or just a solid rectangle? Jan 24 19:14:47 jonc: I've already implemented it and it works. im more or less looking for an explanation of what a bitmap shader is Jan 24 19:15:35 JakeWharton: needs windowActionBar too, otherwise you yell at us for not using a derivative of Theme.Sherlock :P Jan 24 19:15:40 If it is the same as shaders used for a video card it means it will be hardware accelerated bitmap manipulation Jan 24 19:15:51 alexfu: read the javadoc for BitmapShader and Shader Jan 24 19:16:35 and if you want to dig deeper, it would probably be enlightening to look at the source for them too Jan 24 19:18:58 so, BitmapShader draws a Bitmap as a texture... still really doesnt explain how the result of calling Paint#drawRoundedRect() is a rounded image Jan 24 19:19:46 Am i seeing this wrong? http://imgur.com/a/9Gn9U if(output == null ) evaluating to true, even though output is not null? Jan 24 19:19:47 ^^stepping through a debug. notice the variables inspector to see that output is not null Jan 24 19:21:19 ^^first image is before, second is after the if conditional Jan 24 19:22:46 zzxx: that's aweseome! Jan 24 19:23:34 lol, maybe for you! Jan 24 19:23:39 i have to debug this Jan 24 19:23:51 JakeWharton: anyway thanks for the help! if i see you around i'll buy you a beer Jan 24 19:23:53 did you try a clean? Jan 24 19:24:24 jaynewstrom: ah, nah. thats a good idea Jan 24 19:25:19 clean did not work! Jan 24 19:25:19 Yeah, doesn't sound like the source and the app on the device is the same Jan 24 19:26:01 i agree with what you guys are saying... what else can i try besides clean, and initiate a new debug Jan 24 19:26:02 ? Jan 24 19:26:23 Restart eclipse? Use another ide? :p Jan 24 19:26:31 Oh, AS Jan 24 19:26:41 yeah ok ill do that Jan 24 19:27:04 I don't know.. But null checks work on the device Jan 24 19:28:34 i dont doubt that. just trying to sort it out :) Jan 24 19:31:04 wth... restarted AS, and my phone, uninstalled the app, and still this happens Jan 24 19:35:18 zzxx, do you have multiple threads using output? Jan 24 19:35:21 look for any APKs in your directory and remove them Jan 24 19:36:21 jonc: no i do not. good idea though Jan 24 19:37:14 Try an emu Jan 24 19:37:48 JakeWharton: is it possible to have a window title but no action bar, though? Jan 24 19:38:40 razor1101: yeah it is worth a shot Jan 24 19:39:31 jjnye: you can have the legacy title bar. Jan 24 19:39:59 dragorn: didnt work :/ thanks though Jan 24 19:40:16 zzxx: different AS/gradle versions load from different directories so it was worth a shot Jan 24 19:42:58 JakeWharton: but i have to set windowNoTitle, otherwise it's going to inflate either abs__screen_action_bar or abs__screen_action_bar_overlay Jan 24 19:43:30 The non-prefixed attribute, yes Jan 24 19:43:50 But you can only set android:windowActionBar to false and still get the old title Jan 24 19:43:52 would it be wise to convert a double to a string to use as a key in a hashmap? Jan 24 19:44:14 I mean, would I run to any issues when comparing? Jan 24 19:44:21 because it would just be like comparing two strings right? Jan 24 19:44:31 A double is a terrible key... But yes Jan 24 19:44:38 comparing strings is slow slow slow Jan 24 19:44:51 comparing numeric data isn't Jan 24 19:45:05 A map isn't doing string comparisons Jan 24 19:45:10 I don't know what's in your double, but if you can multiply it by a large constant and turn it into a Long, you'll be a lot happier Jan 24 19:45:12 It's doing hash buckets Jan 24 19:45:22 JakeWharton: I'm once again thinking c++ land, aren't i Jan 24 19:45:35 JakeWharton: a stl map<> is a RB tree so i always jump to that conclusion Jan 24 19:45:39 dragorn, true I guess Jan 24 19:45:54 CocoStorm: what are you trying to do? Jan 24 19:46:24 well, I have a lat long which are both doubles and I want to use it as a key for the hashmap. I don't want to accidentally have two identical keys in the map so I thought those were good enough Jan 24 19:46:41 lat/lon isn't a very unique value Jan 24 19:46:45 unless you've got something special going on Jan 24 19:47:04 it's extra non-unique when you consider wifi/cell positioning might have hotspots it sticks to Jan 24 19:47:15 JakeWharton: ah, tricky! so android:windowNoTitle=false, windowNoTitle=true. That seems to do it :D Jan 24 19:47:42 hmm, Jan 24 19:48:39 (not sure how you source your lat/lon identities) Jan 24 19:51:00 dragorn, it gets the current location Jan 24 19:51:29 CocoStorm: you're likely to see hotspots where it sticks you when doing cell location then, unless you only listen to gps Jan 24 19:51:36 and even then I wouldn't bet on them being 100% unique Jan 24 19:53:11 dragorn, I see hmm Jan 24 19:54:27 dragorn, I can use long as you mentioned earlier right? Also, HashMap gives an error Syntax error on token "long", Dimensions expected after this token Jan 24 19:56:02 I guess it's one those inconsient places in java where autoboxing doesn't do the intuitive thing... Jan 24 19:56:12 [a.k.a. use Long] Jan 24 19:57:03 or if you want to make lint happy, SparseLongArray might Jan 24 19:57:36 heh kk will do Jan 24 19:57:56 actually, guess i mistook what sparselongarray does - skip that last bit Jan 24 19:57:59 adding two doubles is a bad idea right? Jan 24 19:58:01 yeah, Long is the object version Jan 24 19:58:33 any time you manipulate float-ish stuff you lose precision. Lat/lon makes your life easy - pick the number of decimals you care about, and multiply it into a Long using that Jan 24 19:58:46 ie 10e5 is probably plenty Jan 24 20:00:16 so lat * 10^5? Jan 24 20:01:15 dragorn, that is true, but if you round anytime you do math with the rounded version you lose precision also Jan 24 20:01:38 jonc: fortunately since it's gps data he has a reasonable precision cutoff Jan 24 20:02:03 jonc: so if he turns it into a 5-digit precision long, or 6 digit, he can do all his math w/out losing additional precision Jan 24 20:02:15 http://stackoverflow.com/questions/21340136/why-is-there-a-class-missing-when-i-compile-my-app where am I goin wrong ._. Jan 24 20:02:38 he will lost precision still, because he loses any true digits after 5 Jan 24 20:03:10 use the value closest to the true value, you will maintain the highest precision Jan 24 20:03:45 at the very end if you only want 5 decimal points then cut off any extra digits Jan 24 20:03:52 but until you are finished leave it as is Jan 24 20:04:41 I disagree. Doing lots of math on doubles with gps style data leads to significant rounding errors Jan 24 20:04:49 so does rounding first Jan 24 20:05:04 say the 5th and 6th decimal place are 1 and 5 and the 7th which is an error is 4 Jan 24 20:05:21 Trimming it to 5 digits of precision, shifting it into a long, and doing integer math, introduces much less Jan 24 20:05:28 no it won't Jan 24 20:05:30 or using a high-precision float library like GMP Jan 24 20:05:40 hey, i have got an external crash: http://pastebin.com/FWhpc895 Jan 24 20:05:44 * dragorn shrugs Jan 24 20:05:46 by cutting off any digits you just made rounding a ton worse Jan 24 20:05:50 but...im not using FrameLayout.LayoutParams... Jan 24 20:06:01 My time working on gis style data disagrees with you, but who knows if any of this is even relevant to whatever he's doing. Jan 24 20:06:05 yes, there is error in a float data type Jan 24 20:06:36 but by cutting off any digits that are relevant you've now made it worse than if you would have left it Jan 24 20:06:50 I'm not saying cut off relevant digits. Jan 24 20:07:17 I'm saying determine the precision relevancy of your data: your phone gps is not going to be relevant past the 5th or 6th decimal place Jan 24 20:07:21 if the 6th digit is not rounding error (from the float data type) and you cut it off, then yes it is cutting off relevant data Jan 24 20:09:23 I think dragorn's point is that [as long as the integer/long values don't overflow] the error boundary is highly predictable Jan 24 20:10:13 however, error intervals on a long sequence of double math is dependent on the actual operations in question... but hey - to each his own opinion :-) Jan 24 20:11:33 kbs: more or less, yup. Your crappy phone GPS isn't going to be returning sane values into the 7+ decimal point, and your float math will definitely drift once you start adding a few points together at that precision. figure the precision tipping point for the real-world data you're getting. It's like a 24bit audio dac - there isn't 24 usable bits of signal in there, regardless of what it's reporting Jan 24 20:17:55 should i call onPause() of a glsurfaceview in its activity's onPause()? Jan 24 20:29:18 Hey guys, So I've been saving and loading an arrayList to a file. And now that i've changed the ArrayList to a HashMap, the compiler is complaining when loading from the file that the arraylist cannot be cast to hashmap. What do i do? Delete the file or something? Jan 24 20:30:55 !ping Jan 24 20:30:59 ~ping Jan 24 20:36:02 CocoStorm: Maps and List are not interchangeable. you need to convert one to the other by hand Jan 24 20:36:07 :) Jan 24 20:36:23 CocoStorm you could use a persistent hash like mvstore Jan 24 20:36:30 hash table Jan 24 20:37:32 Oh, yeah I've changed all the ArrayLists in my code to HashMaps but I already have an ArrayList stored in my file Jan 24 20:37:53 so it crashes when loadArray is called Jan 24 20:38:40 * g00s sighs Jan 24 20:39:52 I think that's what is happening? S: lol Jan 24 20:42:31 hey g00s, long time Jan 24 20:42:58 hey Napalm how are you doing :) Jan 24 20:43:08 not too bad Jan 24 20:43:08 CocoStorm: again, you cant cast a Map to a List. Jan 24 20:43:20 CocoStorm: or vice versa Jan 24 20:43:27 it's crashing on this line -> markers = (HashMap) ois.readObject(); Jan 24 20:43:31 so what do I do? Jan 24 20:43:41 markers is a HashMap btw Jan 24 20:43:41 CocoStorm: uhm convert it by hand... Jan 24 20:43:43 was just investigating the possiblity of making the "play music search widget thingy" open Google Music rather than the Play Music Store Jan 24 20:43:52 hi shineworld, i finally got it a BT dongle compatible with IOIO. its awesome now. Android + IOIO via BT.. but I have finished the dev of the app... hehehe!! i installed a crash report app to track what was going on... hehehe Jan 24 20:43:57 alexfu, what do you mean? Jan 24 20:44:03 its damn annoying having Google All Access and not having the search feature link to it Jan 24 20:44:17 hi daivyk Jan 24 20:44:44 CocoStorm: simple. extract data from one data structure, and put it into another.. if you cant get that then you should go back to basics of programming or something Jan 24 20:45:10 alexfu, but there are no arrayLists Jan 24 20:45:14 cool, I'm working with AOA too at now !!! Jan 24 20:45:27 daivyk: waht do you have made with IOIO ? Jan 24 20:46:28 I'm not casting a map to a list because there is no list Jan 24 20:46:32 PS: I've just yesterday finished to implement AOA protocol in a SH2 RENESAS chip.... Jan 24 20:47:30 shineworld: i am reading the pump flow value from a board made by the company Jan 24 20:48:15 cool, I'm driving (HMI management) of a lifter control bard made by my company too Jan 24 20:48:54 I'm lifting train wagons :) Jan 24 20:49:58 shineworld: im thinking to buy a Arduino starter kit... kkkk!! its so cool to do hardware. Jan 24 20:50:18 yeah, take version with 2 USB Jan 24 20:51:45 shineworld: ok! Jan 24 20:52:04 CocoStorm: ois.readObject. what does that return Jan 24 20:53:02 there are also boards with ARM + AMTEL + FPGA to play with android + another RTOS in same board Jan 24 20:53:23 I'm used with Cubieboard 1/2 + selfmade extensions boards Jan 24 20:54:14 FPGA ? RTOS ? Jan 24 20:54:26 the price of Cubieboard1 is lower than an Arduino board and you have an ARM v8 1Ghz + MALI 400 + 1GB ram + SATA + .... Jan 24 20:55:30 daivyk: for example this: http://www.kickstarter.com/projects/435742530/udoo-android-linux-arduino-in-a-tiny-single-board Jan 24 20:55:48 which connect in same board Arduino + ARM (linux/android) Jan 24 20:56:04 RTOS = Real Time Operative System Jan 24 20:57:43 shineworld: i am watching the video. the guy doing soldering is like a pro... kkkk!!! so fast.. Jan 24 20:58:22 there are also other good arduino compatible boards at OLIMEX Jan 24 21:01:14 shineworld: ok. i will take a look. Jan 24 21:05:49 daivyk: I've checked... Unfortunately Arduino ADK Rev3 is OUT OF STOCK Jan 24 21:07:04 shineworld: ok, i have to start learning, at the moment i just did the software part... huahuahua! Jan 24 21:07:17 if you don't need the bandwidth of usb Jan 24 21:07:22 use bluetooth Jan 24 21:07:26 rfcomm is way simpler Jan 24 21:07:28 the android part is more exciting Jan 24 21:07:36 How tall is the actionbar? 48 dp? why does android design ask for ac icons to be 32dp? Jan 24 21:08:16 and you can get integrated BT rfcomm chips for like... $6 Jan 24 21:08:22 rfcomm in, ttl serial out Jan 24 21:08:56 you just take a bandwidth and latency hit Jan 24 21:10:21 eghdk: if that's the case, probably because it doesn't want the icon to completely fill the bar vertically Jan 24 21:12:28 eghdk: yes; and I believe there's a 8dp gap around actionbar icons; hence the size. https://developer.android.com/design/media/metrics_closeup.png Jan 24 21:15:42 dragorn: you are right :) Jan 24 21:16:41 in my case I need a high throughput so USB is the right way Jan 24 21:20:34 the only prob is : I'm a very bad java programmer so I lost a lot of performances in my dummy code :9 Jan 24 21:21:44 Why does resources.getAnimation(…) return an XmlResourceParser Jan 24 21:22:35 Intent.ACTION_VIEW of image show only gray photo in gallery Jan 24 21:23:05 and I wrote the specific mime type Jan 24 21:24:07 explodes: it's a mis-interpretation. that particular method is a convience method for obtaining an XMLResourceParser specifically for Animation xmls. Jan 24 21:24:33 explodes: in short, its the same as http://developer.android.com/reference/android/content/res/Resources.html#getXml(int) but for Animation resources Jan 24 21:25:21 shineworld: the guy doing the HW of the board always called me... "hey i need to test this, create a code for me".. hehehe!! Jan 24 21:25:36 explodes: you may be looking for this instead -- http://developer.android.com/reference/android/view/animation/AnimationUtils.html#loadAnimation(android.content.Context, int) Jan 24 21:26:35 fuck, I've changed all my code to use LatLng as a key and just realised it's not serializable :'( Jan 24 21:29:48 CocoStorm: LatLng is parcelable, if that helps. Jan 24 21:31:02 daivyk, oh really? hmm might look into it Jan 24 21:31:24 CocoStorm: if that doesnt help, create a class and implements Serializable and do writeObject() and readObject(). Jan 24 21:31:47 ohh found it.. http://stackoverflow.com/questions/14220554/how-to-serialize-a-third-party-non-serializable-final-class-e-g-googles-latln Jan 24 21:32:37 oh awesome, thanks daivyk :) Jan 24 21:33:25 Parcelable is preferred since it's faster than Serializable. Jan 24 21:33:47 and it doesn't blow your face off when you actually try to use it properly Jan 24 21:34:12 read the chapter in Effective Java on Serializable and you'll run to the hills and never touch it again Jan 24 21:34:46 serializable isn't great, use it as a last resort Jan 24 21:38:33 anyone done any xposed modules, running into an small problem when trying to override a function to launch an activity from my package Jan 24 21:39:27 getting NoClassDefFoundError.. decompiled and I see that the file is there Jan 24 21:41:38 wow, somebody has it right Jan 24 21:41:40 http://www.zdnet.com/south-korea-rules-pre-installed-phone-bloatware-must-be-deletable-7000025533/ Jan 24 21:43:24 For example, Samsung's Galaxy S4 released by SK Telecom has a total of 80 apps pre-installed, including 25 apps loaded by the telco, 39 by Samsung and 16 by the OS provider Google, noted Yonhap News. Jan 24 21:43:25 haha Jan 24 21:44:04 kkkkk Jan 24 21:44:07 it would be interesting to see if/how google can delete their apps Jan 24 21:44:27 [given the constant migration of the "os" into the play services app] Jan 24 21:44:36 they will not delete it, they will hide it... kkkkkk Jan 24 21:44:46 ah, the microsoft move I guess. Jan 24 21:45:12 i've disabled most of the google apps except for gmail Jan 24 21:45:20 xastey: look higher up in the logs for a VerifyError Jan 24 21:45:32 your class is probably being evicted from the classloader due to problems Jan 24 21:45:51 evicted from the classloader .. Jan 24 21:45:54 ? Jan 24 21:46:01 01-24 15:37:10.966 7385-7385/com.conceptualideas.xposedlockscreen W/dalvikvm﹕ VFY: unable to resolve const-class 656 (Lcom/conceptualideas/xposedlockscreen/ChooseLockPatternSizeFragment;) in Lcom/conceptualideas/xposedlockscreen/ChooseLockPatternSize; Jan 24 21:46:07 I get that.. guess VFY is verify Jan 24 21:46:30 trying to port over the CM lockscreen , chooise 3-6 pattern, to xposed Jan 24 21:48:32 g00s: that's all kinds of awesome Jan 24 21:48:41 the ruling, at least Jan 24 21:49:27 http://pastebin.com/7FNxMbDL more of the log Jan 24 21:56:37 I need to use a circular progress view for showing percentage. Is this possible to do through the sdk or should I search for a library? Jan 24 21:58:16 eghdk a custom view should be pretty easy Jan 24 21:59:33 Is it possible to read incoming and outgoing messages from other apps like whatsapp? Jan 24 22:00:14 Just wanted to get the idea of how that could be done Jan 24 22:00:33 maybe if you got access to the db Jan 24 22:00:38 other than that, probably not Jan 24 22:01:18 Oh nice Jan 24 22:01:55 unless the device is rooted, that won't be possible Jan 24 22:02:52 if the device is rooted, I can access the databases? Jan 24 22:03:24 So any app can monitor all the messages Jan 24 22:06:22 think I found the problem.. fragment was being created with reflection... forgot to create the constructor lol Jan 24 22:07:55 g00s: You mean creating my own custom view should be easy. or just using someone elses should be easy? Jan 24 22:08:06 eghdk creating your own Jan 24 22:10:27 really? I feel like it's probably difficult heh Jan 24 22:10:40 daivyk, omg it's true, I keep getting the same lat when i get the current location Jan 24 22:10:47 and move around the house Jan 24 22:10:48 argh Jan 24 22:10:49 :'( Jan 24 22:12:15 eghdk especially easy if the user doesn't interact with it Jan 24 22:19:19 CocoStorm: gps is not so precise and you can get fluctuation on your position by the error on calculation. Location object has a method call getAccuracy(), so you can check if this value is high or low. low is better. (value in meters) Jan 24 22:20:31 daivyk, oh nice, thanks! Jan 24 22:20:33 CocoStorm: http://developer.android.com/reference/android/location/Location.html#getAccuracy%28%29 Jan 24 22:24:49 cheers! Jan 24 22:58:02 wow! Jan 24 22:58:23 In the Android Studio preview tab, is there any way to disable the wonderful simulated screen-glare? Jan 24 23:14:02 need to get path of databases while there is not any database created. how will that be possible? do not want to hardoce path Jan 24 23:18:29 the getDatabasePath("dbname") requires name of database but as i said i just need the path where databases are stored. Jan 24 23:52:10 I can't fastboot flash my galaxy nexus, it keeps crashing :( Jan 24 23:55:28 I think fastboot on windows just sucks ass for some reason Jan 24 23:56:49 pfn how are TypedResources used? Jan 25 00:00:26 What's the prefered image dpi resizing tool? Jan 25 00:03:10 Hey! I want to develop an app that connects to a pc and does actions depending on what the 'input' from the pc is. What would be the best/easiest design/method to achieve this? Thanks. Jan 25 00:03:59 KNUBBIG, so if something happens on the PC you want the app to do something? Jan 25 00:04:18 or do you just want to ask the PC for data when you press buttons in the app Jan 25 00:04:33 jonc: yes, kinda like the PC 'says' hello and then the app sends a SMS to a certain number (for example) Jan 25 00:04:46 KNUBBIG: PC accesses webpage Jan 25 00:04:52 server sends GCM to android app Jan 25 00:04:58 that's the easiest way Jan 25 00:05:14 you could do it 2 different ways, either GCM, or TCP connection (which will drop fairly frequently if you are moving around) Jan 25 00:05:23 moving around ie: a car Jan 25 00:05:26 GCM would be Google Cloud Messaging? Jan 25 00:05:27 Okay Jan 25 00:05:32 yeah Jan 25 00:05:34 I merely suggest GCM because it almost "just works" Jan 25 00:05:41 I agree Jan 25 00:05:47 it's probably the easier of the 2 Jan 25 00:05:54 and pretty damn close to as reliable Jan 25 00:06:19 I'd guess the most time the app would be used while being in WLAN stationary, but GCM seems like the more sophisticated way, I'll try that. Thanks a lot! Jan 25 00:06:54 you will have to send the device token to your pc for it to be able to send messages through GCM Jan 25 00:07:00 you could do this by hand if it is just for you Jan 25 00:07:43 jonc: not sure if this will be just for me, I just want to try something at first to get some more experience but I guess I'd give it so some of my friends later on :) Jan 25 00:07:58 And getting to know GCM seems a good thing to know :P Jan 25 00:27:28 Is GPS 4.1 usable? Jan 25 00:34:21 can I use a DrawerLayout inside a fragment? Jan 25 01:01:22 Can someone tellme wich line is it in code? 01-25 05:21:54.565: E/AndroidRuntime(637): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jaami.foodtime/com.jaami.foodtime.MainActivity}: java.lang.StringIndexOutOfBoundsException: length=0; index=0 Jan 25 01:02:14 or is there a way to find exact line of error Jan 25 01:02:54 does logcat tells which line in java code caused the error Jan 25 01:02:54 Look at the rest of the stacktrace Jan 25 01:03:52 just to make idea of the error line i need to look logcat? Jan 25 01:04:08 really i cant figure that out Jan 25 01:04:19 what? I need to look at the error to figure out what's wrong? why? Jan 25 01:05:49 Leeds: i wanted to know which line of code caused error, i guess your experties can be used here http://pastebin.com/8A9b9VDA Jan 25 01:07:29 SimonVT maybe you know this; in AS plugins there is "Gradle" … is that the same or different functionality used by the android plugin? Jan 25 01:07:37 hello Jan 25 01:07:51 can someone waste a minute to tell me line number of error here http://pastebin.com/8A9b9VDA Jan 25 01:07:56 should I use internal or external storage on the emultor? Jan 25 01:08:29 g00s: Try disabling it and see if it breaks Jan 25 01:08:37 jaami-win com.jaami.foodtime.MainActivity.onCreate(MainActivity.java:62) Jan 25 01:09:12 thanks goos, sorry for wasting your time Jan 25 01:10:38 SimonVT yeah, that was a dumb question. i tried disabling it and android support was going to get disabled too. well, as 0.4.3 seems to keep failing to sync the gradle stuff … amd the exception logs show AS using gradle 1.9 - which i don't even have on my machine Jan 25 01:10:55 but its in the AS.app bundle Jan 25 01:10:58 stupid crap Jan 25 01:11:36 the gradle settings show the project is linked; and using local distribution. Jan 25 01:11:46 oh well, nm Jan 25 01:19:55 how does the new dex command work in build tools 19? what happens if you specify a directory for output instead of a dex file? Jan 25 01:21:00 pfn, got any idea why after running gen-idea intellij doesn't find play services, but android:run works fine? Jan 25 01:21:14 but gen-idea does find play services... Jan 25 01:22:48 huh? Jan 25 01:22:55 you say it doesn't find it, but it does Jan 25 01:23:09 oh, I forget, for aar, you might have to add the classes.jar for it manually Jan 25 01:23:11 I say, IntelliJ doesn't seem to find them. Jan 25 01:23:19 into classpath Jan 25 01:23:47 Ah, okay, that would be in the project settings? Jan 25 01:26:16 Ah, got it! Perfect, thank you Jan 25 01:26:42 although, iirc, gen-idea is supposed to automatically create a library for classes.jar in an aar Jan 25 01:26:59 if you have >1 aar, then yeah, it won't find the other classes.jar's, but for a single aar, it will Jan 25 01:27:04 I am under the impression that it worked at some point. Jan 25 01:27:09 you have more than 1 aar Jan 25 01:27:11 Ah, so that's why Jan 25 01:27:20 yeah, known issue, file it please Jan 25 01:27:29 I will try Jan 25 01:29:07 OK, I hope the title is understandable. Jan 25 01:29:27 play services is irrelevant Jan 25 01:30:03 anyway, ftfy Jan 25 01:30:04 Hmm, I was suspecting something like this. Also I get a Failed Downloads for the other aar in gen-idea. Is that related? Jan 25 01:30:22 failed what downloads, it's just failing to download source, probably Jan 25 01:30:47 com.makeramen#roundedimageview;1.2.3!roundedimageview.jar: Jan 25 01:31:09 as long as gen-idea completes without failing, you're ok Jan 25 01:31:13 okay, good Jan 25 01:31:14 For Google Billing, I am able to get the purchase pop-up to come up, but I do not get a callback to my onActivityResult. Anyone seen this/ Jan 25 01:31:23 because that one works I was just confused by the error Jan 25 01:31:26 warning Jan 25 01:31:27 sorry Jan 25 01:31:45 Since this is also an aar, I thought it might be related. Jan 25 01:32:58 The other thing I was wondering is whether there is any documentation on how the TypedResources work. Jan 25 01:35:16 work how? Jan 25 01:36:07 you can dig into the source of classes like TypedArray to get a feel for how the resource system packs data Jan 25 01:36:12 it's pretty nuts Jan 25 01:37:27 Okay, I will try to find that class, then Jan 25 01:37:53 Somehow I thought it was a Scala thing. Jan 25 01:38:56 marrrk,it is a scala thing, what's to know, just use findView(TR.whatever) and it's typed Jan 25 01:39:08 ah findView Jan 25 01:39:12 and then with the backticks? Jan 25 01:40:39 If I make an imageview clickable I can use a selector as the source and have it change on state_pressed? Jan 25 01:40:48 no backticks Jan 25 01:41:09 the backticks are only there to allow reserv ed words Jan 25 01:41:53 now what if I make the ImageView duplicateParentState, and make the layout it is in clickable Jan 25 01:42:10 Okay, good Jan 25 01:48:53 How did I bring this upon myself then? com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt Jan 25 01:51:35 works again Jan 25 01:51:37 thanks and good night Jan 25 01:57:28 what exactly is the vulnerability in this bing-on-android app? The WebView addJavascript issue? http://seclists.org/fulldisclosure/2014/Jan/157 Jan 25 02:00:01 it sounds to me that any app that uses WebView.addJavascriptInterface() and running < android4.2 is at risk Jan 25 02:04:59 rats. I bet flipboard uses it; I think I've seen it load js stuff within articles. Jan 25 02:09:07 so, I've got a view that overrides onTouchEvent, but I don't get any types of touch events except MotionEvent.ACTION_DOWN Jan 25 02:09:40 when I override onTouchEvent in the Activity, I'm able to receive the other touch events that I was expecting (.ACTION_UP, .ACTION_MOVE...) Jan 25 02:09:47 is there something that might be eating these events? Jan 25 02:10:35 oh wait, never mind Jan 25 02:10:41 I have to return true to get the other events for the touch **** ENDING LOGGING AT Sat Jan 25 02:59:59 2014