**** BEGIN LOGGING AT Fri Jun 28 02:59:58 2013 Jun 28 03:15:46 hey guys, i'm running robolectric and getting NPE in getActionBar(); does anyone know how to solve this? Jun 28 03:16:55 stack trace Jun 28 03:19:07 Are there built in action bar drawables or must you download them and add to the build? Jun 28 03:21:52 there are built-ins Jun 28 03:25:11 cool thx Jun 28 03:29:05 any recommended books/tutorials/websites for people new to android programming? :) Jun 28 03:29:25 d.android.com Jun 28 03:30:33 using this https://github.com/nostra13/Android-Universal-Image-Loader and have a question on its use. if i have several actives / fragments that use image fetching and this class in particular how do I share across all of them? should I create one for each activity / fragment? Jun 28 03:30:45 yea im looking at it, but i meant something akin to Petzold for windows programming Jun 28 03:31:13 nownot: no. use one and share it with a singleton pattern Jun 28 03:31:32 JakeWharton: really? i thought singletons were to avoided? Jun 28 03:31:43 what makes you think that? Jun 28 03:31:47 JakeWharton: just trying to get a better understanding of when to use when vs when not to Jun 28 03:31:58 put it in application class Jun 28 03:32:05 singletonne Jun 28 03:32:14 just reading around on stack overflow and a little in here folks saying singleton is a last use case Jun 28 03:32:57 well they're wrong. singletons have a place. they are very useful when used appropriately Jun 28 03:33:06 I'm not arguing, just trying to understand the use of them Jun 28 03:33:07 jasabella: i bought a nice one the other day which aimed at games programming, it's a sams book, not bad Jun 28 03:33:13 JakeWharton: understand, thanks Jun 28 03:58:42 I have a question about listviews holding different list items Jun 28 03:59:10 Heh i have the same question i think... Jun 28 03:59:46 right now I have my getView function Jun 28 04:00:05 it figures out which thing this position is Jun 28 04:00:15 does anyone know if getActionBar() is implemented in Robolectric? the following stack overflow says that it isn't supported… so how would anyone go about testing the action bar? thanks http://stackoverflow.com/questions/13168109/getting-nullpointerexception-using-robolectric-to-unit-test-android-activity/13168320#13168320 Jun 28 04:00:15 in a crappy way...it hard codes...knows position 5 is a divider item Jun 28 04:00:57 so then I have something like if(convertView != null && convertView.getId() == R.id.landing_splitter){ view = convertView; } else { view = View.inflate(mContext, R.layout.landing_splitter, null); } Jun 28 04:01:36 I suspect there is a right way to do this...and I'm not doing it the right way Jun 28 04:01:53 especailly because depending on whether you are logged in or now, a new list item will be shown at position 3 Jun 28 04:02:01 so I have to bump the positions up or down based on if you are logged in Jun 28 04:02:06 it is really crappy right now Jun 28 04:16:24 ProgramMax: you need to look into view types Jun 28 04:22:25 okay, I'll google that Jun 28 04:22:26 thank you Jun 28 04:50:07 anyone knows how to getActionBar() working when instantiating in Robolectric unit tests? Jun 28 04:58:37 how are you creating your activity? Jun 28 06:33:17 how does a developer report a user review as spam? Jun 28 06:40:07 hey Mavrik, are you there? I found out what was the issue Jun 28 06:40:18 really? Jun 28 06:40:26 yes, it was friggin mobclix! Jun 28 06:40:28 Hi Jun 28 06:40:38 well, it's not exactly their fault, but also their fault Jun 28 06:40:39 I'm still having this error http://stackoverflow.com/questions/17343017/short-listviews-are-empty-after-rotating-screen Jun 28 06:40:57 it seems that when seeing certain ads, it would crash, not for all ads though Jun 28 06:41:22 I tried lists a list in both an activity and a fragment, they both disappear Jun 28 06:41:27 and also, if I didn't have: webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); on my own webview, it would crash every time Jun 28 06:41:28 tried a list * Jun 28 06:41:45 so basically mobclix should've done that too, at least with crappy GPUs like droid razr Jun 28 06:41:52 it only happens when your target sdk is 11+ Jun 28 06:42:21 my error is Jun 28 06:42:36 the list disappears when I rotate the screen if it doesn't overflow the new orientation Jun 28 06:42:54 mobclix probably uses webviews to show some of the ads, and those webviews were using the hardware acceleration which screwed things over Jun 28 07:13:26 We almost got our complete app running with 1 final bug. Let me summarize the problem Jun 28 07:14:52 We have a Media Player service playing throughout the app, all activities. When you leave the app with the Home button, the Media Player pauses. However, when the service, to display a notification, is being called that something happened in the app.. The Media Player continues while the app is in in the background. Jun 28 07:46:52 I tried to remove header and footer Jun 28 07:46:58 Now the ListView works O_O Jun 28 07:47:16 when rotating Jun 28 07:48:09 I'm trying to set the state of an imagebutton in a tabhost's tab to pressed prior to the tab being first seen and I can't get it to work Jun 28 07:48:35 I tried setPressed directly, doing it in an on tabchanged event, doing it on a tab widget ontouch event, nothing seems to actually apply it Jun 28 07:49:01 Or apply it properly and cause the selected/pressed graphical effect on the button to appear already there. It works when the buttons are pressed afterwards Jun 28 07:53:05 Nevermind, apparently it works with ontabchanged now Jun 28 08:19:59 Let's say I have an app with several Activities and one service interface, that holds an AndroidHttpClient and provides data to the classes of my app. I could instantiate the service class in each Activity that needs it to use it there or I could make the data the service provides Parcelable to have it passed between Activities. Are there any easier ways? Can't I share ONE service instance between all Activities? Jun 28 08:21:50 Neon: yes you can use one same service and you can bass any object Jun 28 08:21:57 pass Jun 28 08:22:54 Hm, just found a solution where they recommend basing on the Application class and putting the service there. Jun 28 08:23:12 Then cast the result of getApplication Jun 28 08:25:01 i'm wondering why. you can bind to the service from anywhere by calling Activity.bindservice() Jun 28 08:26:36 So I just pressed disableAPi check or something along those lines as it was suggested by eclipse. How can I turn it back on? Jun 28 08:31:19 jakob|: Nah, not that kind of service. Just called it service, because it's a class that actually wraps a web-service-like thing. Jun 28 08:31:52 Let's call it HTTP interface. The class provides some methods that automatically send requests and parse the responses. Jun 28 08:35:23 Neon: alright, so you need a singleton class? Jun 28 08:36:46 Neon: just use the standard singleton pattern, you don't need to go through the application class Jun 28 08:36:48 jakob|: Kind of. Just read somewhere that it would be dirty to make a class ith static stsuff and share it among all Activities. So I started to make everything Parcelable, but that's just impossible. Jun 28 08:36:59 *with static stuff Jun 28 08:39:23 Neon: i dont think it's dirty, if it is what you need. it's more dirty to go through the application class and cast it Jun 28 08:48:10 I want to use @override but it tells me "The method onCreateDialog(Bundle) of type MainActivity must override or implement a supertype method" Jun 28 08:48:21 even though I just copied it exactly from the tutorial Jun 28 08:48:43 i read my java compiler needs to be 1.6 instead of 1.5 or sth but to my eyes it is set to 1.6 unless im missing something Jun 28 08:58:03 so call super Jun 28 08:59:11 ? how do i know what the supertype method is Jun 28 08:59:20 and why does the tutorial not have the problem Jun 28 08:59:56 i have no idea, but i also ran on this problem several times and calling super made the error go away, no idea if it's correct or not. hopefully it is Jun 28 09:00:19 the more i google about it the more it seems like the ide uses java compiler level 1.5 instead of 1.6 Jun 28 09:00:23 hm Jun 28 09:01:18 which ide u using? Jun 28 09:01:59 also, not sure about your OS, but on linux, you need to have java jdk installed, so i believe ide uses system installed java compiler, no ? Jun 28 09:02:10 adt Jun 28 09:02:32 it says it uses 1.6 in the options menu Jun 28 09:02:35 thats plugin ... for eclipse? Jun 28 09:02:40 yes Jun 28 09:02:47 its the bundle thingy Jun 28 09:02:51 ok Jun 28 09:03:17 i'm pretty sure it uses system installed java compiler so you might wanna check what you got installed Jun 28 09:03:38 if that is even the problem Jun 28 09:09:36 apparently i got 1.7 Jun 28 09:10:07 which android cant work with so the max is 1.6 Jun 28 09:13:13 is it normal that the sdk manager just opens a cmd window for half a second and then closes instantly? o0 Jun 28 09:14:28 nevermind, it works from within eclipse Jun 28 09:14:52 i take that back Jun 28 09:14:53 it doesnt Jun 28 09:17:59 If my error disappears when i put break points in and slow things down to look at them; would that hint at my error occuring in an async task? maybe it is not finished by the time i use data from it? Jun 28 09:21:46 hey there, anyone using Android Studio can let me know what's the equivalent of the shortcut that adds all the necessary imports? I know i can add the imports one by one by Alt + Return… but is there one that does it for all automatic imports? Jun 28 09:24:30 ahhh.. nvm… "Add unambigious imports on the fly" under preferences does it for me.. thanks Jun 28 09:31:40 so what do I need to do to my object to make it serializable? i want to pass it on to the next activity using intents ... Jun 28 09:33:08 implement Serializable Jun 28 09:33:33 it has no methods or anything, just add that implements Jun 28 09:34:08 just that? ok'ill try thanks Jun 28 09:34:22 interesting, if i set my compiler evel to 1.5 i get another " must override or implement a supertype method" error, while on 1.6 I only have 1 which leads me to the assumption that the problem might be something else Jun 28 09:34:49 you might want to do parcelable instead Zharf its a lot quicker Jun 28 09:35:06 oh yea? ok i'll try that too Jun 28 09:35:21 parcelable is horrible Jun 28 09:35:22 imo Jun 28 09:35:23 :P Jun 28 09:35:27 quicker sure, but horrible Jun 28 09:35:32 primski: have a look at this http://www.developerphil.com/parcelable-vs-serializable/ Jun 28 09:35:47 You get what you put in i guess Jun 28 09:36:06 ok sweet. thanks for tutorial Jun 28 09:36:07 ok does anyone run ColorMatrixColorFilter on any drawable resources ? I think there is an odd bug Jun 28 09:36:16 although it's too simple to be a bug Jun 28 09:36:19 I'm way too lazy to care about speed when it's that much code I have to write ,) Jun 28 09:36:20 it must be me Jun 28 09:36:38 Zharf: then i hope i don't install any of your apps :P Jun 28 09:36:54 Dark-Side, I rarely use serialization really Jun 28 09:37:08 Thats good then Jun 28 09:37:30 and if it reaally ends up being significant, I profile and then optimize Jun 28 09:37:40 what's the recommended practice then? avoid passing on objects? what should i pass on then? Jun 28 09:37:57 I run my apps on Samsung Galaxy 3, it's one of the slowest things on earth :p Jun 28 09:38:08 primski: usually just the data if its well formed Jun 28 09:38:16 primski: are you sending it internally? Jun 28 09:38:49 yes. i have a grid view and i implemented onclick listener and now i want to display a details view .... Jun 28 09:39:18 and i have an object that represents one grid item .... then i wanted to pass this object to details view and display all the relevant information Jun 28 09:39:33 so i should just pass these information as strings instead of whole object? Jun 28 09:39:37 if there were a simpler way to write a parcelable I might advocate it instead... -.- Jun 28 09:39:50 So in your grid you don't display all the info in the object? Jun 28 09:39:57 no, just some of it Jun 28 09:40:20 Hmm usually when you do that sort of thing you have the data in the background and then you access what you need of it at each time Jun 28 09:40:32 that way you could just say to your details view what position to display Jun 28 09:40:36 * Zharf nods Jun 28 09:40:43 then the details view would go and get the data and display it Jun 28 09:41:01 yea i do have it SharedPreferences actuallly, so i just re-retrieve it from there in new activity? Jun 28 09:41:02 otherwise you're loading more than you need Jun 28 09:41:09 ah ok, i'll try this approach Jun 28 09:41:10 thanks Jun 28 09:42:43 np Jun 28 09:42:50 any of you get intel haxm working on os x mavericsk_ Jun 28 09:51:03 how do I implement a supertype method of public Dialog onCreateDialog(Bundle savedInstanceState)? I get that error when using @override just copying the tutorial code at http://developer.android.com/guide/topics/ui/dialogs.html Jun 28 09:51:16 there the problem does not exist though Jun 28 09:53:28 Did you put @override or @Override Jun 28 09:54:28 @Override Jun 28 09:54:47 Pastebin the code if you can then Flaiker Jun 28 09:55:31 http://pastebin.com/WyiVJfx7 Jun 28 09:56:27 You're extending the right class and everything? Jun 28 09:58:04 i think so, look at http://developer.android.com/guide/topics/ui/dialogs.html @Creating a custom Layout Jun 28 09:58:11 it's just copied from there Jun 28 09:59:15 I'm not sure why you are getting that error then, it looks like you are correctly overriding the superclass method Jun 28 10:00:16 hm Jun 28 10:00:31 ill make a new project and try there, maybe i screwed up somewhere else Jun 28 10:00:49 how do I load a drawable resource as a unique entity ? Jun 28 10:01:10 like the same resource twice, but both unique instances ? Jun 28 10:02:19 the only way i can get activity/context in my custom class is to pass it as argument to constructor, eh? getActivity() doesn't just work from anywhere, does it? Jun 28 10:03:01 in fact, i need to call getSharedPreferences and that is a method on activity, correct? Jun 28 10:03:13 context Jun 28 10:03:41 yea, that's the same isnt it ? Jun 28 10:03:56 i mean activity extends context ,or is it the other way around? Jun 28 10:04:05 well it's not the same class Jun 28 10:04:13 but yeah, ish Jun 28 10:04:17 ahaaa Jun 28 10:04:23 mutate() on a drawable Jun 28 10:04:24 nice Jun 28 10:05:06 primski: activity extends context yeah Jun 28 10:05:34 Hi all, is there a dedicated channel for ndk-build related queries? Jun 28 10:07:19 theneb: search and see Jun 28 10:13:15 no way, i put my onCreateDialog in a DialogFragment and the error is gone o0 Jun 28 10:14:18 Its supposed to be in a DialogFragment or a class that extends it Jun 28 10:15:22 well last time i used dialogfragment 2 hours ago it told me that it needed a higher api version than the minimum i set it for Jun 28 10:15:29 so i abonded the dialogfragment Jun 28 10:15:38 abanded Jun 28 10:15:42 abandoned Jun 28 10:15:48 Maybe you didnt use the support version? Jun 28 10:16:17 ? Jun 28 10:16:41 you mean v4.support.app.DialogFragment? Jun 28 10:16:59 Yes because the normal one wouldnt be on older devices Jun 28 10:18:25 could be the case. I disabled the eclipse check for that and dont know how i can turn it back on Jun 28 10:18:29 so propably Jun 28 10:18:33 thanks Jun 28 10:31:18 hello, I am completely confused about the way we can change UI from a thread using a Handler. I've read all the first 10 google results on this topic, and still very confused. Do you guys have any additional references? Jun 28 10:32:19 I have a thread that will do heavyweight work. And I would like it to report data to main activity from time to time. And maybe send some info from main activity to work thread (full duplex) Jun 28 10:32:31 any ideas? Jun 28 10:34:23 back and forth ? now and then ? sounds like this is going to be going a fair amount of time …. maybe a service would be better ? Jun 28 10:34:36 still need threads Jun 28 10:34:40 and messengers etc Jun 28 10:36:35 gmag: otto Jun 28 10:37:06 or you can just post a message to a handler on the UI thread Jun 28 10:37:24 how would otto work in a thread ? Jun 28 10:41:35 funkbox, I am currently, successfully, using a handler in MainActivity that I pass to my Thread object. But I am not sure this is the most elegant way of doing things. I am also getting a warning on the handler definition (This Handler class should be static or leaks might occur). This is how I am defining the handler: "public final Handler actHandler = new Handler(){..." Jun 28 10:43:27 so, in my handler object I override handleMessage() and in my Thread object I call, for instance: mActHandler.obtainMessage(0, 0, 0, null).sendToTarget(); Jun 28 10:43:31 is this the way to go? Jun 28 10:44:01 that mActHandler was passed to the Thread constructor Jun 28 10:44:26 I am not sure if this is correct... :-/ Jun 28 10:49:21 hello! being new to android development, assuming i want to make a music player for myself (i am not content with the default app) - what's the "proper" way to go about data storage? i was thinking in terms of "scan sd card" -> "build sqlite database", but now i found out about mediastore? Jun 28 10:50:33 using mediastore would eliminate the need to scan the sdcard manually, but is it wise to build a sqlite database of artists, albums, playlists etc? Jun 28 10:52:34 ProgramMax! Jun 28 10:53:00 daveid: could use the actual tags/meta info on the file Jun 28 10:53:02 :) Jun 28 10:55:16 StingRay_: i know that i can get the album/artist/artwork info from mediastore (at least now i do), but should i really query the mediastore on like each view of the app to get the data i need? Jun 28 10:55:36 well it's just a db/content provider Jun 28 10:55:45 so your asking if you should create another / Jun 28 10:55:46 ? Jun 28 10:56:17 see I'm a fan of just a filebased thing, me, if I were to do a media player.. Jun 28 10:56:31 or things end up in the world of itunes, and it all ends Jun 28 10:56:32 :) Jun 28 10:58:23 the reason i want to make yet another music player is because i want my music player to know the difference between music and audiobooks/podcasts, and know to resume the latter. it's also quite interesting to just learn android dev. but uh. hm. Jun 28 11:00:08 i mean if i want resuming/bookmarks, i will need to keep a database anyway. Jun 28 11:00:18 indeed Jun 28 11:01:06 arguably matching that info to the songs/files would be slighty easier if they were inside my own db and had an internal ID to refer to them by Jun 28 11:01:26 does that make sense? Jun 28 11:02:01 but then dont you end up maintaining file > db links Jun 28 11:02:06 thus having to scan Jun 28 11:02:40 that's true Jun 28 11:02:45 Am I a bad person for causing a buttload of people to buy a Snapdragon version of the Galaxy S4 over the Exynos version? Jun 28 11:03:05 Sonicadvance1: not sure anyone cares enough to label you Jun 28 11:03:07 :) Jun 28 11:03:11 :D Jun 28 11:03:14 but unless files' paths change it should be fairly quick/easy to rescan Jun 28 11:03:53 i mean the thing is i already coded all that, with custom scanning Jun 28 11:04:04 before knowing mediastore existed -_- Jun 28 11:04:32 well tbh, all I want from a music player is a cool/easy/stylish UI Jun 28 11:04:39 they are quite hard to find Jun 28 11:04:43 What is the sdcard.img in my sdk folder ? Jun 28 11:04:43 yeah Jun 28 11:05:04 bluesm: really ? Jun 28 11:05:28 it's not really a cryptic name is it ? Jun 28 11:05:31 And system.img , and snapshot.img Jun 28 11:05:34 i am not a designer, mostly a backend webdev, and i want the music app to function properly, but i would love it to look nicer than all the cluttery ones Jun 28 11:06:04 neither is system or snapshot Jun 28 11:06:05 StingRay_: Ok... But it's image of virtual machine sd card ? Jun 28 11:06:16 bluesm: yes Jun 28 11:10:05 I've some weird fail. I've a method that expects an android.support.v4.app.FragmentManager and when I call it from my Activity with getFragmentManager() Eclipse tells me it's not applicable for that argument. Seems to be some API version fail. Jun 28 11:10:35 getSupport* Jun 28 11:10:52 Ah right, thanks. Jun 28 11:12:10 a music player UI.. my thoughts: the next/previous buttons should have some whitespace separating them from play/pause, because dammit, every time. Jun 28 11:13:06 the seek bar is almost never needed, should be kind of minimal (basically, so you can tell how much time has passed, but you would rarely click/drag it) Jun 28 11:13:26 well, my thoughts as a designer, is that an entertainment app should function in a way that is happy/merry Jun 28 11:13:28 :) Jun 28 11:13:43 not just normal boring ui stuff Jun 28 11:13:58 more styled in either a real world influenced design Jun 28 11:14:05 or a purpose design Jun 28 11:14:15 not just a…..erm….bland android design Jun 28 11:14:35 the album cover should take up the rest of the space because you can tell what's playing from a quick glance at it (the song title, additional info should be visible, but not so prominent) Jun 28 11:15:02 so album covers should be highres, so if it's not highres, the app should try to get a highres one from somewhere Jun 28 11:15:11 and yes, i agree Jun 28 11:15:11 tbh, I prefer that as optional Jun 28 11:15:28 I care more about track num name than I do wtf the artwork is on the cover Jun 28 11:15:30 :) Jun 28 11:15:44 I'd rather know useful info Jun 28 11:16:01 alright Jun 28 11:16:13 song title, time passed, time left, album, artist Jun 28 11:16:16 any other info? Jun 28 11:16:30 next song/s Jun 28 11:16:38 oh yes, that would be nice Jun 28 11:17:32 for the design.. i think android is going for the flat UI look, and that's what would fit Jun 28 11:18:00 some nice colors and flat graphics instead of gradients Jun 28 11:18:02 again, as a design I dont get it Jun 28 11:18:10 Maybe also last songs. Like 5 names where the central one is the current, displayed as biggest, and the titles get smaller and a bit transparent to the upper and lower. Jun 28 11:18:12 well flat UIs are kind of bauhaus Jun 28 11:18:20 if you were designing a system component, then yes Jun 28 11:18:27 needs to fit with system ui Jun 28 11:18:53 other than that, I dont think it should be an influence Jun 28 11:19:03 specially with android system variances Jun 28 11:19:04 :) Jun 28 11:20:54 right. i still think flat would look nice though. heavy skeomorphism (is that how you spell it? damn) was historically more of an iOS thing Jun 28 11:21:32 many android devices have pretty shitty screens for rendering images, too. my old phone can't render gradients smoothly :/ Jun 28 11:21:45 daveid: it probably can Jun 28 11:22:07 just the color SRC method is capped to share 16bit Jun 28 11:22:13 as in 565 Jun 28 11:22:38 why would it be artificially capped? Jun 28 11:22:45 speed Jun 28 11:23:01 RGB_565 Vs RGBA_8888 Jun 28 11:23:13 not really a fair speedy race that one Jun 28 11:24:35 what's the best way to check if a HorizontalScrollView can scroll either left or right Jun 28 11:27:07 use your finger ? Jun 28 11:29:24 StingRay_: hilarious! Jun 28 11:30:38 simple is often best ;) Jun 28 11:32:36 anyway, i'll go now and return some time later. cheers! Jun 28 11:37:37 Is there a way to force the RSA key popup for the adb whitelist? It's not coming up on my device on a new computer. Jun 28 11:37:55 or at least, can I add the key manually to the whitelist? Jun 28 11:41:54 so i have this simple date string and i parse it like this http://pastebin.com/Nihs2ULw Jun 28 11:42:12 works fine, but when i change language on my phone, it just dies with that error, unparseable Jun 28 11:42:17 any ideas why? Jun 28 11:42:39 the date string looks the same even if i change language Jun 28 11:44:26 that offset 0 part has something to do with timezones eh? but what Jun 28 11:47:20 primski: give it a locale when you make the dateformat Jun 28 11:47:58 shouldn't it just take the systems default at the time if i don't supply it ? Jun 28 11:48:35 http://pastebin.com/rRAhm7ND with this i can add a note, i want to replace a note not add, anyone can hekp? Jun 28 11:48:53 yes primski but you you're not dealing with that are you Jun 28 11:49:08 primski: http://developer.android.com/reference/java/util/Locale.html#default_locale Jun 28 11:50:03 ok thanks, i'll read up on it Jun 28 11:50:21 guys Jun 28 11:50:42 help me with opengl error 0x500 Jun 28 11:51:13 here are the full details Jun 28 11:51:15 http://stackoverflow.com/questions/17265009/surfacetexture-modification-through-canvas Jun 28 11:51:42 also primski you've put 4 z's the docs says that would mean the full name not the short name Jun 28 11:51:48 not sure if that has anything to do with it Jun 28 11:52:01 yea i just tried changing it to one at its the same Jun 28 11:52:27 date stuff is always annoying Jun 28 11:52:39 i think im doing something else wrong though ... if i change language, should the new Date() string look different than in another language? Jun 28 11:53:04 It would appear however they format it in that locale Jun 28 11:53:25 so in the UK we put the day first, US put the month first etc Jun 28 11:53:58 primski: http://stackoverflow.com/questions/14078523/unparseable-date-using-simpledateformatter-with-api-code-example Jun 28 11:54:56 yea i tried passing in a Locale.US parameter and indeed it does parse it then, but i'm still looking what that means to my app if i hardcode a locale like that Jun 28 11:55:18 thanks for googling stuff for me :) i'll search first next time Jun 28 12:12:18 hello. I've compiled ffmpeg/libavcodec static and opencv too. but i won't get the videoencoders working with opencv on android. :( Jun 28 12:22:07 i need some guidance; im trying to get the gps/geo location in the background via AsyncTask. here is my scenario. i have a class that does the network/gps checking and lat+long fetching. now in my main activity, i wanna call it and restive it. however this code is not working. any ideas? -> http://pastebin.com/vyMinPCW Jun 28 12:32:42 not working is not really good enough Jun 28 12:32:46 in this day and age Jun 28 12:32:47 :) Jun 28 12:33:41 StingRay_: i guess i better to say its not working as expected :) Jun 28 12:33:52 again Jun 28 12:34:08 like me calling a garage and saying, my car is not working as expected Jun 28 12:34:12 what can i do ? Jun 28 12:34:14 :) Jun 28 12:34:30 it means noting lol Jun 28 12:34:32 :) Jun 28 12:34:41 * omid8bimo agrees Jun 28 12:35:48 nonetheless, checking the code a little might points to an obvious problem which i missed Jun 28 12:36:17 dont know, you have not said what is "not working" Jun 28 12:36:28 and "how you know it is not working" Jun 28 12:36:39 and "what you expect to have happened" Jun 28 12:37:46 fair enough :) Jun 28 12:38:32 the progressbar is not showing and i dont know if what should i put in AsyncTask parameters. Jun 28 12:38:57 Zharf: hey you there ? :) Jun 28 12:39:13 omid8bimo: whatever you want Jun 28 12:39:16 also, if i did put the execute() in the right place. since my code wont return anything to UI, but instead just need to call the methods in the other class to start fetching location stuff Jun 28 12:39:23 have you read about asyncTask ? Jun 28 12:39:40 Zharf: I couldn't get rid of the seg fault we talked about last night :( Jun 28 12:40:02 StingRay_: yup. most of the teaching examples talk about a value or objects that should be returned or something that needs to be update on UI Jun 28 12:40:06 anybody here who can tell me what could cause the following "app bug" (aka seg fault) in my jni code?: Jun 28 12:40:07 JNI ERROR (app bug): attempt to use stale local reference Jun 28 12:40:07 it happens in this line of code: env->CallStaticVoidMethod(class_libspotify, methodIdAddResult, j_trackname, Jun 28 12:40:07 trackDuration, trackDiscnumber, trackIndex, j_trackuri, Jun 28 12:40:07 j_albumname, albumYear, j_artistname); Jun 28 12:40:07 the bug only happens on some occasions. In most cases the code works well Jun 28 12:40:10 all the j_ parameters are jstring objects Jun 28 12:40:12 the other ones are int Jun 28 12:40:14 class_libspotify is being stored in a globalref like so: Jun 28 12:40:16 jclass class_libspotify_local = find_class_from_native_thread(&env); Jun 28 12:40:18 jclass class_libspotify = reinterpret_cast(env->NewGlobalRef(class_libspotify_local)); Jun 28 12:40:21 I searched for hours and hours now and I couldn't come up with a resolve to this issue :S Jun 28 12:40:25 MrMaffen, I'll be with you in about 20 minutes Jun 28 12:40:26 but since mine wont do anything on UI, im wondering if im doing it right Jun 28 12:40:36 Zharf: thanks ! Jun 28 12:40:51 oh my god Jun 28 12:40:57 omid8bimo: well why not put logging in there so you know whats happening Jun 28 12:40:58 i just discovered ctrl+shift+f Jun 28 12:40:59 and where Jun 28 12:41:07 Flaiker: congrats Jun 28 12:41:25 thx Jun 28 12:41:49 Flaiker: I'm using the formatter after every line of code I write :D Jun 28 12:42:00 ill do that from now on^^ Jun 28 12:42:18 I no longer care about spaces/tabs etc. Just put it all in one line + ctrl shift f = voila Jun 28 12:45:13 when you only change code in .xml files .... i noticed when you click Run it doesn't rebuild project .... does it apply those changes regardless or do I need to "force" rebuild it ? Jun 28 12:47:09 StingRay_: log what exactly? Jun 28 12:47:34 a word ? Jun 28 12:47:45 desriptive of it's position maybe ? Jun 28 12:47:51 descriptive* Jun 28 12:47:51 StingRay_: i have two questions here, first of all, based on my issue, did i implement it right and second, why progressbar is not shpwing Jun 28 12:50:19 MrMaffen, do you have any other places where you call functions through jno Jun 28 12:50:20 jin Jun 28 12:50:26 jni Jun 28 12:50:27 -.- Jun 28 12:51:12 Jin Kazama Jun 28 12:51:26 MrMaffen, also you should put your ints in jints Jun 28 12:51:41 if they aren't already :) Jun 28 12:53:59 StingRay_: hmm, i dont follow! position of what? Jun 28 12:54:13 ok, look at it this way Jun 28 12:54:24 (btw trying to help you help yourself) :) Jun 28 12:54:41 if I said "does it execute?" can you answer that ? Jun 28 12:54:43 StingRay_: i know that my gps/network class is working. but dont know if i implemented it for background task correctly in my main activity. thats it Jun 28 12:55:03 StingRay_: yes. it does execute :) Jun 28 12:55:15 does it reach do in background ? Jun 28 12:55:40 StingRay_: yup. i have a Log.d which i get in logcat Jun 28 12:55:50 does it complete doInBackground Jun 28 12:55:51 ? Jun 28 12:56:12 btw: you see the pattern here ? wanted to avoid obvous questions etc Jun 28 12:56:57 does it exec the method on your object ? then does it complete ? does it reach onPostExecute ? Jun 28 12:56:58 etc Jun 28 12:57:00 StingRay_: i know :) , i think it completes the doInBackground but im not sure. since i have update anything in UI Jun 28 12:57:14 doInBackground nothing to do with ui Jun 28 12:57:39 has* Jun 28 12:57:55 so why not log it ? Jun 28 12:57:57 :) Jun 28 12:58:12 StingRay_: well yeah, but since doPostExecute should make the circle progressbar disappear (and i dont get the progressbar in the first place), im not sure if it reaches there Jun 28 12:58:21 then check Jun 28 12:58:25 either debug or log it Jun 28 12:58:27 :) Jun 28 12:58:30 so you know Jun 28 12:58:32 :) Jun 28 12:58:57 I'm making an android application that uses the asmack library and i have ejabberd installed on my server. My question is whose responsibility is it to register an ejabberd account for the current user? should it be done clientside or serverside? Jun 28 12:59:04 StingRay_: ok, so i can put a Log.d in onPostExecute just to say something in the log to see if it reaches there, right? will be enough? Jun 28 12:59:17 omid8bimo: it could be that it completes so quick you dont see it,, for X reason Jun 28 12:59:28 omid8bimo: no Jun 28 12:59:49 put all places you want to test that it reaches Jun 28 13:00:27 Hello! I want to achive following behaviour: if device have no menu button - move menu to action bar as overflow menu button. If device have menu button - menu placed as usual. I should alway check it using hasPermanentMenuKey()? Jun 28 13:00:32 is there a reason i can't get to things like btn_default_normal_holo_light ? Jun 28 13:00:45 i'm just trying to change the normal color of a button. Jun 28 13:00:51 or it is possible to trigger using xml Jun 28 13:01:07 StingRay_: ok Jun 28 13:02:14 Zharf: ah ok. yea no they aren't. I'm passing simple ints. not jints Jun 28 13:02:32 Zharf: yea I have several other places where I call JNI functions Jun 28 13:03:01 Zharf: I'll be compiling a paste, so you can better understand what's going on. Gimme a sec Jun 28 13:05:00 MrMaffen, if you don't use the right bit size for the arguments, they'll get mixed up and you'll get who knows what, I learnt it the hard way and always put my arguments in js now before calling -.- Jun 28 13:05:52 Zharf: hm yeah ok. But the strange thing is. Sometimes the call to env->GetStaticVoidMethod(....) works without any problems. Jun 28 13:06:12 It works 300 times, then crashes Jun 28 13:06:15 something like that Jun 28 13:06:26 MrMaffen, yeah that's why i asked about the other jni calls Jun 28 13:06:58 maybe one of them throws an exception and you're not handling it before calling another functino Jun 28 13:08:52 Zharf: ah ok. yea that's completely possible. Jun 28 13:09:46 Zharf: I was thinking about another possible issue though. In my method I'm running a for loop 100 times. Each time I'm fetching a const char* and putting it in a jstring (localref) Jun 28 13:09:55 Zharf: Do you know if that's the right approach ? Jun 28 13:10:07 I wouldn't know without more context Jun 28 13:10:22 Zharf: kk. Now I'll fix up the paste :D Jun 28 13:15:07 Mother of god Jun 28 13:15:19 Samsung Galaxy S4 Android 4.3 full firmware leak Jun 28 13:15:48 er... refering to this code: http://developer.android.com/reference/android/os/Looper.html, can I not use that Looper.loop() method, and instead call some Looper.iterate() inside my own main loop? Do you know what I mean? Jun 28 13:16:22 Sonicadvance1: wrong channel Jun 28 13:16:31 StingRay_, Could be Jun 28 13:16:35 #xda-dev Jun 28 13:16:35 But still amazing Jun 28 13:16:38 :P Jun 28 13:16:43 #android-root Jun 28 13:16:56 #wearegirlsandwetourselvesfornoreason Jun 28 13:17:01 pick on and go tell them Jun 28 13:17:05 one* Jun 28 13:17:11 :) Jun 28 13:17:43 StingRay_, Only if you join me in the long one :P Jun 28 13:17:46 any idea Jun 28 13:19:06 I mean, I have my own loop to run on a thread, and having a main loop like Looper.loop() that I don't control does not help me Jun 28 13:19:18 or maybe I don' understand how to use this Jun 28 13:19:52 I am not looking for a thread that does small things upon message receive Jun 28 13:20:20 I would like my thread to do work, and eventually receive a message, for example a message to quit its work Jun 28 13:20:32 or something else Jun 28 13:20:39 to change its behaviour... Jun 28 13:20:51 Good evening. I have to create app using monodroid and opengl (need dynamic realtime lightning, 3d, dynamic textures). Is there any library ? Jun 28 13:22:36 this guy has a similar problem but no good answer there: http://stackoverflow.com/questions/8629511/android-threading-queue-runables Jun 28 13:22:47 Hello! I want to achive following behaviour: if device have no menu button - move menu to action bar as overflow menu button. If device have menu button - menu placed as usual. I should alway check it using hasPermanentMenuKey()? or it is possible to trigger using xml. Jun 28 13:23:51 Zharf: sry I took so long: http://paste.kde.org/784802/ Jun 28 13:24:20 no worries, I'm struggling to record this damn thing on the guitar at the same time anyway Jun 28 13:25:18 finally a decent take, with only one mistake -.- Jun 28 13:26:55 Zharf: :) Jun 28 13:27:22 If I were store store some map files from the level editor on your device. Where would you want me to store them? Jun 28 13:27:23 Zharf: After I've switched my jstring localrefs over to globalrefs I know get this error: Jun 28 13:27:23 06-28 15:25:08.954: ERROR/dalvikvm(16152): JNI ERROR (app bug): attempt to use stale global reference 0x1db0042a Jun 28 13:27:23 06-28 15:25:08.954: ERROR/dalvikvm(16152): VM aborting Jun 28 13:27:24 06-28 15:25:08.954: ASSERT/libc(16152): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 16174 (omahawk_android) Jun 28 13:27:30 now* Jun 28 13:27:43 help? :'-( Jun 28 13:27:46 I was thinking maybe /sdcard/Bricked/level1.map Jun 28 13:27:50 So I'm pretty confident that the crash is being caused by the refs to the jstrings Jun 28 13:28:06 MrMaffen, I'm more and more convinced it's the exception case Jun 28 13:28:49 Zharf: so you think the cause of the problem could be in a completely different place ? Jun 28 13:29:11 yep Jun 28 13:29:12 IF so, what's the best way to debug it then ? :S Jun 28 13:30:01 add exception checking after each method call, at least to print the exception so you know that it's happening Jun 28 13:31:47 Yauhen90: Android should do that by default Jun 28 13:38:38 please if my question was confuse tell me I'll rephrase it Jun 28 13:39:16 I just would like a Thread running its own loop, without havving to call Looper.loop() Jun 28 13:39:25 gmag: wwww.google.com Jun 28 13:39:36 screwsss, I am doing that a lot, trust me Jun 28 13:39:55 gmag: try again Jun 28 13:40:04 screwsss, over and over again, trust me Jun 28 13:40:27 screwsss, if you have any othe references please share Jun 28 13:40:42 gmag: www.bing.com Jun 28 13:40:50 lol Jun 28 13:40:55 screwsss, nahh microsoft... Jun 28 13:41:48 why is everything so hard in Java...? (rethorical, no need to answer) Jun 28 13:42:53 -.- Jun 28 13:42:56 Zharf: hmm I've checked for other jni method calls that could happen during the process. But I couldn't find any.. Everytime a new jni method call is being made I log it, And there is not one call happening during the process (meaning while the for loop is being run through) Jun 28 13:42:59 gmag: www.google.com Jun 28 13:43:19 screwsss, you're being very useful! :D Jun 28 13:43:25 no offense Jun 28 13:43:30 MrMaffen, so there's on that one jni call? Jun 28 13:43:49 >:| Jun 28 13:43:53 Zharf: yep. that one call env->GetStaticVoidMethod(...) repeated over and over again Jun 28 13:44:06 ok then add an exception check to that Jun 28 13:44:10 gmag: www.search.com Jun 28 13:44:24 screwsss, oh please... stop it... Jun 28 13:44:44 screwsss, try to help me c'mon Jun 28 13:44:45 if (env->ExceptionOccured()) env->ExceptionDescribe(); Jun 28 13:44:47 gmag: one more word outta you and ill consider a 24 hour ban Jun 28 13:44:47 or something Jun 28 13:45:01 no wait Jun 28 13:45:08 mm? Jun 28 13:45:15 if (env->ExceptionCheck()) env->ExceptionDescribe(); Jun 28 13:45:55 screwsss, that's democratic... and very adult of you... Jun 28 13:46:16 since when was irc a democracy Jun 28 13:46:31 now gmag Jun 28 13:46:35 gmag: www.yahoo.com Jun 28 13:46:40 Zharf: k ty. I'll try that Jun 28 13:49:18 * gmag added screwsss to ignore list Jun 28 13:49:26 gmag, never tell them that :p Jun 28 13:49:32 gmag, why do you think you need a looper Jun 28 13:49:34 gmag: /part #android-dev Jun 28 13:49:54 okay wtf Jun 28 13:50:10 apparently mediastore already has a IS_PODCAST field? huh? Jun 28 13:50:30 Zharf: afaik ExceptionDescribe outputs to stderr, right? Is stderr automatically redirected to logcat ? Jun 28 13:50:32 it starts to make no sense to build this music player anymore :( Jun 28 13:50:38 MrMaffen, yes Jun 28 13:50:57 Zharf, I see your point, should I just populate the handleMessage() method? Jun 28 13:51:01 * screwsss /deletes emotions Jun 28 13:51:14 Zharf: hmpf. then no Exception is being thrown Jun 28 13:51:30 MrMaffen, bummer Jun 28 13:51:31 aka ExceptionCheck() is always false. just before and just after the call Jun 28 13:51:33 yeah :/ Jun 28 13:51:53 gmag, I don't know what you're trying to do Jun 28 13:53:11 Zharf, just trying to have main activity communicating with a thread. This thread will be running on its own loop doing work, and eventually should receive messages from main telling it to change its behavior. I think I am not being too vague, am I? Jun 28 13:53:38 got damit my camera preview is still having this grey background damit whyyyyyyyyyyyyyyyyyy :'( Jun 28 13:54:21 I like to ask...does every Android Phone running ICS have the ability to sleect the USB Mode (UMS or MTP)? Jun 28 13:55:03 MrMaffen, I don't think you need to/should delete the local refs you do there Jun 28 13:55:39 Zharf: At first I thought so too. But then I had an error telling me that the localref table was overflowing. Jun 28 13:55:50 I fixed that by deleting the localrefs Jun 28 13:55:55 MrMaffen, I see ok Jun 28 13:56:30 MrMaffen, also, if temp==null or strlen(temp) == 0, you're not creating a new string Jun 28 13:56:35 it's still pointing to the deleted one Jun 28 13:56:51 you should probably set them to null after deleting the globalref Jun 28 13:56:53 Zharf: oh yea you're right Jun 28 13:59:01 Zharf: Do you know if it's ok to pass a NULL-pointer to env->CallStaticVoidMethod(...) when it expects a jstring ? Jun 28 13:59:44 yes that's fine Jun 28 14:00:35 Zharf: hm ok after setting the jstrings to NULL I only get a plain ASSERT/libc(21438): Fatal signal 11 (SIGSEGV) at 0x58e636e8 (code=2), thread 21524 (omahawk_android) now :S Jun 28 14:02:02 run it in ndk-gdb, or run ndk-stack on the logcat output Jun 28 14:04:12 Zharf: I just noticed. The crash occurrs at a different line now. Now It's happening in sp_album_release(album);. Maybe the crash is related to one of the sp_XXXX calls after all Jun 28 14:08:41 here is another person with the same problem, and still no answer.... :http://stackoverflow.com/questions/15485195/looper-loop-doesnt-allow-execute-another-work-in-android-thread Jun 28 14:10:03 does anyone here use openfire? Jun 28 14:10:37 gmag, I think you need to explain what kind of behaviour you're expecting... running runnables in another thread? Jun 28 14:12:34 Zharf, gonna give an example, I need a thread that every second increments a int variable, and sends the value to main activity to display on textview. I would the thread to be aware of messages that might arrive from the main activity saying, for instance, to reset that variable. Jun 28 14:13:52 if I can solve this simple problem, I can solve all my communication between threads problems Jun 28 14:14:43 Zharf, please tell me if my english is confusing, I try to rewrite it. I can be confusing some times Jun 28 14:16:23 Zharf: ndk-stack is just the tool that I needed. ty Jun 28 14:16:26 gmag, I don't think you need a looper Jun 28 14:17:28 MrMaffen, it's not always useful :) Jun 28 14:17:32 Zharf, I see. If I understand well, the Looper is to guarantee that the messages are read in order. Right? Jun 28 14:17:55 Zharf, could I lose messages if I dont use looper? Jun 28 14:18:16 gmag, I don't know how :) Jun 28 14:18:27 Zharf: gnarf. don't scare me :D Jun 28 14:18:55 Zharf, ok mate, thanks for the tip, gonna ignore the looper and work on handler only Jun 28 14:20:26 gmag, the thing is, handler needs a looper to work :) Jun 28 14:21:00 ah... right Jun 28 14:21:42 Zharf, that really confuses me, so how can you have a thread that is able to receive messages in a non blocking way? Jun 28 14:21:48 I would rather just use SynchronizedList or something and work on the messages in that Jun 28 14:22:33 so that I could call a while loop inside thread run() method, and then call every iteration something like checkForMessages() method in a non blocking fashion Jun 28 14:22:56 have to google on that Jun 28 14:23:26 that's basically what I have in my xmms2 java clientlibrary.. Jun 28 14:23:44 link Jun 28 14:23:45 pls Jun 28 14:24:42 actually I'm using BlockingQueue there apparently, but same difference, it's never blocking for long when adding and popping messages Jun 28 14:26:47 no I'm consfused... :-| Jun 28 14:28:14 Zharf: hmpf ndk-stack is only outputting two lines Oo Jun 28 14:30:12 when specifiying custom fonts, I'm having issues with non latin based characters not displaying correctly? I've heard that using custom fonts breaks the fallback of the system fonts, i.e. I'm using Lato font and when I show a cyrillic character (and since Lato does not embed any specially styled cyrilic characters) it completely breaks the display of this character. any thoughts on what to do? Jun 28 14:30:40 I've heard techniques of modifying a font file to including all these i18n characters, but I rather not to do that and just maintain the cascading Jun 28 14:31:52 is anyone here who makes a living out of android apps only? Jun 28 14:32:05 (and doesnt work in company or with friends etc) Jun 28 14:33:40 Zharf: omg the issue is finally resolved Jun 28 14:33:47 MrMaffen, cool Jun 28 14:33:48 Zharf: thank you soooo much ! :) Highly appreciated man Jun 28 14:33:54 MrMaffen, no problem, what was it then Jun 28 14:34:13 Zharf: it was a problem with one of the sp_XXX_release functions Jun 28 14:34:21 right Jun 28 14:34:31 https://soundcloud.com/eclipser/tapedeck-2-jun-28-16-51-51 here's what I did meanwhile Jun 28 14:34:34 -.- Jun 28 14:35:05 Zharf: listening to it right now Jun 28 14:35:56 Zharf: 0:42 !? :D Jun 28 14:35:58 I hate that stupid soundcloud "playlist" thing Jun 28 14:36:08 Zharf: Is that the mistake you were talking about Jun 28 14:36:26 Zharf: sounds cool though :) relaxing Jun 28 14:36:33 no this is a different recording, the others had it worse Jun 28 14:37:02 usually I played something else, but that's at least the correct note, just not 100% clear -.- Jun 28 14:37:17 Sounds like music for Harvest Moon Jun 28 14:37:24 Zharf: if you're interested in what I'm doing: https://www.youtube.com/watch?v=fSzA6hWCcvo the first unity game I made :) Jun 28 14:38:24 Dark-Side, some friend gave me notes that he was struggling with so I recorded it for him, basically Jun 28 14:38:55 I don't normally play stuff like that so I had a bit of trouble getting used to playing bassline and melody with fingers :) Jun 28 14:39:57 needs more cutting up TF2 Heavy Jun 28 14:46:10 Hi, is it possible to block all user input from a system service / root ? Jun 28 14:47:44 i would hope not Jun 28 14:47:45 :) Jun 28 14:47:54 but suppose you could Jun 28 14:48:10 how to have the divider between borderless button like google guideline? http://www.pxeo.com/wp-content/uploads/2012/01/buttons_borderless-640x341.png Jun 28 14:48:11 in malicious way with root Jun 28 14:52:29 anyone know why I randomly get this when doing a camera preview http://i.imgur.com/vPyGKJ5.png Jun 28 14:54:33 whats it supposed to be ? Jun 28 14:54:34 black? Jun 28 14:54:40 all black Jun 28 14:54:53 whats the cource of the color ? Jun 28 14:55:04 manual ? resouce ? Jun 28 14:55:05 #ff000000 Jun 28 14:55:10 manual Jun 28 14:55:25 so you just parse hex ? Jun 28 14:55:38 at first I had #000000 , but after talking to someone here I set it to #ff000000 and it was fixed so I though Jun 28 14:55:44 no its hard coded in xml Jun 28 14:56:21 do you do anything else to the xml resource that has that layout ? Jun 28 14:56:21 here is the layout http://pastebin.com/A3GU8ETK Jun 28 14:56:46 like I said it randomly happens.. sometime its all perfect all black.. other times its this error Jun 28 14:57:07 I thought it was the way I did my layout so I tried a linearlayout.. same effect Jun 28 14:57:37 then I thought it was the transparent background on my buttons.. so then I set the background to be #ff000000 for the ImageButtons .. still Jun 28 14:58:02 well it's on 2 views there right ? Jun 28 14:58:09 and both suffer the same prob Jun 28 14:58:23 on 2 views? not sure I follow what you ment by that Jun 28 14:58:35 you mean the background? Jun 28 14:58:45 well I mean that color Jun 28 14:58:49 before I didn't have a background on the ImageButtons OR any other containers Jun 28 14:58:50 is on more that just the 1 view Jun 28 14:58:56 just on the root FrameLayout.. same problem Jun 28 14:58:59 and it is wrong on all those views Jun 28 14:59:35 camera_actions_container camera_button_container Jun 28 14:59:37 I tried without explicitly setting the background color for the inner views.. same problem Jun 28 14:59:50 yeah as I said.. in previous version I didn't have a background Jun 28 14:59:54 and it still caused the problem Jun 28 15:00:16 I added the background after talking here.. and it fixed the problem so I thought Jun 28 15:00:24 also this is random Jun 28 15:00:26 is it just black ? Jun 28 15:00:35 sometimes it works just correct... the whole view is black.. other times it doesn't Jun 28 15:00:35 or any color ends up like that ? Jun 28 15:00:41 correct StingRay_ Jun 28 15:00:52 sometimes its correct others its not Jun 28 15:00:56 all colors end in that shade ? Jun 28 15:00:58 let me get a picture of it correct one sec Jun 28 15:01:01 not matter what they are Jun 28 15:01:03 hmm Jun 28 15:01:16 watch this.. give me a sec Jun 28 15:01:21 with no code change its going to be all black Jun 28 15:02:28 uploading pic its all black now Jun 28 15:03:10 http://i.imgur.com/KmmQ2BS.png Jun 28 15:03:12 all black Jun 28 15:03:26 thats how it should be every time.. but randomly it goes grey Jun 28 15:04:45 and always the same shade of grey ? Jun 28 15:04:50 never lighter or darker ? Jun 28 15:04:51 yeap every time Jun 28 15:04:54 nop same shade Jun 28 15:05:30 thats odd Jun 28 15:05:32 :) Jun 28 15:05:35 tell me about it Jun 28 15:05:41 how often can you get it to do it ? Jun 28 15:05:56 thats the thing.. its unpredicatable Jun 28 15:05:58 you tried chaning color mode of the window in that activity ? Jun 28 15:06:05 I will be fine for some time.. then just say fuck you Jun 28 15:06:06 well pixelFormat Jun 28 15:06:23 no I havn't Jun 28 15:06:26 how would you do that? Jun 28 15:06:28 getWindow().setFormat(PixelFormat.RGBA_8888) Jun 28 15:06:37 ok Jun 28 15:06:47 obviously before setContentView Jun 28 15:06:48 do I need to change it back afterwards? if its in another activity? Jun 28 15:07:09 well that just uses a denser color format Jun 28 15:07:14 so slower'ish Jun 28 15:07:26 i think android defualts an activity to 565 maybe Jun 28 15:07:30 fk knows Jun 28 15:07:34 hehe ok Jun 28 15:07:42 may actially be 8888 default now Jun 28 15:07:52 I just noticed I have one view that has #66000000 as the background Jun 28 15:07:58 going just change it to black as well Jun 28 15:08:38 going take a while to see if it works or not though.. its not predictable Jun 28 15:12:15 when using Android studio, what does it mean when your class name text, in projects, is brown? Jun 28 15:12:58 that it is crappy Jun 28 15:14:24 lol, great color pick then. Jun 28 15:15:29 this is strange.. starting to get the following error : Force-removing child win Window{41fa2b58 u0 SurfaceView} from container Window Jun 28 15:26:11 any idea why "Executing DEX" is horribly slow with the latest build tools? How can I make it faster? :) Jun 28 15:47:15 I want to test the in-app products SDK, but the developer console complains about my apk not having the BILLING permission set. I uploaded a new apk some eight hours ago with BILLING, but it's still complaining. Could be a normal delay, but though I would just ask anyway in case anybody knows anything about it. Jun 28 15:47:51 This is for an app in alpha btw. Jun 28 15:48:02 you no see true app looooong time Jun 28 15:48:45 still not quite sure on the reasons for the huge delay Jun 28 15:49:06 delay yes, such a huge one…. seems a bit big Jun 28 15:49:37 It usually takes just under 2 hours from upload until an app appears on the market Jun 28 15:49:55 what country you in ? Jun 28 15:50:09 rops: That's my experience as well, a bit longer for auto updates (but if you look for the update, it shows after a couple of hours). Jun 28 15:50:16 Me, I'm in Norway. Jun 28 15:50:43 well me, never had my beta updates less than 5 hours Jun 28 15:50:52 normally more like 8-12 Jun 28 15:50:55 Which is why I am fearing that they are looking for the BILLING permission for one of the prod versions which I accidentially pushed (and Google subsequently manually unpublished). Jun 28 15:51:37 StingRay_: You've tried to check for updates in the Play Store on the device? Usually less than two hours is my experience as well. But auto updates take longer. Jun 28 15:51:58 Auto-update meaning before Google push the update message to your device. Jun 28 15:57:54 how do i know wether or not a website login system is usable by webview.postUrl? Jun 28 15:58:22 shouldnt every form that uses post method work? Jun 28 16:00:02 what web framework should i use with my android app? Jun 28 16:00:05 im looking into spring atm Jun 28 16:00:14 never used a java framework before though Jun 28 16:02:38 Zaknafein, I've used Play! before, it worked nicely, because we also needed an administrator frontend Jun 28 16:03:05 So we had routes for json which were delivered to android Jun 28 16:03:24 and the other routes delivered HTML to the web frontend Jun 28 16:03:55 However, you're not limited to java, you might just as well use something like Ruby on Rails. JSON as a message format is definitely a nice way to go though. Jun 28 16:06:57 depending on the size of your application, huge frameworks like spring are probably overkill Jun 28 16:23:15 anyone have experience with webview posturl? It works on my website but not on the one I am developing the app for :/ Jun 28 16:24:49 Hey guys, I'm looking at this example and I can't figure out what goes into the first parameter 'rawContactId' . How do I get the contact Id? http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.DisplayPhoto.html Jun 28 16:25:19 by getting it from the contacts provider ? Jun 28 16:25:29 doing a query Jun 28 16:25:32 how else ? Jun 28 16:25:57 http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html Jun 28 16:26:00 it's there Jun 28 16:27:42 oh yeah o.O Jun 28 16:29:14 can websites block postUrl requests made by webview? I cannot figure this out :/ Jun 28 16:51:35 why is it when you call ArrayAdapter it doesn't clear both mOriginalValues AND mObjects Jun 28 16:51:55 sure, why not Jun 28 16:51:58 block the user agent Jun 28 16:52:30 call what? Jun 28 16:55:24 sonOfRa, what framework is easiest to setup for REST APIs ? Jun 28 16:55:34 I agree, spring might be a bit of overkill Jun 28 16:56:45 spray is pretty awesome Jun 28 16:57:18 i came across this: http://restlet.org/ but i havent heard too much abou ti Jun 28 16:57:21 about it* Jun 28 16:57:43 http://spray.io/ Jun 28 16:58:04 its a scala framework? Jun 28 16:58:16 sure Jun 28 17:19:08 pff... wasnt there a shorter form for: a = (b & mask) | (c & !mask) ? I can't shake the feeling that you should be able to shave one instruction off that ... Jun 28 17:19:43 since i dont seem to get it to work with webview. Can you access websites with http requests that are behind a loginscreen? after using httppost to login ofc Jun 28 17:24:14 Does Android have an API where i can get events from the event bus? Jun 28 17:24:54 I have some third party code which launches an activity, and I have no control over how it's launched. BUt I need to know when it's closed. Jun 28 17:25:07 And I was curoius if I could somehow get a notification that listens for when an activity of a certain type is destroyed. Jun 28 17:27:00 that would be a bit dangerous Jun 28 17:27:07 would not like that at all Jun 28 17:28:09 StingRay_: What would be? Jun 28 17:28:23 what you just asked for Jun 28 17:28:47 ability to detect states of other 3rd party apps Jun 28 17:28:49 well not states Jun 28 17:28:51 events Jun 28 17:30:26 If you support api14+ you can use ActivityLifecycleCallbacks Jun 28 17:30:53 on other apps ? Jun 28 17:30:58 No Jun 28 17:31:12 I assume it's 3rd party code within his app Jun 28 17:31:28 I assumed 3rd party app from what he typed Jun 28 17:32:24 can you detect other 3rd party app start/stop with root ? Jun 28 17:35:00 guys i have one question Jun 28 17:35:05 if i have action bar Jun 28 17:35:27 on default Theme.Sherlock.Light it has shadow Jun 28 17:35:44 is shadow background of actionbar? or what? Jun 28 17:36:04 can it be produced automatically Jun 28 17:36:12 or i should design action bar with shadow? Jun 28 17:36:53 anyone plox? Jun 28 17:37:08 You know, you could just try changing the background of the action bar Jun 28 17:37:11 See if the shadow stays Jun 28 17:39:04 i mean i ask cause i wanted to make template Jun 28 17:39:11 to design in photoshop Jun 28 17:39:23 and dont know where to start action bar Jun 28 17:39:30 i mean i want to have app outline Jun 28 17:39:41 device screen* outline Jun 28 17:39:51 with notice bar + action bar + app content marked Jun 28 17:40:04 or are there ready templates on the web? Jun 28 17:40:51 thats why i made screenshot of device with simple app with actionbar Jun 28 17:40:58 but im not sure where action bar ends Jun 28 17:42:24 ciurkut: that sounds like a brain dump more than a question Jun 28 17:42:26 :) Jun 28 17:42:49 :c Jun 28 17:43:10 StingRay Jun 28 17:43:14 how you design your apps? Jun 28 17:44:13 current one > paper, sketches > "pencil project" layout tests > illustrator final layout and design > illustrator + photoshop to output Jun 28 17:44:54 if it would have lots of motion or something, maybe add "nuke" to that or something that does nice video transforms to test somethings Jun 28 17:45:30 I'm trying to debug my app, in one of my methods if I do Log.d("bla", "bla"); it prints. but if I try and print a global variable photo like so Log.d("Photo: ", "" + photo); nothing happens. Why could this be? Jun 28 17:45:34 host of other apps too, to help with pallet design etc Jun 28 17:46:07 what you mean by pencil project layout tests? Jun 28 17:46:08 :c Jun 28 17:46:29 i mean if i needed a few … move and snap tests for complex layouts Jun 28 17:46:40 I would use something like pencil project over illustrator Jun 28 17:46:50 dunno why really, maybe just preference Jun 28 17:46:56 CocoStorm: Where is your "global" variable defined in the scope? Jun 28 17:47:25 oh I do know why, pencil project doesn't let me design beyond layout, illustrator does, so as a designer I would get tangled in a web Jun 28 17:47:27 :) Jun 28 17:47:36 when I should be moving on a stage Jun 28 17:47:42 Brian|CB, in the surfaceChanged() method Jun 28 17:48:11 Brian|CB, in another method basically Jun 28 17:48:34 but surely even if it was null, the Log should still print? Jun 28 17:48:43 unless it never gets called Jun 28 17:48:51 as in that method dont get called :) Jun 28 17:48:56 StingRay can i ask on pm? Jun 28 17:48:57 CocoStorm: Is the log not getting printed, or is it printing a blank line? Jun 28 17:49:01 there is a difference I believe Jun 28 17:49:03 it gets called at some point Jun 28 17:49:09 Brian|CB, not getting printed Jun 28 17:49:17 CocoStorm: how do you know it gets called ? Jun 28 17:49:25 ciurkut: ask what ? Jun 28 17:49:30 some stuff Jun 28 17:49:39 not rly dev related Jun 28 17:49:43 ok Jun 28 17:49:51 CocoStorm: Then the Log isn't getting called Jun 28 17:49:58 or you're not filtering tags or you're looking at the wrong level Jun 28 17:49:59 or something Jun 28 17:50:00 StingRay_, because I've tried doing a log in the surfaceChanged method and it works. and also in the method that needs this global variable Jun 28 17:50:13 CocoStorm: Can you pastebin me your surfaceChanged code? Jun 28 17:50:15 I'll take alook Jun 28 17:50:19 Brian|CB, ok Jun 28 17:50:44 CocoStorm are you building debug or release apk? Jun 28 17:51:17 Brian|CB, http://pastebin.com/1KwHwy1A Jun 28 17:52:12 CocoStorm: I see no log calls Jun 28 17:52:12 O.o Jun 28 17:52:27 Brian|CB, The log is in the other method Jun 28 17:52:41 where I need to use the photo variable Jun 28 17:52:42 well show me where your log is Jun 28 17:54:42 here is a snippet of the method http://pastebin.com/Lq5mXrzS Jun 28 17:54:51 where the log is called Jun 28 17:55:31 then the applybatch is called when the button is clicked Jun 28 17:55:37 Hey, I'm setting an OnLongClickListener on a HorizontalScrollView, for some reason it does not catch the long click. i've set enableLongClick in the xml. any idea why? Jun 28 17:55:39 Try doing Log.d("Photo", ".add() called"); before the first log in the add function Jun 28 17:55:47 and tell me if that prints Jun 28 17:55:49 if that doesn't print Jun 28 17:55:52 add isn't getting called Jun 28 17:55:58 or you're not printing any debug logs in general Jun 28 17:55:59 lol Jun 28 17:56:12 CocoStorm what app are you making? Jun 28 17:58:48 Brian|CB, only now that I've added that line together with the other log can I see the second log Jun 28 17:58:55 photo is null Jun 28 17:59:02 hmm gotta fix this Jun 28 17:59:43 CocoStorm: Maybe it wasn't being cleaned/built or something Jun 28 17:59:44 idk Jun 28 17:59:48 Either way, glad you can see that now :D Jun 28 18:01:07 Brian|CB, thanks and yeh I have no idea why that is Jun 28 18:02:19 guys, im setting a onLongClickListener on a HorizontalScrollView but it's not being called. when i test the listener on another view it works fine. any idea why the HSV override it? Jun 28 18:06:28 Brian|CB, awesome, it's working now Jun 28 18:06:30 viran: Thats because you're using the wrong listener Jun 28 18:06:53 oh wait Jun 28 18:06:55 I misread Jun 28 18:07:11 viran: Might I see the XML for the HorizontalScrollVIew you are attaching the listener too? Jun 28 18:07:17 and all subsequent children obviously Jun 28 18:10:26 Brian|CB: http://pastebin.com/hhAifKqx Jun 28 18:10:40 which listener should i attach too? Jun 28 18:12:06 viran: Try changing that to return true Jun 28 18:13:47 viran: doesnt help, it doesnt get to that return Jun 28 18:14:21 heh Jun 28 18:14:30 Brian|CB: doesnt help, it doesnt get to that return Jun 28 18:14:45 viran: Try it anyways Jun 28 18:15:07 i did Jun 28 18:16:08 maybe there's a TouchListeners that returns false the LongListeners is called? Jun 28 18:16:14 viran: try setting it to clickable Jun 28 18:16:19 viran: Did you set it to be longclickable? Jun 28 18:16:28 there is a property I believe like longClickable or something Jun 28 18:16:42 as in the view, make it touchable, blaaa whateva Jun 28 18:16:56 i've tried, by xml and code Jun 28 18:17:08 http://stackoverflow.com/questions/16018084/onclicklistener-on-views-inside-a-custom-scrollview Jun 28 18:17:09 Unable to destroy activity : java.lang.IllegalStateException: Not connected to server. Jun 28 18:17:13 i think that's the solution Jun 28 18:17:14 whats this error, ive never seen it before Jun 28 18:17:28 viran: My last suggestion is to wrap the scrollview in a linearlayout Jun 28 18:17:32 and then set the longclick of that layout Jun 28 18:17:32 :S Jun 28 18:18:16 it might get to that :/ Jun 28 18:20:27 viran: does it not work if you setClickable(true) ? Jun 28 18:20:48 yes, not working... Jun 28 18:21:23 the link to stackoverflow has the answer i think, im implementing Jun 28 18:24:14 Regarding my in-app billing issue, it may be me using the wrong permission. The docs just said "add BILLING permission", so I added android.permissions.BILLING. It probably should be com.android.vending.BILLING. Trying again... Jun 28 18:26:36 Bingo, that solved it. I am now allowed to add SKUs. Jun 28 18:38:31 so i need to log a _really_ long string, but logcat cuts most of it off... anyway simple workaround other than doing some loop and logging the string piece by piece? Jun 28 18:38:43 speakingcode-wor, write it out to a file Jun 28 18:39:08 pfn: read "for loop and log it piece by piece" heh Jun 28 18:39:21 yeah, but why would you do it Jun 28 18:39:23 and how long is it Jun 28 18:39:25 speakingcode-wor: Are you sure it's the log that is truncating? Jun 28 18:39:50 it's several hundred lines (big ole json object) Jun 28 18:40:27 make sure it's the log that is truncating Jun 28 18:40:37 print the length of the string and then the string Jun 28 18:40:38 and then compare Jun 28 18:40:42 to make sure log is the one truncating Jun 28 18:40:46 before you try to fix the isuse Jun 28 18:40:49 oh, well it definitely is Jun 28 18:40:51 speakingcode-wor: don't log it to logcat Jun 28 18:41:14 b/c the parsed json is fine, and results in things that simply wouldn't be there if the string itself was truncated and not the log Jun 28 18:42:03 speakingcode-wor: do I dare ask why you want to ruin everyone's logcat? Jun 28 18:42:23 ruin what? huh? Jun 28 18:42:43 this is for my own needs and the chance anyone else in the universe will ever see it is precisely 0 Jun 28 18:42:54 after ir resolve the issue at hand i'll remove the logging Jun 28 18:43:17 give yourself sd permission and write it to /mnt/sdcard/foo.txt Jun 28 18:43:25 i just need to dump out a lot of raw json b/c certain fields are encoded and i need to look at that n see why the decoding is not correct Jun 28 18:43:32 (who cares about hardcoding paths for a debug log) Jun 28 18:43:35 Make it a JSONObject, log JSONObject.toString(2) Jun 28 18:43:46 speakingcode-wor: make sure you remove it before you publish the app Jun 28 18:43:57 but yes, just write it to a file and inspect that Jun 28 18:44:06 or debug the app in an IDE :) Jun 28 18:44:17 i am usingf an IDE, heh Jun 28 18:44:40 It'll prettyprint it, and each line will be 1 logcat entry Jun 28 18:45:17 how iw writing to a file, then having to copy it off the device each time to be able to inspect it, more practical than just splitting the string and logging each piece in a loop, and being able to just copy it right from the logcat view? heh Jun 28 18:45:37 i was really just asking if there is some setting or configuration that would make the logcat view (or logcat itself?) not truncate Jun 28 18:47:12 just don't write a big file to logcat Jun 28 18:47:17 not the right place Jun 28 18:48:11 i digress Jun 28 18:58:01 for (String s : result.split("[{},]")) Log.d("result", s); did what i needed Jun 28 19:01:42 Is there an env var corresponding to the location of the ~/.android dir? Jun 28 19:03:19 $ANDROID maybe tos9 ?? Jun 28 19:03:47 speakingcode-wor: Is that a guess or do you know that exists? (Sorry, hard to find docs) Jun 28 19:03:52 or $ANDROID_HOME Jun 28 19:04:20 uhm, just a guess. i seem to recall those being created automatigically somehow on windows, but i don't see them on my linux box Jun 28 19:04:25 you could certainly create them if you need Jun 28 19:04:33 ANDROID_HOME is sdk Jun 28 19:04:40 o Jun 28 19:04:49 Yeah, my SDK install lives someplace else. Jun 28 19:04:58 and ~/.android gets created automatically if you do android create project, or android update project, or create a project from IDE Jun 28 19:06:15 maybe when you run ant debug as well Jun 28 19:07:01 btw tos9 if you run "env" in bash / your shell it will print all the environment vars set Jun 28 19:07:25 env | sort will make them alphabetical Jun 28 19:07:34 speakingcode-wor: I know (but nothing is set for android, I assume ~/.android is a default, if it's at all configurable) Jun 28 19:08:18 it's not configurable Jun 28 19:08:32 ^^. but keep in mind ~/.android isn't the sdk path Jun 28 19:09:18 pfn: K. Thanks. Jun 28 19:09:29 (And thanks to you as well speakingcode-wor) Jun 28 19:09:32 it's only used to store the debug keystore Jun 28 19:09:43 and some avd config stuff, I guess Jun 28 19:09:46 Right. Jun 28 19:09:47 and sdk manager crap Jun 28 19:10:02 I want those elsewhere (well I want all of it elsewhere, but I can't get what I want apparently) Jun 28 19:10:22 tos9: is there an issue we can try to help, or just trying to locate it somewhere else? Jun 28 19:10:43 (Trying to set up an Ouya FWIW which is telling me to edit adb_usb.ini, which says it shouldn't be updated directly, but I'm guessing I should ignore that since there doesn't seem to be a different way) Jun 28 19:11:09 speakingcode-wor: Just being pedantic mostly, I have a mostly Freedesktop system. Jun 28 19:11:26 (So I want these where they belong, in XDG_CONFIG_HOME and XDG_CONFIG_CACHE, otherwise I have to remember where they are) Jun 28 19:14:01 if you want it elsewhere, use a symlink Jun 28 19:14:54 really not that hard Jun 28 19:14:56 you're on linux Jun 28 19:14:57 symlink and done Jun 28 19:18:12 * monsti is having the update day oday Jun 28 19:18:15 t Jun 28 19:43:22 hello world Jun 28 19:44:21 Is it be possible to automatically delete the application? Jun 28 19:44:44 (at the reception of intent) Jun 28 19:46:14 uninstall an app? Jun 28 19:46:50 app A want's to uninstall app B by code? Jun 28 19:48:07 nope, auto remove Jun 28 19:48:18 user_1337: no Jun 28 19:48:19 what is auto remove in android? Jun 28 19:48:29 you can prompt the user to uninstall, but an app cannot commit suicide Jun 28 19:48:29 What about a "device manager" app? Jun 28 19:49:43 then how spies uninstalls applications that remote work? Jun 28 19:49:44 (I find nothing in the doc ^ ^) Jun 28 19:50:09 user_1337: um, what? Jun 28 19:50:12 syntax error Jun 28 19:50:17 redo from start Jun 28 19:50:48 kjeldahl: device admin API does not expose a way to uninstall an app without user intervention Jun 28 19:51:02 evanc: Ok, thanks, I was curious. Jun 28 19:51:26 which is ok, because without the OS somebody would uninstall chrome and install chrome.spy Jun 28 19:54:10 hello Jun 28 19:54:23 I'm facing a weird issue in my app, it uses Relative layout Jun 28 19:54:30 and the items there are measured dynamically Jun 28 19:54:56 what happens is that I get the first item put into that view overlapping with the second Jun 28 19:55:02 despite correct RIGHT_OF rule Jun 28 19:55:11 all others are fine Jun 28 19:56:30 xml/code pastebin Jun 28 19:57:03 wait, I have a silly idea - perhaps setId(0) is not that great Jun 28 19:57:31 that would not be good, but really bad if used more than once ;) Jun 28 19:57:43 shouldn't be, that's set in a for loop Jun 28 19:59:16 this wouldn't be the first time I've hit undocumented behavior Jun 28 19:59:32 and yep, that was it Jun 28 19:59:41 setId(0) is special, or addRule(..., 0) is Jun 28 20:07:55 can I declare an array list object like this private ArrayList myObject = new ArrayList(); inside a class? Eclipse is not yielding an error, but I usually declare the variable in the class and define itside the constructor, but it's a bit cumbersome... Jun 28 20:08:54 Yes Jun 28 20:09:03 :) thanks Jun 28 20:09:39 gmag: that's the java/C# way - C++ is different here Jun 28 20:10:10 monsti, exactly. Jun 28 20:10:25 thanks Jun 28 20:10:50 huh? Jun 28 20:10:54 oh Jun 28 20:11:10 if there's no error, it's probably ok Jun 28 20:13:29 updating mac ports is always a pleasure Jun 28 20:13:36 (compared to gentoo) Jun 28 20:14:00 well, it's gentoo Jun 28 20:14:21 Hi, I am trying to use alarm manager to start a service that will send a notification to my users once a day. The service never goes off. Am I doing something wrong in my activity? http://pastebin.com/suYZmuzR Jun 28 20:15:06 this is what the alarm service looks like: http://pastebin.com/RKC8dbGX Jun 28 20:18:42 monsti what are you using macports for ? Jun 28 20:18:50 just curious Jun 28 20:19:12 i built everything on my mac from scratch and manage it with stow Jun 28 20:19:23 well, not everything, you know - stuff that may normally be in macports Jun 28 20:22:32 updating gentoo is fun too! Jun 28 20:22:51 if you update regularly enough, you won't run into issues really Jun 28 20:22:57 for sufficiently small values of fun Jun 28 20:23:14 navetz: we need to see your AndroidManifest.xml (the relevant bits) as well as how you're scheduling the alarm Jun 28 20:23:22 JesusFreke: it's fun for us to watch Jun 28 20:25:27 so where is the iosched 23013 source code ? Jun 28 20:25:30 hehe Jun 28 20:25:32 *2013 Jun 28 20:26:38 evanc: here is the mainfest: http://pastebin.com/yC9YFiZ2. This is the activity: http://pastebin.com/L1RPBK45 and this is the service: http://pastebin.com/PTgC5E9V Jun 28 20:27:19 I am fairly sure the service is not starting Jun 28 20:31:57 navetz: I think someone in here the other day had issues with Calendar. Something about its epoch being 1900 instead of the expected 1970? Jun 28 20:31:58 hi - I've got a button that I've added to a layout that seems to keep all the onClickListeners from working for the rest of the buttons on the page when I set its onClickListener Jun 28 20:32:16 if I comment out the setting of the listener, it goes back to normal Jun 28 20:32:18 navetz: try just doing alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (10 * 1000L), pendingIntent); Jun 28 20:32:51 navetz: also log.d onCreate and onStart Jun 28 20:33:08 any pitfalls I should look out for? Jun 28 20:34:41 hello there, im looking for somebody who got some experice on using soundpool. i would like to play 2 sounds at the same time. but i cant handle it. my application is playing the second sound after the first one stopped. has anyone any ideas? Jun 28 20:36:23 evanc: I tried that but it didn't seem to work either.. Jun 28 20:36:43 Why is there two sdcards on my android? Jun 28 20:37:02 internal/external? Jun 28 20:37:36 StingRay_: I changed the log from log.i to log.d Jun 28 20:38:30 do I maybe need more permissions to act as a service? Jun 28 20:38:33 ah, well no use either Jun 28 20:38:44 what I was meaning is log the service Jun 28 20:38:47 in onStart Jun 28 20:38:51 and onCreate Jun 28 20:39:11 I've tried logging inside the set listener Jun 28 20:39:14 but nothing comes up Jun 28 20:40:03 StingRay_: I am logging the service but I don't think the service is ever being started Jun 28 20:40:17 do you log onCreate and onStart ? Jun 28 20:40:26 cause then you wouldn't have to "think" Jun 28 20:40:29 :) Jun 28 20:41:05 StingRay_: I did this inside oncreate and on start: Log.d("oncreate","inside"); Jun 28 20:41:24 StingRay_: but the logs don't show up when I launch the app Jun 28 20:43:20 "Facebook Android app sends phone number to Facebook servers without consent" … this is google's fault as well as FB. the security model blows. Jun 28 20:44:25 hmm Jun 28 20:44:58 there's no notice upon installation about the app having access to phone state or whichever permission is associated with that? Jun 28 20:45:22 speakingcode-wor: There is; a list of 30 or so permissions.. :-( Jun 28 20:45:31 rager: Is there an internal sd card? What does that mean? Jun 28 20:45:35 anyone who is oblivious about the level and magnitude of data collection that is both possible AND taken advantage of by big social networks deserves for their info to be farmed Jun 28 20:45:49 particularly facebook Jun 28 20:46:07 kjeldahl: exactly. which is why i don't have the fb app installed on my phone, or an account with facebook at all Jun 28 20:46:13 looks like we've got an Internet Tough Guy, here. Jun 28 20:46:37 everybody look, speakingcode-wor is really edgy and cool for not having Facebook on his phone Jun 28 20:46:38 * rager bows Jun 28 20:46:39 people still use facebook? Jun 28 20:47:00 "here's a huge list of all the permissions this app needs" "oh too long, not reading" and then the app or the phone maker is at fault when the user is upset or surprised at the level of access the app has to users data? Jun 28 20:47:01 naw, we kids all just sext on snapchat all day Jun 28 20:47:34 done ranting yet, speakingcode-wor? Jun 28 20:47:42 Actually, the iOS way probably make more sense for most of these apps. Ask when the app tries to use the permission the first time for stuff like that. Jun 28 20:47:51 kjeldahl: disagree Jun 28 20:47:55 i'm not trying to be edgy or cool, i only pointed out i don't use the service to say i'm not hyrpocritical or stand for the argument "well no one actually looks over or pays attention to that". if they don't ,it is their own fault Jun 28 20:48:06 kjeldahl: yeah, users really love nag dialogs Jun 28 20:48:16 the Windows Guardian model, right? Jun 28 20:48:29 I love that model of security interaction! Jun 28 20:48:37 you mean the Windows Dumbass model ... "i don't know, you decide!" Jun 28 20:48:48 rager: i'm simply responding to a topical discussion brought up, it's you that is making personal attacks on me, so please save the snark remarks Jun 28 20:48:52 Upfronting all nags so people stopp caring does not solve any problems related to privacy and similar. Jun 28 20:49:13 speakingcode-wor: i'd ignore the rager, it's likely enough to quit anyway ;) Jun 28 20:49:16 personal attacks? no, I'm just being snarky because you're standing on some pedestal Jun 28 20:49:21 And the app could decide to continue running even without certain permissions, but on Android, that does not work. Jun 28 20:49:42 for something like GPS, or contacts, asking the user could be done in a clear way that doesn't train the user to just always say yes and be annoyed by the dialogs Jun 28 20:49:43 f Jun 28 20:50:00 for something like reading the IMEI, some people are just always going to say no, and others are just always going to say yes and not understand at all Jun 28 20:50:13 well, you'd have to request permissions in the AndroidManifest.xml anyway Jun 28 20:50:16 and then it's more work for developers to handle both states gracefully Jun 28 20:50:17 Yes, agree, a little of both is probably the best. Jun 28 20:50:26 but as a developer you have plenty of leeway on how intrusive you are Jun 28 20:50:40 nothing forced Facebook to hoover all those phone numbers without explicitly asking Jun 28 20:50:51 and nothing forced them to not Jun 28 20:51:18 right - just saying that if you really care about your users, you've got plenty of leeway in actually making doing in-app privacy settings that matter, too Jun 28 20:51:55 you mean no one caused them to, it just totally happened by accident when two flash drives happened to fall into a pot of coffee Jun 28 20:52:00 but that shifts the issue to whether or not they care about their users, which farming data without prejidice suggests they don't Jun 28 20:52:13 I'm pretty certain Google will do something with permissions; the way it works now isn't working like it was supposed to work. Too many permissions. Jun 28 20:52:30 it isn't? Jun 28 20:52:34 i'm pretty sure it is Jun 28 20:52:58 When users stop caring, saying it works is kind of missing the boat. Jun 28 20:52:59 though, i would like the ability to restrict an app anyway, but i can't see that happening heh Jun 28 20:53:03 this is just a personal thing of course, but when i am about to install an app and it asks for lots of permissions, i imeediately become weary and likely will just not install it Jun 28 20:53:11 "wary" Jun 28 20:53:20 though i am rather weary of such apps myself Jun 28 20:53:37 ^^^ forgive me, always been a horrible spiller ;-p Jun 28 20:53:48 i just did that with coffee yesterday Jun 28 20:54:03 ...i should make some more coffee Jun 28 20:54:27 reminds me of: "let's eat, grandpa" vs "let's eat grandpa" - proper grammar saves lives Jun 28 20:54:35 heh Jun 28 20:58:11 cool, the leaked 4.3 rom had android.hardware.bluetooth_le in the System Info app :) Jun 28 20:58:41 maybe an addressable market of 4.3 users with ble in a few years Jun 28 20:59:02 oh things still going on in the bluetooth world? Jun 28 20:59:05 haven't kept up Jun 28 21:00:04 yeah its still kicking Jun 28 21:01:17 i remember the horrible experience of trying to sync to old motorolla razr headsets via bluetooth a long time ago, and being disappointedly underwhelmed at the performance, the connection process, all of it... and never considering bluetooth again Jun 28 21:01:46 its hard to know what the cuplrit is, but yeah at the end of the day who cares Jun 28 21:02:17 there are a lot of eHealth gadgets using ble Jun 28 21:03:15 i'm sure it was entirely motorolla's fault, but yeah, wasn't intrigued enough for bluetooth capability to influence purchasing decisions. the big flagship product was the headsets and im not into those either, so yeah Jun 28 21:03:48 that's cool - things like physiological monitoring and such? Jun 28 21:04:10 it is possible to have a BroadcastReceiver that receives several types of indents? Jun 28 21:04:27 user_1337: i do believe so Jun 28 21:05:18 iirc that was necessary for making a homescreen widget with multiple actions, back in the 2.x days Jun 28 21:08:45 g00s: BLE was announced for API 18 already :) Jun 28 21:09:12 mdwright google says stuff all the time Jun 28 21:09:27 yeah we want an API++; Jun 28 21:09:31 all we love Jun 28 21:19:38 anyone have suggestions for viewing i/o videos offline ? Jun 28 21:20:08 first, get online Jun 28 21:20:20 ;) Jun 28 21:20:40 i was hoping they were in iTunes U or something Jun 28 21:20:54 itunes has a university now? Jun 28 21:21:18 ;) Jun 28 21:21:48 hey it's nearly 5 on friday Jun 28 21:22:13 I used download helper plugin for ff to get them Jun 28 21:22:28 shmooz thanks, will check it out Jun 28 21:22:50 hi i have a problem with a button. i set layout_with and height to wrap_content, first has a background a png 276px276px second has a png background of 100x100px Jun 28 21:23:01 this is result https://www.dropbox.com/s/gexsa3nsknkt5dj/twobutton.png Jun 28 21:23:15 g00s: i'm surprised they don't have them for download, but thne i guess who doesn't have youtube Jun 28 21:23:25 i don't undertstand why little button is deformed Jun 28 21:24:29 this is code http://pastebin.com/P1dqBxE8 Jun 28 21:24:30 can an app have multiple sync adapters for syncing different data? Jun 28 21:24:45 i'm having trouble getting more than one entry showing up under the account in settings Jun 28 21:27:39 the two png are identical, but little png is 100x100px big is 276x276 Jun 28 21:31:02 Hey guys im stuck have been trying to find a solution for about 3 hours now Jun 28 21:31:25 When I take a picture with the front facing camera in my app, it saves it sideways Jun 28 21:31:33 I want it to save them all portrait Jun 28 21:31:51 shmooz were they mp4 of flv ? Jun 28 21:33:46 it's a veru strange problem Jun 28 21:34:22 JakeWharton: i don't know, and wish i could help but at any rate i'm curious what the answer is so post back if you find out Jun 28 21:34:45 Google Play Services APK seems to have multiple in it Jun 28 21:34:52 decompiling now to seal their secret codes Jun 28 21:34:56 also, steal Jun 28 21:35:08 steal them before you seal them Jun 28 21:35:42 newinandroid: you can set the way it scales Jun 28 21:36:00 scales? Jun 28 21:36:11 well Jun 28 21:36:11 I asked earlier but could someone please take a look at my activity, service and mainifest and tell me why my service is not starting? I am pulling my hair out right now Jun 28 21:36:12 here is the mainfest: http://pastebin.com/yC9YFiZ2. This is the activity: http://pastebin.com/L1RPBK45 and this is the service: http://pastebin.com/PTgC5E9V Jun 28 21:36:25 you have a 200dip margin on the top, first of all. that may be your issue Jun 28 21:37:13 no speakingcode-wor , if i put only little button i iave same problem Jun 28 21:37:29 try removing the margin just to see what happens Jun 28 21:38:30 new layout http://pastebin.com/hXu0vqkX Jun 28 21:39:34 same problem https://www.dropbox.com/s/gg20raf9xxbu28f/onebutton.png Jun 28 21:39:59 newinandroid: are you sure your image is not scaled oddly in the first place? Jun 28 21:40:36 if background is 120-150 px is perfect but when png is 100px it doesn't work Jun 28 21:40:52 why not just set the width and height to equal amounts, heh Jun 28 21:41:55 i prefere wrap_content Jun 28 21:42:21 OH Jun 28 21:42:31 because if i change layout and png i don't change any code Jun 28 21:42:49 well everything is a trade off aint it Jun 28 21:43:06 little png https://www.dropbox.com/s/fuaia9ka6yt5pry/backbutton_little.png big https://www.dropbox.com/s/jv3vst1fwr5hdsd/backbutton_big.png Jun 28 21:43:08 i'm giong nuts.. Jun 28 21:43:18 my app wont set the front camera to portrait Jun 28 21:43:59 CocoStorm: The preview or the actual images produced? Jun 28 21:44:09 mdwright, images produced sir Jun 28 21:44:30 well newinandroid i'm not a layout expert by any means, but in my experience using "wrap content" for buttons with background images is fairly unpredictable Jun 28 21:44:31 CocoStorm: I suspect you're using the JPEG callback Jun 28 21:45:02 mdwright, pictureCallBack() method? ya Jun 28 21:45:19 CocoStorm: you could always just rotate the image Jun 28 21:45:30 speakingcode-wor, in code? Jun 28 21:45:35 automatically? Jun 28 21:45:48 CocoStorm: yeah. a rotation is a pretty simple operation Jun 28 21:45:59 speakingcode-wor, i'd like use wrap_content because i can put differnt png in drawable-xdpi mdpi etc Jun 28 21:45:59 You'll have to rotate the image yourself based on the orientation of the device. the JPEG callback doesn't respect setDisplayOrientation Jun 28 21:46:02 probably something built into the api to do it Jun 28 21:46:27 You'll probably have to decode the byte array into a bitmap and just apply a rotation matrix. It's pretty straightforward. Jun 28 21:46:36 mdwright, I see, cos I've been trying to mess around with setDisplayOrientation for hours Jun 28 21:46:49 newinandroid: sure, but if it's not working... and at the same time, you could used fixed dimensions, and provide alternate values in values-xdpi, values-mdpi, etc Jun 28 21:47:00 mdwright, once it's into a bitmap turn it back into a byte array? Jun 28 21:47:07 CocoStorm: did you read the docs? :) "This does not affect the order of byte array passed in onPreviewFrame(byte[], Camera), JPEG pictures, or recorded videos." Jun 28 21:47:09 CocoStorm: yup Jun 28 21:47:17 speakingcode-wor, ah I see Jun 28 21:47:25 CocoStorm: depends on what you want to do with it from there :) Jun 28 21:47:55 ahh, I see, and they have this in the docs? Jun 28 21:47:59 I'd look up matrix? Jun 28 21:48:41 do a search for "android decode jpeg" "android rotate bitmap" etc Jun 28 21:48:47 speakingcode-wor: have to use different content authorities Jun 28 21:48:54 JakeWharton: ah Jun 28 21:49:05 but a provider can also server multiple content authorities so you at least don't need multiple of those Jun 28 21:49:07 speakingcode-wor, will do, thanks! Jun 28 21:49:47 when I use a png larger than 130x130px it's works Jun 28 21:49:54 *it work Jun 28 21:51:12 speakingcode-wor, i have create code to change dimension in runtime Jun 28 21:52:51 Now I have to close, Jun 28 21:56:09 What would be the best way to display a dynamic listview when somebody presses a button ingame? Jun 28 21:56:25 I'm currently using AlertBuilder, is that a good or bad idea? Jun 28 22:03:25 hmm, I wonder if I can exclude resources in fast dev builds to reduce apk size for on-device testing Jun 28 22:05:13 probably Jun 28 22:06:08 pfn, this might help http://www.asyncdev.net/2011/02/android-dev-prod-builds/ Jun 28 22:06:44 speakingcode-wor, not really Jun 28 22:14:04 Which view type does ListView contains? Jun 28 22:16:49 Any Jun 28 22:17:06 Your adapter has to create some for it Jun 28 22:17:47 Ah Jun 28 22:17:50 there are some system-provided adapters that are pretty basic, single n double textviews, maybe a few others Jun 28 22:18:07 That works too Jun 28 22:18:15 But those are lame Jun 28 22:18:47 Is ArrayAdapter my type or is android.R.layout.simple_list_item_checked my type? Jun 28 22:18:53 Or am I just doing something wrong? Jun 28 22:19:03 umm Jun 28 22:19:29 yeah, learn java first.. haha. but nah, i think you're being vague/abusive with the word 'type' Jun 28 22:19:40 android.R.layout.simple_list_item_checked is a value at first Jun 28 22:19:44 Not type Jun 28 22:20:21 ListView is a type - it's a class. Object instances of it are ListView typed... Jun 28 22:20:54 ArrayAdapter is a type, it is generic and has a type paramaneter.. in the case of ArrayAdapter it's type parameter is String, indicating whatever it is it does, it will do with Strings in that instance Jun 28 22:21:46 hello... i am trying to get some multi-touch stuff to work on a galaxy s2... and every time my motionEvent.getActionIndex() returns 0 no matter what Jun 28 22:22:19 i am testing with the ACTION_MOVE event, but no matter which finger i move, the index is always 0 :/ Jun 28 22:22:23 android.R.layout.simple_list_item_checked is an int, a primitive type. it's value is used by the system to map to automagically generated objects, but at any rate, it references a View/layout of some sort Jun 28 22:23:36 alegen: getActionIndex is for ACTION_POINTER_DOWN and ACTION_POINTER_UP Jun 28 22:24:09 Sorry, I formulated myself a bit bad. I know Java better than it sounds like. But public T getItem (int position) is a method of ArrayAdapter. So if I use ArrayAdapter, would I be able to just to getItem(0) to get the string stored in the listview then? Jun 28 22:24:31 mdwright: i see... and what can i use for action_move then? to figure out the id of pointer? :( Jun 28 22:24:53 Kake_Fisk: yup Jun 28 22:24:59 alegen: You have to keep track of the IDs for the pointers you care about Jun 28 22:25:19 ArrayAdapter => String getItem(int position) Jun 28 22:25:44 alegen: then use findPointerIndex to obtain the index for it's current position in the motion event Jun 28 22:26:06 Oh, okay, I see. I thought getItem would return a View of some kind. But I guess I just misunderstand what ArrayAdapter actually is. Jun 28 22:26:15 now, typically with an ArrayAdapter you provide the array from which it is backed, so you could of course get the items from that array directly if you have a reference to it in scope Jun 28 22:26:28 Kake_Fisk: getView() returns a vie Jun 28 22:26:30 view* Jun 28 22:26:48 Ahh Jun 28 22:26:56 mdwright: ok, now i understand how this works... makes sense. thanks for your answers :) Jun 28 22:27:07 speakingcode-wor, I've succesfully converted the bitmap, rotated and converted back but now I am getting a TransactionTooLargeException Jun 28 22:27:19 alegen: and in order to get the pointer id, just use getPointerId Jun 28 22:27:27 ArrayAdapter. T is just what I want to store in the list or something? Jun 28 22:27:27 alegen: sure thing, happy to help Jun 28 22:27:39 Eclipse says this api method is depreciated. what is wrong with using it, and what should be used instead? PreferenceActivity.addPreferencesFromResource (int preferencesResId) Jun 28 22:27:41 so when you implement your own array adapter, you typically override getView(int position), and in the body of that method you would grab the item at that position from the backing array, then grab fields from that item to set filds on the View object, and then return that view object Jun 28 22:28:11 yeah, the type parameter of ArrayAdapter is the type of the items stored in its backing array/ArrayList Jun 28 22:28:32 I see, thanks for the explanation Jun 28 22:28:38 you're welcome Jun 28 22:28:44 BullShark: You should be using PreferenceFragment instead Jun 28 22:29:01 is there anything funky about where one should define data adapters? Jun 28 22:29:07 Kake_Fisk: i beleive there is also a getPosition(T item) method IIRC, just to make it extra confusing for the newcomer :-p Jun 28 22:29:15 if i define it in the beginning of my activity Jun 28 22:29:21 then initialize it in onCreate Jun 28 22:29:30 i should be able to use it in a method in that activity, yeah? Jun 28 22:29:47 flipture: yes, it is java. all normal java scope rules apply Jun 28 22:30:08 speakingcode-wor: cool. that means i'm doing something else wrong :) Jun 28 22:30:12 I have an mp3 stream I want to stream and I'm able to do this using media player, but due to the bitrate of the stream it takes up to a minute to buffer and play. Wondering if anyone has tackled playing a mp3 with anything other than media player? Jun 28 22:30:51 references defined in the scope of the class (members) are accessible to all methods of that class. references defined in a method are accessible to only that method. a member can initialized/constructed with a method and still accessible by other methods Jun 28 22:31:09 within* a method Jun 28 22:31:41 so if i define outside of any method, i should be able to make a change to that adapter from within a method that will "stick" Jun 28 22:31:51 (that has been my experience, just making sure i'm not missing something...) Jun 28 22:31:59 flipture: correct Jun 28 22:32:19 speakingcode-wor: cool. thx... i'll hack at it a bit more then may have to post some code to avoid more frustratin :-\ Jun 28 22:33:03 a method has access to references defined with in it, to its parameters, and to members of the class to which it belongs. now, when you get into inheritence and members of other classes, there's more rules, but that does not appear to be relevant directly to what you're doing right now Jun 28 22:33:44 correct. I'm working all within one activity... I've confirmed that the class that i pass in is in tact Jun 28 22:34:42 and the data adapter was working for the most part but when i call my getPosition method inside of the custom adapter, i'm not getting the expected results Jun 28 22:35:01 maybe its because i haven't declared @override Jun 28 22:35:21 MyActivity extends Activity { Adapter myAdapter; void someMethod() { myAdapter = new Adapter(); } void someOtherMethod() { myAdapter.doSomething(); //valid, but myAdapter may be null. if initialized in onCreate(), its probably not null } } Jun 28 22:35:35 @Override isn't necessary, but useful Jun 28 22:36:00 cool. thought it wasn't necessary. it errors when i use overrice Jun 28 22:36:11 so i was init'ing in onCreate, so let me go back to that and try again Jun 28 22:36:29 probably because you're putting @Override on something that isn't being overridden Jun 28 22:36:31 oh, btw, i've changed what gets returned in getPosition Jun 28 22:36:45 Let me post code... will avoid confusion :) Jun 28 22:38:30 speakingcode-wor: if you don't mind taking a peek, my code for that activity is here: http://pastebin.com/SRnes2Ya Jun 28 22:40:06 So first problem was that the getPosition(Integer int) method was always returning 0 Jun 28 22:40:33 Even when my logging clearly showed that i created the SparseIntArray, and validated its contents Jun 28 22:40:46 as it was being created. But when i call it, it returned 0 Jun 28 22:41:20 Now i'm trying to make sure my adapter isn't getting recreated somewhere and i'm getting null for itemCatSpinner.setAdapter (like 106) Jun 28 22:42:03 *line Jun 28 22:43:03 Hey guys, I'm converting a bitmap to a byte array back to a bitmap and I'm getting a TransactionTooLargeException? Jun 28 22:46:37 crap, i still haven't found a reader alternative i like Jun 28 22:46:45 * g00s is screwed Jun 28 22:46:51 feedly Jun 28 22:46:55 theres really nothing else great out there Jun 28 22:46:56 takes all of like 1 second Jun 28 22:46:57 feedly is ok. Jun 28 22:46:59 feedly is great Jun 28 22:47:05 I hate their today view Jun 28 22:47:06 but it's great Jun 28 22:47:13 lol Jun 28 22:47:13 and on top of that, lots of stuff can run off of feedly's apis Jun 28 22:50:56 How can I make a listview with selectable items? Jun 28 22:52:14 pfn: feedly sucks Jun 28 22:52:19 but sadly everything else sucks more Jun 28 22:52:34 Kake_Fisk: add an onclicklistener in the custom adapter Jun 28 22:52:41 how does feedly suck? Jun 28 22:52:45 feedly has a crap UI about as bad as early google reader and its sync is highly flakeball Jun 28 22:52:45 inside getView Jun 28 22:52:48 it works pretty identically to google reader Jun 28 22:53:02 I'd say feedly's ui is better than reader Jun 28 22:53:06 i use it from 4 machines and it's constantly losing read status Jun 28 22:53:12 pfn: it's really not Jun 28 22:53:18 and sync has been reliable for me, in browser and on-device has been close Jun 28 22:53:22 it feels bloated Jun 28 22:53:26 it does look nice tho Jun 28 22:53:41 it looks ok and it's works ok but i'll replace it as soon as i can find/make something better Jun 28 22:53:43 well, it got more reliable after it updated Jun 28 22:53:48 flipture: custom adapter? Jun 28 22:54:00 pre-update, it would never sync read items properly Jun 28 22:54:05 hello. How do I send a boolean into an AsyncTask when I call execute()? i'm extending AsyncTask, with doInBackground(Boolean... param) {}. Is that correct? Jun 28 22:54:07 pfn: it got less for me .. ever since the "feedly cloud" bs i have to manually mark everything read or articles pop back up Jun 28 22:54:18 and it still occasionally loops unread articles at the bottom forever Jun 28 22:54:26 haven't seen that happen Jun 28 22:54:34 reminds me of google reader before it got good :/ Jun 28 22:54:57 (and by good i mean passable, since it was never awesome, really) Jun 28 22:55:07 google reader never got good Jun 28 22:55:14 it put mark as read too far out of the way Jun 28 22:55:21 CocoStorm: You're trying to pass the bitmap or byte array across binder somewhere, and it's too large ( >1MB). Anything that requires you parcel your object is (more than likely) a binder transaction Jun 28 22:55:29 mark all as read or mark up-to-position as read took too many clicks Jun 28 22:55:30 clicking on an article is too far out of th weay? ;) heh Jun 28 22:55:46 yes, it's 2 operations Jun 28 22:55:50 instead of 1 button at the top Jun 28 22:55:51 in GR it was marked read as i browsed it Jun 28 22:55:58 or when i clicked it Jun 28 22:56:07 yes, clicking it and back out = fail :p Jun 28 22:56:12 Kake_Fisk: check out this example, it might help: http://www.mkyong.com/android/android-listview-example/ Jun 28 22:56:14 also, it failed to load images for a bunch of feeds Jun 28 22:56:24 also the feedly android app is crap .. back to menu and back to quit? what kind of navigation is that Jun 28 22:56:26 GR did, that is Jun 28 22:56:28 feedly does Jun 28 22:56:36 worse is menu button -> menu, then back still quits! Jun 28 22:56:45 nafailgation Jun 28 22:56:48 flipture: Thanks, I'll check it out Jun 28 22:57:12 still i'd recommend it over anything else i've tried Jun 28 22:57:15 that sounds correct.. Jun 28 22:57:16 Kake_Fisk: np Jun 28 22:57:17 newsbleh Jun 28 22:57:25 mdwright, ah what should I do? Jun 28 22:57:25 pfn: that is absolutely not correct Jun 28 22:57:39 back should always close the menu and return to what you were doing Jun 28 22:57:41 not quit the app Jun 28 22:58:01 and back shouldn't bring up the menu either Jun 28 23:08:55 CocoStorm: depends on what you're doing with the bitmap :) Jun 28 23:11:52 mdwright, saving it as a contact photo Jun 28 23:13:46 CocoStorm: You should scale the image down then Jun 28 23:15:30 TestBuilder.includeAllPackagesUnderHere() resorts to quite some trickery to get the package name of the calling class Jun 28 23:16:15 The N4 has an 8MP camera, for example, which produces photos that consume ~4.2MB -- more than 4x too large for any given binder transaction. So figure out how large it is, then scale it down to something that makes sense for a contact photo (720x720 is the highest on JB, iirc) Jun 28 23:18:44 g00s, not really just generate a stack trace then take the next frame up Jun 28 23:19:09 i thought that was cool :) never saw that trick before Jun 28 23:19:15 it's expensive but not tricky Jun 28 23:20:56 mdwright, I see, okay for sure, I will try Jun 28 23:21:55 oh sweet, there is a native java 0mq library now that works on android Jun 28 23:22:43 what's 0mg Jun 28 23:22:54 thanks mdwright Jun 28 23:23:03 Zharf 0mq Jun 28 23:23:09 not O M G Jun 28 23:23:17 or 0 M Q Jun 28 23:23:25 oops Jun 28 23:23:36 right whatever, what is it Jun 28 23:23:38 what is 0mq then heh Jun 28 23:23:41 ^^^^^ Jun 28 23:23:47 Is this a bad practice or is it okay: http://pastebin.com/4Ydb07DR I wanted a broadcastreceiver to change some text on the main UI, so it took something like this to accomplish. I have no idea how to get that receiver to change a different activity using intents. (I'm pretty new.) Jun 28 23:23:47 its a great way to talk to a backend service Jun 28 23:23:56 as long as you control that Jun 28 23:23:59 like, RabbitMQ Jun 28 23:24:43 ohh ok Jun 28 23:24:50 ampmq or wahtever protocol Jun 28 23:27:20 yeah, we use rabbitmq all over our infrastructure at my job Jun 28 23:27:34 speakingcode-wor how do you like it ? Jun 28 23:28:26 it's fast as hell i know, but i've yet to have the privelage to really do anything directly with it Jun 28 23:31:09 Can anyone take a peek at my code working with a custom ArrayAdapter and help me figure what i'm doing wrong? I'm about to tear my hear out... lol Jun 28 23:31:12 i've only been here just under 6 months, and am only starting to get into our infrastructure. had me doing some internal tooling and a couple of mobile apps i'm just wrapping up Jun 28 23:31:42 The getPosition method in the ArrayAdapter ALWAYS returns 0. It used to work before, but i broke it out into its own activity and now i can't get it to work again... Jun 28 23:31:58 flipture just write your own BaseAdapter. plenty of examples in apidemos Jun 28 23:32:17 "broke it out into its own Activity" sounds incredibly suspect Jun 28 23:32:27 speakingcode-wor: yeah, it does :) Jun 28 23:32:43 i'd help you further but i have to go, don't want to get locked in the building Jun 28 23:32:58 g00s: if it was working before like it is, i'm sure i can get it working like this agian. dont' think i need to switch completely what i'm doing... Jun 28 23:33:00 good luck tho, and if you don't have it solved by monday come back n get my attention Jun 28 23:33:03 speakingcode-wor: no wirries, lol thanks Jun 28 23:33:22 hopefull i will, will let ya know what it is... Jun 28 23:33:42 so its a custom array adapter that populates a spinner Jun 28 23:33:46 the spinner populates fine Jun 28 23:34:14 but when i'm pulling the items, i need to access them by a key instead of by position because the position no longer corresponds to the object's id Jun 28 23:34:44 So i created a SparseIntArray to hold the position and object id Jun 28 23:35:09 then I have getPosition returning the result from that sparseintarray Jun 28 23:35:16 somethings out of order i think Jun 28 23:35:20 and i've just looked at it too much Jun 28 23:35:32 becuase i have logging all over that shows the sparsearray beign populated Jun 28 23:35:55 but for wahtever reason, the value when i try to get position is 0, and also it shows up in the logs BEFORE the intarray is populated lol Jun 28 23:36:34 i swear i have the call to get the position after everything having to do with the custom adapter, setdropdownviewresource, etc... Jun 28 23:48:33 hello Jun 28 23:48:56 i need to have a layout that resembles css grids, i want to specify a span for elements to take up, from 1 to 6 Jun 28 23:48:59 what is a good way to do that? Jun 28 23:49:20 right now i have a tablerow and set span_cols, but it doesn't work as i expected Jun 28 23:52:55 Stavros: check out GridLayout Jun 28 23:53:34 mdwright: oh that looks great, thank you! Jun 28 23:58:28 Anyone have any idea how stuff inside of a custom adapter is running after the next method is called? Jun 28 23:59:35 say i run blah(), then SpinnerDataAdapter = new My...., then itemSpinner.setAdapter, then myMethod() Jun 28 23:59:54 i'm seeing the log output from myMethoc() before im seeing the logging from the adapter! Jun 28 23:59:57 :-\ Jun 29 00:01:18 flipture: where are you logging in your adapter? Probably easier to diagnose if you paste the code somewhere and give us a link. (Please, don't paste the code itself in channel) Jun 29 00:02:13 mdwright: pasted earlier but no one was available to peek. here's my latest... http://pastebin.com/nxgEF8rV Jun 29 00:02:35 mdwright: it was simpler, was mostly being called from onCreate but i've broken it apart a bit while troubleshooting Jun 29 00:03:48 mdwright: so basically, in buildEditItem(), it calls editListItem, which bilds the view and such, then addCategoriesToSpinner() makes the new dataAdapter, and spinner ands sets the adapter Jun 29 00:04:00 (this is when i would expect to see the data adapter logging Jun 29 00:04:02 ) Jun 29 00:04:26 then, i run getPosition to get the position of the item i need from a SparseIntArray, and the array is blank! Jun 29 00:04:35 right after that i can see the adapter logging setting up the adapter :-\ Jun 29 00:04:37 so confused... Jun 29 00:05:23 how can the data adapter do things AFTER the last thing i've called when i've not done anything else Jun 29 00:07:48 mdwright: and the logging is in getCustomView as you can see... Jun 29 00:09:27 mdwright: you taking a look? if not i'm going to run grab a bite :) Jun 29 00:09:33 just don't want to miss your reply if you're taking a look... Jun 29 00:10:38 flipture: Yes. getView won't be called until the spinner needs to populate itself with the views (which will happen *after* onCreate, iirc) Jun 29 00:10:51 ah dang Jun 29 00:11:07 so how do i run stuff *after* oncreate? do i need to do that in a constructor or some other way? Jun 29 00:11:22 i kinda thought that which is why i started breaking thing sout into their own methods Jun 29 00:11:29 and that makes sense just not sure how to get around it Jun 29 00:11:58 don't populate that map in getView, you have all of the data you need ahead of time Jun 29 00:12:51 should i just not do it in the arrayadapter at all? Jun 29 00:13:11 it was nice to be able to populate it as it steps through the items i feed it so i don't have to worry about it Jun 29 00:14:31 Yeah, there's no reason to Jun 29 00:15:14 ok gotcha thanks sooo much. i realize now why it was working before Jun 29 00:15:31 i had this activity lumped in with another one, and the same spinner was already populated on the first view Jun 29 00:15:44 so after it had run once, the position map was already populated :) Jun 29 00:15:49 adn i wasn't using the position map on the first view Jun 29 00:15:59 i've been fighting with this since last night... Jun 29 00:16:25 hello Jun 29 00:16:53 i'm trying to use the gridlayout, eclipse offered to install the v7 support library and did, but now it claims it can't find the GridLayout anywhere and crashes Jun 29 00:17:17 Stavros: eclipse or the app? Jun 29 00:17:23 the app, sorry Jun 29 00:17:31 eclipse says it can't find the GridLayout Jun 29 00:17:40 running the app crashes with an inflater error (because it can't find the class) Jun 29 00:19:38 Hi, how do I seperate android crap from the core code? Jun 29 00:19:53 if I couldn't make my app easily portable to any PC running Java I'd be so mad Jun 29 00:20:16 Stavros: You have to make sure GridLayout is a) in eclipse as a library project, b) in your project.properties as a library project, and c) the support v7 jar is in your libs directory. Jun 29 00:21:06 mdwright: ah, it was the jar thing, thanks Jun 29 00:21:12 silorge: you design your app properly so that it can be portable to a desktop java environment. Jun 29 00:21:14 i think it works now Jun 29 00:21:20 android is a thorn in my side due to me owning bad devices such as the Amazon Kindle Fire HD Jun 29 00:21:23 silorge: you have a few options. the easiest is probably to just put your core code in its own project and package it as a jar, which you then include in your library project Jun 29 00:21:35 s/library/android/ Jun 29 00:22:16 "wrap_content" means "be as big as the content is", right? Jun 29 00:22:20 Stavros: yes Jun 29 00:22:28 and fill_parent and match_parent are the same? Jun 29 00:22:30 Terrible stock OS, and terrible terrible audio driver for non stock OS Jun 29 00:22:32 yes Jun 29 00:22:34 thank you Jun 29 00:23:26 if only I knew enough about computer programming and the Kindle Fire HD to make the audio work Jun 29 00:23:36 what audio chip is it anyways? Jun 29 00:25:07 Texas Instruments AIC3110 Jun 29 00:27:19 Then um...why is it so hard to make it work? Jun 29 00:27:38 Kindle isn't Android :D Jun 29 00:27:42 android-based ;) Jun 29 00:27:54 The Fire models are Jun 29 00:30:27 and gee, if I really was so smart I'd ditch Linux entirely Jun 29 00:30:51 its all about software economics Jun 29 00:31:06 I'd write MTD flash drivers for GNU Hurd, port Hurd to ARM and Mesa and make Wayland run on Hurd Jun 29 00:31:21 s/Mesa/& as well/ Jun 29 00:31:40 throw Mir in there too Jun 29 00:31:43 ;) Jun 29 00:32:00 if I had all the time in the world to do all this I'd really do it Jun 29 00:32:35 Hi there, a good twitter client (that works?) I have found some client libraries, but they seem somewhat outdated (last commit from some months a go and so on) Jun 29 00:32:49 I think Im having problems because they have drop api 1 Jun 29 00:32:59 with the libs I found out Jun 29 00:34:36 g00s: Linux is so boring but I find that something is wrong with it in that writing and debugging device drivers is so much harder than writing and debugging user space programs Jun 29 00:34:39 tyoc213: didn't they ban third party clients or something? Jun 29 00:34:44 tyoc213: twicca :) Jun 29 00:34:58 Stavros: I dont know... Jun 29 00:35:02 g00s: I mean, it's boring me but it works...at least if your ok with kernel mode debugging and all that jaz Jun 29 00:35:44 and as a kernel powering a general purpose operating system it does well enough Jun 29 00:37:21 but see, Linux is high performance but if the fun of writing device drivers is not your cup of tea then it's kind of...bad Jun 29 00:38:32 Is there a way to invoke an emulator from the command line? Jun 29 00:43:17 in this example, which properties should be replaced with "app:" for it to work with the support lib? http://stackoverflow.com/a/11870823/28196 Jun 29 00:45:12 oh got it, thanks Jun 29 00:52:15 jalcine: http://developer.android.com/tools/help/emulator.html#startup-options Jun 29 00:54:30 thanks RyanM; that was a bit obscured :) Jun 29 01:32:14 mdwright: You were right, that fixed it... Again, i appreciate the help. Jun 29 01:32:23 i knew there was something I was missing about the behavior of the adapter... Jun 29 01:34:37 * pfn hates it when apps get large, testing is such a pita Jun 29 01:34:54 unless you wrote the tests while you wrote the app Jun 29 01:34:58 there's millions and millions of free testers out there! Jun 29 01:50:47 What do you prefer landscape or portrait games? Jun 29 02:12:36 depends on the game, the orientation doesn't matter itself Jun 29 02:12:47 I prefer whichever orientation makes sense for the game being played Jun 29 02:12:59 the choice of orientation doesn't affect which game I'll play Jun 29 02:13:23 same here, since I don't play games on my droid.. Jun 29 02:16:11 How do you guys store your initial default setting for a preference? Jun 29 02:16:49 guys I want to create a notification that goes off once every 24 hours. Everything online suggests using an AlarmManager. Should the alarm manager launch a service or a broadcast service? Jun 29 02:20:48 depends on what you're doing Jun 29 02:20:57 notifications don't need a service Jun 29 02:21:13 broadcast receivers are transient and work for the purposes of posting a service Jun 29 02:26:03 pfn: To be honest this is my first app i'm not exactly sure of the scope i'm working with. How would you suggest I go about creating a notification that goes off once every 24 hours? Jun 29 02:26:24 an alarm manager into a broadcast into a notification Jun 29 02:26:28 if that's all you're trying to accomplish Jun 29 02:26:44 and it's not a broadcast service, it's just a receiver Jun 29 02:26:50 your app wakes up to receive the broadcast, then it goes away Jun 29 02:27:08 pfn: gotcha. Will this work even if the phone is restarted? Jun 29 02:27:30 all alarms set in the alarm manager must be configured at BOOT Jun 29 02:27:54 you will need to have a broadcast receiver receive the boot broadcast, and request permissions to receive it, as well Jun 29 02:28:25 pfn: perfect this puts me on the right track, I think I can get it from here Jun 29 02:33:02 Hi Jun 29 02:33:09 any1 backed up TA partition ? just want to know the filesize Jun 29 02:33:24 Question, is there any way to decompress a .dex to edit a single file inside and then re-dex it? same as with a .jar? Jun 29 02:33:30 I guess it's not zip,. is it? Jun 29 02:33:52 use baksmali and smali Jun 29 02:33:57 dex is bytecode Jun 29 02:33:59 not a zip Jun 29 02:35:07 Bytecode only? what about resources, shoved in a .dex? Jun 29 02:35:15 Oh my. Jun 29 02:35:15 resources don't go in the dex Jun 29 02:35:20 dex is bytecode only Jun 29 02:35:21 Yeah I see my error Jun 29 02:36:25 An apk is simply a .zip... right? Jun 29 02:36:39 I can de-re zip it easily like a jar right? Jun 29 02:53:13 What is the difference between LocationManager and google services LocationClient Are they connected in any way? trying to figure out which one should i be using or should i use both? Jun 29 02:54:36 Activity A starts activity B, if I press back from B, A is resumed, if I press the Up navigation button, A is destroyed and recreated Jun 29 02:54:41 my question is, why? Jun 29 02:54:47 the destroy/create cycle is unneccessary Jun 29 02:59:04 how should we initially populate preferences? Jun 29 02:59:10 as a string in strings.xml? Jun 29 02:59:15 that sounds cludgy to me **** ENDING LOGGING AT Sat Jun 29 02:59:58 2013